Visual form generation method based on FastGPT knowledge base, medium and equipment

By using the intelligent form generation method of the FastGPT knowledge base, the problem of time-consuming and laborious traditional form design is solved, achieving efficient and accurate automated design, improving user experience and the system's self-optimization capabilities.

CN120994788APending Publication Date: 2025-11-21CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511117473.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Traditional form design relies on human experience, which is time-consuming and labor-intensive, making it difficult to adapt to rapidly changing business needs, and it lacks efficient and intelligent solutions.

Method used

We adopt a FastGPT-based approach, which involves data preprocessing, knowledge base construction, retrieval and matching, answer generation and continuous learning. We use a large-scale pre-trained model to automatically generate form designs and combine semantic understanding and vector indexing technologies to achieve intelligent design.

Benefits of technology

It significantly improves the efficiency and accuracy of form design, enhances user experience, has self-learning capabilities, maintains design flexibility and cutting-edge technology, and reduces manual maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994788A_ABST
    Figure CN120994788A_ABST
Patent Text Reader

Abstract

The invention provides a FastGPT knowledge base-based visual form generation method, a medium and equipment, and belongs to the technical field of artificial intelligence. Comprising the following steps: collecting form design data from a business system, cleaning the data and extracting key fields to obtain original JSON data of a form; original JSON data of the form is imported, and a knowledge base of form design is constructed based on a knowledge base function of a FastGPT system; searching answer content in the knowledge base according to question content queried by the user; using a large-scale pre-training model to generate form JSON data in combination with the context understanding ability and the retrieval result, extracting form information from the form JSON data, and presenting form content; and regularly learning a form mode from newly collected form design data, and updating the current knowledge base. The method is applied to the fields of enterprise informatization management, automatic office business and the like, the form design efficiency and quality can be effectively improved, and the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of artificial intelligence, and particularly relates to a visual form generation method based on a FastGPT knowledge base, a medium and equipment. BACKGROUND

[0002] With the development of information technology, a large amount of form data such as orders, reports, and application forms is generated in the daily operation or office business of enterprises. These forms not only carry the core business processes of enterprises, but also are an important part of enterprise knowledge. Traditional form design work relies on manual experience, and designers need to have certain professional knowledge, and the design process is time-consuming and laborious, which is difficult to adapt to the rapid changes in business needs.

[0003] In recent years, deep learning technology has made breakthrough progress, and large-scale pre-training models (PLM) have performed well in natural language processing (NLP) tasks. These models have strong language understanding and generation capabilities after being trained on a large amount of data. However, how to apply these advanced technologies to specific business scenarios, especially in specific tasks such as form design, still faces many challenges. SUMMARY

[0004] The present application aims to use large models in deep learning technology to intelligently analyze and design business forms.

[0005] The technical points of the present application include the following points:

[0006] (1) Data preprocessing: Collect and clean form design data from business systems, retain necessary field information, and ensure high-quality training data.

[0007] (2) Knowledge base construction: Import the processed data into the knowledge base, and convert the text into vectors through the pre-training model to build an efficient vector index to speed up the retrieval speed.

[0008] (3) Retrieval and matching: Use vectorization technology to process user queries, and match the most relevant questions by calculating the similarity between vectors.

[0009] (4) Answer generation: Find the corresponding native data based on the retrieval question results, use a pre-trained large language model combined with semantic understanding to generate form design JSON data that meets the needs, and provide it to users for editing.

[0010] (5) Continuous learning: Regularly update the knowledge base content, fine-tune the model to adapt to new data, optimize the data set, and correct errors through artificial correction to ensure the accuracy and timeliness of the system.

[0011] To achieve the above object, the application adopts the following technical solutions:

[0012] In the first aspect, the application provides a visual form generation method based on a FastGPT knowledge base, comprising:

[0013] Collect form design data from a business system, clean the data and extract key fields to obtain form original JSON data;

[0014] Import the form original JSON data, and build a knowledge base for form design based on the knowledge base function of the FastGPT system;

[0015] According to the question content of the user query, retrieve the answer content in the knowledge base;

[0016] Use a large-scale pre-training model, combine the context understanding ability and the retrieval result to generate form JSON data, extract form information from the form JSON data and present the form content;

[0017] Periodically learn form patterns from newly collected form design data, and update the current knowledge base.

