Table filling method and related equipment

By performing structure recognition and content analysis on the form, recommended options are generated and intelligent filling is performed, which solves the problem of time-consuming and labor-intensive manual filling of electronic forms and realizes an efficient and accurate form filling process.

CN121960409APending Publication Date: 2026-05-01GUANGZHOU KINGSOFT MOBILE TECH +3
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU KINGSOFT MOBILE TECH
Filing Date
2025-12-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, filling out electronic forms requires manual operation, which is time-consuming, labor-intensive, and prone to errors and omissions, resulting in low efficiency.

Method used

By performing structure and content recognition on the forms to be processed, recommended rule templates are generated and modified according to the prompts for filling in the forms, thus achieving automated and intelligent form filling.

Benefits of technology

It improves the efficiency and accuracy of form filling, reduces the burden on users, lowers the error rate, and provides real-time error correction prompts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121960409A_ABST
    Figure CN121960409A_ABST
Patent Text Reader

Abstract

The invention discloses a table filling method and related equipment, and the method comprises the steps: carrying out the table structure and table content processing of a to-be-processed table, and obtaining to-be-filled cells; filling recommendation options generated by the rule template matched with the to-be-filled cell to obtain a filling table; and performing modification according to the prompt information of the filling table to obtain a target table. According to the embodiment of the invention, the automation and intelligence degrees of table processing are improved, and the method can be widely applied to the technical field of computers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a form filling method and related equipment. Background Technology

[0002] In daily work and life, we need to fill out a large number of forms, such as various questionnaires, office forms, and application forms. With the development of computer technology, related technologies use image recognition technology to convert paper forms into electronic forms for automated processing. However, in practical applications, it has been found that electronic forms still need to be filled out manually, which not only consumes a lot of time and energy, but is also prone to errors and omissions, reducing the efficiency of form filling. Summary of the Invention

[0003] The main objective of this application is to provide a form filling method and related equipment. By automating and intelligently processing the form filling, the form content can be filled in quickly and accurately, thereby improving the efficiency and quality of form filling.

[0004] To achieve the above objectives, one aspect of this application provides a method for filling out a form, including: The table to be processed is processed in terms of both structure and content to obtain the cells to be filled. The recommended options generated by the rule template that matches the cells to be filled are used to fill in the cells, resulting in a filled table; Modify the form according to the prompts provided to obtain the target form.

[0005] In some embodiments, the processing of the table structure and content to obtain cells to be filled includes: The table data is obtained by identifying the table structure and table content of the table to be processed; The cells to be filled are identified based on the cell recognition of the table data.

[0006] In some embodiments, the step of identifying the table structure and table content of the table to be processed to obtain table data includes: The table to be processed is then processed to obtain the table structure; The table data is obtained by recognizing the table content of the table to be processed based on the table structure.

[0007] In some embodiments, the step of identifying the table content of the table to be processed based on the table structure to obtain the table data includes: Based on the table structure, table position features and table text features are extracted from the table to be processed. The table style is obtained by recognizing the style of the table to be processed based on the table position features and the table text features; Semantic analysis is performed on the text features of the table to obtain the semantic features of the table; The table data is obtained by recognizing the content of the table to be processed based on the table style and the table semantic features.

[0008] In some embodiments, the cell identification based on the table data to obtain the cell to be filled includes: The table data is divided into header cells and item cells; Blank cells are obtained by identifying blank areas in the table entry cells; The cell to be filled is obtained by performing data recognition on the blank cell based on the header cell.

[0009] In some embodiments, the step of identifying the blank cell based on the header cell to obtain the cell to be filled includes: The header text is obtained by extracting the text content from the header cells. Semantic analysis and keyword mapping are performed on the header text to obtain the data type to be filled in; The blank cells are used to identify the cell position to obtain the coordinates of the data to be filled in; The cell to be filled is determined based on the data type to be filled and the coordinates of the data to be filled.

[0010] In some embodiments, the step of filling the table with recommended options generated from a rule template that matches the cell to be filled, to obtain a filled table, includes: Based on the rule template matching the cell to be filled, the data in the table to be processed is generated to obtain recommended options; The table to be processed is filled with the recommended options to obtain a filled table.

[0011] In some embodiments, the step of generating recommended options from the table to be processed based on the rule template corresponding to the cell to be filled includes: The rule template is obtained by performing rule matching on the cells to be filled; The context of the cell to be filled is analyzed and mapped based on the rule template to obtain the matching content; The matched content is validated and fault-tolerantly generated to obtain recommended options.

[0012] In some embodiments, the step of performing rule matching on the cell to be filled to obtain a rule template includes: Based on the data type of the cell to be filled, a first template set is obtained by matching the data format of the preset template; The templates in the first template set are matched and filtered according to rules to obtain the second template set; The rule templates are obtained by filtering the second template set based on the header similarity threshold.

[0013] In some embodiments, the step of filtering the second template set based on a header similarity threshold to obtain the rule template includes: The target header data corresponding to the cell to be filled is determined based on the coordinates of the data to be filled in the cell. The target header data and the template header data in the second template set are respectively input into the encoder for processing to obtain the target vector and the template vector; A similarity score is obtained by calculating the cosine similarity between the target vector and the template vector; The similarity scores are compared based on the header similarity threshold, and the templates in the second template set are filtered according to the comparison results to obtain the rule templates.

[0014] In some embodiments, the step of analyzing and mapping the context of the cell to be filled based on the rule template to obtain the matching content includes: The header of the cell to be filled is analyzed for correlation, and the contents of adjacent cells are analyzed to obtain analytical data; The matched content is obtained by matching the table entries in the analyzed data based on the rule template.

[0015] In some embodiments, modifying the target table according to the prompts in the table filling section to obtain the target table includes: The filled table is subjected to content detection and prompt generation processing to obtain prompt information; The target table is obtained by modifying the filled table based on the prompt information.

[0016] In some embodiments, the content detection and prompt generation process performed on the filled table to obtain prompt information includes: The data logic is obtained by identifying the data logic of the filling table; The quality of the filled table is detected based on the data logic to obtain the detection result; The detection results are converted into natural language to obtain the prompt information.

[0017] In some embodiments, the step of performing data logic identification on the filled table to obtain data logic includes: The filled table is subjected to target detection processing to obtain cell data; The cell data is subjected to image segmentation and feature extraction to obtain location features; The cell data is subjected to semantic recognition processing to obtain semantic features; Based on the location features and semantic features, the cell data is subjected to hierarchical relationship analysis to obtain the data logic.

[0018] In some embodiments, the step of detecting the quality of the filled table based on the data logic to obtain a detection result includes: The filled table is subjected to integrity detection processing to obtain a first detection score; The data logic is used to perform a consistency check on the filled table to obtain a second check score. The accuracy of the filled table is detected based on the data logic to obtain a third detection score. The first detection score, the second detection score, and the third detection score are weighted and summed to obtain the detection result.

[0019] In some embodiments, modifying the filled table based on the prompt information to obtain the target table includes: Based on the aforementioned prompt information, the cell to be modified is indicated in the fill table; The prompt information is displayed on the interactive interface, and interactive instructions are received through the interactive interface; The target table is obtained by generating and replacing the content of the cell to be modified based on the interactive instructions.

