A method and system for automatically generating a structured collection task based on a large language model

CN122904848APending Publication Date: 2026-10-13HEFEI IFLY DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610731624.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-26
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004](1)复杂任务的Token容量限制:面对涉及多表关联的复杂采集需求时,单次调用模型生成的全量结构往往会超出大语言模型的上下文窗口限制(Token Limit),导致生成内容截断或逻辑缺失

Benefits of technology

[0034]1)攻克了复杂业务需求下的模型容量限制难题:本发明通过宏观规划-微观迭代的两阶段拆解机制,将涉及多表关联的庞大采集需求化整为零,有效规避了大语言模型单次推理过程中极易出现的Token容量溢出风险,确保了复杂长文本需求下数据实体提取的完整性与稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122904848A_ABST
    Figure CN122904848A_ABST
Patent Text Reader

Abstract

The application discloses a structured collection task automatic generation method and system based on a large language model and rule hybrid driving, and the natural language description of data collection requirements is parsed into a data entity list and a macro correlation topology by a large language model, Token capacity limitation is avoided through macro disassembly, attribute description information of each data entity is iteratively generated and field uniqueness is verified, Chinese semantic labels are converted into standardized naming identifiers by a pinyin conversion tool and physical naming conflicts are corrected, UUID and timestamps generated by the system are injected to correct hallucinations and are mapped into physical foreign key constraints, and finally, a collection task compression package containing JSON format structured collection task description information is packaged. The application realizes end-to-end automatic generation from a fuzzy requirement to a deployable collection task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of data engineering and artificial intelligence application technology, specifically to a method, system, storage medium, and electronic device for automatically generating structured data acquisition tasks based on a large language model. Background Technology

[0002] In current IT infrastructure development, the conversion from natural language processing requirements to structured data collection tasks typically relies on manual configuration by professionals, which is inefficient and prone to errors. Although existing technologies have proposed methods for automatic database design using Large Language Models (LLMs), their core focus is on database theory-level normalization checks (such as 1NF to BCNF) and ER diagram generation.

[0003] In practical data acquisition projects, existing technologies still have the following significant shortcomings:

[0004] (1) Token capacity limit for complex tasks: When faced with complex data collection requirements involving multiple table relationships, the full structure generated by a single call to the model often exceeds the context window limit (Token Limit) of the large language model, resulting in truncated or missing generated content.

[0005] (2) Naming does not conform to engineering standards: The database, table and field names generated by large models are usually inconsistent in style, often using full spelling, abbreviations or English with unclear meanings, which makes it difficult to meet the physical naming standards in actual development.

[0006] (3) The illusion of accurate metadata: The UUID (Globally Unique Identifier) ​​and accurate task start time required in the collection task cannot be directly generated by the large model. Such values ​​generated by the model are usually fake data and cannot be directly used for production environment deployment between systems. Summary of the Invention

[0007] The purpose of this invention is to provide a method, system, storage medium, and electronic device for automatically generating structured data acquisition tasks based on a large language model.

[0008] The technical solution for achieving the objective of this invention is: an automatic generation method for structured data collection tasks based on a large language model and rule-driven hybrid approach, the method comprising:

[0009] S110: Task planning and entity recognition steps: Obtain a natural language description of the data collection requirements, call the large language model to parse and process the requirements, and generate basic information of the collection task, a list of data entities to be collected, and a macro-level relationship topology between the entities; wherein, the large language model solves the token capacity limitation problem in a single inference process by decomposing complex collection requirements into macro-level task information and a list of data entities.

[0010] S120: Attribute Iteration Generation and Verification Steps: The system automatically traverses the data entity list, inputs the name of each data entity into the large language model in combination with its natural language description, and performs multiple rounds of iterative reasoning to generate the attribute description information of the corresponding data entity; the attribute description information includes the Chinese semantic tags of the field, the field description, the field logical type, business constraints, and the primary and foreign key relationships between entities;

[0011] S130: Standardized Naming Completion Steps: The identifier conversion tool is invoked to extract Chinese semantic tags from the attribute description information and convert them into standardized naming identifiers to complete the collected database name, username, database table name, and database column field name; physical uniqueness checks are performed on the generated database table name and column field name. When identifier conflicts exist, corrections are made by adding a numeric suffix or enabling a full-pinyin mapping strategy to ensure the uniqueness of the physical name globally; wherein, the identifier conversion tool includes at least a pinyin initial letter extraction tool or a translation mapping tool;