[0018] Optionally, the form design data includes the design content of an application form, a statistical form and a report form; the form original JSON data removes the data used for style rendering, and only retains JSON data including form component types, form component names, data types and data precision.

[0019] Optionally, the knowledge base for form design is built based on the knowledge base function of the FastGPT system, specifically comprising:

[0020] Save the form original JSON data to a txt file, then import the txt file into a data set; then call a large model to generate question and answer pairs for the JSON data, and perform word segmentation and segmentation on the JSON data according to a self-defined segmentation rule; extract form design features from the segmented JSON data and set them as text segments;

[0021] Use a pre-trained vector model to convert the text segments into numerical semantic vector representations;

[0022] Build an index from the generated semantic vectors, including a vector index and an inverted index.

[0023] Optionally, according to the question content of the user query, the answer content in the knowledge base is retrieved, specifically: when the user queries, the question content is vectorized, and the relevant semantic vectors are matched in the index through the method of cosine similarity.

[0024] Optionally, the large-scale pre-training model performs result rearrangement on the retrieval results and generates form JSON data in combination with semantic understanding.

[0025] Optionally, the updating of the current knowledge base comprises:

[0026] Periodically or in real time, updating form design data in the knowledge base and removing outdated form design data;

[0027] Updating and fine-tuning the vector model;

[0028] Inserting question and answer pair texts in the data set, modifying automatically segmented question and answer pair contents and indexes, and deleting question and answer pair contents with automatic segmentation errors;

[0029] When an incorrect answer is detected, manually correct the error, and use the corrected form design data for retraining of the vector model.

[0030] Optionally, the external interface of the large-scale pre-training model is configured to the FastGPT system, and an application is created in the FastGPT system to assemble the knowledge base and large model service.

[0031] Optionally, the FastGPT system uses a sampling method to randomly select the next word for generating a question and answer from a probability distribution, and adjusts the temperature parameter to control the randomness of the generated word, and the formula is:

[0032]

[0033] In the formula, P new (ω i ) and P(ω i ) are the new probability distribution and the original probability distribution of the large-scale pre-training model for the word ω i , T represents the temperature parameter, and i, j represent the word sequence number.

[0034] In a second aspect, the present application provides a computer readable storage medium storing a computer program, wherein the computer program causes a computer to execute the FastGPT knowledge base-based visual form generation method according to the first aspect.

[0035] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the FastGPT knowledge base-based visual form generation method according to the first aspect.

[0036] The present application has the following beneficial effects:

[0037] (1) Efficiency: The automated design process significantly reduces the time and resources required for manual form design.

[0038] (2) Accuracy: The use of deep learning models and knowledge graph technology improves the accuracy and consistency of form design.

[0039] (3) User experience: Users can easily generate preliminary design solutions and make personalized adjustments, enhancing interactivity and satisfaction.

[0040] (4) Continuous improvement: The system has self-learning capabilities, continuously optimizing its performance based on new data, maintaining the cutting-edge and flexibility of the design.

[0041] (5) Easy maintenance: Through modular design and continuous data optimization, system maintenance becomes simpler and more efficient. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 A flowchart of a visual form generation method based on FastGPT knowledge base. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application.

[0044] In an embodiment, the present application proposes a visual form generation method based on FastGPT knowledge base, as shown in Figure 1 The method includes: first, data preprocessing, collecting and cleaning form design data from the system, retaining necessary fields; then building a knowledge base, importing processed data and generating question and answer pairs, converting text to vectors using a pre-trained model, and establishing an index to speed up retrieval; then, when a user queries, vectorize their request and match it with the knowledge base to find the most relevant answer; then generate JSON data required for form design based on the retrieval results, allowing users to further edit; finally, through a continuous learning mechanism, regularly update the knowledge base content, fine-tune the model to adapt to new data, and optimize the data set through testing and human intervention to ensure the accuracy and timeliness of the system. This process combines deep learning and knowledge graph technology to achieve intelligent and automated form design.

[0045] The visual form generation method based on FastGPT knowledge base mainly includes the following two aspects:

[0046] I. Overall process of visual form generation method

[0047] 1. Docking business form design system: designing external interfaces in the business system can allow FastGPT to obtain component library and user form library data for form design.

[0048] 2. Arrange the knowledge base of FastGPT: Arrange the knowledge base in the FastGPT system and dock the open interface of the business system.

