Data processing method and equipment

By calling task planning agents and code generation agents in data processing, using large language models to automatically process user needs, the problem of time-consuming analysis of data is solved, and processing efficiency and accuracy are improved.

CN119918667APending Publication Date: 2025-05-02新奥新智科技有限公司
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202411978732.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

The time-consuming process based on manual analysis of data in the prior art leads to low efficiency and low accuracy of processing.

Method used

By calling task planning agents and code generation agents, the large language model is used to automate user needs. Task planning agent splits business analysis logic, code generation agent generates and executes corresponding code to obtain processing results.

Benefits of technology

Improves the efficiency and accuracy of data processing, and reduces the time and error rate of manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918667A_ABST
    Figure CN119918667A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a data processing method and equipment. In the embodiment of the invention, a target problem input by a user is solved through a multi-agent mode, a task planning agent can independently think and understand the requirements of the user and split service analysis logic according to target information and the target problem, and the target problem of a natural language is converted into each to-be-executed sub-task; and then the code generation agent is called to generate a code corresponding to each subtask, and each code is executed to obtain a target processing result for the target problem, so that the efficiency and accuracy of data processing are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method and device. Background Art

[0002] In the industrial Internet, when a user has a target problem for a certain demand, business personnel need to search the database for a large amount of data related to the demand, and then the algorithm personnel will analyze the large amount of data to process the target problem and meet the user's needs. However, manual data analysis takes a long time, resulting in a long process for processing the target problem, low processing efficiency, and low accuracy. Summary of the invention

[0003] The present application provides a data processing method and device to solve the problem that the existing manual data analysis is time-consuming, resulting in a long processing time for the target problem, low efficiency, and low accuracy of the processing process.

[0004] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0005] Receiving input user requirements, wherein the user requirements carry a target problem to be processed and a target requirement type;

[0006] Searching for target information matching the target problem from a target database stored and used when processing problems of the target demand type;

[0007] Calling a task planning agent so that the task planning agent uses the first language model to determine information of each subtask to be performed according to the target information and the target problem;

[0008] Calling a code generation agent so that the code generation agent generates and executes each code corresponding to each subtask by using the second largest language model according to the information of each subtask;

[0009] Each execution result corresponding to each code is obtained, and each execution result is determined as a target processing result corresponding to the target problem.

[0010] In a second aspect, an embodiment of the present application further provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned data processing methods when executing a computer program stored in the memory.

[0011] In an embodiment of the present application, an electronic device receives input user requirements, wherein the user requirements carry a target problem to be processed and a target requirement type; searches for target information matching the target problem from a target database used to process problems of the target requirement type; calls a task planning agent, so that the task planning agent uses the first language model to determine the information of each subtask to be executed based on the target information and the target problem; calls a code generation agent, so that the code generation agent uses the second language model to generate and execute each code corresponding to each subtask based on the information of each subtask; obtains each execution result corresponding to each code, and determines each execution result as the target processing result corresponding to the target problem. The target problem input by the user is solved by a multi-agent method, wherein the task planning agent can think independently based on the target information and the target problem, understand the user's needs, split the business analysis logic, convert the target problem of the natural language into each subtask to be executed, and then calls the code generation agent to generate the code corresponding to each subtask, and executes each code to obtain the target processing result for the target problem, thereby improving the efficiency and accuracy of data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0013] Figure 1 A schematic diagram of a data processing process provided in an embodiment of the present application;

[0014] Figure 2 A search schematic diagram provided for an embodiment of the present application;

[0015] Figure 3 The data analysis and cognitive system architecture diagram provided for the embodiment of the present application;

[0016] Figure 4 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0017] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0019] In order to improve the efficiency and accuracy of data processing, the embodiments of the present application provide a data processing method and device.

[0020] In an embodiment of the present application, an electronic device receives an input user demand, wherein the user demand carries a target problem to be processed and a target demand type; searches for target information matching the target problem from a target database used to process problems of the target demand type; calls a task planning agent, so that the task planning agent uses a first language model to determine information of each subtask to be executed based on the target information and the target problem; calls a code generation agent, so that the code generation agent uses a second language model to generate and execute each code corresponding to each subtask based on the information of each subtask; obtains each execution result corresponding to each code, and determines each execution result as a target processing result corresponding to the target problem.

[0021] Embodiment 1:

[0022] Figure 1 A schematic diagram of a data processing process provided in an embodiment of the present application, the process includes:

[0023] S101: receiving an input user demand, wherein the user demand carries a target problem to be processed and a target demand type; searching for target information matching the target problem from a target database stored for use in processing problems of the target demand type.

[0024] A data processing method provided in an embodiment of the present application is applied to an electronic device, which may be a PC or a server, and may also be an administrator agent.

[0025] In an embodiment of the present application, a user can log in to a data analysis and cognition system, and send user demands to an electronic device through the system. After the electronic device receives the user demands, it processes the user demands.

[0026] Specifically, the user logs in to the data analysis and cognitive system, clicks on a task button displayed on the page of the data analysis and cognitive system, and enters a relevant problem description. The electronic device determines the target demand type corresponding to the clicked task button in the correspondence relationship as the target demand type carried in the user demand based on the saved correspondence relationship between the task button and the demand type. The electronic device determines the received problem description as the target problem.

[0027] In an embodiment of the present application, the electronic device is also pre-configured with a correspondence between the demand type and the database used to process problems of the demand type. Based on the correspondence, the electronic device searches for a target database corresponding to the target demand type carried in the user demand, and searches for target information matching the target problem from the target database.

[0028] There are multiple databases pre-configured, and each database stores different data.

[0029] In a possible implementation, the configured database includes but is not limited to PostgreSQL, Neo4j, Redis, and Milvus.

[0030] Among them, PostgreSQL is used for business data such as detailed data of civilian users. With a daily growth of more than 100,000 data, it is necessary to consider the effective storage and fast retrieval of large-scale data. PostgreSQL provides a table partitioning function, which can divide large tables into smaller sub-tables according to specific rules, thereby improving query performance, data loading speed, and data management efficiency. As the amount of data increases, PostgreSQL effectively improves query performance and data processing speed through advanced indexing and data partitioning technologies, showing good scalability.