[0020] Another aspect of this application embodiment provides a form filling system, including: The cell module is used to process the table structure and content of the table to be processed, and to obtain the cells to be filled. The fill module is used to fill in the recommended options generated by the rule template that matches the cell to be filled, so as to obtain a filled table; The modification module is used to modify the target table based on the prompts provided in the table filling section.

[0021] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0022] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.

[0023] This application also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.

[0024] The embodiments of this application include at least the following beneficial effects: This invention provides a form filling method and related equipment. This solution obtains table data by performing table structure and content recognition processing on the table to be processed, and then performs cell recognition processing on the table data to obtain the cells to be filled. This accurately identifies the table structure and content, improving form filling efficiency. Furthermore, this solution generates recommended options by matching the corresponding rule template to the cells to be filled with, and then fills the table with the recommended options to obtain a filled table. This automatically generates recommended options for form filling, improving the automation and intelligence of form filling. Moreover, this solution obtains prompt information by performing content detection and prompt generation processing on the filled table, and then modifies the filled table based on the prompt information to obtain the target table. By automating and intelligently processing the table, the embodiments of this application enable fast and accurate form filling, improving the efficiency and quality of form filling and reducing the burden on users. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a form-filling method provided in an embodiment of this application; Figure 3 This is a flowchart illustrating a table structure and content recognition method provided in an embodiment of this application; Figure 4 This is a flowchart illustrating cell recognition provided in an embodiment of this application; Figure 5 This is a flowchart illustrating the generation of a recommended option provided in an embodiment of this application; Figure 6 This is a flowchart illustrating the generation of a prompt message according to an embodiment of this application; Figure 7 This is a flowchart illustrating the modification of table content provided in an embodiment of this application; Figure 8This is a schematic diagram of a business process provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a form filling system provided in an embodiment of this application; Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0027] It is understood that the terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this invention 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 used can be interchanged where appropriate so that embodiments of the invention 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 a 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.

[0028] It should be understood that in this invention, "at least one (item)" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit the scope of the invention.

[0030] Before providing a detailed description of the embodiments of this application, some related technologies involved in the embodiments of this application will be described first, as follows: Artificial intelligence (AI) is a new technological science that studies and develops theories, methods, technologies, and application systems to simulate, extend, and expand human intelligence. AI is a branch of computer science that attempts to understand the nature of intelligence and produce new intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems.

[0031] Large Language Models: Large language models are an application of deep learning, particularly in the field of Natural Language Processing (NLP). These models aim to understand and generate human language. To achieve this, the models need to be trained on large amounts of text data to learn various patterns and structures of language. Large language models are trained to understand and generate human language in order to engage in effective conversations and answer various questions.

[0032] This application provides a form-filling method and related equipment, relating to the field of computer technology. The form-filling method provided in this application can be applied to a terminal, a server, or software running on a terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited thereto; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application implementing the form-filling method, but is not limited to the above forms.

[0033] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0034] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.

[0035] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided in an embodiment of this application. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.

[0036] Server 101 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0037] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.

[0038] Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc. It can also be a vehicle-mounted terminal of the various device types described above, but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment does not impose any limitations.

[0039] It should be noted that in relevant technical scenarios, a large number of forms need to be filled out, such as various questionnaires, office forms, and application forms. In related technologies, image recognition technology can convert paper forms into electronic forms for automated processing; however, the content still needs to be manually filled in. Manual form filling is not only time-consuming and labor-intensive, but also prone to errors and omissions due to human factors. Therefore, this application proposes a form filling method. This method enables automated and intelligent form filling, allowing for quick and accurate completion of form content. Furthermore, this application can monitor the accuracy of the filled-in content in real time during the filling process. When errors or incomplete information are detected, timely correction prompts and reasonable suggestions are provided, improving the accuracy of form filling, reducing the error rate generated by the large language model, and enhancing the generalization of form filling. Moreover, this application allows for customized filling rules and templates based on different form types and usage scenarios, meeting personalized filling needs and improving the practicality of form filling.

[0040] Exemplary based on Figure 1 The implementation environment shown in this application embodiment provides a form filling method, which will be described below using the application of this form filling method in terminal 102 as an example. It is understood that this method can also be applied to server 101. When the method of this application embodiment is applied to server 101, it can be presented on a software system or in a mini-program. When the method of this application embodiment is applied to terminal 102, it can be used through office software on a terminal such as a smartphone or personal computer. For example, the method of this application embodiment can be used in, for example, the WPS 365 one-stop AI office platform. This application embodiment can identify and automatically fill in the form to be processed. The filled form can be bound to the associated accounts of various products in the WPS 365 office scenario, and then the form content can be viewed or edited on the aforementioned meeting application platform through the associated accounts. This facilitates users to share, view, or modify the form content through professional and intelligent meeting applications, and has a wide range of applications.

[0041] Please see Figure 2 , Figure 2 The flowchart illustrates a form-filling method provided in this application embodiment. The executing entity of this method can be any of the aforementioned computer devices (including servers or terminals). See also... Figure 2 The method may include: Step S201: Process the table structure and content of the table to be processed to obtain the cells to be filled; Step S202: Fill the recommended options generated by the rule template that matches the cell to be filled in to obtain a filled table; Step S203: Modify the form according to the prompts for filling in the form to obtain the target form.

[0042] In this embodiment, Optical Character Recognition (OCR) and Natural Language Processing (NLP) technologies can be used to recognize and process the structure and content of the table to be processed, obtaining corresponding table data. This table data may include table headers, table items, filled-in table content, and filling requirements. Then, the cells requiring content to be filled are identified, and the cells to be filled are determined. Data is generated for the table by matching the cells to be filled with corresponding rule templates. Based on user-provided data sources or historical filling records, the system can automatically match the corresponding items in the table and generate recommended options for the user to fill in. The user can select and fill in the table according to the recommended options, or set an auto-fill command to automatically fill in the generated recommended options into the table. The user can then modify and confirm the information according to actual needs. Simultaneously, the system will monitor the accuracy of the filled content in real time during the filling process. When errors or incomplete information are found, timely error correction prompts and reasonable suggestions are provided, generating corresponding prompt information. Based on the generated prompt information, the filled table can be modified to obtain the target table.

[0043] For example, in one embodiment, a user can open a form to be processed through an application. In the human-computer interaction interface, the user can obtain the corresponding form by clicking the application's open component, and the form is displayed in the application's interactive interface. In general scenarios, the user can automatically fill in the form by waking up the intelligent assistant, or interact with the form to automatically generate corresponding content for filling it in via the system's received interactive instructions. This embodiment allows the intelligent assistant to receive task instructions for form filling. Additionally, the user can communicate with the intelligent assistant via voice or phone calls. For example, the user can input task instruction text into the intelligent assistant's interactive dialog box to instruct the assistant to fill in the form. The user can also obtain task instructions input via voice or phone calls to fill in the form, making the form filling process highly intelligent and more convenient to use.

[0044] In step S201 of some embodiments, the processing of the table structure and content of the table to be processed to obtain the cells to be filled includes: The table data is obtained by identifying the table structure and table content of the table to be processed; The cells to be filled are identified based on the cell recognition of the table data; Please see Figure 3 In some embodiments, table data is obtained by identifying the table structure and table content of the table to be processed, including: Step S301: Process the table to be processed to obtain the table structure; Step S303: Based on the table structure, the table content of the table to be processed is identified to obtain the table data.