[0049] 3. Fine-tuning and deploying large model services: To adapt to the needs of form generation, this embodiment fine-tunes the pre-trained base model, so that the large model can recognize the problem intent of the form generation requirement and generate the component content of the form design. First, prepare sample data, 80% of which is annotated, and the remaining data is used for testing. Then add appropriate output layers to the pre-trained model, add one or more fully connected layers followed by a softmax activation function. Then check the prediction results of the trained model, and judge whether it is overfitting or underfitting by looking at the loss function. If it is overfitting, you can freeze part of the pre-trained model, only train the newly added layers or the last few layers, or increase the training sample data. At the same time, use a smaller learning rate to avoid destroying the good feature representation learned by the pre-trained model. This embodiment adjusts the batch size, iteration number and other hyperparameters as needed. Finally, deploy the fine-tuned and verified model to the production environment, continuously monitor its online performance, and update the model regularly according to feedback data. Finally, deploy the trained large model to the production environment and configure the external interface of the large model to the FastGPT system.

[0050] 4. Create FastGPT application: Create an application in the FastGPT system to assemble the knowledge base and large model service, while adjusting the temperature parameter and reply prompt word configuration. When replying to questions, a variety of advanced decoding strategies are used to ensure that the generated reply answer content is both high quality and diverse. First, through greedy search, the highest probability of the next word is selected each time to ensure that the generation process is fast and the result is determined. Second, use beam search to maintain a fixed-size candidate sequence set, select the top k most likely words each time, and continue to generate the next word to generate high-quality text. In addition, FastGPT also uses the sampling method to randomly select the next word from the probability distribution to increase the diversity of generated text. In order to flexibly balance between diversity and certainty, FastGPT introduces temperature adjustment to control the randomness of generation by adjusting the temperature parameter. The principle of temperature adjustment is to control the diversity of generation by adjusting the temperature parameter. The higher the temperature, the more random the generated text; the lower the temperature, the more determined the generated text, which can balance between diversity and certainty. The formula is:

[0051]

[0052] where P(ω i ) is the original probability distribution of the model for the vocabulary ω i , and T is the temperature parameter. The role of the temperature adjustment formula is to adjust the "sharpness" of the probability distribution, thereby affecting the randomness and diversity of the generated text. T > 1: When the temperature is higher, the probability distribution becomes more uniform, and the generated text will be more random and diverse. T = 1: When the temperature is 1, the formula degenerates to the original probability distribution, and the generated text is consistent with the original prediction of the model. T < 1: When the temperature is lower, the probability distribution becomes more sharp, and the generated text will be more determined and concentrated, more inclined to choose high-probability words. In addition, the system has the ability to handle multiple tasks, can handle multiple types of natural language processing tasks at the same time, can accurately understand the user's question using a large language model, and extract key information from it. Finally, the question and answer function generates JSON data corresponding to the form content, and the system extracts form component name, type, data type, data precision, arrangement method, etc. from it, and generates complete form JSON data according to the designer's parsing path, so that the content of the form design can be rendered in the designer page. Users can edit the form in the designer, supplement the component style, number text format, or add, delete, and adjust the components.

[0053] 5. Introduce FastGPT application external interface: In the business system of form design, introduce the debugged FastGPT application dialogue question and answer interface to the form design module, when the user asks natural language, the large model starts the question and answer algorithm to return the rendering data of the business system form design, and the business system displays the data as a form preview effect, and supports re-arranging the form design content for the form design engine of the business system.

[0054] II. Knowledge base construction and form generation technology steps

[0055] 1. Data preprocessing: Collect form design data from the business system, including application forms, statistical forms, reporting forms, and other types of business form design content. The original data needs to be cleaned to remove noise and irrelevant information to ensure the quality of the training data. The form design content exported from the business system is the original JSON data, which needs to remove the data used for style rendering such as form component size, text font, appearance color, etc., and only keep the JSON data content containing form component type, name, data type, data precision.

[0056] 2. Knowledge base construction: Based on the FastGPT knowledge base function, a knowledge base for business form design is constructed. The information obtained from the large model is integrated into a structured knowledge graph. The nodes of the graph represent different form elements, and the edges represent the logical relationships between them (such as dependencies, inclusions, etc.). It includes the following aspects:

