A form field filling method, system and electronic device

By using the FMMC three-layer mapping configuration model and priority sorting mapping item strategy, the problem of empty fields caused by the failure to identify a single material source during the form field filling process was solved, achieving efficient and accurate field filling and improving the system's flexibility and stability.

CN123178477APending Publication Date: 2026-11-27WUHAN BIG PULP IND DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611368743.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies struggle to balance accuracy and flexibility in automating form field filling. They suffer from issues such as fields being empty due to failure to identify a single material source, and are inefficient in processing multiple materials.

Method used

The FMMC three-layer mapping configuration model is adopted. By configuring multiple priority-sorted mapping items for each form field, the specific material source is clearly pointed to. The target field value is attempted to be obtained in sequence according to the priority order. The first non-empty value is used to fill the value, which ensures the accuracy and stability of the filling result.

Benefits of technology

It improves the success rate and efficiency of field population, reduces the risk of errors caused by single-source data anomalies, enhances fault tolerance, avoids the need for manual intervention, and improves the scalability and accuracy of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178477A_ABST
    Figure CN123178477A_ABST
Patent Text Reader

Abstract

The application provides a form field filling method, system and electronic equipment, and belongs to the technical field of data processing. The method comprises the following steps: obtaining mapping information corresponding to a target form field, wherein the mapping information comprises a plurality of mapping items arranged in a priority order, each mapping item comprises a material name and a field identifier; according to the priority order, for each mapping item, obtaining a corresponding material extraction result according to the material name, and then obtaining a target field value corresponding to the field identifier from the material extraction result; and filling the first non-empty value in each target field value obtained according to the priority order into the target form field. The application effectively improves the accuracy and success rate of field automatic filling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, specifically to a form field filling method, system, and electronic device. Background Technology

[0002] During the digital transformation of services, businesses or individuals applying for administrative permits (such as food business licenses, road transport permits, etc.) need to submit multiple documents (business license, ID card, application form, etc.). Window staff or approval personnel must manually review each document, extract key information (such as company name, legal representative, unified social credit code, etc.), and then fill it into the corresponding fields on the form. This process involves a large amount of repetitive manual work, which is inefficient and prone to errors.

[0003] To reduce manual workload, several automated form-filling solutions have been proposed. The first solution is fixed-template OCR matching, which pre-defines fixed OCR recognition region coordinates for each material, extracts the image region according to these coordinates, performs text recognition, and then fills the form with the recognition results according to hard-coded field mapping relationships. The second solution is direct question-and-answer using a general large model, which submits the material image and form field list to a general multimodal large model, which outputs the filled values ​​for all fields at once. The third solution is rule-driven, which extracts field values ​​from the material OCR text based on regular expressions and keyword matching rules, and then fills the form fields using a pre-configured static mapping table. The fourth solution is single-material sequential processing, which downloads, converts, recognizes, and fills each material sequentially, processing each material serially until the previous material is processed before starting the next material's processing flow.

[0004] However, the above solutions still have the following drawbacks: The first solution scatters material fields, form fields, and mapping relationships across multiple locations such as code, configuration files, and databases. Modifying a mapping relationship requires simultaneous adjustments in multiple places. When the material list or form template for a matter changes, developers must modify the code and redeploy, making self-configuration by business personnel impossible. The second solution uses fixed AI prompts, with different material types sharing the same set of extraction instructions. When dealing with different matters such as convenience food permits and road transport permits, the set of fields to be extracted for the same material (such as a business license) may be completely different. Fixed prompts cannot be tailored as needed, leading to the extraction of redundant fields, wasting computing power, or missing key fields. The third solution typically binds form fields to a single material source. When the material image is blurry, information is missing, or recognition is incorrect, the form fields are directly left empty or filled in incorrectly. It does not utilize the information redundancy between multiple materials for cross-validation and automatic error correction. The fourth solution processes multiple materials serially, with the total time equal to the sum of the processing times for each material. The processing time for large PDFs or high-resolution images with many pages is accumulated sequentially, severely impacting the user experience. Summary of the Invention

[0005] In view of this, it is necessary to provide a form field filling method, system, and electronic device to solve the technical problem in the prior art that it is difficult to balance the accuracy and flexibility of field filling.

