Database table field description intelligent generation and dynamic maintenance method based on RAG and large model

By building a domain-adaptive vector knowledge base and RAG technology, combined with large-scale model generation and manual review methods, the problem of low-quality database table field descriptions was solved, efficient and accurate description generation and dynamic maintenance were achieved, and data governance and AI management capabilities were improved.

CN120764654APending Publication Date: 2025-10-10CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD

Patent Information

Application Number
CN202510934904.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

The existing technology has low-quality Chinese descriptions of database table fields, which results in the reliance of developers on the experience of developers to understand the meaning of data, affecting data governance efficiency and AI intelligent management capabilities. Existing solutions also have problems such as low efficiency, accuracy relying on subjective factors, delayed updates, and poor adaptability.

Method used

A method based on RAG and large models is adopted. By building a domain-adaptive vector knowledge base, combined with RAG technology, relevant knowledge is recalled from the knowledge base. After assembling prompt words, the large model is called to generate description results. The knowledge base is optimized through manual review and feedback to achieve dynamic maintenance.

Benefits of technology

It improves the accuracy and efficiency of table field descriptions, reduces maintenance costs, enhances domain adaptability and interpretability, and supports the generation of high-quality descriptions in dynamic business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120764654A_ABST
    Figure CN120764654A_ABST
Patent Text Reader

Abstract

The invention relates to a database table field description intelligent generation and dynamic maintenance method and device based on RAG and a large model. The method comprises the following steps: constructing a domain-based dynamic knowledge base system through multi-source corpus collection, domain adaptation vectorization model processing and a dynamic knowledge base construction and updating process; receiving a description generation request of a table or a field, recalling related knowledge from the knowledge base through an RAG technology, assembling cue words, and then calling a large model for reasoning to generate a description result; the generated description result is confirmed through manual auditing, the knowledge base is updated according to confirmation feedback, and continuous optimization of the knowledge base is achieved. According to the method provided by the invention, the problems of low accuracy, high maintenance cost, poor interpretability and the like in a traditional method are effectively solved by constructing a field-enhanced RAG architecture and combining a three-layer knowledge system and a self-adaptive prompt framework which can be dynamically adjusted according to a business scene, and a new technical implementation path is provided for table and field description in intelligent data governance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of large-scale model applications and database operations, and in particular to a method, device, computer-readable storage medium, and electronic device for intelligently generating and dynamically maintaining database table field descriptions based on RAG (retrieval-augmented generation) and a large language model (LLM). The method is suitable for data governance, metadata management, and AI-driven data intelligence scenarios. Background Art

[0002] In database and data warehouse design practices, tables and fields are typically named in English, while accompanying description fields capture their corresponding Chinese business meanings, data sources, and usage scenarios. Complete and accurate table and field description metadata is the core foundation for accurately conveying business semantics and supporting cross-role data understanding. It plays a key role in improving data governance systems and building intelligent data management capabilities driven by large models.

[0003] Currently, the industry is generally facing the problem of low-quality Chinese descriptions of tables and fields. The Chinese descriptions of most business database tables and fields are non-standard, specifically manifested in the absence of descriptive information or vague descriptions (such as simply labeling "Field 1", "Temporary Field" and other expressions without substantive business meaning). Such problems directly lead to the understanding of data meaning being highly dependent on the experience of developers, and new employees need to invest a lot of time to familiarize themselves with the system context; at the same time, artificial intelligence systems (especially large models) lack accurate Chinese semantic guidance and find it difficult to correctly parse the business definitions of tables and fields through field description information. The above problems further cause data governance engineers and AI systems to spend a lot of resources on tasks such as confirming field meanings and aligning cross-departmental terminology differences, which seriously restricts the improvement of data governance efficiency and the implementation of AI intelligent data management capabilities, and urgently needs technical improvements.