[0045] Specifically, a table to be processed refers to a table that requires data entry. A table is a structure that organizes and displays data in rows and columns, and it can be widely used in data analysis, statistics, and information presentation. Tables to be processed can be obtained through user-input data retrieval commands. These commands can be triggered by inputting specific controls in a computer application interface, retrieved from a database or folder based on a user's voice command, or obtained through other pre-configured trigger commands, such as opening the corresponding table from the history of office software. The table structure refers to the physical layout of the table, including rows, columns, cells, and information such as cell merging relationships, hierarchical structure, and logical partitioning. Table content refers to the specific information entities contained in each cell, such as text, links, numbers, dates, or formulas.

[0046] In this embodiment, after obtaining the table to be processed, the corresponding table data can be obtained by recognizing the structure and content of the table. It is conceivable that this embodiment can also use an intelligent assistant combined with human-computer interactive dialogue to obtain and perform related recognition processing on the table to be processed. Table data refers to data containing table structure and content, such as forms, table items, text content, images, etc. An intelligent assistant is an intelligent agent that integrates multiple capabilities such as super search, task instructions, application scheduling, and general question answering, enabling multi-capability collaborative operation. This embodiment can use a large language model or an intelligent assistant to recognize and process the table structure and content of the table to be processed, thereby obtaining the table data.

[0047] In step S301 of some embodiments, the table to be processed is processed to obtain a table structure, including: The table to be processed is subjected to boundary detection and positioning to obtain the table region; For example, embodiments of this application can define candidate table regions by detecting continuous straight or dotted lines in a document, such as analyzing the blank spaces between aligned cells by detecting border lines, and identifying the regular grid-like arrangement pattern of text blocks within a region. Embodiments of this application can also use an object detection neural network trained on a large amount of labeled data, taking the entire page image as input. In embodiments of this application, the global and local visual features of the table are directly learned through a large language model, and the precise bounding rectangle coordinates of the table region are output, thereby locating the table region.

[0048] The table area is processed to detect table lines and cells to obtain the table structure; Specifically, table lines refer to the straight or dashed lines used visually to divide and define the rows, columns, and outer boundaries of a table. These can include outer border lines and internal dividing lines. The outer border line is the closed frame that forms the outermost edge of the table. Internal dividing lines include horizontal lines used to separate rows and vertical lines used to separate columns. A cell is the most basic, indivisible rectangular area in a table, divided by adjacent table lines or virtual boundaries. It is the smallest unit that holds table content, such as text or numbers.

[0049] In this embodiment, table regions can be located and bounding boxes of all cells can be identified using object detection models or semantic segmentation models. Then, for wired tables, a line-based detection method can be used, employing Hough transform or convolutional neural networks to detect horizontal and vertical lines, and then generating cells through line segment intersection analysis. For wireless or complex tables, an end-to-end structure prediction model, such as a Transformer-based model, is directly used for detection. This model can simultaneously understand the text content and visual layout of the table, directly predicting the row-to-row or column-to-column relationships and hierarchical structure of cells. Finally, combining visual and textual features, graph neural networks or relationship inference modules can be used to infer row-to-column associations and merging relationships in the detected cells, outputting a complete, machine-readable description of the table structure.

[0050] It should be noted that the object detection model, semantic segmentation model, and other model structures described in the embodiments of this application can be deployed in an application. When a form to be processed is obtained through the application and filled out, the form can be input into the model, which will then recognize and process the form. In some embodiments, task instructions can also be input through the human-computer interaction interface of an application, such as office software, and a smart assistant can automatically fill out the form. This smart assistant can integrate model structures such as object detection models and can call different models for form filling.

[0051] In addition, the file format of the table to be processed may include table format, image format, portable document format. After receiving the task instruction input by the user, this embodiment of the application can obtain the table to be processed from the corresponding storage location through the intelligent assistant. The storage location may be, for example, a cloud server, the local storage of the terminal device, or the storage of any node on the blockchain, etc., and is not limited here.

[0052] For example, in the human-computer interaction interface of office software, a dialog box can be displayed. During text input, the user can use the @ symbol to retrieve a table to be processed, then upload the table to a smart assistant for interpretation. In subsequent task processing, the user can communicate and execute tasks based on the smart assistant's interpretation. The smart assistant uses an object detection model to detect table lines and cells within the table area, thereby obtaining the table structure.

[0053] In step S302 of some embodiments, the table data is obtained by identifying the table content of the table to be processed based on the table structure.

[0054] In this embodiment of the application, the table to be processed can be identified based on the visual layout detected in the table structure, thereby performing feature extraction and semantic feature recognition on the table to obtain table data. Specifically, a convolutional neural network can be used to extract features from the table to obtain feature data such as position features, text features, and semantic features. Furthermore, the semantics of the table can be recognized, such as the semantic recognition of the table header and title, and the data items already filled in the table can also be recognized to obtain table data, which includes the structural information and content information of the table to be processed.

[0055] One of the above technical solutions has the following advantages or beneficial effects: The embodiments of this application obtain the structure of the table by detecting and locating the boundary of the table to be processed, and perform content recognition on the table to be processed according to the table structure to extract the corresponding table data, which can accurately identify the structure and content of the table and improve the table recognition efficiency.

[0056] For example, in step S302 of some embodiments, the step of identifying the table content of the table to be processed based on the table structure to obtain the table data includes: Based on the table structure, table position features and table text features are extracted from the table to be processed. The table style is obtained by recognizing the style of the table to be processed based on the table position features and the table text features; Semantic analysis is performed on the text features of the table to obtain the semantic features of the table; The table data is obtained by recognizing the content of the table to be processed based on the table style and the table semantic features.

[0057] Specifically, table positional features refer to the geometric and topological attributes of the table and its cells at the visual level, including the overall bounding box coordinates of the table, the precise coordinates and area of ​​each cell, the row and column alignment relationships between cells, cross-row or cross-column structures, and the relative spatial positions between cells. Table text features refer to the content information within cells, including the extracted plain text string, the language type and semantic content of the text, the text layout style, and the alignment of the text within the cell. Table style features refer to the visual appearance and presentation format of the table, including the cell border line style, fill color, font style, text alignment, and overall background color. Table semantic features are used to reveal the table's internal logical structure and role definition, and can describe the function of table elements, such as identifying which rows or columns are headers, which are data bodies, which cells are merged cells, and their merging methods. This application's embodiments can better understand the table's organizational logic by recognizing its semantic features. Table data refers to the specific objects being analyzed and processed, including specific numerical, text, or other types of data values ​​extracted from table cells and after cleaning and structuring.

[0058] In some embodiments, table position features and table text features are extracted from the table to be processed based on the table structure; In this step, this embodiment calculates the precise bounding box of each cell from the coordinate data of the table structure and establishes an adjacency matrix based on the row and column indices of the cells to quantify the horizontal or vertical adjacency relationship between cells. Then, by comparing the coordinates of the bounding boxes, the alignment features between cells are calculated, and a normalized relative position code is generated for each cell to obtain the table position features. This embodiment also performs spatial association matching based on the coordinates of text blocks output by the text recognition engine and the cell bounding boxes, for example, by using intersection-union ratio or center point inclusion judgment, to correctly assign the text to its respective cell. Then, the original text within the cell is cleaned, the data type is identified, and the cleaned text is used to generate semantic embedding vectors through a pre-trained language model to obtain the table text features.