[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a method for filling in form fields, comprising: Obtain the mapping information corresponding to the target form field. The mapping information includes multiple mapping items arranged in priority order, and each mapping item includes a material name and a field identifier. According to the priority order, for each mapping item, the corresponding material extraction result is obtained based on the material name, and then the target field value corresponding to the field identifier is obtained from the material extraction result; The first non-empty value among the target field values ​​obtained in the order of priority is filled into the target form field.

[0007] In one possible implementation, obtaining the mapping information corresponding to the target form field includes: Get a populate request including the event identifier; Based on the item identifier, load the mapping relationship configuration table corresponding to the item identifier; the mapping relationship configuration table includes mapping information configured for each form field; The mapping information corresponding to the target form field is parsed from the mapping relationship configuration table.

[0008] In one possible implementation, obtaining the corresponding material extraction result based on the material name for each mapping item includes: Based on the material data source configuration table loaded according to the item identifier, obtain the field set corresponding to each material and the extraction description of each field; Based on the set of fields corresponding to each material and the extraction instructions, an extraction instruction corresponding to each material is generated; Obtain the material file corresponding to the material name in each of the mapping items, and convert each of the material files into image format; The image format corresponding to each material file and the corresponding extraction command are input into a preset visual model for field extraction to obtain the material extraction result corresponding to each material file.

[0009] In one possible implementation, converting each of the material files into an image format includes: Read the header byte sequence of each of the aforementioned material files; The file type of the material file is identified based on the header byte sequence, and the material file is converted into an image format based on the identification result; The converted image data is uniformly encoded into Base64 format.

[0010] In one possible implementation, identifying the file type of the material file based on the header byte sequence and converting the material file into an image format based on the identification result includes: The header byte sequence is matched with preset header feature sequences for various file types; If the header byte sequence matches the first header feature sequence, the file type is determined to be an image format, and the original byte stream of the material file is used as image format data. If the header byte sequence matches the second header feature sequence, the file type is determined to be PDF format, and each page of the material file is rendered as image format data at a preset resolution. If the header byte sequence matches the third header feature sequence, and a first preset identifier exists in the internal directory structure of the read material file, the file type is determined to be DOCX format, the text content in the material file is extracted, and the extracted text content is rendered as the image format data; If the header byte sequence matches the third header feature sequence, and a second preset identifier exists in the internal directory structure of the read material file, the file type is determined to be OFD format. The material file is decompressed to obtain the internal file, the character data of the XML text node is extracted from the internal file, and the extracted character data is rendered into the image format data.

[0011] In one possible implementation, obtaining the target field value corresponding to the field identifier from the material extraction result includes: Matching is performed in the material extraction results based on the field identifier; If the match fails, the preset additional information in the field identifier is removed to obtain the processed field identifier, and the matching is performed in the material extraction result according to the processed field identifier. The field value corresponding to the first successful match is used as the target field value.

[0012] In one possible implementation, filling the target form field with the first non-empty value from the target field values ​​obtained in the priority order includes: According to the aforementioned priority order, determine whether the target field value corresponding to the current mapping item is empty; If the target field value corresponding to the current mapping item is not empty, fill the target field value into the target form field to obtain the filling result, and record the material name corresponding to the target field value before ending the traversal; If the target field value corresponding to the current mapping item is empty, continue to check whether the target field value corresponding to the next mapping item is empty.

[0013] In one possible implementation, after filling the target form field with the target field value to obtain the fill result, the process includes: The data structure containing the filled-in results, with form fields as keys and filled-in values ​​as values, is returned to the front end, and the material extraction results corresponding to each material are stored in the database; When a filling request for the same material is received, the stored material extraction result is read from the database.

[0014] Secondly, the present invention also provides a form field filling system, comprising: The acquisition module is used to acquire the mapping information corresponding to the target form field. The mapping information includes multiple mapping items arranged in priority order, and each mapping item includes a material name and a field identifier. The extraction module is used to obtain the corresponding material extraction result for each mapping item according to the material name, and then obtain the target field value corresponding to the field identifier from the material extraction result; The fill module is used to fill the target form field with the first non-empty value among the target field values ​​obtained in the order of priority.

[0015] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the form field filling method described in any of the above implementations.

[0016] The beneficial effects of this invention are as follows: Firstly, by configuring a mapping information containing multiple priority-ordered mapping items for each form field, with each mapping item explicitly pointing to a specific material source through the material name, the invention avoids the problem of fields being empty due to the failure to identify a single material source, thereby improving the success rate of field filling. Furthermore, by sequentially attempting values ​​along the priority order of multiple mapping items and automatically switching to the next priority mapping item when the target field value obtained by the current mapping item is empty, the invention can automatically switch to a backup material source when the primary source material information is missing, thereby enhancing the fault tolerance and stability of the field filling process. Furthermore, by adopting a filling strategy based on the first non-empty value, the invention ensures that the filling result always originates from reliable material data, reducing the risk of errors caused by single-source data anomalies, while avoiding the need for manual intervention in resolving conflicts between multiple source data, significantly improving the efficiency and accuracy of field filling. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic flowchart of an embodiment of the form field filling method provided by the present invention; Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of S101; Figure 3 For the present invention Figure 1 A schematic diagram of an embodiment of S100; Figure 4 For the present invention Figure 1 A schematic diagram of an embodiment of S100; Figure 5 For the present invention Figure 1 A schematic diagram of an embodiment of S100; Figure 6 A schematic flowchart of another embodiment of the form field filling method provided by the present invention; Figure 7 A schematic flowchart of another embodiment of the form field filling method provided by the present invention; Figure 8 A schematic diagram of the architecture of the FMMC three-layer mapping configuration model on which the form field filling method provided by the present invention is based; Figure 9 A schematic diagram of the multi-format material conversion pipeline provided by the present invention; Figure 10 A decision-making diagram illustrating the mapping information filling process provided by this invention; Figure 11 A schematic diagram of the architecture of the concurrent extraction engine provided by this invention; Figure 12 A schematic diagram of an embodiment of the form field filling system provided by the present invention; Figure 13 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] This invention provides a form field filling method, system, and electronic device, which are described below.

[0024] Figure 1 A schematic flowchart of an embodiment of the form field filling method provided by the present invention is shown below. Figure 1 As shown, the methods for filling in form fields include: S101. Obtain the mapping information corresponding to the target form field. The mapping information includes multiple mapping items arranged in priority order. Each mapping item includes a material name and a field identifier.

[0025] It should be noted that the target form field is the form field that needs to be filled in. It can be understood as the name of the input box to be filled in, such as labels like "legal representative" or "company name" on the form. The priority order indicates the order in which multiple mapping items are processed. Based on the target form field (form_field) to be filled in, the system parses the corresponding mapping inference chain (i.e., mapping information) from the mapping relationship configuration table.

[0026] S102. According to the priority order, for each mapping item, obtain the corresponding material extraction result based on the material name, and then obtain the target field value corresponding to the field identifier from the material extraction result.

[0027] It should be noted that the system traverses each mapping item in the mapping inference chain (i.e., mapping information) from high priority to low priority, and then first obtains the corresponding material extraction result based on the material name, and then obtains the target field value corresponding to the field identifier from the material extraction result.

[0028] S103. Fill the target form field with the first non-empty value among the target field values ​​obtained in the order of priority.