[0012] S140: Deterministic metadata injection and correction steps: Identify fields in attribute description information that require high-precision unique values, intercept and correct inaccurate data output by the large language model by executing local script code, inject deterministic system parameters, including a globally unique identifier (UUID) generated by the system and a precise task system timestamp; and map the logical associations between entities identified in step S120 to physical foreign key constraints based on the standardized physical field names generated in step S130.

[0013] S150: Task configuration encapsulation steps: Integrate the structured information generated above, call the compressed package generation tool, and produce a compressed package of the collection task containing JSON-formatted structured collection task description information.

[0014] Furthermore, in step S110, the large language model performs the following operations:

[0015] The core business scenarios in the natural language description are analyzed, and multiple implicit independent business entities are extracted. These independent business entities are then mapped to a list of entity tables in a relational database. Task names, task descriptions, and task execution strategies are generated for the data collection tasks, and initial task numbers are assigned. A global overview containing the list of entity tables and the links between tables is output as a guiding signal for subsequent steps.

[0016] Furthermore, in step S120, the process of generating the attribute description information includes:

[0017] The system employs a thought chain prompting strategy, injecting the generated entity list as a context into the large language model; guiding the model to identify implicit relationships between entities, automatically adding related fields to relevant entities, and marking them as foreign key constraints.

[0018] Furthermore, in step S130, the Pinyin initial letter extraction tool extracts Chinese semantic tags from the attribute description information and converts them into standardized named identifiers, including:

[0019] Extract the initial letter abbreviations of the pinyin of Chinese attribute tags; perform a validity check on the abbreviation results, including filtering illegal characters, truncating the identifier length, and forcibly converting uppercase and lowercase letters, to ensure that the generated identifiers conform to the physical naming conventions of the target database.

[0020] Furthermore, in step S140, the completion logic for the deterministic metadata is as follows:

[0021] Identify fields in the attribute description information that require high-precision unique values, including fields with logical types of UUID or timestamp; call the local operating system interface to generate a UUID and replace the fake ID generated by the model; at the same time, call the system clock to obtain the server's real-time time as the task start time to eliminate the illusion output of the large language model.

[0022] Furthermore, in step S150, the JSON-formatted structured acquisition task description information includes:

[0023] Task-level metadata includes task number, version, creation time, and global collection parameters; entity-level definition data includes physical table name, table description, field list, field physical type, physical constraints, and inter-table relationship mapping topology.

[0024] Furthermore, prior to step S150, the method further includes an auxiliary intervention step:

[0025] The generated structured information is previewed and displayed in a visual interface; it receives manual correction commands from users and updates the corresponding configuration items in real time based on the correction results.

[0026] An automatic generation system for structured data acquisition tasks based on a large language model is provided to implement the aforementioned automatic generation method for structured data acquisition tasks based on a large language model, comprising:

[0027] The macro-analysis and planning module is used to decompose natural language requirements into basic task information, a list of data entities, and macro-level relationship topology between entities based on a large language model. Specifically, it is used to parse natural language descriptions, extract implicit independent business entities and map them to a list of entity tables, generate task names, task descriptions and task execution strategies, and output a global overview containing the list of entity tables and the relationships between tables.

[0028] The micro-attribute construction module is used to generate detailed field definitions and logical relationships between tables for each entity through iterative reasoning. Specifically, it is used to traverse the list of data entities, use the mind chain prompt strategy to guide the large language model to iteratively generate field definitions and logical relationships between tables for each entity, and perform uniqueness verification and semantic conflict investigation on the generated field names. If duplicate or conflicting fields are detected, automatic renaming or deduplication operations are performed.

[0029] The engineering standardization completion module is used to call the identifier conversion tool to complete physical names and inject deterministic metadata through the local code interface. Specifically, it calls the Pinyin initial letter extraction tool to convert Chinese semantic tags into standardized naming identifiers, and performs physical uniqueness checks on the generated database table names and column field names. When identifier conflicts exist, they are corrected by adding a numeric suffix or enabling a full Pinyin mapping strategy. It injects the system-generated globally unique identifier UUID and the precise task system timestamp through the local code interface, and maps the logical relationships between entities identified by the micro-attribute construction module to physical foreign key constraints based on the standardized physical field names.