[0031] Neo4j is a graph database that can display the relationship between different entities in the form of a graph, which can also be called an association graph. It can be used to assist business analysis, and can clearly display the calling relationship between tools and data sources under a certain business, as well as the association relationship between different businesses. In our actual scenario, it mainly includes four types: business experience (usually common business common sense, such as: the heating season ranges from November 15 to March 15 of the following year), business model (usually the analysis process of business experience, such as: gas theft investigation, screening customers who reduce gas consumption by 30% year-on-year, screening users who do not return gas for a long time, etc.), tools (functions that complete a business scenario or realize a general function, which can be called by LLM), and database table description (description of the database table and the detailed meaning of each field). We store the knowledge, tools, and data tables related to a certain business through a graph structure to form a heterogeneous knowledge base containing different types of data.

[0032] Redis mainly stores cache data during user access to the system, such as session expiration time. By monitoring session expiration, related resources are released to improve resource utilization. For example, after the session expires, the corresponding Python interpreter is closed and the SQL connection is released.

[0033] Milvus mainly stores vectors of historical cases to facilitate retrieval of related cases.

[0034] In a possible implementation, when the electronic device obtains the target information from the target database, it can filter data similar to the target problem from the target database based on similarity matching, and use the filtered data as the target information. In addition, the electronic device can also use other methods to determine the target data, which are not limited here.

[0035] S102: Calling a task planning agent so that the task planning agent uses the first language model to determine the information of each subtask to be executed according to the target information and the target problem; calling a code generation agent so that the code generation agent uses the second language model to generate and execute each code corresponding to each subtask according to the information of each subtask.

[0036] In practical applications, the Large Language Model (LLM) is a deep learning model trained on massive text data. It can generate natural language text, deeply understand the meaning of text, and handle various natural language tasks, such as text summarization, question answering, translation, etc. The simple understanding is the logical reasoning of language, such as the common Chat GPT, Wenxin Yiyan, Tongyi Qianwen, etc. However, since the knowledge of the large language model is trained in advance, it is not very timely; and the knowledge used for training generally comes from standardized knowledge in the public domain, there are limitations.

[0037] An AI agent is an intelligent entity that can perceive the environment, understand autonomously, make decisions, and execute actions. Simply put, an AI agent is a computer program based on a large language model that can gradually complete a given goal by thinking independently and calling tools. The AI ​​agent can use the reasoning ability of the LLM to break down the problem into small problems one by one, and define the relationship between these small problems, which one to deal with first and which one to deal with next. Then, external tools are called in order to solve each small problem until the original problem is solved.

[0038] However, the context length of large language models is limited; the credibility of generated content cannot be guaranteed; it cannot incorporate new knowledge in real time and has poor timeliness; it performs poorly in specific professional fields; it cannot be reliably used for long-term planning, multi-step reasoning, and complex task execution; gpt4 has good performance but is costly; single agents have low creativity: single agents have weak interaction capabilities, find it difficult to understand and adapt to different communication scenarios and objects, find it difficult to go beyond their existing knowledge and experience, and find it difficult to generate valuable and meaningful content and solutions, and to cope with complex and diverse task requirements. Existing agents are bound by artificial rules, knowledge, and biases, which limit their ability to solve problems in diverse real-world scenarios.

[0039] Based on this, in an embodiment of the present application, multiple intelligent agents and a large language model are pre-configured, and efficient and accurate data processing is achieved by combining the intelligent agents with the large language model.

[0040] Specifically, in order to improve the performance of electronic devices, the embodiments of the present application are equipped with a variety of professional intelligent roles, which can give full play to the advantages of LLM and improve the ability of data processing. That is, in the embodiments of the present application, intelligent agents corresponding to various roles are pre-configured, including but not limited to calling task planning agents and code generation agents. Each intelligent agent is also equipped with a code interpreter and SQL interpreter to improve its own output, and the electronic device can realize the addition and reuse assembly of intelligent roles.

[0041] Among them, the task planning agent can combine the experience of business experts to decompose complex tasks, divide subtasks and plan analysis steps; the code generation agent can generate and execute the code corresponding to each subtask based on the information of the subtasks input by the task planning agent, and adjust the code based on feedback or continue to complete subsequent tasks.

[0042] Specifically, the electronic device calls the task planning agent, which can call the first language model to determine the information of each subtask to be executed according to the target information and the target problem. The electronic device can also call the code generation agent, which calls the second language model to generate and execute each code corresponding to each subtask according to the information of each subtask.

[0043] In the embodiment of the present application, the first large language model and the second large language model may be the same large language model or different large language models.

[0044] In an embodiment of the present application, when a task planning agent calls the first language model, or a code generation agent calls the second language model, etc., in scenarios where a large language model is required, it is usually necessary to define the role of the large language model in the prompt text to improve the performance of the large language model on various issues. In addition, in an embodiment of the present application, different intelligent roles are equipped with independent professional prompt words, including role information, task description, task restrictions, output format, examples, and other content. For example, "You are a useful assistant" is part of the prompt text.

[0045] However, currently prompts are manually written, which not only consumes a lot of time and effort, but also becomes a bottleneck that limits the flexible deployment and application of large language models. Therefore, automatic prompt engineering technology is needed to generate and optimize prompts in an automated way, which becomes a key way to improve the efficiency and flexibility of large language model applications.

[0046] Specifically, the agent stores a prompt template, which is pre-configured with role information, task description, task restrictions, output format, examples, etc., and is also configured with fields for filling in information and questions. When the agent needs to call a large language model, the target question and target information to be processed can be added to the prompt template, thereby realizing the construction of the prompt text.

[0047] S103: Obtain each execution result corresponding to each code, and determine each execution result as a target processing result corresponding to the target problem.

[0048] In an embodiment of the present application, after the code generation agent generates the code corresponding to each subtask, the code generation agent will execute the code locally and return the execution result.