[0029] It should be noted that the system will sequentially check the non-empty values ​​of the target fields corresponding to each mapping item obtained along the mapping inference chain (i.e., mapping information) in priority order, take the first non-empty value as the final filling result, fill it into the target form field to obtain the filling result, thereby completing the automatic filling of the target form field.

[0030] In summary, the form field filling method provided by this invention firstly configures a mapping information for each form field containing multiple priority-ordered mapping items. Each mapping item explicitly points to a specific material source through its material name, avoiding the problem of empty fields due to failure to identify a single material source, thereby improving the success rate of field filling. Furthermore, by sequentially attempting values ​​along the priority order of multiple mapping items and automatically switching to the next priority mapping item when the target field value obtained by the current mapping item is empty, it can automatically switch to a backup material source when the primary source material information is missing, thereby enhancing the fault tolerance and stability of the field filling process. Furthermore, by adopting a filling strategy based on the first non-empty value, it ensures that the filling result always originates from reliable material data, reducing the risk of errors caused by single-source data anomalies, and avoiding the need for manual intervention in multi-source data conflicts, significantly improving the efficiency and accuracy of field filling.

[0031] In some embodiments of the present invention, such as Figure 2 As shown, step S101 includes: S201. Obtain a populate request including the item identifier.

[0032] It should be noted that the system first obtains the populate request, which includes the item identifier. The item identifier (itemCode) is a unique identifier for each specific business. The system uses the item identifier to distinguish the corresponding material list, form template, and mapping rules for different items (such as food business licenses, road transport licenses, etc.).

[0033] S202. Based on the item identifier, load the mapping relationship configuration table corresponding to the item identifier; the mapping relationship configuration table includes mapping information configured for each form field.

[0034] It should be noted that the system loads the mapping configuration table corresponding to the item identifier based on the item identifier. This mapping configuration table is configured (connectJSON) within the FMMC (Form-Material Mapping Configuration) three-layer mapping configuration model. For example... Figure 8As shown, the architecture of the FMMC three-layer mapping configuration model includes three independent configuration layers: a material data source configuration table, a form field configuration table, and a mapping relationship configuration table. The material data source configuration table stores the set of fields to be extracted for each material and the extraction description for each field. The form field configuration table describes all fields of the target form, including field number (no), section, field key, Chinese label, and pre-filled value. The mapping relationship configuration table includes mapping information for each form field, consisting of multiple mapping items arranged in priority order. Each mapping item contains the material name and field identifier. Figure 8 After business personnel complete the configuration through the front-end visual configuration interface, the system generates three JSON configuration files and stores them in the database. Thus, the FMMC three-layer mapping configuration model of this invention separates the material data source configuration table, the form field configuration table, and the mapping relationship configuration table into three independent JSON configuration layers. After business personnel drag and drop to configure the mapping relationships through the visual configuration interface, the system automatically generates and persists the configuration JSON. The filling engine runs entirely configuration-driven, requiring no code modification. Business personnel can also independently complete the process of adding or adjusting the material list and form templates for new items.

[0035] S203. Parse the mapping information corresponding to the target form field from the mapping relationship configuration table.

[0036] It should be noted that the system parses the mapping information corresponding to the target form field (form_field) from the mapping relationship configuration table based on the target form field to be filled. For example... Figure 8 As shown, the system first extracts field values ​​from each material according to the definition in the material data source configuration table, obtaining the material extraction results for each material. Then, based on the mapping information configured in the mapping relationship configuration table, it maps the extraction results to the corresponding target form fields in the form field configuration table. Specifically, the system uses the name of the target form field as an index to search for a list of mapping items associated with that target form field in the mapping relationship configuration table. This list of mapping items is the mapping information corresponding to the target form field. At runtime, the fill engine obtains a clear field value path and priority order based on the mapping information.

[0037] The FMMC three-layer mapping configuration model proposed in this invention is not a simple key-value pair mapping table. The mapping information of this invention records the dynamic reasoning path between the target form field and multiple mapping items (sorted by priority). Each mapping item contains a precise pointer to the material name and field identifier, and the definition of the material field is decoupled from the mapping relationship, so that the same material can have different subsets of field extraction in different matters.

[0038] In this embodiment, by obtaining a fill request including an item identifier, the corresponding mapping configuration table can be dynamically loaded according to different items, thereby achieving flexible adaptation to different items and reducing system maintenance costs. Furthermore, by loading the mapping configuration table based on the item identifier, the mapping information configured for each form field can be obtained on demand at runtime, avoiding the configuration coupling problem of hard-coded methods and improving the system's scalability. Furthermore, by parsing the mapping information corresponding to the target form field from the mapping configuration table, a clear execution basis can be provided for subsequent value retrieval from multiple mapping items in priority order, thereby ensuring the accuracy and traceability of the field fill process.

[0039] In some embodiments of the present invention, such as Figure 3 As shown, step S102 includes: S301. Based on the material data source configuration table loaded according to the item identifier, obtain the field set corresponding to each material and the extraction description of each field.

[0040] It should be noted that: based on the item identifier, the system loads the corresponding material data source configuration table (materialDataSourceJSON). The material data source configuration table lists all the required certificates and documents for that item and defines the set of fields to be extracted for each document. Each field includes a field name (Chinese name, such as "Legal Representative") and a field description (extraction instructions, such as "Legal Representative / Operator / Responsible Person"). Materials with empty fields indicate that no extraction is required; only the document needs to be retained.

[0041] S302. Generate extraction instructions for each material based on the set of fields corresponding to each material and the extraction instructions.

[0042] It should be noted that the system dynamically generates extraction instructions for each material at runtime based on the set of fields corresponding to each material and the extraction descriptions for each field obtained in step S301. Extraction instructions include role settings, material name context, field names, field descriptions, and formats.

[0043] This invention dynamically generates targeted AI extraction prompts at runtime based on the set of fields that need to be extracted for each material in a specific context. The prompts precisely list the field names and descriptions to be extracted, excluding irrelevant fields. This reduces the computational overhead of the AI ​​model and ensures that the output field names are precisely aligned with the mapping layer, eliminating the need for manual field name alignment.