[0059] In some embodiments, the table style is obtained by recognizing the style of the table to be processed based on the table position features and the table text features; In this step, the extracted table position features and table text features are paired and combined on a cell-by-cell basis. Through feature fusion processing, a structured feature set is obtained, where each cell corresponds to a feature vector that contains both its spatial position attribute and text semantic attribute. Then, based on the position features in this feature set, the relative positional relationship between the coordinates of the text block within the cell and its cell bounding box is analyzed. Furthermore, by utilizing the visual style vector in the text features, a lightweight classifier is used to determine the relevant styles of the text, such as bold and italic, to classify the font style. This embodiment also performs line detection on the table structure, extracts the cell edge areas from the table to be processed, and uses an image classification model to identify the specific line type. This embodiment can also extract the corresponding area based on the cell position coordinates, calculate its primary color, and identify whether there is a background fill color. In addition, this embodiment can also identify the professional layout style of the table based on the alignment distribution of all cells. This embodiment analyzes the geometric relationships and visual attributes in the feature set, making the implicit visual styles explicit into quantifiable and reusable style rules, thereby identifying the table style and obtaining the table style.

[0060] In some embodiments, semantic analysis is performed on the table text features to obtain table semantic features; In this step, semantic analysis of the table text features allows for the determination of the text type for each cell based on a combination of rules and statistical models. This embodiment of the application semantically annotates the table by recognizing the table header and the data body. For example, cells located at the edge of a row or column are identified as table headers based on their positional characteristics, and cells containing general terms in their textual features, as well as those with bold or centered text styles, are also identified as table headers. After determining the table header, the semantics of the data cells can be determined through their row-column mapping relationship with the table header. For example, a cell located below the "Price" column has the semantic feature of "product price".

[0061] In some embodiments, the table data is obtained by identifying the content of the table to be processed based on the table style and the table semantic features.

[0062] In this step, the semantic features of the table can be enhanced or supplemented based on the identified table style. For example, if the identified table style is a bold and centered text block located in the first row, the confidence that it is identified as a table header can be strengthened. This application embodiment constructs a data model using table semantic features as its framework. By using the identified table header semantics as field names and the cell content of the data area directly below or to the right of the header as the corresponding values, the data is organized into key-value pairs or lists by rows or columns to obtain the corresponding table data.

[0063] One of the above technical solutions has the following advantages or beneficial effects: By performing feature extraction and semantic recognition on the table, the embodiments of this application can understand the meaning, hierarchy and internal relationship of the table, thereby providing accurate input for the automatic filling of subsequent content.

[0064] Please see Figure 4 In some embodiments, the step of identifying the cell to be filled based on the table data includes: Step S401: Divide the table data into header cells and item cells; Step S402: Identify the blank areas of the table entry cells to obtain blank cells; Step S403: Based on the header cell, perform data recognition on the blank cell to obtain the cell to be filled.

[0065] In this embodiment, by identifying the obtained table data, it is possible to determine which tables in the table to be processed need to be automatically filled, thereby identifying the cells to be filled. This embodiment can identify the table regions and, based on the parsed semantic and style features of the tables, initially locate candidate regions. Next, inference is made based on the contextual relationships of the cells, such as blank cells that abruptly appear in consecutive data rows, or blank cells located to the right of explicit question description text. For questionnaires or forms, a predefined form template library can also be used for pattern matching. Finally, through a rule engine or lightweight classification model that integrates semantics, style, and contextual logic, a structured list marking the locations of all cells to be filled and their expected data types is output, thereby accurately identifying the table regions that need to be filled by the user or system.

[0066] In step S401 of some embodiments, the table data is divided into header cells and item cells.

[0067] In a table, header cells are descriptive cells used to define data attributes or categorization dimensions. They act as "labels" or "titles" for the data, typically containing summary text. They are usually located in the top row or leftmost column of the table, and their core function is to provide semantic explanations for the data columns below or the data rows to the right. Item cells, on the other hand, are cells in the table that contain specific data instances, including actual values, text, or other information.

[0068] Specifically, this embodiment identifies cells with significant visual differences in tabular data using a target recognition model, and determines the header cell region by analyzing the semantics of the cell text. Then, based on the identified cell physical coordinates and logical merging relationships, a row and column grid index of the table is constructed, with continuous areas typically defined as the table item region. For merged cells spanning rows / columns, the resulting hierarchical structure is identified. For example, a top-level header "2023" spanning two columns might have two sub-headers "First Quarter" and "Second Quarter." The system reconstructs the tree hierarchy by analyzing merging relationships and text indentation or alignment, and verifies whether the candidate header text can reasonably summarize the content theme of all table items below or to the right. This embodiment can robustly handle various table layouts, accurately dividing headers and table items, laying a solid foundation for subsequent data extraction and semantic understanding.

[0069] In step S402 of some embodiments, blank cells are obtained by identifying blank areas of the table entry cells.

[0070] In this embodiment, a pixel analysis method is used to determine whether a cell is visually empty, for example, by calculating the pixel density and color variance of the area of ​​the image to be cropped from the cell, or by using an edge detection operator. At the same time, combined with the confidence output of the text recognition engine, if the engine does not recognize any text or returns an extremely low confidence score, it is marked as a candidate blank cell, thus obtaining a blank cell.

[0071] In step S403 of some embodiments, the blank cell is identified based on the header cell to obtain the cell to be filled.

[0072] In this embodiment, keyword matching and knowledge base mapping are performed by parsing the text of the header cells. For example, if the text of the header cell is identified as "contact number" or "date of employment," the expected data type of the column can be inferred through predefined keyword-type mapping rules or industry knowledge bases. Then, the table function and business rules are identified by analyzing the data of non-blank cells in the same column. By using a natural language processing model to analyze the deep semantics of the header, an enhanced list of blank cell annotations is generated. Each blank cell is not only marked as "to be filled," but also includes the expected data type, format constraints, and possible value references.

[0073] One of the above technical solutions has the following advantages or beneficial effects: The embodiments of this application can identify cells in table data to obtain cells to be filled through structural division and blank area recognition, which can provide accurate guidance for intelligent form filling, data completion or form verification, thereby improving the accuracy of form filling.

[0074] For example, in step S403 of some embodiments, the step of obtaining the cell to be filled by data recognition of the blank cell based on the header cell includes: The header text is obtained by extracting the text content from the header cells. Semantic analysis and keyword mapping are performed on the header text to obtain the data type to be filled in; The blank cells are used to identify the cell position to obtain the coordinates of the data to be filled in; The cell to be filled is determined based on the data type to be filled and the coordinates of the data to be filled.