[0004] To address the above issues, existing technologies mainly provide the following three types of solutions, but all of them have significant limitations: 1. Manual maintenance mode Some companies with well-established data governance practices attempt to improve description quality through a full-process manual control model encompassing "pre-process specification development, in-process modeling assistance, and post-process quality inspection." Specific measures include: developing technical and business data specifications and conducting training after approval; relying on governance experts or system-assisted modeling to complete descriptions during the modeling process; and ensuring description accuracy through manual expert review and scheduled quality inspections. However, this model suffers from the following core flaws: Low maintenance efficiency: For field description updates alone, if a single field is manually processed in 5 seconds, manually correcting millions of fields would require approximately 9 man-months of work. Accuracy relies on subjective factors: The quality of description is highly dependent on personal experience and level of detail, and is easily affected by human omissions or misunderstandings; Significant update lag: After a field is changed, it usually takes several working days to update the document describing the information and synchronize training, which makes it difficult to meet the needs of dynamic business scenarios.

[0005] 2. Automatic maintenance solution based on NLP Some solutions attempt to automate the generation of field descriptions using natural language processing (NLP) technology, but their capabilities are significantly limited: Shallow semantic understanding: It only supports simple term mapping and has difficulty capturing deep semantic associations in complex business scenarios. Insufficient processing capabilities for composite fields: For composite fields containing multi-dimensional information, such as "ods_addr_geo" (ODS layer address geographic information), effective decomposition and comprehensive description cannot be achieved; Poor domain adaptability: Model training relies on domain-specific corpus, and cross-industry reuse requires retraining, making it difficult to meet the needs of diverse business scenarios.

[0006] 3. Simple large model generation solution Some solutions directly use large language models (LLMs) to generate field descriptions, but their reliability and practicality face multiple challenges: The hallucination problem is prominent: the model may generate descriptive information that is irrelevant to the actual business or even incorrect, introducing misleading metadata; Knowledge update delay: Large model training data has timeliness limitations, making it difficult to synchronize the latest business terminology standards and industry trends in real time. Lack of explainability: The generated descriptive information lacks clear traceability and cannot be verified for its consistency with the business definition.

[0007] In summary, existing technologies still have deficiencies in efficiency, accuracy, adaptability, and reliability in improving the quality of table field descriptions. There is an urgent need for an intelligent solution that combines semantic understanding, domain adaptation, and dynamic update capabilities to achieve high-quality generation and continuous maintenance of table field description information. Summary of the Invention

[0008] In order to address the above problems, this application proposes a new method for intelligent generation and dynamic maintenance of database table field descriptions based on RAG and large models.

[0009] Specifically, this application provides the following technical solutions: A first aspect of the present application provides a method for intelligently generating and dynamically maintaining database table field descriptions based on RAG and a large model, the method comprising: S1. Building a Domain-Adaptive Vector Knowledge Base: This involves collecting multi-source corpora, processing domain-adapted vector models, and constructing and updating dynamic knowledge bases to build a domain-specific dynamic knowledge base system. S2. Generate table and field descriptions based on RAG and the large model: Receive a request to generate a table or field description, use RAG (retrieval-augmented generation) technology to retrieve relevant knowledge from the knowledge base, assemble prompt words, and then use the large model to infer and generate the description result; S3. Dynamic feedback optimization: The generated description results are confirmed through manual review, and the knowledge base is updated based on the confirmation feedback to achieve continuous optimization of the knowledge base.

[0010] Furthermore, in the method of the present application, the step S1 of constructing a domain-adaptive vector knowledge base includes: Multi-source corpus collection: collecting structured corpus, semi-structured corpus and corpus generated by large models; Domain-adaptive vectorized model processing: Embedding technology is used to perform hierarchical encoding of table and field English names, supporting similarity threshold retrieval; Dynamic knowledge base construction and updating: This is achieved through batch document storage, real-time business system changes and message queue (MQ) consumption, manual updates, and near-real-time full comparison and update of standard library tables / normalized library tables.

[0011] Furthermore, in the method of the present application, the structured corpus in the multi-source corpus collection includes system standardized library table field information, industry standardized library table field information, and business term list; the semi-structured corpus includes enterprise standard specifications, white papers, requirement documents, data dictionaries, API documents, and industry standard documents; the large model generated corpus includes English and pinyin naming tables generated based on standard domain business terms.