[0057] (1) Data import: Save the preprocessed JSON data to a txt file, then import the file into the dataset. Then call the large model to generate question and answer pairs for the data, and perform word segmentation and segmentation according to the custom segmentation rules. The system extracts form design features such as component name, component type, option content, whether it is required, text length, numerical precision, and component arrangement from JSON data, and sets it as a text segment to enable the model to understand and process the fields and structures in JSON data.

[0058] (2) Data vectorization: The system uses a pre-trained vector model (such as BERT, T5, etc.) to convert these text segments into numerical vector representations. Specifically, the Embedding scheme in RAG (Retrieval-Augmented Generation) is used to convert text into vectors. Text data is converted into a series of numbers, forming a vector. Each vector represents a piece of text or a word, and the vector data is stored in PostgresSQL. When the user asks a question, the question is also vectorized, and the large model is used to process vector similarity in mathematical space, so that the system can understand natural language and answer user questions.

[0059] (3) Index construction: The generated semantic vectors are constructed into indexes, including vector indexes and inverted indexes, to improve response speed and retrieval efficiency. The vector index of this embodiment uses a graph-based method based on HNSW, which facilitates efficient approximate nearest neighbor search. The original data corresponding to the index vector is stored in MongoDB. When retrieving, the vector is first recalled, and then the original data content is found in MongoDB according to the vector ID. If it corresponds to the same group of original data, it is merged, and the vector score is taken as the highest score. This design realizes efficient processing and retrieval of large amounts of data while ensuring data security and scalability

[0060] 3. Retrieval and matching: When the user queries, the question content is also vectorized and matched with relevant semantic vectors in the index through cosine similarity and other methods, achieving fast and accurate retrieval and obtaining similar question vectors. In addition, the system uses the following methods to improve vector search accuracy: optimize word segmentation, maintain the integrity and uniqueness of text fragments; increase the number of indexes, create multiple indexes for the same content through multi-perspective feature extraction and multi-granularity segmentation of text; optimize sorting, use top-k recall strategy, i.e. find the top-k most relevant records; and optimize user query input, complete ambiguous or missing user questions.

[0061] 4. Answer generation: Use large-scale pre-trained models to generate JSON data corresponding to business form design based on context understanding and retrieval results. Specifically, the system will search for matching raw data in the MongoDB database based on the question vector index, then rearrange the results using a large model and generate form JSON data based on semantic understanding.

[0062] 5. Continuous learning: To ensure the timeliness and accuracy of the knowledge base, the system should have the ability to learn from new data, update the existing knowledge graph, and learn the latest form patterns from new data collected regularly. This mainly reflects the following aspects of the system:

[0063] (1) Data update: Regularly or in real time update the data in the knowledge base, add new business form design data, new form component data or update the business description content of the form, remove outdated form design content, and ensure that the knowledge base always remains up-to-date.

[0064] (2) Model fine-tuning: With the addition of new data, fine-tune the existing vector model to make the model better adapt to the new data. By continuing to update the vector model and fine-tuning the original model, the model can learn rich semantic information from the updated text data, improving the retrieval accuracy in the form design related field.

[0065] (3) Optimize data set: Test the content matching degree in the data set through the search test function of the knowledge base. After finding the problem, manually insert the question and answer pair text in the original data set, modify the automatically segmented question and answer pair content and index, or delete the automatically segmented question and answer pair content with errors, then the system will regenerate the text vector and dynamically update the index of the knowledge base. This method allows the model to gradually improve the system search and question and answer functions without interrupting service.

[0066] (4) Error correction: When the system detects an error or inaccurate answer, manually correct the error and update the corrected form design data to the data set for retraining the model.

[0067] In summary, the application uses vector database, large language model training and other technologies to construct a knowledge base for business form design, and realizes the generation of a visual form in a natural language question and answer manner to improve the quality and efficiency of form design in an automated manner. The application can be applied to the fields of enterprise informatization management and automated office business, and can effectively improve the form design efficiency and quality and reduce the labor cost.

[0068] In another embodiment, the application provides a computer readable storage medium storing a computer program, and the computer program causes a computer to execute the visual form generation method based on the FastGPT knowledge base of the foregoing embodiments.

[0069] In another embodiment, the application provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the visual form generation method based on the FastGPT knowledge base of the foregoing embodiments when executing the computer program.