[0075] In some embodiments, the header text is obtained by extracting the text content of the header cell; In this step, based on the table header coordinate area obtained from the table structure analysis, an Optical Character Recognition (OCR) engine is applied to recognize and extract the original character sequence from the header cells. For common header merged cells and multi-level structures, this embodiment further reassembles fragmented text based on the cell merging attributes, ensuring that cross-row and cross-column title text is completely concatenated. Finally, through text cleaning and normalization, and semantic role labeling, pre-trained models or rules can be used to determine whether the text is a field name, unit, or hierarchical identifier, thereby outputting structured header text and its associated semantic type.

[0076] In some embodiments, semantic analysis and keyword mapping are performed on the header text to obtain the data type to be filled in; In this step, the extracted header text is processed through word segmentation, part-of-speech tagging, and entity recognition, and its semantic vector representation is obtained using a pre-trained language model. Then, through a multi-level mapping strategy, direct matching is performed using keywords or regular expression rule bases, and semantic association reasoning is performed by combining domain knowledge graphs or ontology bases. Ambiguity resolution can also be performed by referring to the context of adjacent or similar headers in the same table, thereby determining the data type of the data to be filled in the cells.

[0077] In some embodiments, cell position recognition is performed on the blank cell to obtain the coordinates of the data to be filled; In this step, blank cells are quickly identified using content inspection based on the parsed structured table data, which includes the row and column indices, bounding box coordinates, and merge attributes of each cell. Subsequently, a semantic filter is used to exclude decorative or invalid blanks based on the field types of their associated header fields and their context within the data area. Finally, the location information of the blank cells to be filled is directly extracted from the table structure data, yielding the coordinates of the data to be filled.

[0078] In some embodiments, the cell to be filled is determined based on the data type to be filled and the coordinates of the data to be filled; In this step, cells are labeled based on the data type and coordinates of the data to be filled. Specifically, the coordinates of the data to be filled are precisely matched with the structured cell location index of the table, and the specific blank cell is located through coordinate inclusion relationships or nearest neighbor search. Then, type consistency checks are used to compare the semantics of the associated table header of the blank cell with the data type to be filled to verify whether they match; at the same time, the data pattern in the same column is also used for verification. Finally, only when the cell located by the coordinates is blank and its expected data type is consistent with the data type to be filled is it determined as the final cell to be filled, and the complete cell identifier is output.

[0079] One of the above technical solutions has the following advantages or beneficial effects: This application embodiment, through semantic analysis and keyword mapping of the header text, can accurately identify the data type that needs to be filled in, improving the accuracy of automatic data filling. Furthermore, by identifying the location of blank cells, coordinate annotations can be provided, providing a positional basis for subsequent automatic data entry.

[0080] In step S202 of some embodiments, the step of filling the table with recommended options generated from the rule template that matches the cell to be filled, to obtain a filled table, includes: Based on the rule template matching the cell to be filled, the data in the table to be processed is generated to obtain recommended options; The table to be processed is filled with the recommended options to obtain a filled table.

[0081] Please see Figure 5 In some embodiments, the step of generating recommended options from the table to be processed based on the rule template corresponding to the cell to be filled includes: Step S501: Perform rule matching on the cell to be filled to obtain a rule template; Step S502: Analyze the context of the cell to be filled based on the rule template and map the matching content. Step S503: Verify and generate recommended options by verifying the matched content and performing fault tolerance.

[0082] In this embodiment, matching options can be generated by matching the rule template corresponding to the cell to be filled. The generated data can be displayed to the user for selection, or it can be directly filled into the table for subsequent confirmation or modification by the user. This rule template can be defined according to different table types and usage scenarios, or it can be generated based on historical usage records. For example, for content in the table that is not intended to be saved or recommended, a blacklist can be added to the template. Synonyms on the blacklist will neither be saved nor recommended. In this embodiment, the corresponding content in the rule template can be matched with the annotations in the cell to be filled, thereby generating corresponding recommended options.

[0083] In this embodiment, when one cell in the cells to be filled is selected and filled with the first content, the content associated with the first content can be automatically filled into the other cells of the cell to be filled. The first content and the associated content can be the same or different content. For example, if "Name A" is entered in the cell to be filled, "Name A" and "Number B, Link C" are associated content. Therefore, when "Name A" is entered, "Number B, Link C" will be identified and filled into the matching cells of the cell to be filled. Here, "Name A" and "Number B, Link C" are associated content, so selecting either "Name A" or "Number B, Link C" will bring up the other two associated contents. Of course, multiple cells in the cell to be filled can be selected simultaneously, and "Name A, Name B" can be entered. Accordingly, multiple other cells will match the content associated with "Name A" and "Name B" respectively. When modifying the filled content, for example, changing "Name A" to "Name B", the content associated with Name A will be replaced with the content associated with Name B. When using a template, the processing procedure is the same as in this embodiment.

[0084] In step S501 of some embodiments, the step of performing rule matching on the cell to be filled to obtain a rule template includes: Based on the data type of the cell to be filled, a first template set is obtained by matching the data format of the preset template; The templates in the first template set are matched and filtered according to rules to obtain the second template set; The rule templates are obtained by filtering the second template set based on the header similarity threshold.

[0085] The rule templates are predefined templates that can be constructed based on tables in the history or user-defined rules. The first template set refers to the set of templates that match the data type to be filled in the cell, and the second template set refers to the set of templates filtered by rule matching.

[0086] In some embodiments, a first template set is obtained by performing data format matching on a preset template based on the data type to be filled in the cell to be filled; In this step, by precisely mapping the data type of the cell to be filled to the format constraints defined in the template, the rule engine can verify whether the data type meets the format requirements of the template field. At the same time, by combining type compatibility assessment and format similarity calculation, templates that are fully compatible or can be compatible after standardization conversion are selected from the candidate templates. If the same data type corresponds to multiple format templates, they are prioritized according to the matching consistency of the context field and the historical fill success rate, so as to obtain the set of templates that match the format constraints, and thus obtain the first template set.

[0087] In some embodiments, the templates in the first template set are subjected to rule matching and filtering to obtain a second template set; In this step, an inverted index is built using the core semantics of the table header through rapid retrieval based on key fields, quickly filtering out completely irrelevant templates. Then, structured rule matching is performed on the initially screened templates to calculate the comprehensive matching degree between each template and the cell to be filled in three dimensions: "coverage of required fields", "compatibility of data type and format constraints", and "fit of field arrangement order". Finally, the templates are further screened and sorted using preset confidence thresholds and conflict resolution rules to obtain the second template set.

[0088] In some embodiments, the rule templates are obtained by filtering the second template set based on a header similarity threshold, including: The target header data corresponding to the cell to be filled is determined based on the coordinates of the data to be filled in the cell. The target header data and the template header data in the second template set are respectively input into the encoder for processing to obtain the target vector and the template vector; A similarity score is obtained by calculating the cosine similarity between the target vector and the template vector; The similarity scores are compared based on the header similarity threshold, and the templates in the second template set are filtered according to the comparison results to obtain the rule templates.

[0089] In this embodiment, the headers identified in the table to be processed are matched with the headers of templates in the second template set, and the corresponding rule templates are obtained by filtering according to a preset header similarity threshold. This header similarity threshold can be set according to actual conditions; in this embodiment, it is set to 80%.