[0012] Furthermore, in the method of the present application, the generation of table field description based on RAG and large model in step S2 includes: The user enters the English library name or table name to be described; Search the input and use RAG technology to retrieve TOPK knowledge related to field level, table level and business terms in the knowledge base; Based on the prompt word template, combine domain information, examples and input field names to assemble specific prompt words; Call the large model to perform reasoning based on the prompt words and generate description results; Manually confirm the accuracy and rationality of the description results returned by the large model, and then output the confirmed description results; Based on the feedback from manual confirmation, the relevant knowledge in the knowledge base is updated to optimize the subsequent reasoning and description generation process.

[0013] Furthermore, in the method of the present application, the prompt word template includes: system role (defined as domain data governance expert), task (converting English field names into Chinese descriptions that meet the requirements), input (field name), related fields, examples (input and output pairs and reference source document IDs) and output format requirements (JSON format).

[0014] Furthermore, in the method of the present application, the dynamic feedback optimization in step S3 includes: Feedback record: record the user's "use" or "not use" label for the generated description results; Knowledge base correction: Update or correct relevant knowledge in the knowledge base based on user feedback tags.

[0015] A second aspect of the present application provides a device for intelligently generating and dynamically maintaining database table field descriptions based on RAG and a large model, the device comprising: The knowledge base layer module is used to build a dynamic knowledge base system in different fields through multi-source corpus collection, domain-adapted vectorized model processing, and dynamic knowledge base construction and update processes; The reasoning layer module is used to receive table or field description generation requests, recall relevant knowledge from the knowledge base through RAG technology, assemble prompt words, and call the large model for reasoning to generate description results; The control layer module is used to confirm the generated description results through manual review, update the knowledge base based on the confirmation feedback, and achieve continuous optimization of the knowledge base.

[0016] The device implements the steps of the aforementioned method for intelligently generating and dynamically maintaining database table field descriptions based on RAG and a large model during operation.

[0017] Furthermore, in the device of the present application, (1) Knowledge base layer modules include: A knowledge base construction unit is used to construct a dynamically updated knowledge base system in different fields; the knowledge base system is constructed based on multi-source corpus, which includes structured corpus, semi-structured corpus and large model generated corpus; Vectorization unit, used to perform hierarchical encoding of table and field English names using embedding technology, supporting similarity threshold retrieval; (2) The control layer modules include: Interaction recording unit, used to record the interactive input and output between the user and the large model as well as the user input; Credibility judgment unit, used for allowing users to review relevant documents to judge the credibility of the description results generated by the large model; The feedback correction unit is used to correct the knowledge base based on the "use" and "not use" labels marked by users during review.

[0018] A third aspect of the present application provides an electronic device, comprising: a memory and a processor; Memory: used to store computer programs; Processor: used to execute the computer program to implement the steps of the aforementioned method for intelligently generating and dynamically maintaining database table field descriptions based on RAG and a large model.

[0019] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the aforementioned method for intelligently generating and dynamically maintaining database table field descriptions based on RAG and a large model are implemented.

[0020] In summary, this application effectively solves the problems of low accuracy, high maintenance cost, and poor interpretability existing in traditional methods by constructing a domain-enhanced RAG architecture, building a three-layer knowledge system, innovating hybrid retrieval strategies, and designing an adaptive prompt framework that can be dynamically adjusted according to business scenarios. It also combines the "generation-review-feedback" continuous iterative optimization process of table and field descriptions and the credibility-driven large template result verification process, providing a new technical implementation path for table and field descriptions in intelligent data governance.

[0021] Other features and advantages of this application will be described in detail in the following description, or will be understood through the implementation of the relevant technical solutions of this application. The objectives and other advantages of this application can be achieved through the technical features and technical means clearly indicated in the description, claims, and drawings, and obtained through the implementation of these technical contents. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] To more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings involved in the description of the embodiments. It should be noted that the drawings only illustrate some embodiments of the present application. Those skilled in the art can deduce other relevant drawings based on these drawings without engaging in creative work.