[0049] In an embodiment of the present application, calling a code generation agent so that the code generation agent generates code using the second largest language model can release the reasoning ability of the second largest language model, so that it can be applied to more complex natural language tasks; enabling the second largest language model to directly generate executable, fine-grained steps in the decision-making process, thereby promoting the extensibility of various tool modules through function calls; utilizing the code compilation and execution environment, enabling the second largest language model to receive feedback and improve itself, thereby improving the success rate of complex tasks.

[0050] Based on this, in the embodiment of the present application, the electronic device is also configured with a stateful Python interpreter that can return different types of calculation results (stdout, image) in real time. In a chat session, multiple interactions can retain historical intermediate results, avoid executing repeated codes, and return results in real time, improving the user's interactive experience. At the same time, a SQL interpreter is implemented to create a database connection, which can accept and execute the generated SQL statements, and filter dangerous DDL statements to improve system security.

[0051] That is, in the embodiment of the present application, the code generation agent repeatedly executes each code until the maximum number of interactions is exceeded or the user stops or the task is completed.

[0052] The electronic device obtains each execution result corresponding to each code, and determines each execution result as a target processing result corresponding to the target problem.

[0053] In an embodiment of the present application, a target problem input by a user is solved by a multi-agent approach, wherein the task planning agent is able to independently think based on the target information and the target problem, understand the user's needs, split the business analysis logic, convert the target problem in natural language into each subtask to be executed, and then call the code generation agent to generate the code corresponding to each subtask, and execute each code to obtain the target processing result for the target problem, thereby improving the efficiency and accuracy of data processing.

[0054] Embodiment 2:

[0055] In order to improve the efficiency and accuracy of data processing, based on the above embodiments, in the embodiment of the present application, the process of determining the target database includes:

[0056] If the target requirement type is data analysis, determining that the target database is a historical case database;

[0057] If the target requirement type is business analysis, the target database is determined to be a multi-heterogeneous knowledge base, wherein the multi-heterogeneous knowledge base includes business knowledge, database tables and corresponding fields.

[0058] In the embodiments of the present application, the electronic device can realize various user needs, including but not limited to data analysis and business analysis.

[0059] The data analysis mainly analyzes the files uploaded by the user. Based on this, when the target requirement type received by the electronic device is data analysis, the electronic device determines the historical case database as the target database used when processing the problem of the target requirement type.

[0060] Business analysis mainly involves flexible analysis of scenarios with fixed and non-fixed business processes. Business scenarios usually require the input of business experience from business experts, and in order to ensure that the business scenario analysis of fixed processes can be as stable as possible, the business experience is stored as knowledge in the knowledge base in the embodiment of this application, and the role and plug-in mechanism of task planning are added.

[0061] Specifically, if the electronic device determines that the target demand type is business analysis, the electronic device determines the multi-heterogeneous knowledge base as the target database used when processing the problem of the target demand type.

[0062] The multi-heterogeneous knowledge base includes but is not limited to business knowledge, database tables and corresponding fields.

[0063] Embodiment 3:

[0064] In order to improve the efficiency and accuracy of data processing, based on the above embodiments, in the embodiment of the present application, if the target requirement type is data analysis, searching for target information matching the target problem from the target database used when processing the problem of the target requirement type includes:

[0065] According to the target problem, searching the historical problems similar to the target problem and the corresponding historical processing results from the historical case database;

[0066] The historical issues and corresponding historical processing results are determined as the target information.

[0067] In an embodiment of the present application, when the target requirement type is data analysis, when the electronic device searches for target information matching the target problem in the target database, the electronic device retrieves historical problems similar to the target problem and corresponding historical processing results from the historical case database.

[0068] Specifically, the electronic device determines each first feature vector corresponding to each historical question in the historical case database according to a preset embedding representation algorithm, and determines a second feature vector of the target question. The electronic device determines the similarity between the second feature vector and each first feature vector according to a preset similarity algorithm.

[0069] In a possible implementation, the electronic device sorts each historical question according to the similarity corresponding to each historical question, and determines a preset number of historical questions with the greatest similarity as historical questions similar to the target question.

[0070] In another possible implementation, the electronic device screens historical questions with a similarity higher than a preset threshold value according to the similarity corresponding to each historical question, and determines the historical questions with a similarity higher than the preset threshold value as historical questions similar to the target question.

[0071] The electronic device determines the historical problems similar to the determined target problem and the corresponding historical processing results as the target information.

[0072] In addition, in the embodiment of the present application, in order to improve the efficiency of data processing, when constructing the historical case database, the first feature vector corresponding to each historical question is first determined, and then each historical question and the corresponding first feature vector are saved in the historical case database. In this way, when determining the target information, the electronic device can directly obtain each historical question and the corresponding first feature vector from the historical case database, and the electronic device only needs to determine the second feature vector corresponding to the target question to perform similarity calculation, which reduces the time consumed by the electronic device to determine the feature vector and improves the efficiency of data processing.

[0073] In an embodiment of the present application, the electronic device may use a text embedding model, such as BERT, etc., to determine the first eigenvector corresponding to the historical question and the second eigenvector corresponding to the target question. The electronic device may use a cosine similarity algorithm, etc. to determine the similarity between the second eigenvector and each first eigenvector. In an embodiment of the present application, a variety of retrieval strategies are designed according to different retrieval requirements. Among them, the electronic device may also call a retrieval agent to retrieve historical questions similar to the target question and the corresponding historical processing results from the historical case database. The electronic device may also call a retrieval model to retrieve historical questions similar to the target question and the corresponding historical processing results from the historical case database.

[0074] Specifically, in order to enable the retrieval agent to efficiently utilize expert knowledge, a classic artificial intelligence problem-solving paradigm is adopted in the embodiment of the present application, namely, case-based reasoning. The historical case database mainly stores the problems and successful experiences (SQL or code) of difficult and complex problems. When a new target problem arises, the retrieval agent will first retrieve similar past cases in the case library and try to reuse the solutions of these cases to solve the target problem, giving the retrieval agent the ability of "reference" so that it can use past experience in solving similar problems to solve the target problem.