[0030] Configure the encapsulation and distribution module to convert structured data into an executable data collection task compressed package that conforms to the preset JSON Schema specification; specifically, it encapsulates structured information into a data collection task configuration file that conforms to the preset JSON Schema specification and generates a data collection task compressed package.

[0031] A computer-readable storage medium storing a computer program for automatically generating structured acquisition tasks, wherein the computer program causes a computer to execute the aforementioned method for automatically generating structured acquisition tasks based on a large language model.

[0032] An electronic device includes: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing the automatic generation method for structured acquisition tasks based on large language models.

[0033] Compared with the prior art, the significant advantages of this invention are:

[0034] 1) Overcame the model capacity limitation problem under complex business requirements: This invention breaks down the huge collection requirements involving multiple table relationships into smaller parts through a two-stage decomposition mechanism of macro planning and micro iteration, effectively avoiding the risk of token capacity overflow that is very easy to occur in a single inference process of a large language model, and ensuring the integrity and stability of data entity extraction under complex long text requirements.

[0035] 2) Achieved engineering-level standardization of database physical naming: Unlike the arbitrary field naming in existing technologies, this invention introduces a deterministic tool for extracting the first letter of the Pinyin, forcing the semantic tags generated by large models to be mapped to standardized physical identifiers. This improvement ensures that the generated database, table, and field names conform to the naming conventions of the production environment, solving the pain point that generative AI struggles to produce standardized engineering code.

[0036] 3) Successfully corrected the data illusion bias in generative AI: This invention intercepts and corrects forged parameters in the model output through local code execution logic, injecting genuine UUID globally unique identifiers and high-precision system timestamps. This hybrid-driven model ensures the absolute accuracy of metadata, making the generated configuration files engineering-reliable enough for immediate deployment in a production environment.

[0037] 4) A cross-platform adapted end-to-end task distribution closed loop has been constructed: The final output of this invention is not only a dialect-specific SQL script or ER drawing, but also a highly encapsulated structured JSON configuration and data collection task compressed package. This intermediate-state-based structured data collection task description mechanism decouples business logic from the underlying database syntax. Through downstream engine parsing and adaptation, this configuration package can be dynamically converted into execution scripts adapted to various database types (such as MySQL, PostgreSQL, Oracle, etc.), greatly shortening the conversion cycle from requirements analysis to multi-environment engineering implementation. Attached Figure Description

[0038] Figure 1 This is a flowchart of the structured data acquisition task automatic generation method of the present invention.

[0039] Figure 2 This is a schematic diagram illustrating the structured information collection composition and multi-table association generation logic of the present invention.

[0040] Figure 3 This is a schematic diagram of the structure of the automatic generation system for structured data acquisition tasks of the present invention. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0042] This embodiment provides a method, system, storage medium, and electronic device for automatically generating structured data acquisition tasks based on a hybrid approach of large language models and rules. It constructs a novel framework that can directly map fuzzy natural language intents to standardized, engineered configuration task packages, employing a hybrid driving scheme of "macro-level decomposition, micro-level iteration, rule completion, and deterministic injection." Through task planning and entity recognition steps, complex requirements are first deconstructed into macro-level task information and a list of data entities, and a macro-level relational topology between entities is constructed. This "divide and conquer" strategy avoids the token capacity limitation problem of single-inference in large language models, ensuring the integrity of data entity parsing in complex scenarios. Through attribute iteration generation and verification steps, while traversing the list of data entities and iteratively generating attribute descriptions for each entity, a uniqueness verification mechanism is introduced to perform duplicate detection and semantic conflict investigation on field names within each data entity, ensuring the uniqueness of field identifiers. Through a standardized naming completion step, a preset identifier conversion tool is invoked. This tool includes at least a Pinyin initial letter extraction tool or a translation mapping tool. Chinese semantic tags in the attribute description information are forcibly converted into standardized physical naming identifiers. Physical uniqueness checks and conflict corrections are then performed on the generated database table names and column field names, achieving engineering-level standardization of database identifiers. Addressing the illusion bias of the large language model, a deterministic metadata injection and correction step is implemented. Local script code intercepts and corrects inaccurate data output by the large language model, injecting a globally unique identifier (UUID) generated by the system and a precise task system timestamp. Logical relationships between entities are mapped to physical foreign key constraints based on standardized physical field names. Finally, through a task configuration encapsulation step, the generated structured information is integrated to produce a compressed collection task package containing JSON-formatted structured collection task description information. This embodiment constructs an end-to-end closed loop from natural language to distributable task configuration, significantly improving the standardization, accuracy, and engineering implementation efficiency of collection task generation in complex scenarios such as multi-table joins.