[0023] Figure 1 The figure is a flowchart of the overall implementation of the present application method.

[0024] Figure 2 This is a flowchart for constructing and updating the dynamic knowledge base in this application method.

[0025] Figure 3 This is a flowchart of the RAG-based reasoning generation and dynamic maintenance in the method of this application.

[0026] Figure 4 Figure 1 is a structural diagram of a database table field description intelligent generation and dynamic maintenance device based on RAG and a large model according to an embodiment of the present application.

[0027] Figure 5 Figure 2 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. It should be noted that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort fall within the protection scope of the present application.

[0029] In this document, the term “comprises” and any form of the term “comprise”, such as “comprising”, “comprises” and the like, are open-ended expressions that are used to specify the presence of stated elements or features, but do not exclude the presence of one or more additional elements or features. The term “based on” is intended to mean “based at least in part on”, that is, the stated value is one of a plurality of values that serve as a basis for the stated application. The term “one embodiment” is intended to mean “at least one embodiment”, that is, the described embodiment is one of a plurality of possible embodiments that can be used to implement the described application.

[0030] In this document, the terms “one” and “multiple” are used to modify related elements or features, and the description is illustrative rather than restrictive. Unless otherwise explicitly stated in the context, “one” should be understood as “at least one”, and “multiple” should be understood as “at least two”. Those skilled in the art should interpret these terms reasonably and logically in the context of the semantics and logical relationships, and ensure that they cover the possibility of “one or more”.

[0031] Term explanation: RAG: Retrieval-Augmented Generation, retrieval-augmented generation. A hybrid artificial intelligence architecture combining external knowledge retrieval and generation model. By retrieving relevant data segments in structured / unstructured databases in real time, it is input into the generation model as context to improve the accuracy and verifiability of the output content.

[0032] LLM: Large Language Model, large language model. A deep learning model based on the Transformer architecture, which learns general language representation and generation ability through self-supervised pre-training of massive text data, with typical parameter scale exceeding one hundred million.

[0033] NLP: Natural Language Processing, natural language processing. A key branch of artificial intelligence, studying computer analysis, generation and interaction technology of human language, covering morphological analysis, semantic understanding, sentiment recognition and other sub-tasks.

[0034] Hallucination: hallucination. When the generative model lacks reliable knowledge support, it outputs seemingly reasonable but inconsistent with facts or logically contradictory content, typically manifested as fictional data, false attribution or contradictory statements.

[0035] MQ: Message Queue, message queue. A middleware technology for implementing asynchronous communication in distributed systems. Its core principle is to store and transmit messages through queue mechanism to realize decoupling and collaboration between systems. Common MQ middleware includes Kafka, RabbitMQ, etc.

[0036] Figure 1 The overall implementation process of the database table field description intelligent generation and dynamic maintenance method based on RAG and large model provided by the application is shown, including the following steps: S1. Constructing a domain adaptive vector knowledge base: through multi-source corpus collection, domain adaptive vectorization model processing, and dynamic knowledge base construction and update process, a dynamic knowledge base system is constructed for different fields; S2. Table field description generation based on RAG and large model: receive table or field description generation request, recall relevant knowledge from knowledge base through RAG (retrieval enhancement generation) technology, assemble prompt words and call large model reasoning to generate description results; S3. Dynamic feedback optimization: confirm the generated description results through manual review, update the knowledge base according to the confirmation feedback, and realize the continuous optimization of the knowledge base.

[0037] In order to more clearly illustrate the technical scheme of the application, the following will be further illustrated through specific examples of implementation.

[0038] The application provides a three-layer enhanced architecture scheme based on RAG, and the technical strategies adopted by the scheme include: constructing a domain adaptive vector knowledge base in the knowledge base layer, verifying the LLM workflow in multiple stages in the reasoning layer, and optimizing the mechanism through dynamic feedback in the control layer.