[0044] If a document has a large number of fields to be extracted, causing the prompt words to exceed the model's context length limit, the system will split the entire list of fields to be extracted into multiple batches. Each request will carry only one batch of field rules, and an independent multimodal request will be constructed with the same image, calling the preset visual model multiple times.

[0045] S303. Obtain the material file corresponding to the material name in each of the mapping items, and convert each of the material files into image format.

[0046] It should be noted that the system retrieves the material files corresponding to the material names in each mapping item and converts all material files into image formats recognizable by the preset visual model. For example... Figure 11 As shown, the system creates an independent download task for each material file, simultaneously initiating HTTP requests through a thread pool. Each thread downloads the file byte stream from its specified URL, meaning all material file downloads occur concurrently, rather than sequentially. After each material file is downloaded, it independently enters... Figure 2 The conversion pipeline performs format conversion. The detailed process of this conversion pipeline will be described in subsequent embodiments.

[0047] The download addresses for the aforementioned material files originate from the fill request received in S201. Specifically, the fill request also includes a case ID (caseId) and a material information list (materialInfo). Each item in the material information list includes the material name, the original file name, and the file's HTTP access URL. The system can then initiate a file download based on this URL.

[0048] S304. Input the image format corresponding to each of the material files and the corresponding extraction instructions into the preset visual model for field extraction to obtain the material extraction results corresponding to each of the material files.

[0049] It should be noted that the system assembles the image formats (Base64-encoded Data URIs) corresponding to each material file obtained in step S303 with the extraction instructions corresponding to each material generated in step S302 into a multimodal ChatCompletion request, and calls a preset visual model (such as the Doubao preset visual model) for field extraction. Figure 11 As shown, each material's Base64 image is paired with a dynamically generated, proprietary extraction command. Field extraction is performed by concurrently calling a preset visual model API via a thread pool. Before calling the AI ​​model, the system first queries the database (parseResult field) to determine if the material has been extracted before. If the cache is hit, the expensive AI model call is skipped, and historical extraction results are read from the database. If not, parallel AI extraction is performed, and the results are asynchronously written to the database for future reuse.

[0050] The preset visual model performs visual understanding and semantic analysis on the image based on the field requirements in the extraction instructions, and returns the extraction results for each field in JSON format. The system cleans the JSON string returned by the preset visual model and parses it into a JSONObject to obtain the material extraction result for that material.

[0051] AI extraction tasks for multiple materials are executed concurrently through a thread pool, such as Figure 11 As shown in the synchronization barrier, the system uses the `CompletableFuture.allOf()` synchronous waiting mechanism to wait for all parallel tasks (downloading, conversion, and AI extraction) of all materials to complete before uniformly aggregating the material extraction results of all materials and then uniformly entering the mapping and filling stage. The system will not rush into the filling stage before some materials have been processed, ensuring that all material data is ready during mapping and filling. The extraction results of individual materials are cached in the database (parseResult field), and the cache can be reused directly for subsequent identical materials, avoiding repeated calls to the AI ​​model. This invention constructs a multi-format material conversion pipeline, automatically detects file types (PDF / DOCX / OFD / images) and routes them to the corresponding conversion processors, uniformly outputting them as images before submitting them for AI recognition. At the same time, a concurrent extraction engine is adopted, with the downloading, conversion, and AI extraction tasks of multiple materials executed in parallel, significantly improving the efficiency of form filling.

[0052] In this embodiment, by loading the material data source configuration table according to the item identifier and obtaining the field set and extraction instructions corresponding to each material, flexible configuration of the fields to be extracted for different items can be achieved, avoiding the waste of computing power or field omissions caused by fixed prompts. Furthermore, by dynamically generating targeted extraction instructions based on the field set and extraction instructions of each material, it can be ensured that the output field names of the preset visual model are precisely aligned with the input field names of the mapping layer, eliminating the need for manual field name alignment. Furthermore, by obtaining the material files corresponding to the material names in the mapping items and uniformly converting them into image formats, it can be compatible with various formats of certificate materials such as PDF, DOCX, OFD, and images, improving the system's versatility and compatibility. Furthermore, by inputting the image format along with the corresponding extraction instructions into the preset visual model for field extraction, automated and intelligent extraction of material data can be achieved, reducing manual intervention and improving the accuracy and efficiency of field extraction.

[0053] In some embodiments of the present invention, such as Figure 4 As shown, step S303 includes: S401. Read the header byte sequence of each of the material files.

[0054] It should be noted that for each material file byte stream downloaded, the system first reads the byte sequence at a fixed position in the file header (usually 4 to 8 bytes at the beginning of the file).

[0055] For example, the system reads the first four bytes from the byte stream of the material file, converts them into a hexadecimal string representation, and uses this string for subsequent matching with header feature sequences of various preset file types. Figure 9 As shown, the system detects the true file type by reading the magic number in the first few bytes of the file header.

[0056] S402. Identify the file type of the material file based on the header byte sequence, and convert the material file into an image format based on the identification result.

[0057] It should be noted that the system matches the read header byte sequence with preset header feature sequences for various file types, determines the file type based on the matching result, and routes it to the corresponding conversion processor. The conversion processor then converts the material file into an image format recognizable by a preset visual model. Then, as... Figure 9 As shown, the system encodes all converted image data (including the original byte stream of the image format, PNG image data after PDF rendering, PNG image data after DOCX rendering, and PNG image data after OFD rendering) into a Base64 format DataURI, which is then used as input to the preset visual model.

[0058] For example, the system encodes the PNG image data converted from the PDF of the business license into Base64 format, and uses the Base64 encoded data of other materials (such as ID card images and DOCX images of application forms) as input to the preset visual model for subsequent steps to extract fields.