[0043] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0044] like Figure 1 As shown, the method provided in this embodiment specifically includes the following steps.

[0045] Step S110: Task planning and entity recognition steps

[0046] The system obtains a natural language description of the data collection requirements, calls a large language model to parse and process the requirements, and generates basic information about the collection task, a list of data entities to be collected, and a macro-level topology of relationships between these entities. The large language model addresses the token capacity limitation issue in a single inference process by breaking down complex collection requirements into macro-level task information and a list of data entities.

[0047] Specifically, the system receives natural language descriptions of data collection needs from users (e.g., collecting student grades from a school, involving basic student information, teacher information, and exam scores for each subject). Since complex business requirements often involve a large number of entities and fields, generating the complete structure at once can lead to token overflow issues in the Large Language Model (LLM) due to context window limitations, or output truncation due to logic overload. Therefore, this step first guides the LLM to perform macro-level planning, performing the following operations: parsing the core business scenario in the natural language description, extracting multiple implicit independent business entities, and mapping these independent business entities to a list of entity tables in a relational database; generating task names, task descriptions, and task execution strategies for the collection task, and assigning initial task numbers; outputting a global overview containing the entity table list and inter-table relationships, serving as a guiding signal for subsequent steps. This "breakdown" strategy lays a complete and distortion-free logical framework for subsequent detailed reasoning.

[0048] Step S120: Attribute Iteration Generation and Verification Step

[0049] The system traverses the list of data entities, inputting the name of each data entity into a large language model along with its natural language description for multiple rounds of iterative reasoning to generate attribute description information for the corresponding data entity. A uniqueness verification mechanism is introduced during the generation process to perform duplicate detection and semantic conflict resolution on field names within each data entity. If duplicate or conflicting fields are detected, automatic renaming or deduplication is performed. The attribute description information includes field descriptions, field logical types, business constraints, primary and foreign key relationships between entities, and verified unique field identifiers.

[0050] Specifically, the system automatically iterates through the entity list generated by S110. When generating for a specific entity (such as "subject transcript"), the system employs a thought chain prompting strategy, injecting the already generated entity list as context into the large language model; guiding the model to identify implicit relationships between entities, automatically adding related fields to relevant entities, and marking them as foreign key constraints. This enables the model to automatically identify inter-table relationships when generating attributes for the current table, for example, automatically adding foreign key related fields pointing to the student and teacher entities in the transcript entity. The final output information includes the Chinese semantic label for each field, the field logical type (such as character, numeric, date), and business constraints (such as NOT NULL, foreign key constraints, etc.), while the field names have undergone uniqueness verification and semantic conflict resolution to ensure the uniqueness of field identifiers.

[0051] Step S130: Standardized naming completion steps

[0052] A pre-defined identifier conversion tool is invoked to extract Chinese semantic tags from the attribute description information and convert them into standardized naming identifiers to complete the database name, username, database table name, and database column field name. Physical uniqueness checks are performed on the generated database table name and column field name. When identifier conflicts exist, corrections are made by adding a numeric suffix or enabling a full-pinyin mapping strategy to ensure the uniqueness of the physical name globally. The identifier conversion tool includes at least a pinyin initial letter extraction tool or a translation mapping tool.