[0039] The specific implementation steps of the scheme are as follows: (I) Knowledge base layer In the knowledge base layer, a dynamic update knowledge base system is constructed based on multi-source corpus for different fields.

[0040] 1. Multi-source corpus collection a. Structuring: System-standardized database table field information, industry-standardized database table field information, and business terminology glossary; b. Semi-structured: corporate standards, white papers, requirements documents, data dictionaries, API documents, industry standard documents, etc. c. Big model: Based on standard domain business terms, the big model generates corresponding naming tables in English, Pinyin, etc. for corresponding business terms.

[0041] By using the corpus from the above sources, we can organize the knowledge base into different fields. The following is an example of a field-level knowledge base:

[0042] 2. Domain-Adapted Vectorized Model Embedding technology is used to perform hierarchical encoding on table English names (Table) and field English names (Column), supporting similarity threshold retrieval.

[0043] 3. Construction and update process of dynamic knowledge base ( Figure 2 ) Batch import of documents: The data in the documents is imported into the knowledge base in batches, providing an initial large amount of data foundation for the knowledge base.

[0044] Real-time changes in business systems and real-time consumption by MQ: Real-time change data generated by the business system is sent to MQ (message queue), which consumes and processes this real-time data and then inputs the processed data into the knowledge base. The knowledge base parses and updates in real time to ensure that the knowledge base can obtain the latest dynamic data from the business system in a timely manner.

[0045] Manual update: The system provides maintenance operations for the vector knowledge base, including query, modification, deletion, and addition, which is convenient for knowledge base managers to update the knowledge base online in real time.

[0046] Quasi-real-time full comparison and update of standard and normalized database tables: Perform a quasi-real-time full comparison of standard and normalized database tables with the data in the knowledge base. Update the knowledge base based on the comparison results to ensure that the data in the knowledge base remains consistent and standardized with the standard and normalized database tables, further improving the quality and reliability of the knowledge base data.

[0047] The entire process uses multiple data sources and update methods to achieve dynamic construction and timely updating of the knowledge base, providing an accurate and standardized data foundation for the subsequent intelligent generation and dynamic maintenance of database table field descriptions.

[0048] (2) Reasoning Layer When there is a demand for generating a library table field description, the system will prioritize using RAG to vector recall. After obtaining the topK results, it will assemble prompt words and then use the assembled prompt words to call the large model for inference to obtain the results.

[0049] 1. RAG-based reasoning generation and dynamic maintenance process ( Figure 3 ) (1) The user enters the English library name or table name to be completed; (2) Search the input and use RAG technology to retrieve TOPK knowledge related to field level, table level and business terms in the knowledge base; (3) Based on the prompt word template, combine domain information, examples and input field names to assemble specific prompt words; (4) Call the large model to perform reasoning based on the prompt words and generate description results; (5) Manually confirm the accuracy and rationality of the description results returned by the large model, and then output the confirmed description results; (6) Based on the feedback from manual confirmation, the relevant knowledge in the knowledge base is updated to optimize the subsequent reasoning and description generation process.

[0050] The entire process realizes a closed-loop operation from user input to knowledge retrieval, prompt word generation, model reasoning, manual confirmation and dynamic update of the knowledge base.

[0051] 2. Vector recall process: def retrieve_context(field): Field-level search field_results = vector_db.search(field, top_k=10) Table-level context search table_results = vector_db.search(field.table_schema, top_k=10) # Business term search term_results = term_db.fuzzy_search(field.name_segments) return rank_results(field_results + table_results + term_results) If the calling end passes in the domain name, a RAG search will be performed in combination with the domain.