[0070] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium, which can contain or store programs for use by or in conjunction with an instruction execution system, device or apparatus. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or apparatus, or any suitable combination of the above. More specific examples of computer storage media can include one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, compact disk read-only memory (CDROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0071] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0072] The above is only the preferred embodiment of the present application, and the protection scope of the present application is not limited to the above-mentioned embodiments. Any technical solution falling within the concept of the present application shall fall within the protection scope of the present application. It should be noted that, for those of ordinary skill in the art, some improvements and refinements without departing from the principles of the present application shall be considered within the protection scope of the present application.

Claims

1. A method for generating visual forms based on the FastGPT knowledge base, characterized in that, include: Collect form design data from the business system, clean the data and extract key fields to obtain the original JSON data of the form; Import the raw JSON data from the form and build a knowledge base for the form design based on the knowledge base functionality of the FastGPT system. Based on the user's query, retrieve the answer from the knowledge base; Using a large-scale pre-trained model, combined with contextual understanding capabilities and retrieval results, form JSON data is generated, from which form information is extracted and form content is presented. Regularly learn form patterns from newly collected form design data and update the current knowledge base.

2. The method for generating a visual form based on the FastGPT knowledge base as described in claim 1, characterized in that: The form design data includes the design content of application forms, statistical tables, and form filling forms; the original JSON data of the form has removed the data used for style rendering, and only retains the JSON data including the form component type, form component name, data type, and data precision.

3. The method for generating a visual form based on the FastGPT knowledge base as described in claim 1, characterized in that: The knowledge base built on the FastGPT system for form design specifically includes: The original JSON data of the form is saved to a txt file, and then the txt file is imported into the dataset. Then, the large model is called to generate question-answer pairs for the JSON data, and the JSON data is segmented into words and segments according to a custom segmentation rule. The form design features are extracted from the segmented JSON data and set as text fragments. Use a pre-trained vector model to convert text fragments into numerical semantic vector representations; The generated semantic vectors are used to build an index, including a vector index and an inverted index.

4. The method for generating a visual form based on the FastGPT knowledge base as described in claim 3, characterized in that: The step of retrieving answer content from the knowledge base based on the user's query content specifically involves: when a user queries, the query content is vectorized, and relevant semantic vectors are matched in the index using the cosine similarity method.

5. The method for generating a visual form based on the FastGPT knowledge base as described in claim 1, characterized in that: The large-scale pre-trained model rearranges the retrieval results and combines semantic understanding to generate form JSON data.

6. The method for generating a visual form based on the FastGPT knowledge base as described in claim 3, characterized in that: The updating of the current knowledge base includes: Regularly or in real time, update the form design data in the knowledge base and remove outdated form design data; Update and fine-tune the vector model; Insert question-and-answer pair text into the dataset, modify the content and index of the automatically segmented question-and-answer pairs, and delete the question-and-answer pairs that are incorrectly segmented by the automatic segmenter. When an incorrect answer is detected, the error is manually corrected, and the corrected form design data is used for retraining the vector model.

7. The method for generating a visual form based on the FastGPT knowledge base as described in claim 1, characterized in that: The external interface of the large-scale pre-trained model is configured to the FastGPT system, and applications are created in the FastGPT system to assemble knowledge bases and large model services.

8. The method for generating a visual form based on the FastGPT knowledge base as described in claim 7, characterized in that: The FastGPT system employs a sampling method to randomly select the next word for generating the question and answer from a probability distribution. The randomness of the generated word is controlled by adjusting a temperature parameter, as shown in the formula: In the formula, P new (ω i ) and P(ω i ) are respectively large-scale pre-trained models for vocabulary ω i The new probability distribution and the original probability distribution, where T represents the temperature parameter and i,j represent the word sequence numbers.

9. A computer-readable storage medium storing a computer program, characterized in that, The computer program causes the computer to execute the visual form generation method based on the FastGPT knowledge base as described in any one of claims 1-8.

10. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the visual form generation method based on the FastGPT knowledge base as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Form generation method and device based on large language model, equipment and medium

    CN117077643A

  • Method for generating front-end prototype based on artificial intelligence technology

    CN119829022A

  • Task template generation method and system combining knowledge retrieval enhancement and Agent workflow

    CN120218036A

  • A system for generating answers to multiple questions using rag-based generative artificial intelligence technology

    KR102710159B1

  • Systems and methods for a knowledge-based form creation platform

    US10474745B1