[0053] Specifically, this step corrects non-standard naming generated by the rule-driven model. The system extracts Chinese semantic tags (such as "student name") generated in S120 and calls an external conversion tool to forcibly map them to identifiers that conform to the physical naming specifications of the database. The conversion algorithm for the standardized naming identifiers includes: extracting the initial letter abbreviation of the pinyin of the Chinese attribute tags; performing a legality check on the abbreviation results, including filtering illegal characters, truncating the identifier length, and forcibly converting capitalization, to ensure that the generated identifiers conform to the physical naming specifications of the target database (e.g., converting "student name" to "xsxm"). In addition, the system performs physical uniqueness checks on the generated database table names and column field names. When identifier conflicts exist, corrections are made by adding a numeric suffix or enabling a full pinyin mapping strategy to ensure that the database names, table names, and column names have unified engineering readability and system compatibility.

[0054] Step S140: Deterministic Metadata Injection and Correction Steps

[0055] By executing local script code to intercept and correct inaccurate data output by the large language model, certain system parameters are injected, including a globally unique identifier (UUID) generated by the system and a precise task system timestamp; and based on the standardized physical field names generated in step S130, the logical associations between entities identified in step S120 are mapped to physical foreign key constraints.

[0056] Specifically, for metadata fields in the configuration package that require high precision, the system corrects the "data illusion" of the model through local code execution. The completion logic for the deterministic metadata is as follows: identify fields in the attribute description information that require high-precision unique values; call the local operating system interface to generate a UUID and replace the fake ID generated by the model; simultaneously call the system clock to obtain the server's real-time time as the task start time to eliminate the illusion output of the large language model. Since the large language model cannot generate true globally unique identifiers and high-precision system clocks, this step directly intercepts placeholders or fake data output by the model and injects the real-time generated UUID and millisecond-level task start timestamp by calling local system functions. This "hybrid-driven" mode ensures that each acquisition task has a unique and traceable identifier in the production environment. At the same time, based on the standardized physical field names generated in S130, the logical relationships between entities identified in S120 (such as primary and foreign key relationships) are mapped to physical foreign key constraints.

[0057] Preferably, the logical expression for the deterministic metadata injection step is:

[0058]

[0059] in, This represents the final output metadata set; This represents the raw attribute data generated by the large language model; This represents inaccurate illusion data generated by the model; This represents a globally unique identifier generated by the local system; This indicates the system's precise timestamp, obtained in real time.

[0060] Assisted intervention steps (located before step S150)

[0061] Before step S150, the method further includes an auxiliary intervention step: previewing and displaying the generated structured information on a visual interface; receiving manual correction instructions from the user and updating the corresponding configuration items in real time according to the correction results.

[0062] Step S150: Task Configuration Encapsulation Step

[0063] By integrating the structured information generated above, a compressed package generation tool is invoked to produce a compressed package containing a structured collection task description in JSON format.

[0064] Specifically, the system serializes the metadata, database table definitions, detailed field attributes, and inter-table relationship topology logic generated in the above stages, and encapsulates them into a data collection task configuration file conforming to a preset JSON Schema specification. The JSON-formatted structured data collection task description information includes: task-level metadata, covering task number, version, creation time, and global collection parameters; and entity-level definition data, covering physical table name, table description, field list, field physical type, physical constraints, and inter-table relationship mapping topology. Subsequently, a compression generation tool is used to encapsulate the JSON configuration and accompanying description file into a ZIP archive format for one-click distribution and adaptive deployment at downstream data collection terminals.

[0065] Further reference Figure 2 The data flow logic shown in this embodiment intuitively demonstrates the mapping process from fuzzy semantics to precise physical configuration. After natural language input, the capacity limitation of the large model is solved by "entity list extraction". Then, the "rule completion tool" introduces a defined transformation algorithm and local code, so that the final JSON configuration file not only contains the business logic of the large model design, but also solidifies the high-precision system version, physical field names (such as mapping "score" to "fs"), and logical topological relationships across entities.

[0066] like Figure 3 As shown in the figure, the structured data acquisition task automatic generation system based on a large language model provided in this embodiment is divided into the following modules in terms of functional architecture:

[0067] The macro-analysis and planning module is used to decompose natural language requirements into basic task information, a list of data entities, and macro-level relationship topology between entities based on a large language model. Specifically, it is used to parse natural language descriptions, extract implicit independent business entities and map them to a list of entity tables, generate task names, task descriptions and task execution strategies, and output a global overview containing the list of entity tables and the relationships between tables.