[0090] In some embodiments, target header data corresponding to the cell to be filled is determined based on the coordinates of the data to be filled in the cell to be filled. In this step, the target header data can be determined through coordinate projection and hierarchical backtracking. Specifically, by utilizing the table's row and column grid structure, the column index of the cell to be filled is projected vertically upwards until a valid header cell at the top of that column is encountered. If multiple levels of headers exist, all levels of headers are retrieved by backtracking. Similarly, the row index is projected horizontally to the left to locate the row-direction header. Then, semantic association verification ensures that the semantics of the backtracked header are consistent with the expected data type of the cell to be filled, thus eliminating coordinate offset errors caused by merging cells across columns or rows. Finally, the target header data strictly bound to the cell to be filled is output.

[0091] In some embodiments, the target header data and the template header data in the second template set are respectively input into an encoder for processing to obtain a target vector and a template vector; In this step, the target header data and the template header data in the second template set are respectively input into the same pre-trained natural language processing model for word segmentation. Then, special tags are added to the segmented sequences and context-aware encoding is performed through the bidirectional Transformer encoding layer of the model. Finally, the semantic information of each header text is compressed into a dense vector of fixed dimensions through pooling operation, thereby obtaining the target vector representing the semantics of the target header and the template vector representing the semantics of each template header.

[0092] In some embodiments, a similarity score is obtained by calculating the cosine similarity between the target vector and the template vector; In this step, the two vectors are normalized to unit length, and then their inner product is calculated. The inner product value is the cosine of the angle between the vectors, which is directly used as the similarity score. The score ranges from [-1, 1]. The closer it is to 1, the more similar the two table headers are semantically, thus providing a quantifiable ranking basis for template matching.

[0093] In some embodiments, the similarity scores are compared based on the header similarity threshold, and the templates in the second template set are filtered according to the comparison results to obtain the rule templates.

[0094] In this step, the similarity score of each template in the second template set can be compared using the header similarity threshold. Templates with a similarity score greater than the header similarity threshold can be selected. Multiple templates can be integrated to obtain a rule template. The table items corresponding to the matching headers in each template can be integrated to obtain a rule template. Alternatively, the template with the highest similarity score can be used as the rule template.

[0095] One of the above technical solutions has the following advantages or beneficial effects: In this application embodiment, the similarity matching between the header of the table to be processed and the header in the rule template is performed to obtain the corresponding rule template. According to the rule template, the corresponding data can be automatically filled into the table to be processed, providing a data foundation for subsequent content generation.

[0096] In step S502 of some embodiments, the step of analyzing and mapping the context of the cell to be filled based on the rule template to obtain the matching content includes: The header of the cell to be filled is analyzed for correlation, and the contents of adjacent cells are analyzed to obtain analytical data; The matched content is obtained by matching the table entries in the analyzed data based on the rule template.

[0097] In this embodiment, the column or row header of the cell to be filled is determined in the table structure based on its row and column coordinates, and the semantic label of the header is obtained. Simultaneously, the content of adjacent non-blank cells in the same row and column is extracted as context samples. By parsing the semantics of the header and performing pattern mining on the context samples, the expected data type, data format, possible value range, or filling example of the cell to be filled is comprehensively inferred, thereby obtaining structured analytical data.

[0098] For example, in this embodiment, the analyzed data is compared conditionally with each field rule in a preset rule template. This is done by verifying whether the data type and format are fully compliant, and then checking whether the value is within a preset range or whether the text belongs to an enumerated set. This embodiment also calculates the proportion of matches that meet the constraints and combines this with a weighted scoring mechanism to quantify and score all matches. Finally, the rule field that meets all key constraints and has the highest total score is selected as the best match, and the default value, calculation logic, or associated data source corresponding to that field is output as the matching content. This accurately maps data features to specific values, thus obtaining the matching content.

[0099] One of the above technical solutions has the following advantages or beneficial effects: By performing association analysis and data matching on the cells to be filled, the embodiments of this application can match the existing data in the template to the table to be filled, thereby generating automatically filled content and improving the automation efficiency of table filling.

[0100] In step S503 of some embodiments, the matching content is verified and fault-tolerantly generated to obtain recommended options.

[0101] In this embodiment, by performing format and rule verification on the matched content, it is possible to check whether the matched content strictly conforms to the data type, format constraints, and business rules of the target field. If it fully conforms to the rules, it is marked as high confidence. If there are slight deviations, such as inconsistent date formats, the error correction module is activated to attempt to repair it through standardized conversion or context-based calibration. If the repair is successful, it is downgraded to medium confidence. For matched content that cannot be repaired or fails verification, the system will extract alternative options from the preset global default value library, the same column data pattern, or historical populated records according to the field semantics, and add low confidence markers and manual review suggestions. Finally, the system integrates all verification and error-tolerance results to generate a structured list of recommended options that includes the preferred recommended option, alternative options, and their confidence levels and correction instructions.

[0102] In some embodiments, the table to be processed is filled based on the recommended options to obtain a filled table.

[0103] In this embodiment, the system automatically fills the corresponding cells with recommended options that have a "high" confidence level as reliable anchors; for options with a "medium" confidence level, the system fills them after performing a preset standardization or format conversion and records the conversion log in the cell metadata; for options with a "low" confidence level or marked as requiring manual review, the system pre-fills them in the table with a highlight color or annotation, and attaches the reasons for the recommendation and the questions that need to be confirmed.

[0104] For example, after filling, the system initiates cross-cell logic validation to check whether the filled data conforms to business rules. If a conflict is found, dependency backtracking adjustment is automatically triggered, prioritizing high-confidence data as the benchmark and adjusting or marking related low-confidence data to ensure internal logical consistency within the table. Ultimately, the system outputs two key results: first, a directly usable filled table file, where filled content at different confidence levels can be distinguished by visual markers; second, a structured fill report, which records in detail the original state of each cell, the recommendation source, the filled value, the confidence level, and all automatically executed transformations or corrections, providing transparent evidence for manual review or process optimization.

[0105] In step S203 of some embodiments, modifying the target table according to the prompt information for filling the table includes: The filled table is subjected to content detection and prompt generation processing to obtain prompt information; The target table is obtained by modifying the filled table based on the prompt information.

[0106] Please see Figure 6 In some embodiments, the process of performing content detection and prompt generation on the filled table to obtain prompt information includes: Step S601: Identify the data logic of the filling table to obtain the data logic; Step S602: Based on the data logic, the quality of the filled table is detected to obtain the detection result; Step S603: Perform natural language conversion on the detection result to obtain the prompt information.

[0107] In this embodiment, when performing content detection and prompt generation on the filled table, the system calls a preset business rule engine and consistency validator to perform logical conflict detection, format verification, and cross-cell statistical relationship verification on the filled content. Simultaneously, an anomaly pattern recognition model scans the data distribution to identify outliers or fill items that violate common sense. Detected issues are categorized into errors, warnings, or suggestions based on severity, and are converted into structured prompt information by a natural language generation module. Each message includes the problem location, problem description, violated rules, and specific modification suggestions. Finally, a priority-sorted prompt list is output to guide the user in precise review or automatic correction.

[0108] In step S601 of some embodiments, identifying the data logic of the filling table to obtain the data logic includes: The filled table is subjected to target detection processing to obtain cell data; The cell data is subjected to image segmentation and feature extraction to obtain location features; The cell data is subjected to semantic recognition processing to obtain semantic features; The data logic is obtained by performing hierarchical relationship analysis on the cell data based on the location features and semantic features.

