A form generation method and apparatus
Patent Information
- Application Number
- CN202510556772.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]现有表单生成方法主要依托于用户(表单需求方)填写的信息生成表单,在用户需要填报多种表单,且填写的信息量较大时,需要占用了用户大量的时间,表单生成效率也不高,进而影响用户的体验感
[0028]所述发明中的一个实施例具有如下优点或有益效果:通过获取待生成表单的生成请求和凭证文件;从凭证文件中提取表单明细,根据表单明细确定待生成表单的表单类型,调取与表单类型对应的表单生成流程,并上传凭证文件至表单业务端;根据表单生成流程,确定待生成表单的组成字段,利用生成请求和表单明细,获取组成字段对应的字段值,并上传字段值至表单业务端,以使表单业务端根据字段值和凭证文件生成表单及其对应的表单标识;响应于接收到表单业务端返回的表单标识,将表单标识反馈给生成请求的请求方的技术方案,实现了一种自动、便捷的表单生成方法,用户仅需要提交生成请求和凭证文件,即可自动识别表单类型,确定表单的组成字段,获取组成字段对应的字段值,进而生成表单,节约了用户填报信息的时间,提升了表单的生成效率和用户的体验感。
Smart Images

Figure CN123013880A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for generating forms. Background Technology
[0002] In daily business operations, forms serve as carriers of business data and play a crucial role in processing transactions. When users need to conduct business, they fill out and upload form information through relevant pages in the business processing system, enabling the system to generate the necessary forms for processing the transaction based on the received information.
[0003] In the process of realizing this invention, the following problems were found in the prior art:
[0004] Existing form generation methods mainly rely on information filled in by users (form requesters) to generate forms. When users need to fill in multiple forms and the amount of information is large, it takes up a lot of their time and the form generation efficiency is not high, which in turn affects the user experience. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a form generation method and apparatus that realizes automatic and convenient form generation. Users only need to submit a generation request and a voucher file to automatically identify the form type, determine the constituent fields of the form, obtain the field values corresponding to the constituent fields, and then generate the form, saving users time in filling in information and improving the efficiency of form generation and user experience.
[0006] To achieve the aforementioned objective, according to one aspect of the present invention, a method for generating a form is provided, comprising:
[0007] Obtain the generation request and voucher file for the form to be generated;
[0008] Extract form details from the voucher file, determine the form type of the form to be generated based on the form details, call the form generation process corresponding to the form type, and upload the voucher file to the form business terminal;
[0009] According to the form generation process, the constituent fields of the form to be generated are determined. Using the generation request and the form details, the field values corresponding to the constituent fields are obtained, and the field values are uploaded to the form business terminal so that the form business terminal can generate the form and its corresponding form identifier based on the field values and the voucher file.
[0010] In response to receiving the form identifier returned by the form service terminal, the form identifier is fed back to the requester that generated the request.
[0011] Optionally, in response to the fact that the form type, the form generation process, the constituent fields, and their corresponding field values are all obtained through a pre-trained information extraction model, after obtaining the generation request and credential file of the form to be generated, the method further includes: uploading the credential file to the cloud and obtaining the Uniform Resource Locator (URL) of the credential file; querying the sending information of the requester of the generation request and the credential file; and encapsulating the generation request, the URL of the credential file, and the sending information into a form task message body according to the input format of the information extraction model, so as to adapt to the information extraction model.
[0012] Optionally, extracting form details from the voucher file and determining the form type of the form to be generated based on the form details includes: inputting the form task message body into the information extraction model, so that the information extraction model determines the form type by calculating the similarity between the form details extracted from the form task message body and the form details in the corresponding relationship based on a pre-configured correspondence between form details and form types.
[0013] Optionally, in response to the fact that the constituent fields include the associated personnel of the form to be generated, obtaining the field value corresponding to the constituent fields using the generation request and the form details includes: obtaining the sending information from the form task message body; using the sending information to query the associated personnel of the form to be generated, and using the personnel identifier of the associated personnel as the corresponding field value.
[0014] Optionally, in response to the existence of special fields in the constituent fields whose values cannot be directly extracted from the generation request and the form details, obtaining the field values corresponding to the constituent fields using the generation request and the form details includes: performing semantic analysis and intent recognition on the special fields using the information extraction model to determine the element fields corresponding to the special fields; searching for matching fields that match the element fields in the generation request and the form details; in response to finding the matching fields in the generation request and the form details, logically processing the field values of the matching fields to generate the field values of the special fields; and in response to not finding the matching fields in the generation request and the form details, obtaining the field values of the special fields from the requester of the generation request.
[0015] Optionally, in response to the voucher file being an image, the step of extracting form details from the voucher file includes: calling an optical character recognition interface to identify form information related to form generation in the image of the voucher file, assembling the form information according to a preset data format to obtain the form details.
[0016] Optionally, the generation request and the credential file are collected by a chatbot on the user interface, and the form task message body is constructed through middleware deployed between the user interface and the information extraction model.
[0017] According to a second aspect of the present invention, a form generation apparatus is provided, comprising:
[0018] The request retrieval module is used to retrieve the generation request and credential file of the form to be generated;
[0019] The type determination module is used to extract form details from the voucher file, determine the form type of the form to be generated based on the form details, call the form generation process corresponding to the form type, and upload the voucher file to the form business terminal.
[0020] The form generation module is used to determine the constituent fields of the form to be generated according to the form generation process, obtain the field values corresponding to the constituent fields using the generation request and the form details, and upload the field values to the form business terminal so that the form business terminal can generate the form and its corresponding form identifier according to the field values and the voucher file.
[0021] The result feedback module is used to respond to the form identifier returned by the form business terminal and to send the form identifier back to the requester of the generation request.
[0022] According to a third aspect of the present invention, an electronic device for generating forms is provided, comprising:
[0023] One or more processors;
[0024] Storage device for storing one or more programs.
[0025] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiments of the present invention.
[0026] According to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect of the present invention.
[0027] According to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method provided in the first aspect of the present invention.
[0028] One embodiment of the invention has the following advantages or beneficial effects: By obtaining the generation request and voucher file of the form to be generated; extracting form details from the voucher file; determining the form type of the form to be generated based on the form details; invoking the form generation process corresponding to the form type; and uploading the voucher file to the form business terminal; determining the constituent fields of the form to be generated based on the form generation process; obtaining the field values corresponding to the constituent fields using the generation request and form details; and uploading the field values to the form business terminal so that the form business terminal can generate the form and its corresponding form identifier based on the field values and voucher file; and responding to the form identifier returned by the form business terminal by feeding back the form identifier to the requester of the generation request, the technical solution realizes an automatic and convenient form generation method. Users only need to submit a generation request and voucher file to automatically identify the form type, determine the constituent fields of the form, obtain the field values corresponding to the constituent fields, and then generate the form, saving users' time in filling in information and improving the efficiency of form generation and user experience. Attached Figure Description
[0029] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0030] Figure 1 This is a schematic diagram of the main flow of the form generation method according to an embodiment of the present invention;
[0031] Figure 2 This is a flowchart of a form generation method according to a possible embodiment of the present invention;
[0032] Figure 3 This is a schematic diagram illustrating the construction process of the form task message body according to an embodiment of the present invention;
[0033] Figure 4 This is a schematic diagram illustrating the determination of form type in an embodiment of the present invention;
[0034] Figure 5 This is a detailed flowchart illustrating the form generation method according to an embodiment of the present invention;
[0035] Figure 6 This is a schematic diagram of the main modules of a form generation device according to an embodiment of the present invention;
[0036] Figure 7 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0037] Figure 8 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0038] It should be noted that the collection, updating, analysis, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate and reasonable purposes, and are not shared, disclosed, or sold outside of these legitimate uses, and are subject to supervision and management by national regulatory authorities. Necessary measures should be taken to selectively block the use or access to personal information data to prevent unauthorized access to such personal information data, ensure that personnel authorized to access personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Furthermore, once this user personal information data is no longer needed, the risk should be minimized by restricting or even prohibiting data collection and / or deleting the data.
[0039] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0040] Existing form generation methods mainly rely on information filled in by users (form requesters) to generate forms. When users need to fill in multiple forms and the amount of information is large, it takes up a lot of their time, and the form generation efficiency is not high, which affects the user experience and cannot meet the needs of practical applications.
[0041] To address the aforementioned problems in existing technologies, this invention proposes a form generation method. By submitting a user-submitted form generation request and supporting documentation, the method determines the form type, identifies the constituent fields of the form, retrieves the corresponding field values, and uploads them to the form processing platform to generate the form. This method provides an automatic and convenient form generation process. Users only need to submit a generation request and supporting documentation to automatically identify the form type, determine the constituent fields, retrieve the corresponding field values, and generate the form. This saves users time filling in information and improves form generation efficiency and user experience.
[0042] Figure 1 This is a schematic diagram of the main flow of the form generation method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the form generation method of this embodiment includes the following steps S101 to S104.
[0043] Step S101: Obtain the generation request and credential file of the form to be generated.
[0044] Specifically, daily business processes inevitably involve filling out various business forms, such as expense reports and application forms. The form requester, also known as the form filler (user), prepares the necessary supporting documents in advance. In this embodiment of the invention, the supporting documents for expense reports specifically include the invoices to be reimbursed, while for application forms, they include the required qualification certificates, resource statistics tables, and audio / video files of the application documents. The specific supporting documents depend on the specific business category. The form requester enters the request to generate the form into the form generation system, attaching the corresponding supporting documents. In this embodiment of the invention, the generation request is a concise textual description of the requirements for generating the form. For example, for expense report business, the specific content of the generation request includes: reimbursement time, location, and reimbursement amount.
[0045] Step S102: Extract form details from the voucher file, determine the form type of the form to be generated based on the form details, call the form generation process corresponding to the form type, and upload the voucher file to the form business terminal.
[0046] Specifically, considering the wide applicability of the form generation system, the form generation system needs to be compatible with various types of forms, and the accuracy of the form type is also a prerequisite for ensuring the quality of form generation. Therefore, the embodiments of the present invention determine the form type based on relatively more reliable and objective voucher documents.
[0047] The process begins by obtaining the file format of the voucher document and determining the corresponding parsing method based on this format. For example, for a tabular voucher document, filtering or lookup functions can be used to extract the form details needed to generate the form. For an audio voucher document, an audio-to-text tool can be used to convert the audio to text and then extract the form details needed to generate the form. Furthermore, keywords related to the form type are identified from the extracted form details to determine the form type. For example, for a declaration form, the extracted form details might include lists of various office supplies; therefore, based on the form types supported by the form generation system, a declaration form for the office supplies requisition category can be matched. Further, based on the determined form type, the form generation process corresponding to that form type is retrieved from the business interface. Considering the importance of the voucher document for form generation, it is also synchronously uploaded to the form business terminal for use in subsequent form generation.
[0048] According to an embodiment of the present invention, in response to the voucher file being an image, the step of extracting form details from the voucher file includes: calling an optical character recognition interface to identify form information related to form generation in the image of the voucher file, assembling the form information according to a preset data format to obtain the form details.
[0049] Specifically, when the voucher file is in image format, the Optical Character Recognition (OCR) interface is used to recognize the text information contained in the image, and form information related to form generation is extracted from the text information. Finally, the extracted form information is assembled according to a preset data format, such as the commonly used JSON format, to obtain a standardized form detail related to the form in the voucher file, which is more convenient for subsequent use.
[0050] Step S103: According to the form generation process, determine the constituent fields of the form to be generated, obtain the field values corresponding to the constituent fields using the generation request and the form details, and upload the field values to the form business terminal so that the form business terminal can generate the form and its corresponding form identifier based on the field values and the voucher file.
[0051] Specifically, different types of forms have corresponding form generation processes. The form generation process for the office supplies requisition application form mentioned above differs from that for the equipment and instrument procurement application form. The form generation process in this embodiment can also be referred to as a workflow. Based on the aforementioned determined form generation process, the required fields in the form generation process are collected; these required fields are the constituent fields of the form to be generated.
[0052] Furthermore, the form generation system extracts the field values corresponding to the constituent fields from the user's generation request and the form details in the voucher file, marks the field identifiers of the constituent fields on the corresponding field values, and uploads the marked field values to the form processing terminal. The form processing terminal, as the final stage of form generation, upon receiving the field values, generates a form that meets the user's needs based on the field values and the previously obtained voucher file, according to the format corresponding to the form type, and assigns a corresponding form identifier to the form.
[0053] Step S104: In response to receiving the form identifier returned by the form service terminal, the form identifier is fed back to the requester that generated the request.
[0054] Specifically, the form processing client sends the form identifier corresponding to the generated form to the external interaction interface of the form generation system. The form generation system receives the form identifier, finds the corresponding requester of the generation request, and sends the form identifier back to the requester so that the requester can use the form identifier to reference or download the generated form. Using the form identifier to provide feedback on the form generation result can effectively save system resources.
[0055] This invention provides an automatic and convenient form generation method that uses only the user-inputted form generation request and corresponding voucher file to identify the form type and determine the constituent fields of the form to be generated. Then, based on the generation request and form details, the field values of the constituent fields are obtained. This allows the form processing terminal to generate the form and form identifier based on the field values and voucher file, saving users time in filling in information and improving the efficiency of form generation and user experience.
[0056] With the development and application of large model technology, the form generation method of this invention can also be used to pre-train and construct an information extraction model. The form types, form generation process, constituent fields and their corresponding field values mentioned above are all obtained through this information extraction model. Figure 2 This is a flowchart of a form generation method according to a possible embodiment of the present invention. As another embodiment of the present invention, such as... Figure 2 As shown, the method for generating the form may include:
[0057] Step S201: Obtain the generation request and credential file of the form to be generated.
[0058] Step S202: Upload the credential file to the cloud and obtain the Uniform Resource Locator (URL) of the credential file; query the sending information of the requester of the generation request and the credential file; according to the input format of the information extraction model, encapsulate the generation request, the URL of the credential file, and the sending information into a form task message body to adapt to the information extraction model.
[0059] Specifically, considering the application and promotion of existing intelligent models, several commonly used models are often integrated into an intelligent model platform for easy management and comprehensive application. In practical applications, the information extraction model of this invention is integrated and deployed in an intelligent model platform. In order to facilitate the information extraction model's understanding of the input information, it is necessary to convert the user's input generation request and voucher file into an interface input format that is compatible with the intelligent model platform where the information extraction model is located.
[0060] Since voucher files are typically uploaded as attachments, and most often as images, the form generation system in this embodiment of the invention, upon receiving the generation request and the voucher file, first identifies the voucher file, uploads it to cloud storage, and obtains the Uniform Resource Locator (URL) returned by the cloud for storing the voucher file. It also needs to query the sending information of the requester who sent the generation request and the voucher file. This sending information includes the requester's sending method, such as instant messaging software or email, allowing for the tracing of the requester's relevant information. Finally, according to the input format of the intelligent model platform where the information extraction model resides, the generation request of the form to be generated, the URL of the voucher file, and the requester's sending information are concatenated and encapsulated into a form task message body, which is used as input to the information extraction model.
[0061] According to one embodiment of the present invention, the generation request and the credential file are collected by a chatbot on the user interaction terminal, and the form task message body is constructed through middleware deployed between the user interaction terminal and the information extraction model.
[0062] Specifically, the specific scenarios of this embodiment of the invention can be further described in finer detail. To save resources to the greatest extent, the form generation system of this embodiment does not develop additional dedicated interactive tools. It collects generation requests and voucher files based on the existing user interaction terminal, and integrates the information extraction model into the intelligent model platform. Users only need to add the corresponding business's chatbot to the user interaction terminal to establish a group chat, and enter the generation request and voucher file in the group chat. The chatbot collects this information. A middleware is deployed between the user interaction terminal and the intelligent model platform where the information extraction model resides to construct the form task message body that interfaces with the information extraction model. That is, the middleware obtains the generation request and voucher file from the chatbot, uploads the voucher file to the cloud, obtains the URL of the voucher file, queries the sending information of the requester, and finally assembles the generation request, the URL of the voucher file, and the sending information into a form task message body, which is then sent to the intelligent model platform that integrates the information extraction model.
[0063] Understandably, from the perspective of the overall form generation method, the entire form generation system includes the user interaction terminal, middleware, an intelligent model platform integrating information extraction models, and the form business terminal.
[0064] This invention fully utilizes existing resources and uses minimal resources, relying solely on middleware as a bridge between the user interaction terminal and the intelligent model. This enables the user interaction terminal to access the intelligent model platform and then input it into the information extraction model, thereby achieving intelligent and automatic form generation.
[0065] Figure 3This is a schematic diagram illustrating the construction process of the form task message body according to an embodiment of the present invention. The user sends a message containing a generation request for the form to be generated and a voucher file through the user interface. The intelligent model platform configures an information extraction model. Understandably, after collecting the generation request and voucher file, the chatbot on the user interface, for information security reasons, can encrypt the message before transmitting it to the middleware. Upon receiving the encrypted message, the middleware's external interface first decrypts it to obtain the message composed of the generation request and voucher file, then performs verification and cleaning on the message, identifies the voucher file, uploads it to cloud storage, obtains the URL of the returned voucher file, queries the requester's sending information, and finally assembles and encapsulates the generation request, the voucher file URL, and the sending information according to the agreed input format into a form task message body. The form task message body is then sent to the external interface of the intelligent model platform, which integrates the information extraction model.
[0066] Step S203: Input the form task message body into the information extraction model, so that the information extraction model determines the form type by calculating the similarity between the form details extracted from the form task message body and the form details in the corresponding relationship based on the pre-configured correspondence between form details and form types.
[0067] Specifically, the intelligent model platform integrating the information extraction model inputs the form task message body constructed by the middleware into the information extraction model. Based on the URL within the message, the information extraction model retrieves the voucher file from the cloud, calls the OCR interface to recognize the text within the voucher file, and extracts the form details related to form generation from the text. These form details are then input into the form category recognition module within the information extraction model. Based on a pre-configured correspondence between form details and form types, the form category recognition module calculates the similarity between the received form details and the corresponding form details, selecting the form type corresponding to the form detail with the highest similarity in the correspondence as the determined form type for this application.
[0068] The form category identification module in the information extraction model pre-establishes the correspondence between form details and form types. For example, for expense reimbursement forms, there are various types such as employee welfare reimbursement forms, office expense reimbursement forms, and vehicle usage expense reimbursement forms. Each form type has different keywords in the names of goods or services in the invoice (voucher document). Employee welfare forms correspond to meal expenses, accommodation expenses, catering services, baked goods, and fruits; office expense forms correspond to telecommunications services, electricity fees, and property management services; and vehicle usage expense forms correspond to car rental fees and taxi fares. Of course, the categories can be further subdivided into finer-grained categories. Each major category can be further divided into several subcategories. For example, the major category of employee welfare can be divided into subcategories such as team building welfare, housing allowance, and meal allowance. Correspondingly, each subcategory corresponds to different keywords. Furthermore, to further improve the accuracy of form type determination, additional required information from the voucher documents can be added to the correspondence between each major or minor category. A successful match is achieved only when the extracted form details not only match the keywords in the correspondence but also possess the corresponding required information. Understandably, if no two matches are completely identical, the one with the highest similarity is selected to determine the form type.
[0069] Understandably, the determination of form type can also utilize the learning and analysis capabilities of the form category recognition module, combined with other factors such as user history, user input generation requests, and voucher file codes to extract multi-dimensional features. Based on these multi-dimensional features and form details, the form type can be accurately determined.
[0070] Figure 4 This is a schematic diagram illustrating the form type determination process according to an embodiment of the present invention. Taking an expense report as an example, the information extraction model retrieves the voucher file (invoice) from the cloud based on the URL in the form task message body, calls the OCR interface to recognize the text within the invoice, and extracts form details related to form generation from the text, specifically including: invoice code, invoice number, goods or service name, total price, buyer's name, etc. The form details are then input into the form category recognition module in the information extraction model. The form category recognition module is built based on a large language model (LLM). According to the pre-configured correspondence between form details and form types, it uses a large model analysis method, employing prompt words to calculate the similarity between the received form details and the corresponding form details, ultimately determining the matched form type.
[0071] Step S204: Retrieve the form generation process corresponding to the form type and upload the voucher file to the form business terminal.
[0072] Specifically, the information extraction model retrieves the form generation process corresponding to the form type based on the form type identified by the form category identification module, and simultaneously uploads the voucher file to the form business terminal.
[0073] Step S205: Determine the constituent fields of the form to be generated according to the form generation process.
[0074] Specifically, the information extraction model extracts and determines the constituent fields of the form to be generated, such as date fields and user fields, based on the retrieved form generation process.
[0075] Step S206: In response to the fact that the constituent fields include the associated personnel of the form to be generated, obtain the sending information from the form task message body; use the sending information to query the associated personnel of the form to be generated, and use the personnel identifier of the associated personnel as the corresponding field value.
[0076] Specifically, if the form to be generated involves multiple people, such as the team-building benefits subcategory under the employee benefits category in an expense reimbursement form, its constituent fields include not only the requester but also the associated individuals for whom the team-building expense reimbursement form is to be generated. In this case, when the requester creates a group chat on the user interface, they not only need to add the chatbot but also the associated individuals to the group chat. Accordingly, the sent message will also include the group chat ID. The information extraction model uses the group chat ID in the sent message to query the members in the group chat and uses the user ID of the group chat member as the field value of the associated individual.
[0077] Step S207: In response to the existence of special fields in the constituent fields whose field values cannot be directly extracted from the generation request and the form details, the information extraction model is used to perform semantic analysis and intent recognition on the special fields to determine the element fields corresponding to the special fields; a matching field that matches the element fields is searched from the generation request and the form details; in response to the matching field being found from the generation request and the form details, the field value of the matching field is logically processed to generate the field value of the special field; in response to the lack of a matching field being found from the generation request and the form details, the field value of the special field is obtained from the requester of the generation request.
[0078] Specifically, in some cases, the values of the constituent fields of the form to be generated can be directly extracted from the generation request and the form details. In other cases, there may be constituent fields whose values cannot be directly extracted from the generation request and the form details. In this embodiment of the invention, such fields are referred to as special fields.
[0079] For such special fields, the information extraction model can leverage its textual understanding and analytical capabilities to perform semantic analysis and intent recognition. Based on the results of semantic analysis and intent recognition, it determines the corresponding element field. For example, in expense reimbursement processes, reimbursement amounts are divided into several levels. Larger amounts at higher levels require approval from higher-level departments. Therefore, for special fields, such as the level to which the reimbursement amount belongs, semantic analysis and intent recognition determine that the corresponding element field is the total price. The model then searches for the corresponding reimbursement amount value in the generated request and form details. Simultaneously, it retrieves the current form category to obtain the corresponding level threshold, determines which level threshold the reimbursement amount value falls under, and then calculates the specific level value to which the reimbursement amount belongs.
[0080] Additionally, for some special fields, due to missing information in the generated request input by the requester, the specific matching field value may not be found from the generated request and form details. For example, the "reason for team building" field in the team building benefits subcategory of the expense report business. In this case, the special field is fed back to the requester through the user interaction terminal, and the corresponding field value is obtained from the requester.
[0081] Understandably, in order to further ensure the accuracy of the field values corresponding to the constituent fields, the field values can also be sent to the requesting user for confirmation, and the confirmed field values can be provided to the subsequent form business.
[0082] Step S208: Upload the field value to the form business terminal so that the form business terminal can generate a form and its corresponding form identifier based on the field value and the voucher file.
[0083] Specifically, based on the form type determined by the aforementioned information extraction model, the field values of the constituent fields are uploaded and sent to the form processing client. The form processing client, using this information and combining it with previously received voucher documents, generates the corresponding form and form identifier, and finally sends the form identifier back to the intelligent model platform where the information extraction model resides.
[0084] Step S209: In response to receiving the form identifier returned by the form service terminal, the form identifier is fed back to the requester that generated the request.
[0085] Specifically, the intelligent model platform receives the form identifier from the form business terminal and sends the form identifier back to the requesting user who generated the request, so that the requesting user can obtain the form generation result.
[0086] Figure 5This is a detailed flowchart illustrating the form generation method according to an embodiment of the present invention. The user sends chat content through a user interface, including a request to generate the form and supporting documents. The chatbot on the user interface collects the request and supporting documents and sends them to middleware. The middleware identifies the request and supporting documents, uploads the supporting documents to the cloud, obtains the URL of the supporting documents, and uses the group chat number of the requesting party to compose a sending message. The middleware encapsulates the request, the URL of the supporting documents, and the sending message into a form task message body and sends it to the intelligent model platform.
[0087] The intelligent model platform sends the received form task message body to its internal information extraction model. The information extraction model needs to determine the form type, upload the voucher file image, and determine the field values of the constituent fields. The order of determining the form type and uploading the voucher file image can be flexible. In this diagram, the URL of the voucher file image is parsed first, the voucher file is obtained and uploaded to the form business terminal, the form type is determined, and the determined form type is uploaded to the form business terminal. If related personnel are involved, the related personnel are queried, and their personnel identifiers are uploaded to the form business terminal as field values. The information extraction model then uses the generated request and form details to obtain the field values corresponding to all constituent fields and uploads the extracted field values to the form business terminal. The form business terminal generates a form that conforms to the form type and its corresponding form identifier based on the received field values and voucher file. Finally, the form business terminal sends the form identifier back to the intelligent model platform, which then sends the form identifier back to the user interaction terminal to notify the user that the form has been generated.
[0088] This invention makes full use of existing resources by building only the middleware between the user interaction terminal and the intelligent model platform. A chatbot that collects information is deployed on the user interaction terminal, and an information extraction model is deployed on the intelligent model platform. By utilizing the form type recognition and field value extraction capabilities of the information extraction model, forms can be generated automatically and conveniently, maximizing the use of existing resources. This saves resources and improves the efficiency of form generation and the user experience.
[0089] Figure 6 This is a schematic diagram of the main modules of a form generation apparatus according to an embodiment of the present invention. Figure 6 As shown, the form generation device 600 mainly includes a request acquisition module 601, a type determination module 602, a form generation module 603, and a result feedback module 604.
[0090] The request retrieval module 601 is used to retrieve the generation request and credential file of the form to be generated;
[0091] The type determination module 602 is used to extract form details from the voucher file, determine the form type of the form to be generated based on the form details, call the form generation process corresponding to the form type, and upload the voucher file to the form business terminal.
[0092] The form generation module 603 is used to determine the constituent fields of the form to be generated according to the form generation process, obtain the field values corresponding to the constituent fields using the generation request and the form details, and upload the field values to the form business terminal so that the form business terminal can generate the form and its corresponding form identifier according to the field values and the voucher file.
[0093] The result feedback module 604 is used to respond to the form identifier returned by the form business terminal and to feed back the form identifier to the requester that generated the request.
[0094] According to an embodiment of the present invention, in response to the form type, the form generation process, the constituent fields and their corresponding field values being obtained through a pre-trained information extraction model, the form generation device 600 further includes a message body construction module (not shown in the figure), used for: after obtaining the generation request and credential file of the form to be generated, uploading the credential file to the cloud, and obtaining the Uniform Resource Locator (URL) of the credential file; querying the sending information of the requester of the generation request and the credential file; and encapsulating the generation request, the URL of the credential file, and the sending information into a form task message body according to the input format of the information extraction model, so as to adapt to the information extraction model.
[0095] According to another embodiment of the present invention, the type determination module 602 is further configured to: input the form task message body into the information extraction model, so that the information extraction model determines the form type by calculating the similarity between the form details extracted from the form task message body and the form details in the corresponding relationship based on a pre-configured correspondence between form details and form types.
[0096] According to another embodiment of the present invention, in response to the constituent fields including the associated personnel of the form to be generated, the form generation module 603 is further configured to: obtain the sending information from the form task message body; use the sending information to query the associated personnel of the form to be generated, and use the personnel identifier of the associated personnel as the corresponding field value.
[0097] According to another embodiment of the present invention, in response to the existence of special fields in the constituent fields whose field values cannot be directly extracted from the generation request and the form details, the form generation module 603 is further configured to: perform semantic analysis and intent recognition on the special fields using the information extraction model to determine the element fields corresponding to the special fields; search for matching fields that match the element fields from the generation request and the form details; in response to finding the matching fields from the generation request and the form details, perform logical processing on the field values of the matching fields to generate the field value of the special fields; and in response to not finding the matching fields from the generation request and the form details, obtain the field value of the special fields from the requester of the generation request.
[0098] According to another embodiment of the present invention, in response to the fact that the voucher file is an image, the type determination module 602 is further configured to: call the optical character recognition interface to identify form information related to form generation in the image of the voucher file, and assemble the form information according to a preset data format to obtain the form details.
[0099] According to another embodiment of the present invention, the generation request and the credential file are collected by a chatbot on the user interaction terminal, and the form task message body is constructed through middleware deployed between the user interaction terminal and the information extraction model.
[0100] Figure 7 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied.
[0101] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, and 703, a network 704, and a server 705. Network 704 serves as the medium for providing communication links between terminal devices 701, 702, and 703 and server 705. Network 704 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0102] Users can use terminal devices 701, 702, and 703 to interact with server 705 via network 704 to receive or send messages, etc. Various communication client applications, such as form generation applications, can be installed on terminal devices 701, 702, and 703 (for example only).
[0103] Terminal devices 701, 702, and 703 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0104] Server 705 can be a server providing various services, such as a backend management server supporting the generation of forms by users using terminal devices 701, 702, and 703 (for example only). The backend management server can obtain the generation request and voucher file of the form to be generated; extract form details from the voucher file; determine the form type of the form to be generated based on the form details; invoke the form generation process corresponding to the form type; and upload the voucher file to the form business terminal; determine the constituent fields of the form to be generated based on the form generation process; obtain the field values corresponding to the constituent fields using the generation request and the form details; and upload the field values to the form business terminal so that the form business terminal generates the form and its corresponding form identifier based on the field values and the voucher file; in response to receiving the form identifier returned by the form business terminal, the server processes the form identifier back to the requester of the generation request, and sends the processing result (e.g., the form identifier – for example only) back to the terminal device.
[0105] It should be noted that the form generation method provided in the embodiments of the present invention is generally executed by server 705, and correspondingly, the form generation device is generally set in server 705.
[0106] It should be understood that Figure 7 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0107] The following is for reference. Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Figure 8 The terminal device or server shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0108] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the system 800. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0109] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.
[0110] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs the functions defined above in the system of this invention.
[0111] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0112] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0113] The units described in the embodiments of the present invention can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor can be described as including: a request acquisition module, a type determination module, a form generation module, and a result feedback module.
[0114] In some cases, the names of these modules do not constitute a limitation on the module itself. For example, the request acquisition module can also be described as "a module for acquiring the generation request and credential file of the form to be generated".
[0115] On the other hand, the present invention also provides a computer-readable medium, which may be included in the device described in the embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: acquiring a generation request for a form to be generated and a voucher file; extracting form details from the voucher file, determining the form type of the form to be generated based on the form details, invoking a form generation process corresponding to the form type, and uploading the voucher file to a form service terminal; determining the constituent fields of the form to be generated according to the form generation process, acquiring the field values corresponding to the constituent fields using the generation request and the form details, and uploading the field values to the form service terminal, so that the form service terminal generates a form and its corresponding form identifier based on the field values and the voucher file; and, in response to receiving the form identifier returned by the form service terminal, feeding back the form identifier to the requester of the generation request.
[0116] The technical solution of the present invention has the following advantages or beneficial effects: by obtaining the generation request and voucher file of the form to be generated; extracting form details from the voucher file; determining the form type of the form to be generated based on the form details; calling the form generation process corresponding to the form type; and uploading the voucher file to the form business terminal; determining the constituent fields of the form to be generated based on the form generation process; obtaining the field values corresponding to the constituent fields using the generation request and form details; and uploading the field values to the form business terminal so that the form business terminal can generate the form and its corresponding form identifier based on the field values and voucher file; and responding to the form identifier returned by the form business terminal by feeding back the form identifier to the requester of the generation request, the technical solution realizes an automatic and convenient form generation method. Users only need to submit the generation request and voucher file to automatically identify the form type, determine the constituent fields of the form, obtain the field values corresponding to the constituent fields, and then generate the form, saving users' time in filling in information and improving the efficiency of form generation and user experience.
[0117] The specific embodiments described herein do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for generating a form, characterized in that, include: Obtain the generation request and voucher file for the form to be generated; Extract form details from the voucher file, determine the form type of the form to be generated based on the form details, call the form generation process corresponding to the form type, and upload the voucher file to the form business terminal; According to the form generation process, the constituent fields of the form to be generated are determined. Using the generation request and the form details, the field values corresponding to the constituent fields are obtained, and the field values are uploaded to the form business terminal so that the form business terminal can generate the form and its corresponding form identifier based on the field values and the voucher file. In response to receiving the form identifier returned by the form service terminal, the form identifier is fed back to the requester that generated the request.
2. The method according to claim 1, characterized in that, In response to the fact that the form type, the form generation process, the constituent fields, and their corresponding field values are all obtained through a pre-trained information extraction model, after obtaining the generation request and credential file of the form to be generated, the method further includes: Upload the credential file to the cloud and obtain the Uniform Resource Locator (URL) of the credential file; Query the sending information of the requester of the generation request and the credential file; According to the input format of the information extraction model, the generation request, the Uniform Resource Locator of the credential file, and the sending information are encapsulated into a form task message body to adapt to the information extraction model.
3. The method according to claim 2, characterized in that, Extract form details from the voucher file, and determine the form type of the form to be generated based on the form details, including: The form task message body is input into the information extraction model, so that the information extraction model determines the form type by calculating the similarity between the form details extracted from the form task message body and the form details in the corresponding relationship, based on the pre-configured correspondence between form details and form types.
4. The method according to claim 2, characterized in that, In response to the fact that the constituent fields include the associated personnel of the form to be generated, the step of obtaining the field values corresponding to the constituent fields using the generation request and the form details includes: Obtain the sending information from the form task message body; Use the sent information to query the associated personnel of the form to be generated, and use the personnel identifier of the associated personnel as the corresponding field value.
5. The method according to claim 2, characterized in that, In response to the existence of special fields in the component fields whose values cannot be directly extracted from the generation request and the form details, the step of obtaining the field values corresponding to the component fields using the generation request and the form details includes: The information extraction model is used to perform semantic analysis and intent recognition on the special field to determine the element field corresponding to the special field. The system searches for a matching field that matches the element field from the generation request and the form details. In response to finding the matching field from the generation request and the form details, it performs logical processing on the field value of the matching field to generate the field value of the special field. In response to not finding the matching field from the generation request and the form details, it obtains the field value of the special field from the requester of the generation request.
6. The method according to claim 1, characterized in that, In response to the fact that the voucher file is an image, the step of extracting form details from the voucher file includes: The optical character recognition interface is invoked to identify form information related to form generation in the image of the voucher document. The form information is then assembled according to a preset data format to obtain the form details.
7. The method according to claim 2, characterized in that, The generation request and the credential file are collected by a chatbot on the user interface, and the form task message body is constructed through middleware deployed between the user interface and the information extraction model.
8. A form generation device, characterized in that, include: The request retrieval module is used to retrieve the generation request and credential file of the form to be generated; The type determination module is used to extract form details from the voucher file, determine the form type of the form to be generated based on the form details, call the form generation process corresponding to the form type, and upload the voucher file to the form business terminal. The form generation module is used to determine the constituent fields of the form to be generated according to the form generation process, obtain the field values corresponding to the constituent fields using the generation request and the form details, and upload the field values to the form business terminal so that the form business terminal can generate the form and its corresponding form identifier according to the field values and the voucher file. The result feedback module is used to respond to the form identifier returned by the form business terminal and to send the form identifier back to the requester of the generation request.
9. A mobile electronic device terminal, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.