[0068] The micro-attribute construction module is used to generate detailed field definitions and logical relationships between tables for each entity through iterative reasoning. Specifically, it is used to traverse the list of data entities, use the mind chain prompt strategy to guide the large language model to iteratively generate field definitions and logical relationships between tables for each entity, and perform uniqueness verification and semantic conflict investigation on the generated field names. If duplicate or conflicting fields are detected, automatic renaming or deduplication operations are performed.

[0069] The engineering standardization completion module is used to call the identifier conversion tool to complete physical names and inject deterministic metadata through the local code interface. Specifically, it calls the Pinyin initial letter extraction tool to convert Chinese semantic tags into standardized naming identifiers, and performs physical uniqueness checks on the generated database table names and column field names. When identifier conflicts exist, they are corrected by adding a numeric suffix or enabling a full Pinyin mapping strategy. It injects the system-generated globally unique identifier UUID and the precise task system timestamp through the local code interface, and maps the logical relationships between entities identified by the micro-attribute construction module to physical foreign key constraints based on the standardized physical field names.

[0070] Configure the encapsulation and distribution module to convert structured data into an executable data collection task compressed package that conforms to the preset JSON Schema specification; specifically, it encapsulates structured information into a data collection task configuration file that conforms to the preset JSON Schema specification and generates a data collection task compressed package.

[0071] The system also supports a user intervention interface, corresponding to the aforementioned auxiliary intervention steps, allowing users to preview and fine-tune the generated JSON structured information before configuration and encapsulation, further enhancing the accuracy and flexibility of the generation.

[0072] This embodiment also provides a computer-readable storage medium storing a computer program for automatically generating a structured data acquisition task, wherein the computer program causes a computer to perform any step of the above-described method.

[0073] This embodiment also provides an electronic device, including: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs include instructions for performing any step of the above methods.

[0074] In summary, compared with the prior art, this embodiment has the following beneficial effects:

[0075] It effectively solves the token capacity limitation problem of large language models in complex business scenarios. Through a two-stage decomposition strategy of "macro-task planning" and "micro-attribute iteration", the massive task is broken down into a controllable list of entities and their subordinate attributes, which fundamentally ensures the integrity and stability of task generation in complex scenarios.

[0076] It significantly improves the engineering and standardization level of database naming. It innovatively introduces a rule-driven standardized naming completion unit, which uses tools such as Pinyin initial letter extraction to forcibly map ambiguous Chinese semantic tags into standardized physical identifiers, eliminating the randomness in code naming of large models.

[0077] The "data illusion" of the large language model was accurately corrected, ensuring the authenticity and reliability of metadata. By executing local script code to complete missing information and injecting the real UUID and millisecond-level timestamp into the configuration file, the generated task information has extremely high engineering practical value.

[0078] An end-to-end closed-loop automated process was constructed, from natural language to deployable task packages. The final output is a JSON structured description package and compressed file containing complete business logic, multi-table relationship topology, and engineering specifications. It supports adaptive parsing and one-click deployment of downstream data collection engines, significantly improving the implementation efficiency of data collection tasks.

[0079] Example

[0080] To verify the effectiveness of the present invention, the following experimental design was conducted.

[0081] The technical solution of the present invention will be illustrated below with examples.

[0082] Given requirements: Description of requirements for generating student basic information and course grade information.

[0083] S110 Steps: The large model should be responded to as follows:

[0084] Okay, I need to design two database tables: "Student Basic Information" and "Course Grade Information".

[0085] S120 Steps: First, I need to determine the fields for each table. For "Student Basic Information," the primary key should be `id`, type `number`, length 20, and cannot be null. Then there's the student ID, using `xh` as the column name, type `varchar2`, length 20. Student name: `xsxm`, `varchar2`, length 50. Gender: `xb`, `varchar2`, length 10. Date of birth: `csrq`, type `date`. Class: `bj`, `varchar2`, length 20. Year of enrollment: `xfnf`, `number`, length 4. Creation time: `cjsj`, type `date`. Update time: `gxsj`, type `date`. Status: `zhuang_tai`, `varchar2`, length 10. Next is "Course Grade Information," again using `id` as the primary key. Course number: `kcbh`, `varchar2`, length 20. Course name: `kcmc`, `varchar2`, length 50. Student ID: `xh`, `varchar2`, length 20 (foreign key, related to the student basic information table). Grade: `cj`, `number`, length 5, rounded to one decimal place. Exam date (ksrq), date type. Semester (xq), varchar2, length 20. Creation time (cjsj), date type. Update time (gxsj), date type. Status (zhuang_tai), varchar2, length 10. Check that all fields are unique and that there are no duplicate column names. Then generate the JSON structure as required, ensuring that each field's attributes are correct, its type and length are appropriate, and that required fields are correctly marked. Finally, ensure the entire JSON format is correct and free of syntax errors.