[0075] In addition, case retrieval requires a relatively strong retrieval model and retrieval method to retrieve the most relevant historical experience. Otherwise, high-ranking information containing irrelevant information is often retrieved. This irrelevant information may be semantically related to the context, but it is irrelevant to the answer to the question. The retrieval agent is often disturbed by irrelevant information, resulting in the accuracy and reliability of the output results being affected. Based on this, in an embodiment of the present application, the retrieval agent can use semantic vector retrieval (Embedding), that is, semantic relevance matching, which is also an important part of the RAG ecosystem.

[0076] Embodiment 4:

[0077] In order to improve the efficiency and accuracy of data processing, based on the above embodiments, in the embodiment of the present application, the user demand also carries a target file to be analyzed;

[0078] The method further comprises:

[0079] Calling a file description agent so that the file description agent describes the target file and obtains description information of the target file;

[0080] The description information is determined as the target information.

[0081] In the embodiment of the present application, data analysis is to analyze the files uploaded by the user. Based on this, when the user inputs the target question, he can also upload the target file to be analyzed. That is, the user demand also carries the target file to be analyzed.

[0082] The electronic device is also equipped with a file description agent, which can infer the content of the target file and the meaning of each column based on the file name, column name, and data preview information of the target file, and generate description information corresponding to the target file.

[0083] In addition, the file description agent can also call the third language model to analyze the target file, determine and output the description information corresponding to the target file. The electronic device also determines the description information as the target information.

[0084] The third largest language model may be consistent with at least one of the first largest language model and the second largest language model, or may be inconsistent with neither the first largest language model nor the second largest language model, which will not be elaborated here.

[0085] Specifically, the file description agent constructs a prompt text to be input into the third language model based on the target file, and inputs the prompt text into the third language model, so that the third language model describes the target file.

[0086] The prompt text includes but is not limited to role information, task description, task restrictions, output format, examples, target files and other information.

[0087] Embodiment 5:

[0088] In order to improve the efficiency and accuracy of data processing, based on the above embodiments, in the embodiment of the present application, if the target requirement type is business analysis, searching for target information matching the target problem from the target database used when processing the problem of the target requirement type includes:

[0089] Extracting keywords from the target question to determine target keywords contained in the target question;

[0090] According to the target keyword, the target business knowledge, target database table and target field corresponding to the target keyword are retrieved from a multi-heterogeneous knowledge base;

[0091] The business knowledge, the target database table and the target field are determined as the target information.

[0092] In an embodiment of the present application, the electronic device is also configured with a multi-heterogeneous knowledge base, which stores business knowledge, database tables and corresponding fields. When the target demand type carried in the user demand is business analysis, the electronic device can retrieve the target business knowledge, target database table and target field from the multi-heterogeneous knowledge base, and determine the retrieved target business knowledge, target database table and target field as target information.

[0093] Specifically, in an embodiment of the present application, the electronic device performs keyword extraction on the target question to determine the target keywords contained in the target question; the electronic device retrieves the target business knowledge, target database table and target field corresponding to the target keywords from a multi-heterogeneous knowledge base based on the target keywords.

[0094] In a possible implementation, the multi-heterogeneous knowledge base may store keywords, business knowledge, database tables and fields accordingly. After determining the target keyword, the electronic device may retrieve the target business knowledge, target database table and target field corresponding to the target keyword from the multi-heterogeneous knowledge base.

[0095] In another possible implementation, the multi-heterogeneous knowledge base can also be a knowledge graph, with keywords and business knowledge as nodes in the knowledge graph. The electronic device can use the target keyword to retrieve the business knowledge node connected to the node corresponding to the target keyword in the knowledge graph, and determine the business knowledge stored in the business knowledge node as the target business knowledge. The electronic device is also configured with a database table selection agent, which can determine the target database table and target field to be used in subsequent tasks based on the target business knowledge.

[0096] Among them, the database table selection agent can determine the target database table and target field by calling the large language model, which will not be elaborated here.

[0097] In addition, in the embodiment of the present application, in order to improve the accuracy of data processing, when the target demand type is business analysis, the electronic device can also retrieve historical problems similar to the target problem and corresponding historical processing results from the historical case database. The retrieval process of the electronic device is consistent with the retrieval process during data analysis, and will not be repeated here.

[0098] In an embodiment of the present application, business processes and tools may also be stored in a multi-heterogeneous database, and the electronic device may use the same retrieval method to retrieve the target business process and target tool corresponding to the target problem, and use the target business process and target tool as target information.

[0099] Figure 2 The search diagram provided in the embodiment of the present application is as follows: Figure 2 As shown, the multi-heterogeneous database stores business knowledge, business processes, tools and metadata. The electronic device uses an advanced RAG retriever to retrieve target information from the multi-heterogeneous database based on the target question (examples) and sends the target information to the large language model (LLM).

[0100] Embodiment 6:

[0101] In order to improve the efficiency and accuracy of data processing, based on the above embodiments, in the embodiment of the present application, the process of the code generation agent generating each code corresponding to each subtask includes:

[0102] For each subtask, the code generation agent determines whether a candidate tool corresponding to the subtask is saved, and the candidate tool encapsulates the candidate code; if so, the code generation agent calls the second largest language model to generate the code corresponding to the subtask based on the candidate code encapsulated in the candidate tool, the business knowledge, the target database table and the target field.