[0059] In this embodiment, by reading and matching the header byte sequence of the material file, the true file type can be accurately detected without relying on the file extension, thus effectively preventing format recognition errors caused by file extension tampering. Furthermore, by converting the material file into an image format based on the identified file type, unified processing of various certificate materials such as PDF, DOCX, OFD, and images can be achieved, improving the system's compatibility and applicability. Furthermore, by uniformly encoding the converted image format data into Base64 format, material data from different sources and in different formats can be input into the preset visual model in a unified format, simplifying the subsequent field extraction process and improving the system's processing efficiency.

[0060] In some embodiments of the present invention, such as Figure 5As shown, step S402 includes: S501. Match the header byte sequence with the preset header feature sequences of various file types.

[0061] It should be noted that the system compares the header byte sequence of each material file read in step S401 with the preset header feature sequences for various file types one by one. The header feature sequence is a specific byte sequence written at a fixed position in the header of various standard file formats, which can uniquely identify the true format of the file. For example... Figure 9 As shown, the system pre-sets header feature sequences for various file types and their corresponding file type identifiers. These header feature sequences include: PNG format (hexadecimal 0x89504E47), JPEG format (hexadecimal 0xFFD8FFE0, 0xFFD8FFE1, or 0xFFD8FFE8), PDF format (hexadecimal 0x25504446), and ZIP archives (hexadecimal 0x504B0304). The system matches the read header byte sequence with these header feature sequences and determines the file type based on the matching result. This detection mechanism does not rely on file extensions, effectively preventing format recognition errors caused by file extension tampering.

[0062] S502. If the header byte sequence matches the first header feature sequence, the file type is determined to be an image format, and the original byte stream of the material file is used as image format data.

[0063] It should be noted that the first header feature sequence includes header feature sequences (0x89504E47) corresponding to various image formats. Image formats include common formats such as PNG, JPEG, GIF, BMP, and WEBP. When the header byte sequence matches the header feature sequence corresponding to any of the above image formats, the system determines the file type to be an image format. Figure 9 As shown, for material files in image format, the system directly uses the raw byte stream of the material file as image format data, without any rendering or conversion processing, and sends it directly to the image transmission channel. For example, when the header byte sequence matches the header feature sequence (0x89504E47) corresponding to the PNG format, the file type is determined to be PNG; when the header byte sequence matches the header feature sequence (0xFFD8FFE0 / E1 / E8) corresponding to the JPEG format, the file type is determined to be JPEG. For material files in image format, the system directly uses the raw byte stream of the material file as image format data, without any rendering or conversion processing.

[0064] S503. If the header byte sequence matches the second header feature sequence, determine that the file type is PDF format, and render each page of the material file as image format data at a preset resolution.

[0065] It should be noted that the second header feature sequence is the header feature sequence corresponding to the PDF format (0x25504446). When the header byte sequence matches this header feature sequence, the system determines that the file type is PDF format. Figure 9 As shown, for PDF material files, the system calls the Apache PDFBox library's Loader.loadPDF() to load the document. Then, using PDFRenderer, each page of the material file is rendered as a BufferedImage at a preset resolution (e.g., 200 DPI), and outputs a byte array as image data in PNG format. Each page of the PDF document is rendered as independent image data, ensuring that the preset visual model can fully recognize all page content.

[0066] S504. If the header byte sequence matches the third header feature sequence, and a first preset identifier exists in the internal directory structure of the read material file, determine that the file type is DOCX format, extract the text content in the material file, and render the extracted text content as the image format data.

[0067] It should be noted that the third header feature sequence is the header feature sequence (0x504B0304) corresponding to the ZIP archive. For example... Figure 9 As shown, since both DOCX and OFD are essentially ZIP archives, their headers match the magic number (0x504B0304) corresponding to ZIP archives. The system needs to further read the internal directory structure for secondary differentiation. When the header byte sequence matches the third header feature sequence, the system determines the file is in ZIP archive format and needs to further determine its specific type. The system reads the internal directory structure of the material file and checks for the presence of a first preset identifier. When the first preset identifier exists in the internal directory structure, the system determines the file type to be DOCX format. The first preset identifier includes, but is not limited to, internal file or directory structure identifiers specific to DOCX formats such as word / directory or [Content_Types].xml.

[0068] For DOCX format material files, the system calls Apache POI's XWPFDocument and XWPFWordExtractor to extract all text content. The extracted text content is then rendered using Java Graphics2D with a preset font (such as Microsoft YaHei) onto a white background image with a preset width (such as 800 pixels), and output as image data in PNG format.

[0069] S505. If the header byte sequence matches the third header feature sequence, and a second preset identifier exists in the internal directory structure of the read material file, determine that the file type is OFD format, decompress the material file to obtain the internal file, extract the character data of the XML text node from the internal file, and render the extracted character data into the image format data.

[0070] It should be noted that: Similarly, as Figure 9 As shown, when the header byte sequence matches the third header feature sequence (the header feature sequence 0x504B0304 corresponding to the ZIP archive), the system further reads the internal directory structure of the material file to check if a second preset identifier exists therein. When the second preset identifier exists in the internal directory structure, the system determines that the file type is OFD format. The second preset identifier includes, but is not limited to, internal file identifiers specific to OFD format such as OFD.xml or Content.xml.

[0071] For OFD format material files, the system decompresses the material file to obtain the internal file, extracts the character data of XML (Extensible Markup Language) text nodes from the internal file, and renders the extracted character data as the image format data. Specifically, OFD (Open Fixed-layout Document) is essentially a ZIP archive containing an XML document conforming to the national standard GB / T 33190. The system writes the OFD file byte stream to a temporary file, opens it using java.util.zip.ZipFile, iterates through Content.xml, Document.xml, or OFD.xml, parses it using XMLStreamReader in non-namespace-aware mode, collects the character data of all XML text nodes, concatenates them into plain text, and then renders it using Java Graphics2D with a preset font (such as Microsoft YaHei) onto a white background image of a preset width (such as 800 pixels), outputting it as PNG format image data.