[0086] Step S130: First, I need to identify the entity: the user mentioned "student basic information," which needs to be converted into pinyin abbreviations as field identifiers. Conversion logic: call pinyin_tool to process "student basic information."

[0087] [Tool Call] JSON { “tool”: “pinyin_tool”, “arguments”: { “text”: “Student Basic Information”, “format”: “initials”}} [Tool Output] xsjbxx.

[0088] Step S140: Identify the instance number requirement, specifically the "Student ID" which is generated using the UUID tool. [Tool Call]JSON{ "tool": "uuid_generator", "arguments": { "type": "v4"}} [Tool Output]a3c5d9e2-8f4b-4c72-a1d3-9e7b5c2a8d4f.

[0089] S150 Step: The generated partial answer is as follows:

[0090] {"name":"Student Basic Information","table_name":"xsjbxx","columns":[

[0091] {"name":"student ID", "column_name": "xs_id", "type": "10",

[0092] "column_type": "number", "column_length": "20",

[0093] “column_comment”:“Student’s unique ID”, “is_null”: “0”}]}.

[0094] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0095] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for automatically generating structured data collection tasks based on a hybrid approach of large language models and rules, characterized in that... The method includes: S110: Task planning and entity recognition steps: Obtain a natural language description of the data collection requirements, call the large language model to parse and process the requirements, and generate basic information of the collection task, a list of data entities to be collected, and a macro-level relationship topology between the entities; wherein, the large language model solves the token capacity limitation problem in a single inference process by decomposing complex collection requirements into macro-level task information and a list of data entities. S120: Attribute Iteration Generation and Verification Steps: The system automatically traverses the data entity list, inputs the name of each data entity into the large language model in combination with its natural language description, and performs multiple rounds of iterative reasoning to generate the attribute description information of the corresponding data entity; the attribute description information includes the Chinese semantic tags of the field, the field description, the field logical type, business constraints, and the primary and foreign key relationships between entities; S130: Standardized Naming Completion Steps: The identifier conversion tool is invoked to extract Chinese semantic tags from the attribute description information and convert them into standardized naming identifiers to complete the collected database name, username, database table name, and database column field name; physical uniqueness checks are performed on the generated database table name and column field name. When identifier conflicts exist, corrections are made by adding a numeric suffix or enabling a full-pinyin mapping strategy to ensure the uniqueness of the physical name globally; wherein, the identifier conversion tool includes at least a pinyin initial letter extraction tool or a translation mapping tool; S140: Deterministic metadata injection and correction steps: Identify fields in attribute description information that require high-precision unique values, intercept and correct inaccurate data output by the large language model by executing local script code, inject deterministic system parameters, including a globally unique identifier (UUID) generated by the system and a precise task system timestamp; and map the logical associations between entities identified in step S120 to physical foreign key constraints based on the standardized physical field names generated in step S130. S150: Task configuration encapsulation steps: Integrate the structured information generated above, call the compressed package generation tool, and produce a compressed package of the collection task containing JSON-formatted structured collection task description information.

2. The method for automatically generating structured data collection tasks based on a large language model and rule-driven hybrid approach as described in claim 1, characterized in that, In step S110, the large language model performs the following operations: The core business scenarios in the natural language description are analyzed, and multiple implicit independent business entities are extracted. These independent business entities are then mapped to a list of entity tables in a relational database. Task names, task descriptions, and task execution strategies are generated for the data collection tasks, and initial task numbers are assigned. A global overview containing the list of entity tables and the links between tables is output as a guiding signal for subsequent steps.