[0103] In an embodiment of the present application, a tool is also pre-configured in the electronic device, which can be directly called by the large language model. For complex or private operations, they can be directly encapsulated in the tool to prevent information leakage. For example, if the code generated by LLM contains operations to query the database, a connection string to the LLM database needs to be provided so that the generated code can be executed directly locally without modification, resulting in private information leakage. By encapsulating it into a tool, fetch_data(#sql), LLM only needs to call fetch_data in the generated code to obtain the corresponding data. On the one hand, it can protect privacy information, and on the other hand, it can improve the execution accuracy of the LLM generated code.

[0104] In addition, the electronic device also allows users to register new tools. When providing a tool, relevant comments such as tool function description, input field description, and output field description need to be added to the tool code. The electronic device will automatically generate tool description information that LLM can understand and save the tool description information to the knowledge base.

[0105] Based on this, in an embodiment of the present application, when the code generation agent generates each code corresponding to each subtask, for each subtask, the code generation agent determines whether a candidate tool corresponding to the subtask is saved, and the candidate tool encapsulates the candidate code; if so, the code generation agent calls the second largest language model to generate the code corresponding to the subtask according to the candidate code encapsulated in the candidate tool, business knowledge, target database table and target field.

[0106] Among them, in the embodiments of the present application, the tool is generally a Python tool.

[0107] Embodiment 7:

[0108] In order to improve the efficiency and accuracy of data processing, based on the above embodiments, in the embodiment of the present application, after the task planning agent uses the first language model to determine the information of each subtask to be executed according to the target information and the target problem, the method further includes:

[0109] Output information of each subtask;

[0110] If a correction operation for the target subtask and a corresponding correction content are received, the target information of the target subtask is updated according to the correction content.

[0111] In an embodiment of the present application, the user can also modify each subtask output by the task planning agent.

[0112] Specifically, the task planning agent uses the first language model to determine the information of each subtask to be executed according to the target information and the target problem, and then the electronic device outputs the information of each subtask. The user modifies any subtask based on the operation interface of the data analysis and cognitive system. If the electronic device receives the correction operation for the target subtask and the corresponding correction content, the electronic device updates the target information of the target subtask according to the correction content.

[0113] Among them, in the embodiment of the present application, the correction operation can be to modify the content of the subtask, or to delete the subtask, add a new subtask, etc., which is not limited here.

[0114] Embodiment 8:

[0115] In order to improve the efficiency and accuracy of data processing, on the basis of the above embodiments, in the embodiment of the present application, after obtaining each execution result corresponding to each code, the method further includes:

[0116] If at least one target execution result in each of the execution results is an execution failure, determining the information of the subtask corresponding to the target execution result, and obtaining the error information corresponding to the target execution result;

[0117] The error message and the corresponding subtask information are sent to the code generation agent, so that the code generation agent uses the second large language model to regenerate the candidate code corresponding to the candidate subtask according to the error message and the corresponding subtask information, and executes the candidate code.

[0118] In an embodiment of the present application, if the electronic device determines that at least one target execution result is an execution failure in each execution result of each subtask, the electronic device determines the information of the subtask corresponding to the target execution result, and obtains the error information corresponding to the target execution result. The electronic device sends the error information and the corresponding subtask information to the code generation agent, so that the code generation agent uses the second largest language model to regenerate the candidate code corresponding to the candidate subtask according to the error information and the corresponding subtask information, and executes the candidate code.

[0119] In another possible implementation, the electronic device can also send the error information and the corresponding subtask information to the task planning agent, so that the task planning agent re-plans the subtask according to the error information and the corresponding subtask information, and re-calls the code generation agent to generate new code.

[0120] Embodiment 9:

[0121] In order to improve the efficiency and accuracy of data processing, based on the above embodiments, in the embodiment of the present application, the method further includes:

[0122] Calling a code compression agent to compress each code to obtain a target code;

[0123] The object code is stored in a database.

[0124] In actual use, the context retrieved by the vector is not completely useful. Only a very small part of it may be relevant to the answer. For a specific question, it may be necessary to merge multiple contents to get the answer.

[0125] In the historical context, the code accounts for a larger proportion. Code compression should retain the key libraries, variables, and files in the code as much as possible, so as to serve as a prompt for subsequent code generation, and the previous variables can be directly called. Based on this, the embodiment of the present application proposes a method for extracting key information from the code, so as to summarize the code and extract the libraries, variables, and files in the code.

[0126] Specifically, a code compression agent is pre-configured in the electronic device, and the electronic device calls the code compression agent to compress each code to obtain a target code, and saves the target code in a database.

[0127] The following is an introduction to the data processing process provided by the embodiment of the present application in combination with two specific scenarios:

[0128] Scenario 1: The user logs in to the data analysis and cognitive system. The user clicks the data analysis button. The electronic device will first create an independent data analysis session, initialize a code execution environment and work path, initialize the LLM service, create data analysis and file description roles, initialize the retrieval model, and initialize the database service. The specific process includes: 1) After the user uploads the file and enters the target problem, the file description agent generates file description information to provide necessary information for subsequent code generation; 2) Use the retrieval model to retrieve and sort historical cases related to the target problem in the historical case database; 3) Input the file description information and case information as target information to the task planning agent; 4) The task planning agent thinks based on the target information and plans subtasks; 5) The code generation agent takes action based on the information of each subtask and generates the corresponding code; 6) Execute the code locally and return the intermediate result. For code anomalies, return to step 4 as observation information; 7) Perform code compression and store related records in the database as historical context; 8) Repeat until the maximum number of interactions is exceeded or the user stops or the task is completed.

[0129] Scenario 2: The user logs in to the data analysis and cognitive system and clicks the business analysis button. The electronic device will first create an independent business analysis session, initialize the code execution environment and work path, initialize the LLM service, create data analysis and file description roles, initialize the search service, initialize the database service, and initialize the knowledge base service. The specific process includes: 1) The user enters the target question, extracts the corresponding target keywords based on the target question, retrieves the business nodes in the knowledge graph based on the keywords, and obtains the business knowledge involved in the target question; 2) The database table selection agent determines all database tables and fields that will be used in subsequent tasks based on business knowledge; 3) The task planning agent performs task planning and subtask decomposition based on business knowledge and database tables, and gives the analysis steps for each subtask; 4) The user can modify or delete the subtask; 5) Retrieve the tools that may be used, and use the search model to retrieve historical cases related to the target problem in the historical case database; 6) The code generation agent generates the code for each subtask in turn, calls the relevant plug-ins, and executes to obtain program feedback. Among them, to ensure data privacy, LLM will only be informed whether the program execution is successful and the error message when it fails, and all the results of the program will not be fed back to LLM; 7) Code compression, store related records in the database as historical context; 8) Repeat the execution until the maximum number of interactions is exceeded or the user stops or the task is completed.