[0072] In this embodiment, by matching the header byte sequence with preset header feature sequences for various file types, the true file type can be accurately identified without relying on the file extension, effectively preventing format recognition errors caused by file extension tampering and improving system security and reliability. Furthermore, by directly treating the raw byte stream as image format data for image formats, unnecessary rendering processing can be avoided, improving processing efficiency. Furthermore, by rendering each page of the PDF as image format data at a preset resolution, it can be ensured that all content of multi-page PDF documents is completely recognized, avoiding missing fields due to page omissions. Furthermore, by extracting DOCX format text content and rendering it as image format data, non-image format documents can be uniformly converted into a format recognizable by a preset visual model, expanding the system's applicability. Furthermore, by decompressing OFD format files, extracting XML text node data, and then rendering it as image format data, the recognition requirements of OFD format certificate materials are met, improving the system's adaptability.

[0073] In some embodiments of the present invention, such as Figure 6 As shown, step S102 further includes: S601. Match the material extraction results according to the field identifier.

[0074] It should be noted that: for the currently traversed mapping item, the system matches the material extraction results corresponding to the material name in the mapping item obtained in step S304 with the field identifier in that mapping item to obtain the target field value corresponding to that field identifier. For example... Figure 10 The system first uses the field identifier as the key to perform an exact match search in the material extraction results corresponding to the material name. Each material extraction result is a JSON object containing a collection of key-value pairs of all extractable fields within that material, with the field identifier being a key name in this JSON object. The system searches for the corresponding key-value pair in the material extraction results using the field identifier as the key name. If a corresponding key-value pair exists, the match is successful, and this key-value pair is retrieved as the target field value for that mapping item; otherwise, the match fails.

[0075] S602. If the matching fails, remove the preset additional information from the field identifier to obtain the processed field identifier, and perform matching in the material extraction result according to the processed field identifier.

[0076] It should be noted that: such as Figure 10As shown, if an exact match fails, the system automatically removes preset additional information from the field identifier. Specifically, the preset additional information includes, but is not limited to, notes within the field identifier. These notes are explanatory texts added during the configuration of the field identifier to help business personnel understand the meaning of the field. The system obtains the processed field identifier by identifying and removing the preset additional information from the field identifier (e.g., removing parentheses and all content within them), and then uses the processed field identifier as the key to perform another fuzzy match search in the material extraction results.

[0077] S603. The field value corresponding to the first successful match is used as the target field value.

[0078] It should be noted that the system performs matching using the original field identifier or a secondary matching using the processed field identifier after removing preset additional information. The field value corresponding to the first successful match is used as the target field value. Specifically, the matching order is as follows: First, the matching in step S601 is executed. If the match is successful, the field value corresponding to the successful match is directly obtained as the target field value, and a secondary match is not performed. If the first match fails, the secondary matching in step S602 is executed, and the field value corresponding to the second successful match is obtained as the target field value. If both matches fail, the target field value corresponding to the mapping item is empty, and the system continues to process the next mapping item. Figure 10 As shown, if the match is successful and the obtained target field value is not empty, the value is immediately adopted, the loop is broken (no further attempts are made for subsequent mapping items), and the source material name is recorded for audit traceability; if the match fails or the target field value is empty, the current mapping item is abandoned, and the process returns to step 2 to retrieve the next mapping item and continue trying.

[0079] In this embodiment, by using the field identifier as the key for precise matching in the material extraction results, the corresponding field value can be quickly located and obtained, improving the efficiency of field value retrieval. Furthermore, by removing preset additional information from the field identifier and performing a second match when precise matching fails, the problem of matching failure caused by remarks in the field identifier can be effectively solved, avoiding value retrieval failures due to differences in field name format, and improving the success rate of field value retrieval. Furthermore, by using the field value corresponding to the first successful match as the target field value, field value retrieval can be automatically completed without manual intervention, improving the automation level of the form filling process.

[0080] In some embodiments of the present invention, such as Figure 7 As shown, step S103 includes: S701. According to the priority order, determine whether the target field value corresponding to the current mapping item is empty.

[0081] It should be noted that the system iterates through each mapping item sequentially from high priority to low priority according to the priority order set in the mapping information, and determines whether the target field value corresponding to the current mapping item is empty. For example... Figure 10 As shown, the system checks the null value of the target field obtained after a successful match. If the obtained target field value is not null, the value is immediately adopted, and the loop is exited; if the target field value is null, the current mapping item is discarded, and the system continues to try the next mapping item. The null check includes whether the target field value is null (empty value) or an empty string.

[0082] S702. If the target field value corresponding to the current mapping item is not empty, fill the target field value into the target form field to obtain the filling result, and record the material name corresponding to the target field value before ending the traversal.

[0083] It should be noted that: such as Figure 10 As shown, if the target field value corresponding to the current mapping item is determined to be non-empty (i.e., not null and not an empty string), the system uses this target field value as the filling result and fills it into the target form field. Simultaneously, the system records the material name corresponding to this target field value as a source marker for subsequent audit traceability. After filling is complete, the system stops iterating through subsequent mapping items and ends the filling process for this target form field. The system records the material name corresponding to the filled value of each field during filling for subsequent audit traceability, ensuring that the filling result of each field can be traced back to a specific material source.

[0084] S703. If the target field value corresponding to the current mapping item is empty, continue to determine whether the target field value corresponding to the next mapping item is empty.