3. The method for automatically generating structured data collection tasks based on a large language model and rule-driven hybrid approach as described in claim 1, characterized in that, In step S120, the process of generating the attribute description information includes: The system employs a thought chain prompting strategy, injecting the generated entity list as a context into the large language model; guiding the model to identify implicit relationships between entities, automatically adding related fields to relevant entities, and marking them as foreign key constraints.

4. The method for automatically generating structured data collection tasks based on a large language model and rule-driven hybrid approach as described in claim 1, characterized in that, In step S130, the Pinyin initial letter extraction tool extracts Chinese semantic tags from the attribute description information and converts them into standardized named identifiers, including: Extract the initial letter abbreviations of the pinyin of Chinese attribute tags; perform a validity check on the abbreviation results, including filtering illegal characters, truncating the identifier length, and forcibly converting uppercase and lowercase letters, to ensure that the generated identifiers conform to the physical naming conventions of the target database.

5. The method for automatically generating structured data collection tasks based on a large language model and rule-driven hybrid approach as described in claim 1, characterized in that, In step S140, the completion logic for the deterministic metadata is as follows: Identify fields in the attribute description information that require high-precision unique values, including fields with logical types of UUID or timestamp; call the local operating system interface to generate a UUID and replace the fake ID generated by the model; at the same time, call the system clock to obtain the server's real-time time as the task start time to eliminate the illusion output of the large language model.

6. The method for automatically generating structured data collection tasks based on a large language model and rule-driven hybrid approach as described in claim 1, characterized in that, In step S150, the JSON-formatted structured data acquisition task description information includes: Task-level metadata includes task number, version, creation time, and global collection parameters; entity-level definition data includes physical table name, table description, field list, field physical type, physical constraints, and inter-table relationship mapping topology.

7. The method for automatically generating structured data collection tasks based on a large language model and rule-driven hybrid approach as described in claim 1, characterized in that, Prior to step S150, the method further includes an auxiliary intervention step: The generated structured information is previewed and displayed in a visual interface; it receives manual correction commands from users and updates the corresponding configuration items in real time based on the correction results.

8. A structured data acquisition task automatic generation system based on a large language model, characterized in that, The method for automatically generating structured data acquisition tasks based on a large language model, as described in any one of claims 1 to 7, includes: The macro-analysis and planning module is used to decompose natural language requirements into basic task information, a list of data entities, and macro-level relationship topology between entities based on a large language model. Specifically, it is used to parse natural language descriptions, extract implicit independent business entities and map them to a list of entity tables, generate task names, task descriptions and task execution strategies, and output a global overview containing the list of entity tables and the relationships between tables. The micro-attribute construction module is used to generate detailed field definitions and logical relationships between tables for each entity through iterative reasoning. Specifically, it is used to traverse the list of data entities, use the mind chain prompt strategy to guide the large language model to iteratively generate field definitions and logical relationships between tables for each entity, and perform uniqueness verification and semantic conflict investigation on the generated field names. If duplicate or conflicting fields are detected, automatic renaming or deduplication operations are performed. The engineering standardization completion module is used to call the identifier conversion tool to complete physical names and inject deterministic metadata through the local code interface. Specifically, it calls the Pinyin initial letter extraction tool to convert Chinese semantic tags into standardized naming identifiers, and performs physical uniqueness checks on the generated database table names and column field names. When identifier conflicts exist, they are corrected by adding a numeric suffix or enabling a full Pinyin mapping strategy. It injects the system-generated globally unique identifier UUID and the precise task system timestamp through the local code interface, and maps the logical relationships between entities identified by the micro-attribute construction module to physical foreign key constraints based on the standardized physical field names. Configure the encapsulation and distribution module to convert structured data into an executable data collection task compressed package that conforms to the preset JSON Schema specification; specifically, it encapsulates structured information into a data collection task configuration file that conforms to the preset JSON Schema specification and generates a data collection task compressed package.

9. A computer-readable storage medium, characterized in that, It stores a computer program for automatically generating structured acquisition tasks, wherein the computer program causes a computer to execute the automatic generation method for structured acquisition tasks based on a large language model as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing the automatic generation method for structured acquisition tasks based on a large language model as described in any one of claims 1 to 7.