[0130] Figure 3 The data analysis and cognitive system architecture diagram provided in the embodiment of the present application is as follows: Figure 3 As shown, the system includes: application layer, intelligent agent, service layer, storage layer and data layer.

[0131] Among them, the data layer is the structured and unstructured data used for data analysis, providing data support for upper-level data analysis, including but not limited to IoT data, table data, text data, web page data and others; the storage layer mainly implements the storage of platform-related data and knowledge, including but not limited to PostgreSQL, Neo4j, Redis and Redis; the service layer mainly includes the database service layer, the knowledge base service layer, the cache service layer, and the vector data service layer, which mainly encapsulates the relevant operation logic of the underlying database, such as data addition, deletion, modification and query. The database service layer also includes setting scheduled tasks, regularly pulling relevant business data every day, and storing it in the warehouse after processing. The cache service layer also includes monitoring the session expiration date and recycling resources.

[0132] The agent layer is the core algorithm support layer of the data analysis platform, which includes multiple modules and algorithms, including but not limited to: LLM service layer, execution environment service layer, plug-in service layer, RAG retrieval, compression, prompt engineering, multi-role collaboration and multi-role AI-Agent.

[0133] Among them, the LLM service layer mainly implements the encapsulation and registration of different LLMs, and adaptively uses different models in different scenarios. For example, when data privacy is involved, a local deployment model is used, and when complex code generation is involved, a business model with better performance is used.

[0134] In the embodiment of the present application, in order to improve the performance of different modules of the analysis system, each module is equipped with a professional intelligent role, which can give full play to the advantages of LLM and improve the capabilities of each module. The intelligent role is also equipped with a code interpreter and SQL interpreter to improve its own output. Among them, each intelligent role is an intelligent body, and the data analysis and cognitive system can realize the addition and reuse assembly of intelligent roles. The currently supported intelligent roles include:

[0135] File description role: infer the file content and the meaning of each column based on the file name, column name, and data preview information.

[0136] File Data Analysis Role: Plan and generate code based on files uploaded by users to implement statistical analysis, data visualization, complex data analysis, and machine learning modeling.

[0137] Task planning role: Combine the experience of business experts to decompose complex tasks, divide subtasks and plan analysis steps.

[0138] Code generation role: Generates and executes the code for the corresponding subtasks according to the task planning role, and adjusts the code or continues to complete subsequent tasks based on feedback.

[0139] Management role: Perform task allocation and message forwarding in multi-agent interactions.

[0140] SQL generation role: Generate professional SQL code according to user needs, execute it, and make modifications based on the result feedback.

[0141] Tool selection role: Select the tool information most relevant to the user's problem.

[0142] Database table selection role: Select the database table and corresponding fields that are most relevant to the user's question.

[0143] Code summary generation: Summarize the code and extract relevant information.

[0144] In an embodiment of the present application, in the data analysis and cognitive system, intelligent agents of different roles can be assembled to complete complex tasks, which is equivalent to an experienced employee who has mastered a complete set of work and thinking methods and can complete data query, code generation and data analysis. Currently, it mainly includes data analysis agents, business analysis agents, and data export (indicator generation) agents.

[0145] The data processing method proposed in the embodiment of this application supports business personnel to quickly obtain and analyze data, call intelligent agents and large language models, and assist in decision-making. It mainly solves three problems:

[0146] 1. Accumulate the experience of enterprise experts and build a heterogeneous business knowledge base:

[0147] The embodiments of the present application organically integrate business knowledge, business processes, analysis tools, operational data, etc. to provide powerful, accurate and reliable specific domain knowledge support for downstream data intelligent analysis.

[0148] 2. Empower the big language model with enterprise knowledge and give full play to the respective capability boundaries of the big language model and knowledge base:

[0149] The embodiment of the present application integrates the business knowledge and analysis cases of relevant scenarios into a large language model through retrieval enhancement technology based on the natural language needs of business personnel.

[0150] 3. Support personalized business data analysis needs through intelligent agent technology to improve the efficiency and accuracy of data analysis:

[0151] The intelligent agent in the embodiment of the present application can understand the needs of business personnel, split business analysis logic, and cleverly convert the user's natural language needs into executable code and SQL query statements through independent thinking, call tools, and gradually complete given analysis goals. It supports flexible data query and elastic data analysis, allowing business personnel to easily create personalized virtual assistants.

[0152] Embodiment 10:

[0153] Based on the above embodiments, the embodiment of the present application also provides a data processing device. Figure 4 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application, the device comprising:

[0154] The matching module 401 is used to receive an input user demand, wherein the user demand carries a target problem to be processed and a target demand type; and search for target information matching the target problem from a target database used when processing problems of the target demand type.

[0155] The processing module 402 is used to call the task planning agent, so that the task planning agent uses the first language model to determine the information of each subtask to be executed according to the target information and the target problem; call the code generation agent, so that the code generation agent uses the second language model to generate and execute each code corresponding to each subtask according to the information of each subtask;

[0156] The response module 403 is used to obtain each execution result corresponding to each code, and determine each execution result as a target processing result corresponding to the target problem.

[0157] In a possible implementation, the matching module 401 is specifically used to determine that the target database is a historical case database if the target requirement type is data analysis; if the target requirement type is business analysis, determine that the target database is a multi-heterogeneous knowledge base, wherein the multi-heterogeneous knowledge base includes business knowledge, database tables and corresponding fields.

[0158] In a possible implementation, the matching module 401 is specifically used to retrieve historical problems similar to the target problem and corresponding historical processing results from a historical case database according to the target problem if the target requirement type is data analysis; and determine the historical problems and corresponding historical processing results as the target information.

[0159] In a possible implementation manner, the user demand also carries a target file to be analyzed;

[0160] The matching module 401 is further used to call a file description agent, so that the file description agent describes the target file and obtains description information of the target file; and determines the description information as the target information.

[0161] In a possible implementation, the matching module 401 is specifically used to perform keyword extraction on the target problem to determine the target keywords contained in the target problem if the target demand type is business analysis; retrieve the target business knowledge, target database table and target field corresponding to the target keyword from a multi-heterogeneous knowledge base based on the target keyword; and determine the business knowledge, the target database table and the target field as the target information.