[0085] It should be noted that if the target field value corresponding to the current mapping item is determined to be empty (i.e., null or an empty string), the system will not use the value of that mapping item and will automatically downgrade it to the next lower priority mapping item. For example... Figure 10 As shown, when a match fails or the target field value is empty, the system automatically abandons the current mapping item and continues to determine whether the target field value corresponding to the next mapping item is empty, repeating steps S701 to S703. If the target field values ​​corresponding to all mapping items are empty, the system will eventually fill the target form field with an empty value, waiting for subsequent manual processing or triggering other exception handling procedures.

[0086] By defining mapping information for each form field, containing multiple priority-ordered mapping items, and attempting values ​​sequentially along the mapping information during population, the system uses the first non-empty valid value as the population result. This achieves cross-validation and automatic degradation supplementation among multi-source mapping items. When the primary source material cannot provide a valid value, the system automatically degrades to a backup mapping item. This cross-validation mechanism among multiple mapping items effectively improves the accuracy of population.

[0087] In this embodiment, by sequentially determining whether the target field value corresponding to the current mapping item is empty according to priority, the system can automatically downgrade to the next mapping item when the current mapping item value is missing, forming a complete automatic downgrade chain. This effectively avoids filling failure due to missing data from a single source, enhancing the robustness of the form filling process. Furthermore, by recording the material name corresponding to a non-empty value and ending the traversal after obtaining a non-empty value, clear source traceability information can be provided for the filling result of each field, enhancing auditability and credibility in approval scenarios. Furthermore, by adopting a first non-empty value filling strategy and returning an empty value when all mapping items are empty, manual intervention can be avoided when there are conflicts between multiple source data while ensuring data quality, improving field filling efficiency.

[0088] In some embodiments of the present invention, after filling the target field value into the target form field to obtain the filling result, the process includes: The data structure containing the filled-in results, with form fields as keys and filled-in values ​​as values, is returned to the front end, and the material extraction results corresponding to each material are stored in the database; When a filling request for the same material is received, the stored material extraction result is read from the database.

[0089] It should be noted that after filling in the target form fields, the system returns the results to the front end as a Map data structure with the form field as the key and the filled value as the value. In this Map structure, the key is the Chinese name of the target form field, and the value is the corresponding filled result. The system encapsulates this Map structure into a unified response format and returns it to the front end. The front end directly reads the corresponding value using the key and renders it to the form control without additional conversion. Simultaneously, the system persistently stores the material extraction results for each material in a material table in the database. For example... Figure 11 As shown, the system stores the material extraction results for each material in the corresponding `parseResult` field of the material record. When a subsequent request to fill in the same material is received, the system first queries the database to see if a stored material extraction result already exists. If it does, the system directly reads the stored material extraction result from the database, without needing to re-execute steps such as downloading the material, format conversion, and extracting the preset visual model fields.

[0090] In this embodiment, by returning the fill results to the front end in a data structure where the form fields are keys and the fill values ​​are values, the front end can directly render the form without additional conversion, simplifying the front end processing logic and improving the overall response efficiency of the system. Furthermore, by storing the material extraction results corresponding to each material in a database, subsequent fill requests for the same material can be directly retrieved from the database without repeatedly executing AI model calls, effectively reducing AI model call costs, significantly reducing the time overhead of repetitive processing, and improving the system's processing efficiency and resource utilization.

[0091] This invention establishes a complete value retrieval path from the primary source to the backup source by configuring mapping information containing multiple mapping items for each target form field and setting a priority order among these mapping items. Furthermore, by sequentially trying values ​​from each mapping item according to priority order and automatically switching to the next priority mapping item when the target field value obtained by the current mapping item is empty, it can automatically downgrade to the backup material source when the primary source material information is missing, thereby enhancing the fault tolerance and stability of the form filling process and effectively avoiding the problem of empty fields due to the failure to identify a single material source. Furthermore, by filling only the first non-empty value into the target form field, it ensures that the filling result always comes from reliable material data, while avoiding the need for manual intervention in the event of multi-source data conflicts, thus significantly improving both filling accuracy and field filling efficiency. Furthermore, by using the FMMC three-layer mapping configuration model to separate material field definitions, form field definitions, and mapping relationships into three independent JSON configuration layers, it enables business personnel to configure themselves and the filling engine to be completely configuration-driven with zero code, significantly reducing system maintenance costs and business change cycles. Furthermore, by using a multi-format material conversion pipeline to uniformly process formats such as PDF, DOCX, OFD, and images, and a concurrent extraction engine to execute multi-material download, conversion, and AI extraction tasks in parallel, the total processing time is approximately equal to the time of the slowest single material rather than the sum of all materials, significantly reducing end-to-end processing latency and improving user experience.

[0092] 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. Additionally, when embodiments of this application require access to sensitive personal information, separate permission or consent from the user is obtained through pop-ups or redirects 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.

[0093] To better implement the form field filling method in this embodiment of the invention, based on the form field filling method, correspondingly, such as... Figure 12 As shown, this embodiment of the invention also provides a form field filling system 1200, which includes: The acquisition module 1201 is used to acquire mapping information corresponding to the target form field. The mapping information includes multiple mapping items arranged in priority order, and each mapping item includes a material name and a field identifier. The extraction module 1202 is used to obtain the corresponding material extraction result for each mapping item according to the material name in the priority order, and then obtain the target field value corresponding to the field identifier from the material extraction result; The fill module 1203 is used to fill the target form field with the first non-empty value among the target field values ​​obtained in the priority order.

[0094] The form field filling system 1200 provided in the above embodiments can implement the technical solutions described in the above form field filling method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above form field filling method embodiments, and will not be repeated here.

[0095] like Figure 13 As shown, the present invention also provides an electronic device 1300. The electronic device 1300 includes a processor 1301, a memory 1302, and a display 1303. Figure 13 Only some components of the electronic device 1300 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0096] In some embodiments, processor 1301 may be a central processing unit (CPU), microprocessor or other data processing chip, used to run program code stored in memory 1302 or process data, such as the form field filling method of the present invention.