[0052] 3. Prompt words: Prompt Engineering Framework [System Role] You are a data governance expert in {domain} [Task] Convert English field names into Chinese descriptions that meet the requirements [Input] Field names: {field_name1}, {field_name2}, ... [Related fields] {domain1}, ... [Example] Input name (name) | Output description (comment) | Reference document ID (ref) EQUIPMENT_ID|Equipment ID|1 OPERATOR_ID|Operator ID|1 [Output] Please ensure that the returned JSON is in the correct format and can be successfully parsed by Python's json.loads method. JSON data is output using formatted format. Please place the thought process separately in the thoughts field: { "result": [ { "name": "submit_date", "comment": ["Submission Date"], "ref": [1] },{ "name": "xh", "comment": ["serial number","model"], "ref": [ ] } ], "thoughts": "Thought process..." } Then, when the user enters EQUIPMENT_OPERATOR, the output of calling the large model through the assembled prompt word is as follows: { "result": [ { "name": "EQUIPMENT_OPERATOR", "comment": ["Device Operator"], "ref": [2] } ], "thoughts": "1. The field name 'EQUIPMENT_OPERATOR' consists of two parts: EQUIPMENT (equipment) and OPERATOR (operator). 2. In the energy sector, equipment operator generally refers to the person responsible for equipment operation and maintenance. 3. Reference the translation model for similar fields (e.g., EQUIPMENT_ID → equipment ID, OPERATOR_ID → operator ID). 4. Using the principle of literal translation and domain adaptation, the final name is 'equipment operator'. 5. The reference source remains consistent with the example, using the "XX Business Data Specification" with document ID=2." } The above is the description generation at the field level. When generating the table-level description, the prompt list of the fields in the table will be added based on the above prompt word template. The snippet is as follows: [List of fields in the table] ID|Primary key ID CJR_ID|Creator CJSJ | Creation Time XGR_ID|Modifier XGSJ|Modification time SFSC|Delete (3) Control layer The system records the interactive input and output between the user and the large model, as well as the user's input, in the system session log. After returning to the front-end interface, the user can view the relevant documents in the ref field, making it convenient for the user to judge the credibility of the results generated by the large model by referencing the documents.

[0053] The user decides whether to use the result output by the large model: if it is used, it indicates that the record is generated effectively and of high quality; if the user abandons it, it indicates that the record does not meet the user's expectations.

[0054] The system feeds back (corrects, updates) the "use" and "not use" labels marked by users during review to the knowledge base.

[0055] This application also proposes a database table field description intelligent generation and dynamic maintenance device based on RAG and large model ( Figure 4 ), the device comprises: The knowledge base layer module is used to build a dynamic knowledge base system in different fields through multi-source corpus collection, domain-adapted vectorized model processing, and dynamic knowledge base construction and update processes; The reasoning layer module is used to receive table or field description generation requests, recall relevant knowledge from the knowledge base through RAG technology, assemble prompt words, and call the large model for reasoning to generate description results; The control layer module is used to confirm the generated description results through manual review, update the knowledge base based on the confirmation feedback, and achieve continuous optimization of the knowledge base.

[0056] When the above device is running, the steps of the method for intelligent generation and dynamic maintenance of database table field description based on RAG and large model disclosed in this application are implemented.

[0057] The flowcharts and block diagrams in the accompanying drawings illustrate possible implementations of the apparatus, methods, and computer program products according to various embodiments of the present application, including architecture, functions, and operations. In these figures, each box may represent a module, a program segment, or a portion of a code, which contains one or more executable instructions for implementing a specified logical function. It should be noted that each box in the block diagram and / or flowchart, and the combination of these boxes, can be implemented using a dedicated hardware-based system to implement the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0058] The embodiment of the present application also discloses an electronic device ( Figure 5 ), comprising: a processor 310, a communication interface 320, a memory 330 for storing a computer program executable by the processor, and a communication bus 340. The processor 310, communication interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 executes the executable computer program to implement the steps of the aforementioned method for intelligently generating and dynamically maintaining database table field descriptions based on RAGs and large models.

[0059] It is understood that, in addition to the memory and processor, the electronic device may also include an input device (e.g., a keyboard), an output device (e.g., a display), and other communication modules. These input devices, output devices, and other communication modules all communicate with the processor via an I / O interface (i.e., an input / output interface).