[0162] In one possible implementation, the processing module 402 is specifically used to determine, for each subtask, whether the code generation agent has saved candidate codes corresponding to the subtask; if so, the code generation agent calls the second largest language model to generate the code corresponding to the subtask based on the candidate codes, the business knowledge, the target database table and the target field.

[0163] In a possible implementation, the response module 403 is further configured to output information of each subtask; if a correction operation for a target subtask and corresponding correction content are received, the target information of the target subtask is updated according to the correction content.

[0164] In a possible implementation, the response module 403 is further configured to determine information of a subtask corresponding to the target execution result and obtain error information corresponding to the target execution result if at least one target execution result in each execution result is an execution failure;

[0165] The processing module 402 is also used to send the error message and the corresponding subtask information to the code generation agent, so that the code generation agent uses the second large language model to regenerate the candidate code corresponding to the candidate subtask according to the error message and the saved corresponding subtask information, and execute the candidate code.

[0166] In a possible implementation, the processing module 402 is further used to call a code compression agent to compress each code to obtain a target code; and save the target code into a database.

[0167] Embodiment 11:

[0168] Based on the above embodiments, the present application also provides an electronic device, Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, it includes: a processor 501, a communication interface 502, a memory 503 and a communication bus 505, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504;

[0169] The memory 503 stores a computer program. When the program is executed by the processor 501, the processor 501 performs the following steps:

[0170] Receiving input user requirements, wherein the user requirements carry a target problem to be processed and a target requirement type;

[0171] Searching for target information matching the target problem from a target database stored and used when processing problems of the target demand type;

[0172] Calling a task planning agent so that the task planning agent uses the first language model to determine information of each subtask to be performed according to the target information and the target problem;

[0173] Calling a code generation agent so that the code generation agent generates and executes each code corresponding to each subtask by using the second largest language model according to the information of each subtask;

[0174] Each execution result corresponding to each code is obtained, and each execution result is determined as a target processing result corresponding to the target problem.

[0175] In a possible implementation manner, the process of determining the target database includes:

[0176] If the target requirement type is data analysis, determining that the target database is a historical case database;

[0177] If the target requirement type is business analysis, the target database is determined to be a multi-heterogeneous knowledge base, wherein the multi-heterogeneous knowledge base includes business knowledge, database tables and corresponding fields.

[0178] In a possible implementation manner, if the target requirement type is data analysis, searching for target information matching the target problem from a target database stored and used when processing problems of the target requirement type includes:

[0179] According to the target problem, searching the historical problems similar to the target problem and the corresponding historical processing results from the historical case database;

[0180] The historical issues and corresponding historical processing results are determined as the target information.

[0181] In a possible implementation manner, the user demand also carries a target file to be analyzed;

[0182] The method further comprises:

[0183] Calling a file description agent so that the file description agent describes the target file and obtains description information of the target file;

[0184] The description information is determined as the target information.

[0185] In a possible implementation manner, if the target requirement type is business analysis, searching for target information matching the target problem from a target database stored and used when processing problems of the target requirement type includes:

[0186] Extracting keywords from the target question to determine target keywords contained in the target question;

[0187] According to the target keyword, the target business knowledge, target database table and target field corresponding to the target keyword are retrieved from a multi-heterogeneous knowledge base;

[0188] The business knowledge, the target database table and the target field are determined as the target information.

[0189] In a possible implementation, the process of the code generation agent generating each code corresponding to each subtask includes:

[0190] For each subtask, the code generation agent determines whether there is a candidate code corresponding to the subtask saved; if so, the code generation agent calls the second largest language model to generate the code corresponding to the subtask based on the candidate code, the business knowledge, the target database table and the target field.

[0191] In a possible implementation manner, after the task planning agent uses the first language model to determine the information of each subtask to be performed according to the target information and the target problem, the method further includes:

[0192] Output information of each subtask;

[0193] If a correction operation for the target subtask and a corresponding correction content are received, the target information of the target subtask is updated according to the correction content.

[0194] In a possible implementation, after obtaining each execution result corresponding to each code, the method further includes:

[0195] If at least one target execution result in each of the execution results is an execution failure, determining the information of the subtask corresponding to the target execution result, and obtaining the error information corresponding to the target execution result;

[0196] The error message and the corresponding subtask information are sent to the code generation agent, so that the code generation agent uses the second large language model to regenerate the candidate code corresponding to the candidate subtask according to the error message and the saved corresponding subtask information, and executes the candidate code.

[0197] In a possible implementation, the method further includes:

[0198] Calling a code compression agent to compress each code to obtain a target code;

[0199] The object code is stored in a database.

[0200] Since the principle of solving the problem by the above electronic device is similar to the data processing method, the implementation of the above electronic device can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0201] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 502 is used for communication between the above electronic device and other devices. The memory may include a random access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0202] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0203] Embodiment 12:

[0204] On the basis of the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program executable by a processor is stored. When the program runs on the processor, the processor implements the following steps when executing:

[0205] Receiving input user requirements, wherein the user requirements carry a target problem to be processed and a target requirement type;

[0206] Searching for target information matching the target problem from a target database stored and used when processing problems of the target demand type;

[0207] Calling a task planning agent so that the task planning agent uses the first language model to determine information of each subtask to be performed according to the target information and the target problem;

[0208] Calling a code generation agent so that the code generation agent generates and executes each code corresponding to each subtask by using the second largest language model according to the information of each subtask;

[0209] Each execution result corresponding to each code is obtained, and each execution result is determined as a target processing result corresponding to the target problem.

[0210] In a possible implementation manner, the process of determining the target database includes:

[0211] If the target requirement type is data analysis, determining that the target database is a historical case database;

[0212] If the target requirement type is business analysis, the target database is determined to be a multi-heterogeneous knowledge base, wherein the multi-heterogeneous knowledge base includes business knowledge, database tables and corresponding fields.