[0097] In some embodiments, processor 1301 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 1301 may be local or remote. In some embodiments, processor 1301 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, etc., or any combination thereof.

[0098] In some embodiments, memory 1302 may be an internal storage unit of electronic device 1300, such as a hard disk or memory of electronic device 1300. In other embodiments, memory 1302 may also be an external storage device of electronic device 1300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 1300.

[0099] Furthermore, the memory 1302 may include both internal storage units of the electronic device 1300 and external storage devices. The memory 1302 is used to store application software and various types of data installed on the electronic device 1300.

[0100] In some embodiments, display 1303 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 1303 is used to display information from electronic device 1300 and to display a visual user interface. Components 1301-1303 of electronic device 1300 communicate with each other via a system bus.

[0101] In one embodiment, when processor 1301 executes a form field filling program in memory 1302, the following steps may be performed: Obtain the mapping information corresponding to the target form field. The mapping information includes multiple mapping items arranged in priority order, and each mapping item includes a material name and a field identifier. According to the priority order, for each mapping item, the corresponding material extraction result is obtained based on the material name, and then the target field value corresponding to the field identifier is obtained from the material extraction result; The first non-empty value among the target field values ​​obtained in the order of priority is filled into the target form field.

[0102] It should be understood that when the processor 1301 executes the form field filling program in the memory 1302, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.

[0103] Furthermore, the embodiments of the present invention do not specifically limit the type of the electronic device 1300 mentioned. The electronic device 1300 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 1300 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0104] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0105] The above provides a detailed description of the form field filling method, system, and electronic device provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for filling in a form field, characterized in that, include: Obtain the mapping information corresponding to the target form field. The mapping information includes multiple mapping items arranged in priority order, and each mapping item includes a material name and a field identifier. According to the priority order, for each mapping item, the corresponding material extraction result is obtained based on the material name, and then the target field value corresponding to the field identifier is obtained from the material extraction result; The first non-empty value among the target field values ​​obtained in the order of priority is filled into the target form field.

2. The form field filling method according to claim 1, characterized in that, The step of obtaining the mapping information corresponding to the target form field includes: Get a populate request including the event identifier; Based on the item identifier, load the mapping relationship configuration table corresponding to the item identifier; the mapping relationship configuration table includes mapping information configured for each form field; The mapping information corresponding to the target form field is parsed from the mapping relationship configuration table.

3. The method according to claim 2, characterized in that, For each mapping item, obtaining the corresponding material extraction result based on the material name includes: Based on the material data source configuration table loaded according to the item identifier, obtain the field set corresponding to each material and the extraction description of each field; Based on the set of fields corresponding to each material and the extraction instructions, an extraction instruction corresponding to each material is generated; Obtain the material file corresponding to the material name in each of the mapping items, and convert each of the material files into image format; The image format corresponding to each material file and the corresponding extraction command are input into a preset visual model for field extraction to obtain the material extraction result corresponding to each material file.

4. The method according to claim 3, characterized in that, The step of converting each of the material files into an image format includes: Read the header byte sequence of each of the aforementioned material files; The file type of the material file is identified based on the header byte sequence, and the material file is converted into an image format based on the identification result; The converted image data is uniformly encoded into Base64 format.

5. The method according to claim 4, characterized in that, The step of identifying the file type of the material file based on the header byte sequence and converting the material file into an image format based on the identification result includes: The header byte sequence is matched with preset header feature sequences for various file types; If the header byte sequence matches the first header feature sequence, the file type is determined to be an image format, and the original byte stream of the material file is used as image format data. If the header byte sequence matches the second header feature sequence, the file type is determined to be PDF format, and each page of the material file is rendered as image format data at a preset resolution. If the header byte sequence matches the third header feature sequence, and a first preset identifier exists in the internal directory structure of the read material file, the file type is determined to be DOCX format, the text content in the material file is extracted, and the extracted text content is rendered as the image format data; If the header byte sequence matches the third header feature sequence, and a second preset identifier exists in the internal directory structure of the read material file, the file type is determined to be OFD format. The material file is decompressed to obtain the internal file, the character data of the XML text node is extracted from the internal file, and the extracted character data is rendered into the image format data.

6. The method according to claim 1, characterized in that, The step of obtaining the target field value corresponding to the field identifier from the material extraction result includes: Matching is performed in the material extraction results based on the field identifier; If the match fails, the preset additional information in the field identifier is removed to obtain the processed field identifier, and the matching is performed in the material extraction result according to the processed field identifier. The field value corresponding to the first successful match is used as the target field value.

7. The method according to any one of claims 1 to 6, characterized in that, The step of filling the target form field with the first non-empty value among the target field values ​​obtained in the order of priority includes: According to the aforementioned priority order, determine whether the target field value corresponding to the current mapping item is empty; If the target field value corresponding to the current mapping item is not empty, fill the target field value into the target form field to obtain the filling result, and record the material name corresponding to the target field value before ending the traversal; If the target field value corresponding to the current mapping item is empty, continue to check whether the target field value corresponding to the next mapping item is empty.

8. The method according to claim 7, characterized in that, After filling the target form field with the target field value to obtain the filling result, the process includes: The data structure containing the filled-in results, with form fields as keys and filled-in values ​​as values, is returned to the front end, and the material extraction results corresponding to each material are stored in the database; When a filling request for the same material is received, the stored material extraction result is read from the database.

9. A form field filling system, characterized in that, include: The acquisition module is used to acquire the mapping information corresponding to the target form field. The mapping information includes multiple mapping items arranged in priority order, and each mapping item includes a material name and a field identifier. The extraction module is used to obtain the corresponding material extraction result for each mapping item according to the material name, and then obtain the target field value corresponding to the field identifier from the material extraction result; The fill module is used to fill the target form field with the first non-empty value among the target field values ​​obtained in the order of priority.

10. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the form field filling method according to any one of claims 1 to 8.