[0060] The operation of the present application can be implemented by writing computer program code using one or more programming languages ​​or a combination thereof. The programming languages ​​include but are not limited to the following types: Object-oriented programming languages, such as Java, Smalltalk, C++, etc.; A conventional procedural programming language, such as "C" or a similar programming language.

[0061] The execution methods of the program code include but are not limited to: Executes entirely on the user's computer; Partially executed on the user's computer and partially on a remote computer; Executed as a standalone software package; Executes entirely on the remote computer or server.

[0062] In scenarios involving a remote computer, the remote computer can be connected to the user's computer via any type of network, including but not limited to a local area network (LAN) or a wide area network (WAN). Additionally, the remote computer can be connected to an external computer via an Internet service provider, such as the Internet.

[0063] Furthermore, the present application also discloses a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device can execute the various steps of the method for intelligent generation and dynamic maintenance of database table field descriptions based on RAG and large models disclosed in the present application.

[0064] In the context of this application, computer-readable storage media refers to tangible media that can store computer program code and related data. Specific examples include, but are not limited to, the following: (1) Portable computer disk: A removable magnetic storage medium such as a floppy disk.

[0065] (2) Hard disk: includes fixed storage devices such as mechanical hard disks and solid-state hard disks.

[0066] (3) Random Access Memory (RAM): Volatile storage medium used for temporary storage of data and program code.

[0067] (4) Read-only memory (ROM): A non-volatile storage medium used to store fixed programs and data.

[0068] (5) Erasable Programmable Read-Only Memory (EPROM) or Flash Memory: A non-volatile storage medium that supports multiple erasing and programming.

[0069] (6) Fiber optic storage device: storage medium based on fiber optic technology.

[0070] (7) Compact Disc Read-Only Memory (CD-ROM): A read-only medium that stores data in the form of an optical disc.

[0071] (8) Optical storage devices: storage media based on optical principles, such as DVDs and Blu-ray discs.

[0072] (9) Magnetic storage devices: storage media based on magnetic principles, such as magnetic tapes and disks.

[0073] (10) Any suitable combination of the above: for example, combining multiple storage media to meet different storage requirements.

[0074] These computer-readable storage media can be used to store the program code and related data described in this application to support the operation of the program and the persistent storage of data.

[0075] In particular, according to an embodiment of the present application, the process described in the flowchart can be implemented as a computer software program. For example, an embodiment of the present application relates to a computer program product, which includes a computer program carried on a non-transitory computer-readable medium. The computer program includes program code for executing the method for intelligently generating and dynamically maintaining database table field descriptions based on RAG and a large model disclosed in the present application. When the computer program is executed by a processing device, it can implement the above-mentioned functions defined in the embodiments of the present application.

[0076] Although the above discussion contains several specific implementation details, these details should not be interpreted as limiting the scope of this application. The above description is only a preferred embodiment of the present application and an illustration of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in this application is not limited to the technical solutions formed by the specific combination of the above technical features. At the same time, this application should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concepts.

[0077] Those skilled in the art should also understand that they may modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein with equivalents, without departing from the spirit and scope of the technical solutions of the embodiments of the present application. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the core spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for intelligently generating and dynamically maintaining database table field descriptions based on RAG and large models, characterized in that: The method comprises: S1. Building a Domain-Adaptive Vector Knowledge Base: This involves collecting multi-source corpora, processing domain-adapted vector models, and constructing and updating dynamic knowledge bases to build a domain-specific dynamic knowledge base system. S2. Generate table and field descriptions based on RAG and the large model: Receive a request to generate a table or field description, use RAG technology to retrieve relevant knowledge from the knowledge base, assemble prompt words, and then use the large model to infer and generate the description result; S3. Dynamic feedback optimization: The generated description results are confirmed through manual review, and the knowledge base is updated based on the confirmation feedback to achieve continuous optimization of the knowledge base.