[0109] For example, cell data refers to the data obtained by object detection and extraction in each cell of a filled table. This can include cell location data and the content data entered into the cell, such as text, images, links, etc. By extracting features from the cell location data, positional features can be obtained. These positional features include the cell's coordinates within the filled table, as well as the corresponding row and column positional information. Semantic features, in fields such as Natural Language Processing (NLP) or Computer Vision (CV), are used to represent the meaning of text or images within table content. These features capture the semantic information in the data, that is, the meaning or significance of the data, not just its surface form.

[0110] In this embodiment, the filled table can first be converted into image data to facilitate image recognition and analysis by the system. Specifically, a target detection model or semantic segmentation model is used to perform global analysis on the table image, locating and segmenting each independent cell region, while simultaneously identifying the overall row and column structure of the table and the topological relationship of merged cells to obtain positional features. Next, an OCR engine is called to perform text recognition on each detected cell region, extracting its content and performing semantic recognition processing to obtain text features. By performing spatial dominance relationship analysis and semantic inclusion relationship reasoning on the identified positional and semantic features, the parent-child subordination and grouping relationships between cells are identified, thereby constructing a tree-like hierarchical structure with the top-level header or data as the root node, and finally outputting a structured logical model expressing data summarization, grouping, and inheritance relationships to obtain data logic.

[0111] In step S602 of some embodiments, the step of detecting the quality of the filled table based on the data logic to obtain a detection result includes: The filled table is subjected to integrity detection processing to obtain a first detection score; The data logic is used to perform a consistency check on the filled table to obtain a second check score. The accuracy of the filled table is detected based on the data logic to obtain a third detection score. The first detection score, the second detection score, and the third detection score are weighted and summed to obtain the detection result.

[0112] In this embodiment, different scores can be obtained by performing different tests on the filled table, and the corresponding test results are obtained by weighted summation analysis of the different scores. Specifically, integrity testing can ensure structural integrity by verifying the existence of key fields, such as primary keys and required fields, and whether data rows or columns are continuous without breaks. Consistency testing focuses on the internal logic of the data, using a rule engine to verify the calculation relationship across cells, such as the sum of sub-items equals the total, format uniformity, and business logic constraints, such as whether the state transition order is consistent. Accuracy testing verifies the correctness of the content itself by cross-comparing table data with authoritative data sources, applying statistical models to identify outliers, or performing reasonableness checks based on domain knowledge. This embodiment generates a comprehensive test score by using a weighted fusion algorithm, and performs hierarchical judgment based on a preset threshold range. At the same time, it combines the weak links of each dimension sub-item to automatically generate a structured test result report containing specific problem descriptions, location indications, and repair suggestions, thus obtaining the test results.

[0113] In step S603 of some embodiments, the detection result is converted into natural language to obtain the prompt information.

[0114] In this embodiment, the detection results can be classified and graded according to the problem type and the severity defined by the business rules. Core context information can be extracted for each problem in the detection results, the precise cell position can be located, and the data or field names involved, as well as the specific business rules violated, can be extracted. A matching prompt information template can be selected for the specific problem, and the extracted context information can be dynamically filled into the template as parameters to generate a grammatically correct and complete sentence.

[0115] One of the above technical solutions has the following advantages or beneficial effects: This application embodiment detects the filled data content by identifying the data logic of the filling table. During the filling process, the system can detect the accuracy of the filled content in real time. When errors or incomplete information are found, the system can promptly provide error correction prompts and reasonable suggestions, thereby improving the accuracy of form filling.

[0116] Please see Figure 7 In some embodiments, modifying the filled table according to the prompt information to obtain the target table includes: Step S701: Based on the prompt information, indicate the cell to be modified in the fill table; Step S702: Display the prompt information on the interactive interface and receive the interactive command through the interactive interface; Step S703: Based on the interactive instructions, generate and replace the content of the cell to be modified to obtain the target table.

[0117] Specifically, the prompt message refers to the natural language instructions generated by the system through detection, guiding users to modify the table, including problem descriptions, location, and modification suggestions. The filled table refers to a table file that has undergone initial automatic filling but may contain content requiring correction, awaiting review. The cell to be modified refers to the specific cell in the filled table that is precisely located by the prompt message and needs to be reviewed or modified by the user. The interactive interface refers to the graphical user interface (GUI) provided to the user for viewing, confirming, and operating. Interactive instructions refer to the operation commands issued by the user through the interactive interface, such as "confirm modification," "enter new value," or "ignore prompt." The target table refers to the final version of the table that meets quality requirements after all interactive corrections.

[0118] In this embodiment, in an automated expense reimbursement form filling and review scenario, the system has automatically filled out the expense reimbursement form. During this process, the user can participate in filling out and modifying the form to obtain a filled table. The filled table is then checked. Based on a prompt message indicating a format inconsistency in the "Invoice Amount" column (e.g., "Cell C5: Amount 'One Thousand Yuan' should be in Arabic numeral format"), cell C5 is highlighted in red in the table's visual interface, and the prompt is displayed in detail in the sidebar. At this point, the user can click on the prompt in the interactive interface, select the "Manual Correction" command, and change "One Thousand Yuan" to "1000.00" in the pop-up input box. After receiving this interactive command, the system automatically completes the cell content replacement and logical verification in the background, ultimately generating a target reimbursement form with accurate data and standardized format.

[0119] One of the above technical solutions has the following advantages or beneficial effects: The embodiments of this application can detect the accuracy of the filled content in real time through the system and interact with the user, making it convenient for the user to modify the table content according to the error correction prompts, thereby improving the user experience.

[0120] The following is in conjunction with the instruction manual appendix. Figure 8 The following describes in detail the specific implementation process of the form filling method of this application embodiment in a specific application scenario: In this embodiment, assuming a user needs to fill out a form, they can do so using a smartphone. The smartphone has an application program installed that uses the form-filling method described in this embodiment. The specific process is as follows: Users open the smart application and enter the human-computer interaction interface. They then input task commands to activate the smart assistant, which retrieves the form to be filled out. Alternatively, users can directly open the form and use the auto-fill function within the application; the system will automatically fill in and correct the form.