[0213] In a possible implementation manner, if the target requirement type is data analysis, searching for target information matching the target problem from a target database stored and used when processing problems of the target requirement type includes:

[0214] According to the target problem, searching the historical problems similar to the target problem and the corresponding historical processing results from the historical case database;

[0215] The historical issues and corresponding historical processing results are determined as the target information.

[0216] In a possible implementation manner, the user demand also carries a target file to be analyzed;

[0217] The method further comprises:

[0218] Calling a file description agent so that the file description agent describes the target file and obtains description information of the target file;

[0219] The description information is determined as the target information.

[0220] In a possible implementation manner, if the target requirement type is business analysis, searching for target information matching the target problem from a target database stored and used when processing problems of the target requirement type includes:

[0221] Extracting keywords from the target question to determine target keywords contained in the target question;

[0222] According to the target keyword, the target business knowledge, target database table and target field corresponding to the target keyword are retrieved from a multi-heterogeneous knowledge base;

[0223] The business knowledge, the target database table and the target field are determined as the target information.

[0224] In a possible implementation, the process of the code generation agent generating each code corresponding to each subtask includes:

[0225] For each subtask, the code generation agent determines whether there is a candidate code corresponding to the subtask saved; if so, the code generation agent calls the second largest language model to generate the code corresponding to the subtask based on the candidate code, the business knowledge, the target database table and the target field.

[0226] In a possible implementation manner, after the task planning agent uses the first language model to determine the information of each subtask to be performed according to the target information and the target problem, the method further includes:

[0227] Output information of each subtask;

[0228] If a correction operation for the target subtask and a corresponding correction content are received, the target information of the target subtask is updated according to the correction content.

[0229] In a possible implementation, after obtaining each execution result corresponding to each code, the method further includes:

[0230] If at least one target execution result in each of the execution results is an execution failure, determining the information of the subtask corresponding to the target execution result, and obtaining the error information corresponding to the target execution result;

[0231] The error message and the corresponding subtask information are sent to the code generation agent, so that the code generation agent uses the second large language model to regenerate the candidate code corresponding to the candidate subtask according to the error message and the saved corresponding subtask information, and executes the candidate code.

[0232] In a possible implementation, the method further includes:

[0233] Calling a code compression agent to compress each code to obtain a target code;

[0234] The object code is stored in a database.

[0235] Since the principle of solving the problem by the above-mentioned computer program product is similar to that of the data processing method, the implementation of the above-mentioned computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.

[0236] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0237] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0238] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0239] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0240] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A data processing method, characterized in that: The method comprises: Receiving input user requirements, wherein the user requirements carry a target problem to be processed and a target requirement type; Searching for target information matching the target problem from a target database stored and used when processing problems of the target demand type; Calling a task planning agent so that the task planning agent uses the first language model to determine information of each subtask to be performed according to the target information and the target problem; Calling a code generation agent so that the code generation agent generates and executes each code corresponding to each subtask by using the second largest language model according to the information of each subtask; Each execution result corresponding to each code is obtained, and each execution result is determined as a target processing result corresponding to the target problem.

2. The method according to claim 1, characterized in that The process of determining the target database includes: If the target requirement type is data analysis, determining that the target database is a historical case database; If the target requirement type is business analysis, the target database is determined to be a multi-heterogeneous knowledge base, wherein the multi-heterogeneous knowledge base includes business knowledge, database tables and corresponding fields.

3. The method according to claim 1 or 2, characterized in that: If the target requirement type is data analysis, searching for target information matching the target problem from a target database stored for use in processing problems of the target requirement type includes: According to the target problem, searching the historical problems similar to the target problem and the corresponding historical processing results from the historical case database; The historical issues and corresponding historical processing results are determined as the target information.

4. The method according to claim 3, characterized in that The user requirement also carries a target file to be analyzed; The method further comprises: Calling a file description agent so that the file description agent describes the target file and obtains description information of the target file; The description information is determined as the target information.

5. The method according to claim 1 or 2, characterized in that: If the target requirement type is business analysis, searching for target information matching the target problem from a target database stored and used when processing problems of the target requirement type includes: Extracting keywords from the target question to determine target keywords contained in the target question; According to the target keyword, the target business knowledge, target database table and target field corresponding to the target keyword are retrieved from a multi-heterogeneous knowledge base; The business knowledge, the target database table and the target field are determined as the target information.

6. The method according to claim 5, characterized in that The process of the code generation agent generating each code corresponding to each subtask includes: For each subtask, the code generation agent determines whether a candidate tool corresponding to the subtask is saved, and the candidate tool encapsulates the candidate code; if so, the code generation agent calls the second largest language model to generate the code corresponding to the subtask based on the candidate code encapsulated in the candidate tool, the business knowledge, the target database table and the target field.

7. The method according to claim 1, characterized in that After the task planning agent uses the first language model to determine the information of each subtask to be performed according to the target information and the target problem, the method further includes: Output information of each subtask; If a correction operation for the target subtask and a corresponding correction content are received, the target information of the target subtask is updated according to the correction content.

8. The method according to claim 1, characterized in that After obtaining each execution result corresponding to each code, the method further includes: If at least one target execution result in each of the execution results is an execution failure, determining the information of the subtask corresponding to the target execution result, and obtaining the error information corresponding to the target execution result; The error message and the corresponding subtask information are sent to the code generation agent, so that the code generation agent uses the second large language model to regenerate the candidate code corresponding to the candidate subtask according to the error message and the corresponding subtask information, and executes the candidate code.

9. The method according to claim 1, characterized in that: The method further comprises: Calling a code compression agent to compress each code to obtain a target code; The object code is stored in a database.

10. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the data processing method according to any one of claims 1 to 9 when executing a computer program stored in the memory.

Citation Information

Cited By

  • Intelligent agent question and answer method and device fusing different large models, medium and product

    CN120353909A

  • Data processing method and multi-agent processing system

    CN120723878A

  • Component generation method and device, electronic equipment and storage medium

    CN121008715A

  • LLM-based multi-modal data management intelligent code generation method

    CN121029179A

  • LLM-based multi-modal data governance intelligent code generation method

    CN121029179B