Form filling method and device based on business scenario, electronic equipment and storage medium
Patent Information
- Application Number
- CN202611138802.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]基于此,有必要针对现有的基于业务场景的表单填充问题,提出了一种基于业务场景的表单填充方法、装置、电子设备及存储介质
[0014]本发明的有益效果:通过显示基于当前业务场景配置的自然语言输入区域和表单填充区域,使系统能够根据当前业务场景加载适配的待填充字段集合,在表单填充区域并行展示文本输入信息拆分后的多个文本片段,使得用户能够直观地看到系统对自然语言输入的切分结果,由于现有技术中用户无法获知系统对输入的理解是否正确,并行展示文本片段便于用户在执行匹配操作前对文本拆分结果进行预校验,当拆分结果不符合预期时用户可及时修正输入,从而在匹配操作执行之前即降低了后续匹配错误的概率。
Smart Images

Figure CN123013875A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of form filling technology based on business scenarios, and in particular to a form filling method, apparatus, electronic device and storage medium based on business scenarios. Background Technology
[0002] With the rapid development of voice interaction and natural language processing technologies, more and more applications are beginning to support users in completing form data through natural language input, replacing the traditional manual field-by-field input method. However, existing solutions lack a deep understanding of field semantics. When a user's input text contains multiple entities, multiple fields may compete for the same entity simultaneously. Existing solutions lack effective conflict resolution mechanisms and often adopt a simple first-come, first-served strategy or simply abandon autofill, affecting the reliability of form filling. Summary of the Invention
[0003] Therefore, it is necessary to propose a form filling method, device, electronic device and storage medium based on business scenarios to address the existing problem of form filling based on business scenarios.
[0004] Firstly, this application provides a form filling method based on a business scenario, the method comprising: Displays a natural language input area and a form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; In response to text input information received in the natural language input area, text fragments of the text input information are displayed in parallel in the form fill area; In response to the matching operation between the field to be filled and the text fragment, the matching result between the field to be filled and the text fragment is displayed; When the matching results result in a matching contest, a conflict resolution prompt is displayed in the form fill area; wherein, the conflict resolution prompt is used to indicate the attribution decision of the matching contest; Based on the attribution decision, the hierarchical filling results are displayed in the corresponding field positions of the form's fill area; wherein, the hierarchical filling results include direct filling results, filling results pending confirmation, and results pending manual completion; Based on the results of each level of filling, each field to be filled is filled to obtain the target form that has been filled.
[0005] Further, the step of displaying the matching result of the field to be filled and the text fragment in response to the matching operation of the field to be filled and the text fragment includes: Perform multi-field parallel entity extraction on the text fragment to generate a candidate entity set; wherein, the candidate entity set contains multiple belonging candidates corresponding to different fields for the same candidate entity extracted from the same text fragment; The attribution confidence score between each candidate entity and each field to be filled is calculated to obtain a confidence score matrix; wherein, the attribution confidence score is calculated by weighted summation of regular expression matching score, trigger word association score, character structure feature score and semantic vector similarity score; In the form's fill area, at each field to be filled, the candidate entity with the highest confidence score and its corresponding attribution confidence score are displayed.
[0006] Furthermore, before the step of calculating the attribution confidence score between each candidate entity and each field to be filled to obtain the confidence score matrix, the method further includes: For each field to be filled, the corresponding regular expression, trigger keyword list, character structure feature template and semantic weight vector are obtained from the preset field semantic template set; The text content of each candidate entity is matched against the regular expression. If a match is successful, a regular expression matching score is generated. Detect whether the text content of each candidate entity contains any of the trigger keywords in the trigger keyword list, and generate a trigger word association score based on the detection results; Extract the character structure features of each candidate entity; The character structure features are compared with the character structure feature template to generate a structure feature score; The text content of each candidate entity is input into the semantic encoding model to generate semantic vectors; Calculate the cosine similarity between the semantic vector and the semantic weight vector to obtain the semantic vector similarity score.
[0007] Furthermore, the step of displaying a conflict resolution prompt in the form fill area when the matching result results in a matching contest includes: When the same candidate entity simultaneously satisfies the confidence threshold conditions of the first and second fields to be filled in the multiple fields to be filled in the confidence score matrix, the matching competition is determined to occur. A conflict resolution window is overlaid on the form fill area; wherein, the conflict resolution window displays in parallel the first confidence score and the corresponding first matching basis description when the same candidate entity belongs to the first field to be filled, and the second confidence score and the corresponding second matching basis description when it belongs to the second field to be filled; The attribution decision is generated by performing a global optimal match on the confidence score matrix based on the Hungarian algorithm; wherein the attribution decision is the allocation scheme that maximizes the total global matching score for the same candidate entity under the conditions of satisfying field uniqueness constraints and fragment uniqueness constraints.
[0008] Further, the step of displaying the hierarchical filling result in the corresponding field position of the form fill area according to the attribution ruling result includes: Obtain the attribution confidence of each field to be filled and the corresponding text fragment in the attribution decision result; Each of the attribution confidence scores is compared with a preset first confidence threshold and a second confidence threshold; wherein the first confidence threshold is greater than the second confidence threshold; When the corresponding attribution confidence score is higher than the first confidence threshold, the direct fill result is displayed; when the corresponding attribution confidence score is between the first confidence threshold and the second confidence threshold, the fill result to be confirmed is displayed; when the corresponding attribution confidence score is lower than the second confidence threshold, the result to be manually filled is displayed.
[0009] Furthermore, after the step of filling each of the fields to be filled based on the hierarchical filling results to obtain the filled target form, the method further includes: In response to the triggering of the integrity verification command, the form integrity verification result is displayed in the form fill area; wherein, the form integrity verification result is used to indicate whether there are any empty fields that have not been filled among the plurality of fields to be filled; If there are any empty fields that have not been filled, the positions of all empty fields will be highlighted in the form fill area, and field name hints and input examples will be displayed in association at the positions of each empty field; In response to a user-triggered form submission, the system prevents the submission of forms containing empty fields and displays a prompt window at the top of the form's fill area; wherein the prompt window is used to list the field names of all empty fields and their corresponding recommended input formats.
[0010] Furthermore, the step of displaying the natural language input area and form fill area configured based on the current business scenario includes: Based on the type of the current business scenario, a target scenario template set is selected from multiple pre-stored scenario template sets; wherein, each scenario template set contains a list of fields to be filled corresponding to the scenario, the order of the fields, and the position coordinates of each field in the form fill area; According to the arrangement order and position coordinates of each field in the target scene template set, the multiple fields to be filled are rendered in the form filling area, and the natural language input area is displayed in the form filling area.
[0011] Secondly, this application provides a form filling device based on a business scenario, the device comprising: The first display module is used to display a natural language input area and a form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; The display module is used to display text fragments of the text input information received in the natural language input area in parallel in the form fill area in response to the text input information received in the natural language input area. A response module is used to display the matching result between the field to be filled and the text fragment in response to the matching operation between the field to be filled and the text fragment; The second display module is used to display a conflict resolution prompt in the form fill area when the matching result generates a matching competition; wherein the conflict resolution prompt is used to indicate the attribution decision result of the matching competition; The third display module is used to display the hierarchical filling results in the corresponding field positions of the form filling area according to the attribution decision result; wherein, the hierarchical filling results include direct filling results, filling results to be confirmed, and results to be manually filled; The fill module is used to fill each of the fields to be filled based on the results of each level of fill, so as to obtain the target form that has been filled.
[0012] Thirdly, this application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps: Displays a natural language input area and a form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; In response to text input information received in the natural language input area, text fragments of the text input information are displayed in parallel in the form fill area; In response to the matching operation between the field to be filled and the text fragment, the matching result between the field to be filled and the text fragment is displayed; When the matching results result in a matching contest, a conflict resolution prompt is displayed in the form fill area; wherein, the conflict resolution prompt is used to indicate the attribution decision of the matching contest; Based on the attribution decision, the hierarchical filling results are displayed in the corresponding field positions of the form's fill area; wherein, the hierarchical filling results include direct filling results, filling results pending confirmation, and results pending manual completion; Based on the results of each level of filling, each field to be filled is filled to obtain the target form that has been filled.
[0013] Thirdly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the following steps: Displays a natural language input area and a form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; In response to text input information received in the natural language input area, text fragments of the text input information are displayed in parallel in the form fill area; In response to the matching operation between the field to be filled and the text fragment, the matching result between the field to be filled and the text fragment is displayed; When the matching results result in a matching contest, a conflict resolution prompt is displayed in the form fill area; wherein, the conflict resolution prompt is used to indicate the attribution decision of the matching contest; Based on the attribution decision, the hierarchical filling results are displayed in the corresponding field positions of the form's fill area; wherein, the hierarchical filling results include direct filling results, filling results pending confirmation, and results pending manual completion; Based on the results of each level of filling, each field to be filled is filled to obtain the target form that has been filled.
[0014] The beneficial effects of this invention are as follows: By displaying a natural language input area and a form fill area configured based on the current business scenario, the system can load an adapted set of fields to be filled according to the current business scenario. Multiple text fragments after the text input information is split are displayed in parallel in the form fill area, allowing users to intuitively see the system's segmentation results of the natural language input. Since users cannot know whether the system's understanding of the input is correct in the prior art, displaying text fragments in parallel makes it easier for users to pre-validate the text splitting results before performing the matching operation. When the splitting results do not meet expectations, users can correct the input in time, thereby reducing the probability of subsequent matching errors before the matching operation is executed.
[0015] By displaying conflict resolution prompts in the form fill area when matching results result in competition, the field competition adjudication process, which was originally executed automatically in the background, is explicitly presented to the user. The system displays tiered fill results based on the adjudication results, including direct fill, pending confirmation, and manual fill. Since different fields have objectively different matching confidence levels, presenting fill results with different confidence levels in a differentiated manner allows high-confidence fields to be filled quickly, medium-confidence fields to ensure accuracy with user confirmation, and low-confidence fields to be filled manually by the user. This achieves a balance between fill efficiency and accuracy. Compared to existing technologies that use the same fill processing method for all fields, tiered fill reduces the risk of incorrect fills being submitted directly, improving the overall reliability of form completion. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.
[0017] in: Figure 1 This is an application environment diagram of a form filling method based on a business scenario in one embodiment; Figure 2 This is a flowchart of a form filling method based on a business scenario in one embodiment; Figure 3 This is a structural block diagram of a form filling device based on a business scenario in one embodiment; Figure 4 This is a structural block diagram of an electronic device in one embodiment. Detailed Implementation
[0018] 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 some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Figure 1 This is a diagram of a form population application environment based on a business scenario in one embodiment. (Refer to...) Figure 1This business scenario-based form filling method is applied to a business scenario-based form filling system. The system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal; a mobile terminal can be at least one of a mobile phone, tablet, or laptop. The server 120 can be a standalone server or a server cluster consisting of multiple servers. The terminal 110 displays the natural language input area and form filling area configured based on the current business scenario, while the server 120 generates the attribution decision result.
[0020] like Figure 2 As shown, in one embodiment, a form filling method based on a business scenario is provided. This method can be applied to both terminals and servers; this embodiment uses terminal application as an example. The form filling method based on a business scenario specifically includes the following steps: S1: Display the natural language input area and form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; S2: In response to the text input information received in the natural language input area, display the text fragments of the text input information in parallel in the form fill area; S3: In response to the matching operation between the field to be filled and the text fragment, display the matching result between the field to be filled and the text fragment; S4: When the matching result results in a matching contest, a conflict resolution prompt is displayed in the form fill area; wherein, the conflict resolution prompt is used to indicate the attribution decision of the matching contest; S5: Based on the attribution decision, display the hierarchical filling results in the corresponding field positions of the form fill area; wherein, the hierarchical filling results include direct filling results, filling results pending confirmation, and results pending manual filling; S6: Fill each of the fields to be filled based on the results of each level of filling to obtain the target form that has been filled.
[0021] As described in step S1 above, the natural language input area and form fill area, configured based on the current business scenario, are displayed. The form fill area contains multiple fields to be filled, corresponding to the current business scenario. Different business scenarios correspond to different form templates and field sets. The corresponding field list is retrieved from a pre-configured form template library based on the scenario identifier and then rendered in a structured manner on the graphical user interface. The natural language input area receives text information entered by the user in natural language, while the form fill area displays the fields to be filled in a structured form. The two areas coexist on the same interface, forming an interaction paradigm of "unstructured input → structured fill." This parallel dual-area interface layout retains the flexibility and convenience of natural language input while maintaining the structured and standardized requirements of form filling.
[0022] As described in step S2 above, in response to the text input information received in the natural language input area, text fragments split from the text input information are displayed in parallel in the form fill area. When a user inputs or submits a piece of text information in the natural language input area, instead of directly attempting to map the entire text to the form field, the text input information is first intelligently split into several semantically complete text fragments, and these split text fragments are displayed in parallel with the fields to be filled in the form fill area. The splitting criteria can include punctuation marks (periods, commas, semicolons, etc.), semantic boundaries (such as entity boundaries for time, place, people, amounts, etc.), syntactic structure (subject-verb-object structure), and other dimensions. Specifically, rule-based sentence segmentation algorithms, sequence labeling-based semantic segmentation models, or prompt-based splitting based on large language models can be used. The parallel display method can be: next to or below each field to be filled in the form fill area, a candidate list of text fragments that may be related to that field, split from the input text, is displayed synchronously.
[0023] As described in step S3 above, in response to the matching operation between the field to be filled and the text fragment, the matching result between the field to be filled and the text fragment is displayed. After the text is split and the text fragments are displayed in parallel in the form filling area, the matching operation between the field to be filled and the text fragment is performed, and the matching result is displayed. The matching operation can be an automatically executed intelligent matching, or a matching performed under the user's manual triggering or confirmation, or a combination of automatic matching and user manual adjustment. The core of the matching is to calculate the semantic similarity or relevance between each field to be filled and each text fragment, thereby determining which text fragments should be filled into which fields. Matching methods can include: keyword matching based on field labels and text fragments (e.g., if the field label is "business trip city" and the text fragment contains "Beijing", then it is matched), cosine similarity calculation based on semantic vectors, field-text semantic relevance scoring based on pre-trained language models, and pattern matching based on rule templates (e.g., date format recognition, amount format recognition), etc. The display of matching results can include: highlighting the matched text fragments next to the field, displaying the matching confidence score (such as 90% match), and using different colors to indicate different matching states (such as green for high confidence match, yellow for medium confidence match, and red for low confidence match or no match), etc.
[0024] As described in step S4 above, when a matching competition occurs in the matching results, a conflict resolution prompt is displayed in the form fill area. In practical applications, due to the flexibility and ambiguity of natural language, situations often arise where a text fragment is related to multiple fields to be filled (one-to-many competition), multiple text fragments are related to the same field to be filled (many-to-one competition), or different text fragments provide contradictory information about the same field (conflict). These matching competition situations can hinder the automatic completion of form filling, thus requiring the introduction of a conflict resolution mechanism. When a matching competition is detected in the matching results, a conflict resolution prompt is displayed in the form fill area. This prompt indicates the outcome of the matching competition. The conflict resolution prompt can take various forms: it can be a pop-up dialog box or drop-down menu next to the competing field, listing all competing candidate text fragments for the user to manually select; it can also be based on priority rules (such as the highest confidence level wins, the latest information takes precedence, the credibility of the information source takes precedence, etc.) to automatically determine the outcome and provide a prompt; or it can be that the system generates a resolution suggestion and waits for user confirmation. The conflict resolution prompt should include: the names of the fields involved in the competition, the text fragments involved in the competition and their contents, the matching criteria or confidence level of each candidate, the system's recommended decision result (if any), and the user's action options (such as confirm, modify, ignore, etc.).
[0025] As described in step S5 above, based on the attribution decision, hierarchical filling results are displayed in the corresponding field positions of the form filling area. After the matching in S3 and the conflict resolution in S4, a final attribution decision is obtained for each field to be filled, that is, determining which text fragment should be filled into the field, or determining that the field cannot be automatically filled. The filling results are divided into three levels: direct filling results, pending confirmation filling results, and pending manual filling results, and are displayed differently in the corresponding field positions of the form filling area. Direct filling results indicate that the matching and decision were completed with high confidence and can be automatically filled without user intervention; pending confirmation filling results indicate that although the system has provided filling suggestions, the confidence level is not high enough or there is slight uncertainty, requiring user review and confirmation; pending manual filling results indicate that the system failed to extract valid information from the input text and requires manual input by the user. This hierarchical display mechanism allows users to clearly see which fields have been automatically filled, which need to be reviewed, and which require manual operation, improving the efficiency of form filling and the user experience.
[0026] As described in step S6 above, each field to be filled is filled based on the various hierarchical fill results to obtain a filled target form. After processing in S1 to S5, each field to be filled has obtained a hierarchical fill result. Whether it is a direct fill result, a fill result awaiting confirmation, or a result awaiting manual filling, each field has a definite value or a definite pending state. Based on the actual content of each hierarchical fill result, the final fill operation is performed on each field to be filled to obtain a filled target form. It is important to note that the meaning of "filling" differs for different hierarchical fill results: for "direct fill results," the matched text fragment value is automatically written to the corresponding field without any user operation; for "fill results awaiting confirmation," the suggested value is officially written to the field only after the user completes the confirmation operation (such as clicking the "confirm" button or saving); for "results awaiting manual filling," the system waits for the user to complete the manual input in the blank input box before the filling is considered complete. Once all fields have been filled (i.e., all "pending confirmation" fields have been confirmed and all "pending manual completion" fields have been filled), a complete target form is obtained. This form can then be submitted, saved, printed, or transmitted to downstream business systems.
[0027] In one embodiment, step S3, which displays the matching result of the field to be filled and the text fragment in response to the matching operation between the field to be filled and the text fragment, includes: S301: Perform multi-field parallel entity extraction on the text fragment to generate a candidate entity set; wherein, the candidate entity set contains multiple belonging candidates corresponding to different fields of the same candidate entity extracted from the same text fragment; S302: Calculate the attribution confidence score between each candidate entity and each field to be filled to obtain a confidence score matrix; wherein, the attribution confidence score is calculated by weighted summation of regular expression matching score, trigger word association score, character structure feature score and semantic vector similarity score; S303: Display the candidate entity with the highest confidence score and its corresponding attribution confidence score at each field to be filled in the form fill area.
[0028] As described in step S301 above, multi-field parallel entity extraction is performed on the text fragment to generate a candidate entity set. For each text fragment split in step S2, a multi-field parallel entity extraction strategy is adopted to extract multiple candidate entities that may belong to different fields to be filled from the same text fragment at once, thereby constructing a candidate entity set. The key features of "parallel" and "multiple affiliations" are emphasized. "Parallel" means that instead of searching for matching values in a specific field within the text fragment, entity recognition is performed simultaneously on all fields to be filled in the form (such as names, dates, amounts, cities, employee IDs, etc.), exhaustively enumerating all potential information units contained in the text fragment at once. "Multiple affiliations" means that the same extracted entity value (e.g., the text "Zhang San") may be identified as a candidate for the "traveler's name" field, a candidate for the "approver's name" field, or even a candidate for the "emergency contact person" field. Therefore, the entity will correspond to multiple different affiliation candidate records in the candidate set. Each element in the candidate entity set is typically recorded as a triple: {text fragment source identifier, extracted entity value, candidate attribution field name}.
[0029] As described in step S302 above, the attribution confidence score between each candidate entity and each field to be filled is calculated to obtain a confidence score matrix. The key calculation step in quantitatively evaluating the candidate entity set generated in S301 involves designing a multi-dimensional comprehensive scoring mechanism. This mechanism calculates a confidence score for the attribution relationship between each candidate entity and each field to be filled, ultimately forming a confidence score matrix covering all candidates and all fields. The attribution confidence score is not based on a simple judgment of a single dimension, but rather on a weighted sum of regularity matching score, trigger word association score, character structure feature score, and semantic vector similarity score. For example: Score = α·R + β·T + γ·S + δ·V, where α + β + γ + δ = 1, α, β, γ, and δ are the weights of the regularity matching score, trigger word association score, character structure feature score, and semantic vector similarity score, respectively, and R, T, S, and V are the regularity matching score, trigger word association score, character structure feature score, and semantic vector similarity score, respectively. The system comprises four components: a regular expression matching score, a trigger word association score, and a semantic vector similarity score. The regular expression matching score checks whether the candidate entity's format matches the expected data format of the field (e.g., date format, email format, amount format, etc.). The trigger word association score checks whether the context of the text fragment containing the candidate entity contains trigger words strongly related to the field name (e.g., if the field is "business trip city," the presence of trigger words like "go," "fly to," or "arrive" in the fragment adds points). T = sum(w_i * (1 - d_i / D)), where w_i is the keyword weight, d_i is the distance between the keyword and the entity, and D is the length of the text fragment. The character structure feature score evaluates whether the candidate entity's character composition conforms to common field patterns (e.g., employee IDs are usually pure numbers or a combination of letters and numbers, and names are combinations of Chinese characters). The semantic vector similarity score uses a pre-trained language model to encode the field label and candidate entity into semantic vectors, calculating their cosine similarity in the semantic space. The four scores are weighted and summed using preset weight coefficients (which can be dynamically adjusted according to the business scenario) to obtain the final attribution confidence score. After performing this calculation on all candidate-field pairs, a confidence score matrix is generated, with the number of rows equal to the number of candidate entities and the number of columns equal to the number of fields to be filled. This matrix quantitatively reflects the matching strength of each candidate entity for each field. When the text fragment is short or contains technical terms, the trigger word association score can provide accurate local semantic indications; while when the text fragment is long or the trigger word is not matched, the semantic vector similarity score can capture deep global semantic associations. This application combines the advantages of both by using a weighted summation method, achieving robust matching in different scenarios.
[0030] As described in step S303 above, in each field to be filled in the form fill area, the candidate entity with the highest confidence score and its corresponding attribution confidence score are displayed. Based on the generated confidence score matrix, for each field to be filled in the form fill area, the candidate entity with the highest attribution confidence score is selected from all candidate entities, and this candidate entity and its corresponding score are displayed intuitively at that field position. Only the candidate result with the highest matching degree is displayed for each field position to avoid information overload and difficulty in user decision-making caused by displaying a large number of low-quality candidates. However, it should be noted that displaying only the highest-scoring candidate does not mean that the final attribution decision has been completed. This display result is only used as the matching result output of step S3 for user reference or for conflict resolution in the subsequent step S4. The display method should present both the specific content of the candidate entity and the confidence score value (or percentage) so that users can intuitively understand the credibility of the matching result. If the confidence scores of all candidate entities corresponding to a certain field are lower than a preset threshold (e.g., lower than 30 points), it is considered that no valid candidate has been matched for that field, and "Not Matched" or left blank is displayed at that field position. In addition, for multiple candidates with similar scores (such as the difference between the first and second place scores being less than 5 points), an additional "Similar candidates exist" prompt can be added next to the field to provide early warning for potential conflict resolution.
[0031] In one embodiment, before step S302, which calculates the attribution confidence score between each candidate entity and each field to be filled to obtain the confidence score matrix, the method further includes: S3011: For each field to be filled, obtain the corresponding regular expression, trigger keyword list, character structure feature template and semantic weight vector from the preset field semantic template set; S3012: Match the text content of each candidate entity with the regular expression; if the match is successful, generate a regular expression matching score. S3013: Detect whether the text content of each candidate entity contains any of the trigger keywords in the trigger keyword list, and generate a trigger word association score based on the detection result; S3014: Extract the character structure features of each candidate entity; S3015: Compare the character structure features with the character structure feature template to generate a structure feature score; S3016: Input the text content of each candidate entity into the semantic encoding model to generate semantic vectors; S3017: Calculate the cosine similarity between the semantic vector and the semantic weight vector to obtain the semantic vector similarity score.
[0032] As described in step S3011 above, for each field to be filled, the corresponding regular expression, trigger keyword list, character structure feature template, and semantic weight vector are obtained from a preset field semantic template set. A field semantic template set is pre-constructed (which can be stored as a database table, configuration file, or knowledge graph). This template set configures four types of parameters for subsequent matching calculations for each type of field to be filled: regular expression, trigger keyword list, character structure feature template, and semantic weight vector. When it is necessary to calculate the attribution confidence score for a certain field to be filled, these four types of parameters for the corresponding field are first retrieved from the template set and loaded. The regular expression is used to define the legal format pattern of the field value (such as date format, amount format, mobile phone number format, etc.); the trigger keyword list is used to define the set of words that can indicate the attribution of the field when they appear in the text context; the character structure feature template is used to define the typical pattern of the field value in terms of character composition (such as all Chinese, all numbers, mixed alphanumeric, etc.); and the semantic weight vector is the vectorized representation of the field label in the semantic space, used for subsequent semantic similarity calculation.
[0033] As described in step S3012 above, the text content of each candidate entity is matched against the regular expression. If a match is successful, a regular expression matching score is generated. The regular expression obtained in step S3011 for a field to be filled is applied one by one to the text content of all candidate entities to check whether the text format of the candidate entity meets the expected data format specification of that field. If a match is successful, a corresponding regular expression matching score is generated; if a match fails, the regular expression matching score is zero or a very low score. The regular expression matching score can be further refined: a complete match (e.g., a date format that fully conforms to the "YYYY-MM-DD" standard format) receives a high score (e.g., 95-100 points); a partial match (e.g., a date written as "2026 / 7 / 1" instead of the standard format, but still captured by the regular expression) receives a medium score (e.g., 70-85 points); if a match is successful but there are format irregularities (e.g., the amount lacks a currency symbol, but the number format is correct), a lower score (e.g., 60-70 points) is obtained. This scoring strategy can distinguish candidate entities of different quality levels, making the subsequent weighted summation result more accurate. The calculation result of this step will be used as one of the four components of the weighted summation of the attribution confidence score, and the weight coefficients are preset in the template obtained by S3011.
[0034] As described in step S3013 above, the text content of each candidate entity is checked to see if it contains any of the trigger keywords in the trigger keyword list, and a trigger word association score is generated based on the detection results. Utilizing the contextual information of the text segment containing the candidate entity (rather than relying solely on the candidate entity itself), the context is checked to see if it contains trigger keywords strongly related to the target field, thereby evaluating the semantic association strength between the candidate entity and the field. Unlike regular expression matching, which only focuses on the format of the candidate entity itself, this step introduces the important additional information source of "contextuality," which can improve the accuracy of matching. For example, the entity "860 yuan" could belong to "transportation expenses," "accommodation expenses," or "food expenses," and cannot be distinguished solely from the entity itself. However, if the trigger keyword "transportation expenses" appears in the text segment containing the entity, the entity can be attributed to the "transportation expenses" field with high confidence. The implementation logic of this step is as follows: For each candidate entity, obtain the original text fragment from its source; search the text fragment for any word in the trigger keyword list of the target field; generate a trigger keyword association score based on factors such as the number of hit keywords, the distance between the keyword and the entity (the closer the keyword, the higher the weight), and the weight level of the keyword (core trigger keywords have higher weight than general trigger keywords). If no trigger keyword is hit, the score is zero or a base score, but not zero (because a zero score may cause this dimension to become completely ineffective; usually, a very low base score, such as 10 points, is set).
[0035] As described in the above step S3014, the character structure feature of each candidate entity is extracted. A character-level structural analysis is performed on the text content of each candidate entity, so as to extract quantitative features that can characterize the character composition rule of the entity. The character structure feature is a shallow feature based on character morphology that does not rely on semantic understanding, with extremely low calculation cost but strong discrimination capability. Common character structure features include, but are not limited to: character length (for example, the length of "Zhang San" is 2, and the length of "2026-07-01" is 10), character type distribution (for example, the proportion of Chinese characters, the proportion of numeric characters, the proportion of alphabetic characters, the proportion of special symbols), character combination patterns (for example, the "letter + number" pattern, the "all Chinese" pattern, the "number + separator" pattern), first character type, last character type, whether specific characters are included (such as quantifiers or unit characters like "Yuan", "Ri (day)", "Shi (city)"), etc. These features can be quantified as a structure feature vector, for example, represented by a vector of fixed length: the 1st dimension is the length, the 2nd dimension is the proportion of Chinese characters, the 3rd dimension is the proportion of numeric characters, the 4th dimension is whether a separator is included (0 / 1), and so on. The output of this step (i.e., the structure feature vector of each candidate entity) will be used as the input of step S3015, and compared with the character structure feature template of the field. The granularity and dimension of feature extraction can be configured according to actual service requirements, and different field types may need to focus on different structure feature dimensions.
[0036] As described in the above step S3015, the character structure feature is compared with the character structure feature template to generate a structure feature score. The extracted character structure feature vector of the candidate entity is compared with the obtained character structure feature template corresponding to the field, and the structural similarity between the two is calculated, so as to generate the structure feature score. The character structure feature template defines the character composition pattern of the expected value of a certain field, for example, the expected value structure of the "business trip start date" field is "number + separator + number + separator + number" (that is, a date-type structure), the expected value of the "business trip person name" field is a structure of "2-4 all Chinese characters", and the expected value of the "employee ID" field is a "mixed letter and number" structure, etc. The implementation manner of the comparison may be: calculating the Euclidean distance or cosine similarity between the structure feature vector of the candidate entity and the template standard vector; or performing rule-based item-by-item comparison, such as whether the length is within the allowable range, whether the proportion of Chinese characters meets the threshold requirement, whether a separator of the expected type is included, etc., and then performing comprehensive scoring according to the matching situation of each item. The significance of the structure feature score lies in that even if a certain candidate entity is semantically related to the field, if its character structure seriously does not meet the conventional format requirement of the field, the system will still assign a low structure feature score, thereby reducing the comprehensive confidence of the candidate entity on the field, and avoiding the false matching situation of "semantically related but format incorrect".
[0037] As described in step S3016 above, the text content of each candidate entity is input into a semantic encoding model to generate semantic vectors. Using deep learning-based semantic encoding models, such as Bidirectional Encoder Representations from Transformers (BERT), Robust Optimized BERT Pre-training Method (RoBERTa), or Enhanced Representation through Knowledge Integration (ERNIE), the text content of the candidate entities is converted into a dense semantic vector of fixed dimensions. Unlike character structure features (shallow, syntactic level), semantic vectors capture the deep semantic information of the text. Even if two entities are completely different in character form, if they are semantically similar (e.g., "Beijing" and "Imperial Capital"), they will be close in the semantic vector space; conversely, even if two entities are completely identical in character structure (e.g., "apple" can refer to both fruit and company), their semantic vectors will differ in different contexts. This step uses a semantic encoding model to map natural language text to a high-dimensional continuous vector space, where each dimension encodes a certain semantic feature, the direction of the vector represents the semantic direction, and the magnitude represents the semantic strength. Semantic vector generation typically relies on language models pre-trained on large-scale corpora, which have learned rich vocabulary and semantic knowledge. The output of this step is the semantic vector for each candidate entity (usually a 768-dimensional or 1024-dimensional floating-point vector), which serves as input to step S3017 for similarity calculation with the field's semantic weight vector. It is worth noting that the semantic encoding model can be fine-tuned for specific business domains to improve its semantic representation capabilities in specific scenarios.
[0038] As described in step S3017 above, the cosine similarity between the semantic vector and the semantic weight vector is calculated as the semantic vector similarity score. The generated candidate entity's semantic vector is compared with the obtained semantic weight vector of the field (i.e., the semantic vector of the field label) using cosine similarity calculation. The result is used as the semantic vector similarity score between the candidate entity and the field. Cosine similarity is a metric that calculates the cosine of the angle between two non-zero vectors. Its value range is [-1, 1]. The closer the value is to 1, the more consistent the directions of the two vectors in the semantic space, i.e., the more semantically similar they are; the closer the value is to 0, the more orthogonal they are, and the semantics are unrelated; the closer the value is to -1, the opposite the semantics. Cosine similarity is chosen instead of Euclidean distance because it is not sensitive to the magnitude of the vectors but focuses more on the direction of the vectors (i.e., semantic direction), which meets the needs of semantic comparison—even if the semantic vector of a candidate entity has a small magnitude (such as short text), as long as its direction is consistent with the direction of the field's semantic vector, the cosine similarity can still give a high score. The calculated cosine similarity is usually output in percentage form (e.g., mapping [-1,1] to the interval [0,100]), and is used as a semantic vector similarity score in subsequent weighted summation.
[0039] In one embodiment, step S4, which displays a conflict resolution prompt in the form fill area when the matching result results in a matching contest, includes: S401: When the same candidate entity simultaneously satisfies the confidence threshold conditions of the first and second fields to be filled in the multiple fields to be filled in the confidence score matrix, it is determined that the matching competition has occurred; S402: Display a conflict resolution window overlay in the form fill area; wherein, the conflict resolution window displays in parallel the first confidence score and corresponding first matching basis description when the same candidate entity belongs to the first field to be filled, and the second confidence score and corresponding second matching basis description when it belongs to the second field to be filled; S403: The attribution decision result generated after performing global optimal matching on the confidence score matrix based on the Hungarian algorithm; wherein the attribution decision result is the allocation scheme that maximizes the total global matching score for the same candidate entity under the conditions of satisfying field uniqueness constraints and fragment uniqueness constraints.
[0040] As described in step S401 above, when the same candidate entity simultaneously satisfies the confidence threshold conditions of the first and second fields to be filled in the multiple fields to be filled in the confidence score matrix, a matching competition is determined to have occurred. Based on the generated confidence score matrix, for each candidate entity (i.e., the specific information unit extracted from the text fragment), its confidence score with all fields to be filled is checked. When it is found that the same candidate entity simultaneously causes the confidence scores of two or more fields to be filled (e.g., the first and second fields to be filled) to exceed the preset confidence threshold conditions, the system determines that a "matching competition" has occurred. The confidence threshold conditions can be a fixed absolute score threshold (e.g., a confidence score ≥ 60 points is considered satisfactory), a relative threshold (e.g., the score ranks in the top 3 among all candidate entities is considered satisfactory), or a combination of both. For example, a text fragment may contain only the date "July 1st," but this date could belong to either the "business trip start date" or the "business trip end date" field. In this case, the same candidate entity ("July 1st") simultaneously satisfies the threshold conditions of both date fields, resulting in matching competition. This detection mechanism can comprehensively capture both one-to-many (one entity corresponds to multiple fields) and many-to-one (multiple entities correspond to one field, which is represented by multiple high-score columns for the same field in the S302 matrix, but this step specifically refers to the former) competition scenarios, providing precise trigger signals for subsequent conflict resolution.
[0041] As described in step S402 above, a conflict resolution window is overlaid in the form fill area. This window displays, in parallel, the first confidence score and corresponding first matching criterion description when the same candidate entity belongs to the first field to be filled, and the second confidence score and corresponding second matching criterion description when it belongs to the second field to be filled. When S401 detects matching competition, a dedicated conflict resolution window (which can be a modal dialog box, side panel, or embedded expanded area) pops up on the current interface of the form fill area in an overlay manner. This window presents the core information of the competition to the user in a parallel comparison. It not only displays the confidence scores of the same candidate entity in different fields but also the matching criterion descriptions corresponding to each score. The matching criterion descriptions present the matching evidence for each dimension in readable natural language or structured labels, such as "The text fragment contains the trigger word 'go,' and the character structure conforms to the city name pattern; the regular expression match passes." Through this parallel display, users can clearly understand why the candidate entity is recommended to multiple fields simultaneously, and the logical basis behind each recommendation, enabling them to make informed decisions. The window should support user interaction, typically including selection buttons (such as "Enter this value into field A" and "Enter this value into field B"), and may also include auxiliary options such as "Ignore this candidate" or "Manually modify". Overlaying the display rather than redirecting to a new page ensures that the user always retains a complete contextual awareness of the form's fill area.
[0042] As described in step S403 above, the attribution decision is generated after performing a globally optimal match on the confidence score matrix using the Hungarian Algorithm (a combinatorial optimization algorithm for solving the optimal assignment problem). The attribution decision is the allocation scheme that maximizes the total global matching score for the same candidate entity while satisfying the field uniqueness and fragment uniqueness constraints. The matching problem from candidate entities to fields to be filled is abstracted into a classic optimal assignment problem, and the Hungarian Algorithm is used to solve the globally optimal match problem on the generated confidence score matrix, thereby generating the final attribution decision. This provides an automated, mathematically optimal decision mechanism, parallel to the provided manual user decision method. The core constraints of this mechanism include two aspects: the "field uniqueness constraint" means that each field to be filled can only accept one candidate entity as its filling value (i.e., the field cannot be repeatedly occupied); the "fragment uniqueness constraint" means that each candidate entity (from the same text fragment) can only be assigned to one field (i.e., the entity cannot be reused). Under these two constraints, the optimal assignment scheme is found among all possible assignment schemes that maximizes the global matching total score (i.e., the sum of the confidence scores of all selected candidate entity-field pairs). The Hungarian algorithm can solve this assignment problem in polynomial time complexity by finding the optimal bipartite graph perfect match through mathematical operations such as matrix reduction, marking zero elements, and finding augmenting paths. The assignment decision is a set of pairs of the form {candidate entity k → field j to be filled}, where each assignment pair is part of the global optimal solution, and all conflicting candidate entities receive a unique assignment decision within this global framework.
[0043] In one embodiment, step S5, which displays the hierarchical filling result at the corresponding field position in the form filling area based on the attribution ruling result, includes: S501: Obtain the attribution confidence of each field to be filled and the corresponding text fragment in the attribution decision result; S502: Compare each of the attribution confidence levels with a preset first confidence threshold and a second confidence threshold; wherein the first confidence threshold is greater than the second confidence threshold; S503: When the corresponding attribution confidence score is higher than the first confidence threshold, the direct fill result is displayed; when the corresponding attribution confidence score is between the first confidence threshold and the second confidence threshold, the fill result to be confirmed is displayed; when the corresponding attribution confidence score is lower than the second confidence threshold, the result to be manually filled is displayed.
[0044] As described in step S501 above, the attribution confidence scores of each field to be filled and its corresponding text segment are obtained from the attribution decision result. After generating the globally optimal attribution decision result using the Hungarian algorithm, the assigned candidate entity corresponding to each field to be filled is extracted from the decision result, and the attribution confidence score corresponding to the assigned pair is obtained simultaneously. The attribution decision result is essentially a set of binary mapping relationships, such as {field A → candidate entity X, field B → candidate entity Y, ...}, and each mapping relationship has a unique corresponding score value in the confidence score matrix generated in S302. This step is the process of retrieving these scores from the matrix and associating them with the fields. The technical significance of this step is that it provides a unique quantitative basis for subsequent hierarchical decision-making—the three levels of hierarchical filling results (direct filling, filling pending confirmation, and filling pending manual completion) are based on the high and low attribution confidence scores. The attribution confidence score is consistent with the confidence score matrix. However, due to the globally optimal matching performed by the Hungarian algorithm, some candidate entities that originally generated matching competition have been assigned to uniquely determined fields. Therefore, the score obtained in this step is the score corresponding to the field to which the candidate entity was ultimately assigned, rather than the score across all fields. For fields that were not assigned any candidate entities (i.e., failed to extract valid information from any text fragment), their attribution confidence score is recorded as zero or a null value.
[0045] As described in step S502 above, each assigned confidence score is compared with a preset first confidence threshold and a second confidence threshold; wherein the first confidence threshold is greater than the second confidence threshold. The acquired assigned confidence score of each field to be filled is numerically compared with the two preset confidence thresholds, the first confidence threshold (higher threshold) and the second confidence threshold (lower threshold). The field is assigned to a specific fill level by determining which numerical interval the assigned confidence score falls within, as defined by these two thresholds. By setting a "dual threshold" mechanism, the continuous confidence score space is divided into three non-overlapping discrete intervals: above the first threshold is the "high confidence interval," between the first and second thresholds is the "medium confidence interval," and below the second threshold is the "low confidence interval." These three intervals correspond to three different ways of displaying the fill results. The first confidence threshold can be set to 85 points, and the second confidence threshold can be set to 60 points. These thresholds can be dynamically adjusted based on the historical fill accuracy of the scenario.
[0046] As described in step S503 above, when the corresponding attribution confidence score is higher than the first confidence threshold, the direct fill result is displayed; when the corresponding attribution confidence score is between the first confidence threshold and the second confidence threshold, the fill result to be confirmed is displayed; when the corresponding attribution confidence score is lower than the second confidence threshold, the result to be manually filled is displayed. Based on the comparison and classification results, the fill content is displayed in three different visual styles and interaction modes at each field to be filled in the form fill area. When the attribution confidence of a field is higher than the first confidence threshold, the "direct fill result" is displayed—the value is directly filled into the field with a high-trust visual style (such as a green background, a checkmark icon, and a gray locked and uneditable state), indicating that the user can trust the fill result without any operation. When the attribution confidence level is between the first and second thresholds, the system displays "Pending Confirmation of Fill-in Result"—the suggested value is filled into the field with a reminder visual style (such as a yellow or orange background, a question mark or warning icon, and an editable state). "Confirm" and "Modify" buttons are provided next to the field, indicating that a fill-in suggestion has been given but requires user review and confirmation before it takes effect. When the attribution confidence level is below the second threshold, the system displays "Pending Manual Fill-in Result," with the field displayed as an empty or placeholder visual style (such as a red asterisk, a dashed border, and a blank input box), indicating that no valid information could be extracted from the input text and that the user needs to enter the information completely manually.
[0047] In one embodiment, after step S6, which involves filling each of the fields to be filled based on the hierarchical filling results to obtain the filled target form, the method further includes: S701: In response to the triggering of the integrity verification command, the form integrity verification result is displayed in the form fill area; wherein, the form integrity verification result is used to indicate whether there are any empty fields that have not been filled in among the plurality of fields to be filled; S702: If there are empty fields that have not been filled, highlight the positions of all empty fields in the form fill area and display field name prompts and input examples in association at the positions of each empty field; S703: In response to a user-triggered form submission, prevent the submission of a form containing the empty fields and display a prompt window at the top of the form fill area; wherein the prompt window is used to list the field names of all empty fields and their corresponding recommended input formats.
[0048] As described in step S701 above, in response to the triggering of the integrity verification command, the form integrity verification result is displayed in the form fill area. After receiving the integrity verification command issued by the user or itself, all fields to be filled in the form fill area are traversed, and each field is checked to see if it has been effectively filled (i.e., whether it has a non-empty, valid value). Based on the detection results, a form integrity verification result is generated, and then the result is presented to the user in a visual manner in the form fill area. The "integrity verification command" referred to here can be triggered actively by the user (such as when the user clicks the "Verify Integrity" button on the interface), or it can be automatically triggered by the system in a specific event (such as automatically executing after all filling is completed in step S6, or automatically triggering before the user attempts to switch pages, save drafts, submit forms, etc.). The display format of the completeness verification results can be varied. For example, "8 / 11 fields completed (73%)" can be displayed at the top of the form as a progress bar or score; "Required field completeness: 100%, all field completeness: 73%" can be displayed at the bottom of the form as a statistical summary; or the status icon (filled / not filled) can be updated in real time next to each field.
[0049] As described in step S702 above, if there are any unfilled empty fields, the positions of all empty fields are highlighted in the form fill area, and field name hints and input examples are displayed in association at each empty field location. When the completeness check finds unfilled empty fields, a targeted visual guidance mechanism is activated. In the form fill area, the positions of all empty fields are highlighted (e.g., using highlight colors, flashing borders, enlarged icons, etc.), and at these empty field locations, field name hints (to remind users of the specific meaning of the field) and input examples (to guide users on what content to fill in) are displayed in association. The organic combination of "location guidance" and "format demonstration" solves the problem of "where to fill in," while the associated field name hints and input examples solve the problems of "what to fill in" and "how to fill in." Field name hints can directly reuse field labels (e.g., "Approver's Name"), or they can be expanded to more detailed semantic descriptions (e.g., "Please enter your direct supervisor's name"). The input examples generate specific sample values based on the data type of the fields (e.g., "Zhang San" for text fields, "2026-07-01" for date fields, and "860.00" for monetary fields). This two-pronged approach greatly reduces the cognitive burden and input error rate for users when manually filling in the form later, and is especially helpful for users unfamiliar with form structures.
[0050] As described in step S703 above, in response to a user-triggered form submission, submission of forms containing empty fields is prevented, and a prompt window pops up at the top of the form fill area. When the user performs a form submission operation (such as clicking the "Submit," "Save and Submit," or "Done" button), a real-time empty field check is first performed in the submission event handling function. If any unfilled empty fields are detected in the form, the system immediately intercepts the submission operation—that is, it prevents the form data from being sent to the server, preventing incomplete form data from flowing into downstream business systems. At the same time, a pop-up window (or floating prompt bar) at the top of the form fill area clearly shows the user the reason for the submission being rejected. The key feature of this prompt window is that it does not simply prompt "Please fill in completely," but lists the field names of all empty fields one by one, and for each empty field, it additionally displays the recommended input format for that field. The recommended input format is a further structured presentation of the input examples in S702. It appears in the form of format specification descriptions (such as "text type, 2-20 characters", "date type, format YYYY-MM-DD", "amount type, retain two decimal places", etc.) to help users complete the supplementary information according to the correct data specifications.
[0051] In one embodiment, step S1, which displays the natural language input area and form fill area configured based on the current business scenario, includes: S101: Based on the type of the current business scenario, select a target scenario template set from multiple pre-stored scenario template sets; wherein, each scenario template set contains a list of fields to be filled corresponding to the scenario, the order of each field, and the position coordinates of each field in the form fill area; S102: According to the arrangement order and position coordinates of each field in the target scene template set, render the multiple fields to be filled in the form filling area, and display the natural language input area in the form filling area.
[0052] As described in step S101 above, a target scenario template set is selected from multiple pre-stored scenario template sets based on the type of the current business scenario. Based on the type identifier of the current business scenario (such as scenario ID, scenario name, or scenario classification code), the template set matching the current scenario is retrieved and selected from multiple pre-stored scenario template sets in a database, configuration file, or cloud template library as the target scenario template set. The "scenario template set" referred to here is not simply a list of field names, but a structured, complete data object containing configuration information in at least three dimensions: First, the "list of fields to be filled," which includes metadata such as the names, data types, and whether they are required for all fields that the user needs to fill in under this scenario; second, the "order of the fields," which is the logical arrangement of these fields in the form from top to bottom or from left to right. This order is usually set according to business habits or operational processes (e.g., filling in basic information first, then detailed information, and finally approval information); and third, the "position coordinates of each field in the form's fill area," which is the specific rendering position of each field in the graphical user interface, usually defined by page grid coordinates (such as row and column numbers) or absolute coordinates (such as X and Y pixel values). This design, which packages field definitions, logical order, and physical coordinates into a single template, achieves a complete description of the form interface layout. It eliminates the need for hard-coding interface code; simply changing the template allows for the automatic generation of forms for different business scenarios, greatly improving the system's scalability and maintainability.
[0053] As described in step S102 above, according to the arrangement order and position coordinates of each field in the target scene template set, the multiple fields to be filled are rendered in the form fill area, and the natural language input area is displayed in the form fill area. Using the target scene template set selected in step S101 as a blueprint, according to the arrangement order and position coordinates of each field defined therein, the visual components (including field labels, value display areas, or input controls, etc.) of all fields to be filled are drawn in the form fill area of the graphical user interface. At the same time, the natural language input area is rendered and displayed in the same form fill area, ultimately forming a composite interactive interface that includes both a flexible input area and a structured field area. The key to this step lies in "coordinate-driven precise rendering" and "spatial fusion of two regions"—based on the row and column coordinates of each field in the template, it is rendered to a specified grid position in the form fill area, ensuring that the fields are neatly arranged, properly aligned, and that the relative positions between the fields fully conform to the preset business logic order of the template. The natural language input area is rendered as an independent UI component in a specific position in the form fill area (usually located at the top, side, or embedded between fields). The size and style of this area can be predefined or adaptively adjusted according to the overall layout of the form fill area.
[0054] Reference Figure 3 The present invention also provides a form filling device based on a business scenario, the device comprising: The first display module 902 is used to display a natural language input area and a form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; Display module 904 is used to display text fragments of the text input information in parallel in the form fill area in response to the text input information received in the natural language input area; The response module 906 is used to display the matching result between the field to be filled and the text fragment in response to the matching operation between the field to be filled and the text fragment; The second display module 908 is used to display a conflict resolution prompt in the form fill area when the matching result generates a matching competition; wherein the conflict resolution prompt is used to indicate the attribution decision result of the matching competition; The third display module 910 is used to display the hierarchical filling results in the corresponding field positions of the form filling area according to the attribution decision result; wherein, the hierarchical filling results include direct filling results, filling results to be confirmed, and results to be manually filled; The filling module 912 is used to fill each of the fields to be filled based on the filling results of each level, so as to obtain the target form that has been filled.
[0055] In one embodiment, the response module 906 includes: The candidate entity set generation submodule is used to perform multi-field parallel entity extraction on the text fragment to generate a candidate entity set; wherein, the candidate entity set contains multiple belonging candidates corresponding to different fields of the same candidate entity extracted from the same text fragment; The attribution confidence score calculation submodule is used to calculate the attribution confidence score between each candidate entity and each field to be filled, and obtain a confidence score matrix; wherein, the attribution confidence score is calculated by weighted summation based on regular expression matching score, trigger word association score, character structure feature score and semantic vector similarity score; The attribution confidence score display submodule is used to display the candidate entity with the highest confidence score and its corresponding attribution confidence score at each field to be filled in the form fill area.
[0056] In one embodiment, the response module 906 further includes: The regular expression retrieval submodule is used to retrieve the corresponding regular expression, trigger keyword list, character structure feature template and semantic weight vector for each field to be filled from the preset field semantic template set; The matching submodule is used to match the text content of each candidate entity with the regular expression, and if the match is successful, a regular expression matching score is generated. The detection submodule is used to detect whether the text content of each candidate entity contains any of the trigger keywords in the trigger keyword list, and to generate a trigger word association score based on the detection results; The extraction submodule is used to extract the character structure features of each candidate entity; The comparison submodule is used to compare the character structure features with the character structure feature template to generate a structure feature score; The input submodule is used to input the text content of each candidate entity into the semantic encoding model to generate semantic vectors; The cosine similarity calculation submodule is used to calculate the cosine similarity between the semantic vector and the semantic weight vector, as a semantic vector similarity score.
[0057] In one embodiment, the second display module 908 includes: The matching competition generation submodule is used to determine the generation of the matching competition when the same candidate entity simultaneously meets the confidence threshold conditions of the first and second fields to be filled in the multiple fields to be filled in the confidence score matrix. The conflict resolution window display submodule is used to overlay a conflict resolution window on the form fill area; wherein, the conflict resolution window displays in parallel the first confidence score and the corresponding first matching basis description when the same candidate entity belongs to the first field to be filled, and the second confidence score and the corresponding second matching basis description when it belongs to the second field to be filled. The attribution decision result generation submodule is used to generate attribution decision results after performing global optimal matching on the confidence score matrix based on the Hungarian algorithm; wherein, the attribution decision result is the allocation scheme that maximizes the total global matching score for the same candidate entity under the conditions of satisfying field uniqueness constraints and fragment uniqueness constraints.
[0058] In one embodiment, the third display module 910 includes: The attribution confidence acquisition submodule is used to acquire the attribution confidence of each field to be filled and the corresponding text fragment in the attribution decision result; The comparison submodule is used to compare each of the attribution confidence scores with a preset first confidence threshold and a second confidence threshold; wherein the first confidence threshold is greater than the second confidence threshold; The display submodule is used to display the direct fill result when the corresponding attribution confidence score is higher than the first confidence threshold; to display the fill result to be confirmed when the corresponding attribution confidence score is between the first confidence threshold and the second confidence threshold; and to display the result to be manually filled when the corresponding attribution confidence score is lower than the second confidence threshold.
[0059] In one embodiment, the form filling device based on a business scenario further includes: The form completeness verification result display module is used to display the form completeness verification result in the form fill area in response to the triggering of the completeness verification command; wherein, the form completeness verification result is used to indicate whether there are any empty fields that have not been filled among the plurality of fields to be filled; The input example display module is used to highlight the positions of all empty fields in the form fill area if there are any unfilled empty fields, and to display field name prompts and input examples in association at the positions of each empty field; The submission blocking module is used to prevent the submission of forms containing empty fields in response to a user-triggered form submission operation, and to pop up a prompt window at the top of the form fill area; wherein, the prompt window is used to list the field names of all empty fields and their corresponding recommended input formats.
[0060] In one embodiment, the first display module 902 includes: The selection submodule is used to select a target scenario template set from multiple pre-stored scenario template sets according to the type of the current business scenario; wherein, each scenario template set contains a list of fields to be filled corresponding to the scenario, the order of the fields, and the position coordinates of each field in the form fill area; The rendering submodule is used to render the multiple fields to be filled in the form filling area according to the arrangement order and position coordinates of each field in the target scene template set, and to display the natural language input area in the form filling area.
[0061] Figure 4 An internal structural diagram of an electronic device in one embodiment is shown. This electronic device can specifically be a terminal or a server, and more specifically, a computer device. Figure 4As shown, the electronic device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a form-filling method based on a business scenario. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement a form-filling method based on a business scenario. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0062] In one embodiment, an electronic device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps: Displays a natural language input area and a form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; In response to text input information received in the natural language input area, text fragments of the text input information are displayed in parallel in the form fill area; In response to the matching operation between the field to be filled and the text fragment, the matching result between the field to be filled and the text fragment is displayed; When the matching results result in a matching contest, a conflict resolution prompt is displayed in the form fill area; wherein, the conflict resolution prompt is used to indicate the attribution decision of the matching contest; Based on the attribution decision, the hierarchical filling results are displayed in the corresponding field positions of the form's fill area; wherein, the hierarchical filling results include direct filling results, filling results pending confirmation, and results pending manual completion; Based on the results of each level of filling, each field to be filled is filled to obtain the target form that has been filled.
[0063] By displaying conflict resolution prompts in the form fill area when matching results result in competition, the field competition adjudication process, which was originally executed automatically in the background, is explicitly presented to the user. The system displays tiered fill results based on the adjudication results, including direct fill, pending confirmation, and manual fill. Since different fields have objectively different matching confidence levels, presenting fill results with different confidence levels in a differentiated manner allows high-confidence fields to be filled quickly, medium-confidence fields to ensure accuracy with user confirmation, and low-confidence fields to be filled manually by the user. This achieves a balance between fill efficiency and accuracy. Compared to existing technologies that use the same fill processing method for all fields, tiered fill reduces the risk of incorrect fills being submitted directly, improving the overall reliability of form completion.
[0064] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the following steps: Displays a natural language input area and a form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; In response to text input information received in the natural language input area, text fragments of the text input information are displayed in parallel in the form fill area; In response to the matching operation between the field to be filled and the text fragment, the matching result between the field to be filled and the text fragment is displayed; When the matching results result in a matching contest, a conflict resolution prompt is displayed in the form fill area; wherein, the conflict resolution prompt is used to indicate the attribution decision of the matching contest; Based on the attribution decision, the hierarchical filling results are displayed in the corresponding field positions of the form's fill area; wherein, the hierarchical filling results include direct filling results, filling results pending confirmation, and results pending manual completion; Based on the results of each level of filling, each field to be filled is filled to obtain the target form that has been filled.
[0065] By displaying conflict resolution prompts in the form fill area when matching results result in competition, the field competition adjudication process, which was originally executed automatically in the background, is explicitly presented to the user. The system displays tiered fill results based on the adjudication results, including direct fill, pending confirmation, and manual fill. Since different fields have objectively different matching confidence levels, presenting fill results with different confidence levels in a differentiated manner allows high-confidence fields to be filled quickly, medium-confidence fields to ensure accuracy with user confirmation, and low-confidence fields to be filled manually by the user. This achieves a balance between fill efficiency and accuracy. Compared to existing technologies that use the same fill processing method for all fields, tiered fill reduces the risk of incorrect fills being submitted directly, improving the overall reliability of form completion.
[0066] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0067] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0068] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A form filling method based on business scenarios, characterized in that, The method includes: Displays a natural language input area and a form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; In response to text input information received in the natural language input area, text fragments of the text input information are displayed in parallel in the form fill area; In response to the matching operation between the field to be filled and the text fragment, the matching result between the field to be filled and the text fragment is displayed; When the matching results result in a matching contest, a conflict resolution prompt is displayed in the form fill area; wherein, the conflict resolution prompt is used to indicate the attribution decision of the matching contest; Based on the attribution decision, the hierarchical filling results are displayed in the corresponding field positions of the form's fill area; wherein, the hierarchical filling results include direct filling results, filling results pending confirmation, and results pending manual completion; Based on the results of each level of filling, each field to be filled is filled to obtain the target form that has been filled.
2. The form filling method based on business scenarios according to claim 1, characterized in that, The step of displaying the matching result of the field to be filled and the text fragment in response to the matching operation of the field to be filled and the text fragment includes: Perform multi-field parallel entity extraction on the text fragment to generate a candidate entity set; wherein, the candidate entity set contains multiple belonging candidates corresponding to different fields of the same candidate entity extracted from the same text fragment; The attribution confidence score between each candidate entity and each field to be filled is calculated to obtain a confidence score matrix; wherein, the attribution confidence score is calculated by weighted summation of regular expression matching score, trigger word association score, character structure feature score and semantic vector similarity score; In the form's fill area, at each field to be filled, the candidate entity with the highest confidence score and its corresponding attribution confidence score are displayed.
3. The form filling method based on business scenarios according to claim 2, characterized in that, Before the step of calculating the attribution confidence score between each candidate entity and each field to be filled to obtain the confidence score matrix, the method further includes: For each field to be filled, the corresponding regular expression, trigger keyword list, character structure feature template and semantic weight vector are obtained from the preset field semantic template set; The text content of each candidate entity is matched against the regular expression. If a match is successful, a regular expression matching score is generated. Detect whether the text content of each candidate entity contains any of the trigger keywords in the trigger keyword list, and generate a trigger word association score based on the detection results; Extract the character structure features of each candidate entity; The character structure features are compared with the character structure feature template to generate a structure feature score; The text content of each candidate entity is input into the semantic encoding model to generate semantic vectors; Calculate the cosine similarity between the semantic vector and the semantic weight vector to obtain the semantic vector similarity score.
4. The form filling method based on business scenarios according to claim 2, characterized in that, The step of displaying a conflict resolution prompt in the form fill area when the matching result results in a matching contest includes: When the same candidate entity simultaneously satisfies the confidence threshold conditions of the first and second fields among the multiple fields to be filled in the confidence score matrix, the matching competition is determined to occur. A conflict resolution window is overlaid in the form fill area; wherein, the conflict resolution window displays in parallel the first confidence score and the corresponding first matching basis description when the same candidate entity belongs to the first field to be filled, and the second confidence score and the corresponding second matching basis description when it belongs to the second field to be filled; The attribution decision is generated by performing a global optimal match on the confidence score matrix based on the Hungarian algorithm; wherein the attribution decision is the allocation scheme that maximizes the total global matching score for the same candidate entity under the conditions of satisfying field uniqueness constraints and fragment uniqueness constraints.
5. The form filling method based on business scenarios according to claim 1, characterized in that, The step of displaying the hierarchical filling result in the corresponding field position of the form fill area according to the attribution ruling result includes: Obtain the attribution confidence of each field to be filled and the corresponding text fragment in the attribution decision result; Each of the attribution confidence scores is compared with a preset first confidence threshold and a second confidence threshold; wherein the first confidence threshold is greater than the second confidence threshold; When the corresponding attribution confidence score is higher than the first confidence threshold, the direct fill result is displayed; when the corresponding attribution confidence score is between the first confidence threshold and the second confidence threshold, the fill result to be confirmed is displayed; when the corresponding attribution confidence score is lower than the second confidence threshold, the result to be manually filled is displayed.
6. The form filling method based on business scenarios according to claim 1, characterized in that, After the step of filling each of the fields to be filled based on the results of each hierarchical filling to obtain the filled target form, the method further includes: In response to the triggering of the integrity verification command, the form integrity verification result is displayed in the form fill area; wherein, the form integrity verification result is used to indicate whether there are any empty fields that have not been filled among the plurality of fields to be filled; If there are any empty fields that have not been filled, the positions of all empty fields will be highlighted in the form fill area, and field name hints and input examples will be displayed in association at the positions of each empty field; In response to a user-triggered form submission, the system prevents the submission of forms containing empty fields and displays a prompt window at the top of the form's fill area; wherein the prompt window is used to list the field names of all empty fields and their corresponding recommended input formats.
7. The form filling method based on business scenarios according to claim 1, characterized in that, The step of displaying the natural language input area and form fill area configured based on the current business scenario includes: Based on the type of the current business scenario, a target scenario template set is selected from multiple pre-stored scenario template sets; wherein, each scenario template set contains a list of fields to be filled corresponding to the scenario, the order of the fields, and the position coordinates of each field in the form fill area; According to the arrangement order and position coordinates of each field in the target scene template set, the multiple fields to be filled are rendered in the form filling area, and the natural language input area is displayed in the form filling area.
8. A form filling device based on a business scenario, characterized in that, The device includes: The first display module is used to display a natural language input area and a form fill area configured based on the current business scenario; wherein, the form fill area contains multiple fields to be filled corresponding to the current business scenario; The display module is used to display text fragments of the text input information received in the natural language input area in parallel in the form fill area in response to the text input information received in the natural language input area. A response module is used to display the matching result between the field to be filled and the text fragment in response to the matching operation between the field to be filled and the text fragment; The second display module is used to display a conflict resolution prompt in the form fill area when the matching result generates a matching competition; wherein the conflict resolution prompt is used to indicate the attribution decision result of the matching competition; The third display module is used to display the hierarchical filling results in the corresponding field positions of the form filling area according to the attribution decision result; wherein, the hierarchical filling results include direct filling results, filling results to be confirmed, and results to be manually filled; The fill module is used to fill each of the fields to be filled based on the results of each level of fill, so as to obtain the target form that has been filled.
9. A computer-readable storage medium, characterized in that, The system contains a computer program that, when executed by a processor, causes the processor to perform the steps of the form filling method based on a business scenario as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, The device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the form filling method based on a business scenario as described in any one of claims 1 to 7.