2. The method according to claim 1, characterized in that The step S1 of constructing a domain-adaptive vector knowledge base includes: Multi-source corpus collection: collecting structured corpus, semi-structured corpus and corpus generated by large models; Domain-adaptive vectorized model processing: Embedding technology is used to perform hierarchical encoding of table and field English names, supporting similarity threshold retrieval; Dynamic knowledge base construction and updating: This is achieved through batch document storage, real-time changes to business systems and real-time consumption of message queues, manual updates, and near-real-time full comparison and updates of standard / normalized database tables.

3. The method according to claim 2, characterized in that The structured corpus in the multi-source corpus collection includes system standardized library table field information, industry standardized library table field information, and business terminology list; the semi-structured corpus includes enterprise standard specifications, white papers, requirement documents, data dictionaries, API documents, and industry standard documents; the large model generated corpus includes English and pinyin naming tables generated based on standard domain business terms.

4. The method according to claim 1, wherein The generation of table field descriptions based on the RAG and the large model in step S2 includes: The user enters the English library name or table name to be described; Search the input and use RAG technology to retrieve TOPK knowledge related to field level, table level and business terms in the knowledge base; Based on the prompt word template, combine domain information, examples and input field names to assemble specific prompt words; Call the large model to perform reasoning based on the prompt words and generate description results; Manually confirm the accuracy and rationality of the description results returned by the large model, and then output the confirmed description results; Based on the feedback from manual confirmation, the relevant knowledge in the knowledge base is updated to optimize the subsequent reasoning and description generation process.

5. The method according to claim 4, characterized in that The prompt word template includes: system role, task, input, related fields, examples and output format requirements.

6. The method according to claim 1, characterized in that The dynamic feedback optimization in step S3 includes: Feedback record: record the user's "use" or "not use" label for the generated description results; Knowledge base correction: Update or correct relevant knowledge in the knowledge base based on user feedback tags.

7. A device for intelligently generating and dynamically maintaining database table field descriptions based on RAG and large models, characterized in that: The device comprises: The knowledge base layer module is used to build a dynamic knowledge base system in different fields through multi-source corpus collection, domain-adapted vectorized model processing, and dynamic knowledge base construction and update processes; The reasoning layer module is used to receive table or field description generation requests, recall relevant knowledge from the knowledge base through RAG technology, assemble prompt words, and call the large model for reasoning to generate description results; The control layer module is used to confirm the generated description results through manual review, update the knowledge base based on the confirmation feedback, and achieve continuous optimization of the knowledge base.

8. The device according to claim 7, characterized in that In the device, (1) Knowledge base layer modules include: A knowledge base construction unit is used to construct a dynamically updated knowledge base system in different fields; the knowledge base system is constructed based on multi-source corpus, which includes structured corpus, semi-structured corpus and large model generated corpus; Vectorization unit, used to perform hierarchical encoding of table and field English names using embedding technology, supporting similarity threshold retrieval; (2) The control layer modules include: Interaction recording unit, used to record the interactive input and output between the user and the large model as well as the user input; Credibility judgment unit, used for allowing users to review relevant documents to judge the credibility of the description results generated by the large model; The feedback correction unit is used to correct the knowledge base based on the "use" and "not use" labels marked by users during review.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for intelligently generating and dynamically maintaining database table field descriptions based on RAG and a large model are implemented as described in any one of claims 1 to 6.

10. An electronic device, characterized in that: include: memory and processor; Memory: used to store computer programs; Processor: used to execute the computer program to implement the steps of the method for intelligently generating and dynamically maintaining database table field descriptions based on RAG and a large model as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Field description information generation method and device, equipment and storage medium

    CN114840563A

  • Vector retrieval service method and device, equipment and storage medium thereof

    CN116431878A

  • Credit business system evolution method and device based on large model RAG technology

    CN119204205A

  • Method for constructing vectorized knowledge base based on dynamic fields for RAG system

    CN119377418A

  • Automatic RAG knowledge base construction method and system based on large model

    CN119558393A

Cited By

  • Prompt word generation method and related device

    CN121072789A

  • Method and system for automatically generating function call data

    CN121413734A

  • New media intelligent channel switching method, system and device and medium

    CN121561074A