[0121] Specifically, the system identifies the user's form and converts it into an image for image recognition and other processing. Then, it obtains the header of the form to be filled out through table structure recognition. By matching the header with a preset template or retrieving historical data from the database, the system calculates the semantic similarity of the corresponding headers. This allows the system to find corresponding data items in the template and recommend them to the user. For example, it calculates the similarity value for the data set "[Mom's Name]" and "[Mother's Name]". If the similarity exceeds a certain value, the data is considered similar. The system compares the user's requested header (the header currently being filled out) with multiple candidate headers. These candidate headers can be obtained by matching previously filled and saved templates or system-preset templates. Multiple candidate groups are then compared sequentially. To avoid inaccurate model results, each group of data first undergoes positive rule protection to increase the priority of high-frequency headers, and negative rules to filter bad cases. Finally, the model predicts multiple candidate headers that meet the similarity values. For example, a user's current header is "Shipping Address," and saved headers include "Name," "Address," "Mailing Address," "Ethnicity," "School," and "License Plate Number." Multiple candidate groups are compared sequentially: "Shipping Address - Name," "Shipping Address - Address," "Shipping Address - Mailing Address," "Shipping Address - Ethnicity," "Shipping Address - School," and "Shipping Address - License Plate Number." A similarity score is calculated, and if the score is greater than 0.9, the headers "Address" and "Mailing Address" are selected. Then, the saved values ​​under "Address" and "Mailing Address" are searched and recommended to the user. Some headers can have exhaustively listed values, such as "Marital Status," "Completed," "Gender," "Political Affiliation," "Ethnicity," and "Optional." The backend can configure which headers can generate options and what values ​​each header corresponds to. Then, when a header requests frequently used information, the similarity model matches the user's header with the headers that can generate matching options. If they match, the corresponding value is retrieved. Furthermore, this application embodiment will also provide corresponding suggestions based on the information input by the user, by comparing whether there are any errors through the system. After the user adopts the suggestions, the system will automatically replace the original wrong values.

[0122] This application embodiment automates form filling by accurately identifying the structure and content of the form, significantly reducing filling time and greatly improving work and efficiency. Furthermore, intelligent recognition and error correction effectively avoids human errors and information omissions, improving the accuracy and completeness of the form content. In addition, this application embodiment eliminates the need for manual input of large amounts of information; form filling can be completed with simple operations, reducing the user's burden, enhancing the user experience, and decreasing the workload of manual form processing, thus lowering labor and time costs.

[0123] Please see Figure 9 Another aspect of this application embodiment provides a form filling system, including: Cell module 901 is used to process the table structure and content of the table to be processed, and obtain the cells to be filled. The fill module 902 is used to fill in the recommended options generated by the rule template that matches the cell to be filled, so as to obtain a filled table; Modification module 903 is used to modify the target table according to the prompt information of the table filling to obtain the target table.

[0124] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described form filling method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0125] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0126] Please see Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 1002 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 using the form filling method of the embodiments of this application. Input / output interface 1003 is used to implement information input and output; The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004); The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0127] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described form filling method.

[0128] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0129] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0130] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0131] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0132] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0133] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0134] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above 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; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0135] The units described above 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.

[0136] Furthermore, the functional units in the various embodiments of the present invention 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.

[0137] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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 multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for filling out a form, characterized in that, include: The table to be processed is processed in terms of both structure and content to obtain the cells to be filled. The recommended options generated by the rule template that matches the cells to be filled are used to fill in the cells, resulting in a filled table; Modify the form according to the prompts provided to obtain the target form.

2. The form filling method according to claim 1, characterized in that, The process involves processing the table structure and content to obtain cells to be filled, including: The table data is obtained by identifying the table structure and table content of the table to be processed; The cells to be filled are identified based on the cell recognition of the table data.

3. The form filling method according to claim 2, characterized in that, The process of identifying the table structure and content of the table to be processed to obtain table data includes: The table to be processed is then processed to obtain the table structure; The table data is obtained by recognizing the table content of the table to be processed based on the table structure.

4. The form filling method according to claim 3, characterized in that, The step of identifying the table content of the table to be processed based on the table structure to obtain the table data includes: Based on the table structure, table position features and table text features are extracted from the table to be processed. The table style is obtained by recognizing the style of the table to be processed based on the table position features and the table text features; Semantic analysis is performed on the text features of the table to obtain the semantic features of the table; The table data is obtained by recognizing the content of the table to be processed based on the table style and the table semantic features.

5. A form filling method according to claim 2, characterized in that, The cell to be filled is identified based on the table data, including: The table data is divided into header cells and item cells; Blank cells are obtained by identifying blank areas in the table entry cells; The cell to be filled is obtained by performing data recognition on the blank cell based on the header cell.

6. A form filling method according to claim 5, characterized in that, The step of identifying the blank cell based on the header cell to obtain the cell to be filled includes: The header text is obtained by extracting the text content from the header cells. Semantic analysis and keyword mapping are performed on the header text to obtain the data type to be filled in; The blank cells are used to identify the cell position to obtain the coordinates of the data to be filled in; The cell to be filled is determined based on the data type to be filled and the coordinates of the data to be filled.

7. A form filling method according to claim 1, characterized in that, The step of filling the table with recommended options generated from the rule template that matches the cell to be filled, to obtain a filled table, includes: Based on the rule template matching the cell to be filled, the data in the table to be processed is generated to obtain recommended options; The table to be processed is filled with the recommended options to obtain a filled table.

8. A form filling method according to claim 7, characterized in that, The step of generating recommended options from the table to be processed based on the rule template corresponding to the cell to be filled includes: The rule template is obtained by performing rule matching on the cells to be filled; The context of the cell to be filled is analyzed and mapped based on the rule template to obtain the matching content; The matched content is validated and fault-tolerantly generated to obtain recommended options.

9. A form filling method according to claim 8, characterized in that, The step of performing rule matching on the cell to be filled to obtain a rule template includes: Based on the data type of the cell to be filled, a first template set is obtained by matching the data format of the preset template; The templates in the first template set are matched and filtered according to rules to obtain the second template set; The rule templates are obtained by filtering the second template set based on the header similarity threshold.

10. A form filling method according to claim 9, characterized in that, The step of filtering the second template set based on the header similarity threshold to obtain the rule template includes: The target header data corresponding to the cell to be filled is determined based on the coordinates of the data to be filled in the cell. The target header data and the template header data in the second template set are respectively input into the encoder for processing to obtain the target vector and the template vector; A similarity score is obtained by calculating the cosine similarity between the target vector and the template vector; The similarity scores are compared based on the header similarity threshold, and the templates in the second template set are filtered according to the comparison results to obtain the rule templates.

11. A form filling method according to claim 8, characterized in that, The step of analyzing and mapping the context of the cell to be filled based on the rule template to obtain the matching content includes: The header of the cell to be filled is analyzed for correlation, and the contents of adjacent cells are analyzed to obtain analytical data; The matched content is obtained by matching the table entries in the analyzed data based on the rule template.

12. A form filling method according to claim 1, characterized in that, The step of modifying the target table according to the prompts in the table filling section includes: The filled table is subjected to content detection and prompt generation processing to obtain prompt information; The target table is obtained by modifying the filled table based on the prompt information.

13. A form filling method according to claim 12, characterized in that, The process of performing content detection and prompt generation on the filled table to obtain prompt information includes: The data logic is obtained by identifying the data logic of the filling table; The quality of the filled table is detected based on the data logic to obtain the detection result; The detection results are converted into natural language to obtain the prompt information.

14. A form filling method according to claim 12, characterized in that, The step of modifying the filled table based on the prompt information to obtain the target table includes: Based on the aforementioned prompt information, the cell to be modified is indicated in the fill table; The prompt information is displayed on the interactive interface, and interactive instructions are received through the interactive interface; The target table is obtained by generating and replacing the content of the cell to be modified based on the interactive instructions.

15. A form filling system, characterized in that, The system includes: The cell module is used to process the table structure and content of the table to be processed, and to obtain the cells to be filled. The fill module is used to fill in the recommended options generated by the rule template that matches the cell to be filled, so as to obtain a filled table; The modification module is used to modify the target table based on the prompts provided in the table filling section.

16. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 14.