Data processing method and device based on large language model and cluster

By outputting the operator description information required for user tasks in a large language model, the waste of glue function development and Python code generation in the existing technology is solved, efficient and flexible complex task processing is achieved, and user experience and model adaptability are improved.

CN120744084APending Publication Date: 2025-10-03SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410372472.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-27
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

When using large language models to process complex user tasks, existing technologies require the development of glue functions and the generation of Python code, which leads to a waste of human resources and costs, and poses security risks and inaccurate task processing results.

Method used

By inputting natural language content into a large language model, the description information of the operators required for the user task is output, the required operators are obtained from the preset operator package, and these operators are used to process the results of the query task without developing glue functions and generating Python code.

Benefits of technology

It saves manpower and resources, improves the accuracy and flexibility of task processing, simplifies the development process, and enhances user experience and the adaptability of large language models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744084A_ABST
    Figure CN120744084A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device based on a large language model and a cluster. The method comprises the steps that natural language content describing a user task is input into a large language model, so that the large language model outputs description information of an operator required by the user task and at least one query task; wherein each query task in the at least one query task corresponds to at least one plug-in; based on the description information of the operator required by the user task, obtaining the operator required by the user task from a preset operator packet; calling a plug-in corresponding to the query task to obtain a query result of the query task; calculating a query result of each query task in the at least one query task by using an operator required by the user task to obtain a first processing result of the user task; and outputting the first processing result. According to the method, complex user tasks can be processed through the large language model under the condition of saving human resources and cost.
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, device, and cluster based on a large language model. Background Art

[0002] The Large Language Model (LLM) agent is an intelligent entity capable of autonomously understanding, planning, and executing complex tasks. LLMs serve as the core computing engine, invoking plugins to complete tasks described by users in natural language, demonstrating a degree of autonomous behavior.

[0003] Plugins are tools for acquiring information from large language models. They are used to obtain one or a few types of information and lack the data processing logic required for complex user tasks. One approach to meeting the processing requirements of complex user tasks is to develop glue functions between plugins. These glue functions perform logical processing on the information acquired by the plugins to complete complex user tasks.

[0004] Among them, the development cost of the bonding function is huge and requires more human resources and costs. Summary of the Invention

[0005] This application provides a data processing method, device, and cluster based on a large language model, which can process complex user tasks through a large language model while saving human resources and costs.

[0006] In a first aspect, a data processing method based on a large language model is provided, the method comprising: inputting natural language content describing a user task into the large language model, so that the large language model outputs description information of an operator required for the user task and at least one query task; wherein each query task in the at least one query task corresponds to at least one plug-in; based on the description information of the operator required for the user task, obtaining the required operator for the user task from a preset operator package; and calling the plug-in corresponding to the query task to obtain a query result of the query task; using the required operator for the user task, calculating the query results of each query task in the at least one query task to obtain a first processing result of the user task; and outputting the first processing result.

[0007] In this method, a large language model outputs descriptions of the operators required for the user task based on the natural language content describing the task. Furthermore, based on this description, the required operators are retrieved from a pre-defined operator package. These operators are then used to perform logical processing on the query results, yielding the task's processing result. This approach eliminates the need to develop glue functions or generate Python code, while meeting the logical processing requirements of complex user tasks, saving manpower, costs, and resources.

[0008] In one possible implementation, the method further includes: receiving an operator adjustment operation for a user task issued by a user; adjusting a required operator for the user task based on the operator adjustment operation to obtain an adjusted operator; using the adjusted operator to calculate the query results of each query task in at least one query task to obtain a second processing result of the user task; and outputting the second processing result.

[0009] In this implementation, users can adjust the operator used to process user tasks. In this way, if the user finds that the processing result of the user task is incorrect or the calculation logic of the current operator is not suitable for the user task, the user can adjust the operator to obtain the correct processing result.

[0010] In a possible implementation, the method further includes: outputting the calculation logic of the operator required for the user task.

[0011] In this implementation, the calculation logic of the operator can be output to the user, so that the user can determine whether the calculation logic of the operator is suitable for the user task.

[0012] In a possible implementation, the method further includes: receiving an operator adding operation and an operator to be added issued by a user; and responding to the operator adding operation to add the operator to be added to an operator package.

[0013] In this implementation, users can update operator packages so that the operators in the operator packages can adapt to user task needs.

[0014] In one possible implementation, the large language model outputs description information and at least one query task based on natural language content and operator packages.

[0015] The large language model can be trained or fine-tuned using natural language content and operators from an operator package. This allows the large language model to output descriptions of the operators required for the user task described in the natural language content, ensuring that the required operators are from the operator package.

[0016] In one possible implementation, a plug-in corresponding to each query task in at least one query task is included in a preset plug-in package; the large language model outputs description information and at least one query task based on natural language content, operator package and plug-in package.

[0017] The large language model can be trained or fine-tuned using natural language content, operators from the operator package, and plugins from the plugin package. Based on the natural language content, the large language model can output descriptions of the operators required for the user task described in the natural language content, as well as query tasks. The model also ensures that the required operators are from the operator package, and that the plugins corresponding to the query tasks are from the plugin package.

[0018] In a second aspect, a data processing device is provided, which includes: an input module for inputting natural language content describing a user task into a large language model, so that the large language model outputs description information of the operator required for the user task and at least one query task; wherein each query task in at least one query task corresponds to at least one plug-in; an obtaining module for obtaining the required operator for the user task from a preset operator package based on the description information of the operator required for the user task; and calling the plug-in corresponding to the query task to obtain the query result of the query task; a calculation module for using the required operator for the user task to calculate the query results of each query task in at least one query task to obtain a first processing result of the user task; and an output module for outputting the first processing result.

[0019] In one possible implementation, the device also includes: a receiving module and an adjustment module; wherein the receiving module is used to: receive an operator adjustment operation for a user task issued by a user; the adjustment module is used to: adjust the required operator of the user task based on the operator adjustment operation to obtain an adjusted operator; the calculation module is also used to: use the adjusted operator to calculate the query results of each query task in at least one query task to obtain a second processing result of the user task; and the output module is also used to: output the second processing result.

[0020] In a possible implementation, the output module is further configured to output the calculation logic of the operator required for the user task.

[0021] In a possible implementation, the device further includes: a receiving module and an adding module; the receiving module is configured to: receive an operator adding operation and an operator to be added issued by a user; and respond to the operator adding operation to add the operator to be added to the operator package.

[0022] In one possible implementation, the large language model outputs description information and at least one query task based on natural language content and operator packages.

[0023] In one possible implementation, a plug-in corresponding to each query task in at least one query task is included in a preset plug-in package; the large language model outputs description information and at least one query task based on natural language content, operator package and plug-in package.

[0024] In a third aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster performs the method provided in the first aspect.

[0025] In a fourth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method provided in the first aspect.

[0026] In a fifth aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computer device cluster, the computer device cluster executes the method provided in the first aspect.

[0027] The beneficial effects of the second to fifth aspects can be referred to the above introduction to the beneficial effects of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of a system architecture provided in an embodiment of the present application;

[0029] Figure 2 A schematic diagram of a large language model fine-tuning solution provided in an embodiment of the present application;

[0030] Figure 3 A schematic diagram of a large language model fine-tuning solution provided in an embodiment of the present application;

[0031] Figure 4 A flowchart of a data processing method based on a large language model provided in an embodiment of the present application;

[0032] Figure 5 A flowchart of a data processing method based on a large language model provided in an embodiment of the present application;

[0033] Figure 6 A schematic diagram of a user interface provided in an embodiment of the present application;

[0034] Figure 7 A schematic diagram of a user interface provided in an embodiment of the present application;

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

[0036] Figure 9 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0037] Figure 10 A schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;

[0038] Figure 11 A schematic diagram of the structure of a computing device cluster connected via a network provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following describes the solutions provided by the embodiments of the present application in conjunction with the accompanying drawings. In the embodiments of the present application, "plurality" refers to two or more, and "multiple" refers to two or more. Terms such as "first" and "second" are used only to distinguish similar objects and do not necessarily describe a specific order or quantity of objects.

[0040] To facilitate understanding of the solutions provided by the embodiments of the present application, the technical terms that may be involved in the embodiments of the present application are first introduced.

[0041] A large language model (LLM) is a large-scale neural network model that uses deep learning techniques. Large language models typically have billions or even hundreds of billions of parameters. Using unsupervised or self-supervised learning methods, large language models are pre-trained on large amounts of text data, enabling them to learn rich feature representations and the underlying structure of the data. After pre-training, the large language model is fine-tuned for specific downstream tasks to improve its performance. Large language models are typically trained and optimized through supervised learning, resulting in their outstanding performance across a variety of natural language processing tasks. The massive training datasets for large language models contain a wealth of human behavior data, laying a solid foundation for simulating human-like interactions. As a result, large language models exhibit capabilities such as human-like thinking, enabling them to break down complex, challenging tasks into manageable subtasks. Typical large language models include ChatGPT and BERT, which have achieved remarkable success in text generation, understanding, and question-answering.

[0042] Large language model agents are intelligent entities capable of autonomous understanding, decision-making, and execution of complex tasks. They can perceive their environment, take autonomous actions to achieve their goals, and improve their performance through learning or knowledge acquisition. While there's currently no unified, clear definition of an agent within the industry, generally speaking, an agent uses a large language model as its processing center, possessing observation, thinking, and planning capabilities, the ability to call plugins, and possessing certain action and memory capabilities. In large language model applications, agents utilize the large language model as their core brain, combined with plugins to complete user tasks.

[0043] Complex user tasks require logical processing of multiple pieces of information. These include comparison, statistics, sorting, summation, subtraction, consistency checks, intersection, union, and difference. For example, to determine who has invested in more companies, A1 or A2, this task requires not only obtaining the number of companies invested by A1 and A2, but also comparing the number of companies invested by A1 and A2.

[0044] In related technologies, the purpose of processing complex user tasks is achieved through a code interpreter solution or a glue function solution.

[0045] Among them, in the code interpreter solution, the large language model generates Python code with logical processing functions, and uses this Python code to perform logical processing on information to handle complex user tasks. Because the Python code is generated by the large language model, the generation process or method is not controlled by humans, so the Python code may pose security risks. To prevent possible security risks, a built-in Python sandbox is used to execute Python code in the Python sandbox. This results in a large resource usage. In addition, to ensure the accuracy of task processing, the code generation capability of the large language model is relatively high. The current code generation capability of the large language model is limited. Therefore, the generated Python code may not process relevant information according to the correct processing logic, resulting in inaccurate task processing results.

[0046] In the glue function solution, glue functions with logical processing functionality must be developed for different plug-ins. These glue functions and related plug-ins must be encapsulated and registered according to pre-defined specifications or formats to ensure they work together. Glue function development is a significant workload and consumes considerable manpower. Furthermore, understanding the working principles of each plug-in is required to correctly encapsulate and register the glue functions and related plug-ins.

[0047] An embodiment of the present application provides a data processing method based on a large language model. In this method, natural language content describing a user task is input into the large language model, which then outputs description information of the operators required for the user task and multiple query tasks. The description information describes the operators required for the user task and is used to retrieve the required operators for the user task from a preset operator package. The query task is used to call the corresponding plug-in to query the required information for the user task. The required operators for the user task can then be used to calculate the required information for the user task, resulting in a processing result for the user task.

[0048] This method uses a large language model to understand natural language content in order to understand user tasks. Based on the understanding of the user tasks, the method outputs description information of the operators required for the user tasks and multiple query tasks for querying the information required for the user tasks. Then, the method obtains the operators that meet the description information in the preset operator package and executes the query tasks to obtain the information required for the user tasks. Then, the operators that meet the description information can be used to calculate the information required for the user tasks to obtain the processing results of the user tasks.

[0049] This method obtains the required operators for user tasks from a preset operator package without developing glue functions, saving manpower and costs, and without generating Python code, saving resources.

[0050] Next, the data processing method provided in the embodiment of the present application is introduced.

[0051] Figure 1 The data processing apparatus 100 for implementing the method is shown in FIG. The data processing apparatus 100 includes a large language model 110 , an operator package 120 , and a plug-in package 130 .

[0052] The large language model 110 can be obtained through training. The large language model can be pre-trained using a large amount of text data, allowing the large language model to learn rich feature representations and the underlying structure in the data. After the large language model is pre-trained, the large language model can be fine-tuned using the description information of the operators in the operator package 120 and the natural language content describing the user task, so that the large language model 110 learns the ability to use the operators in the operator package 120 to process user tasks. The ability to use the operators in the operator package 120 to process user tasks refers to identifying which operator in the operator package 120 should be used to process the user task.

[0053] Fine-tuning the large language model can be performed through supervised training. Specifically, operator labels can be added to the natural language content describing the user task to obtain labeled data. The operator label is a description of the operator required for the user task, and the operator package 120 includes operators that match this description. This labeled data is then used to train the large language model to fine-tune it, resulting in the large language model 110.

[0054] In some embodiments, see Figure 2, the operators in the operator package 120 can be introduced into the large language model 110 by means of supervised fine-tuning (SFT), so that the large language model 110 learns to use the operators in the operator package 120 to process user tasks. Among them, SFT is a model optimization technology in deep learning, which is usually used to further adjust the pre-trained model to adapt to specific tasks. This process involves using a labeled dataset for a specific task and making minor adjustments to the parameters of the pre-trained model to improve the performance of the model on the target task. This method is widely used in fields such as natural language processing and computer vision to accelerate the convergence and optimization of models on specific tasks.

[0055] In some embodiments, see Figure 3 , the operators in the operator package 120 can be introduced into the large language model 110 by means of a low-rank adapter (LoRA), so that the large language model 110 learns to use the operators in the operator package 120 to process user tasks. Among them, in fine-tuning, a large amount of computing resources and time are often required to adapt to the requirements of specific tasks. In LoRA, the dimensionality of the original model is reduced by decomposing the parameter matrix of the large language model into the product of low-rank matrices. Such dimensionality reduction not only helps to reduce computational complexity, but also ensures the effect of fine-tuning by retaining the key information of the model on specific tasks.

[0056] In some embodiments, the large language model can be fine-tuned using the descriptions of the operators in operator package 120, the descriptions of the plug-ins in plug-in package 130, and the natural language content describing the user task, so that the large language model learns the ability to process user tasks using the operators in operator package 120 and the plug-ins in plug-in package 130. The ability to process user tasks using the plug-ins in plug-in package 130 refers to the ability to identify which plug-in or plug-ins in plug-in package 130 should be called to obtain the information required for the user task.

[0057] The ability of the large language model to learn to use the operators in the operator package 120 and the plug-ins in the plug-in package 130 to process user tasks specifically refers to the large language model learning which plug-in or plug-ins in the plug-in package 130 to use to obtain information, and which operators in the operator package 120 to use to calculate the obtained information to obtain the processing results of the user tasks.

[0058] Specifically, operator tags and plug-in tags can be added to the natural language content describing the user task to obtain labeled data. The operator tag is the descriptive information of the operator required for the user task, and the operator package 120 includes operators that match this descriptive information. The plug-in tag is the descriptive information of the plug-in required for the user task, and the operator package 120 includes the operators that match the description of the operator required for the user task, and the plug-in 130 includes the plug-in that matches the description of the plug-in required for the user task. This labeled data is then used to train a large language model to fine-tune the large language model, resulting in a large language model 110.

[0059] For example, the natural language content is "Compare the temperatures on March 20 last year and March 20 this year". The natural language describes a comparison of the temperatures on March 20 last year and March 20 this year. Operator tags and plug-in tags can be added to the natural language content to obtain labeled data. Among them, the operator label is the description information of the operator for comparative calculation, such as the description information of the eq operator. The plug-in tag is the description information for querying weather information. Referring to the above description, multiple labeled data can be set. Then, the labeled data fine-tunes the large language model 110 so that the large language model learns the ability to use the operators in the operator package 120 and the plug-ins in the plug-in package 130 to process user tasks.

[0060] Operator package 120, also known as a public operator package, includes multiple pre-set operators. Different operators belong to different operator types, and operators of different operator types have different logical processing functions. For example, an operator is a pseudocode segment with input parameters and output parameters. The operator calculates the input parameters according to the operator's logical processing function to obtain the output parameters.

[0061] In some embodiments, as Figure 2 As shown, the operator package 120 may include common operators such as must operator, mustNO operator, should operator, eq operator, it operator, gt operator, lte operator, gte operator, rank operator, like operator, not operator, count operator, intersect ion operator, union operator, diff operator, sum operator, sub operator, and same operator.

[0062] The operators in the operator package 120 are associated with description information. For example, the description information associated with the eq operator is "an operator for determining equality", the description information associated with the diff operator is "an operator for calculating differences", and so on.

[0063] In some embodiments, the operators in operator package 120 are not static. A user or operator package 120 maintainer can issue an operator add operation, which includes the operator to be added. In response to this operator add operation, the operator to be added can be added to operator package 120. A user or operator package 120 maintainer can issue an operator delete operation, which includes the description of the operator to be deleted. In response to this operator delete operation, the operator to be deleted can be identified in operator package 120 based on the description of the operator to be deleted, and the identified operator to be deleted can be deleted from operator package 120.

[0064] In some embodiments, the operator package 120 may be released as a separate product and may be expanded, deleted, or customized based on the plug-in package 130 .

[0065] Plug-in package 130 includes existing plug-ins. In some embodiments, plug-in package 130 may also include public plug-ins. The plug-ins in plug-in package 130 are associated with descriptive information. For example, if plug-in package 130 includes a plug-in for querying weather information, the descriptive information associated with the plug-in is "Weather Query Plug-in." For another example, if plug-in package 130 includes a plug-in for querying business information, the descriptive information associated with the plug-in is "Business Information Plug-in."

[0066] In some embodiments, each plug-in has a calling interface. Exemplarily, the calling interface may be an application programming interface (API).

[0067] The plug-in package 130 can enhance the plug-in calling capability and scope of the large language model or the large language model agent.

[0068] The above example introduces the system architecture provided by the embodiment of the present application. Next, in combination with the system architecture, the data processing method based on the large language model provided by the embodiment of the present application is described. The method can be executed by a data processing device. Figure 3 As shown, the method includes the following steps.

[0069] In step 401, the data processing device may input natural language content describing a user task into the large language model 110, so that the large language model 110 outputs description information of the operator required for the user task and at least one query task; wherein each of the multiple query tasks corresponds to at least one plug-in.

[0070] See Figure 4, step 401 may include step 501, where the data processing device may receive natural language content that may be issued by a user, where the natural language content describes a user task. Exemplarily, the user may issue the natural language content in the form of text, that is, the natural language content is text. In step 502, the data processing device inputs the natural language content into the large language model 110. The large language model 110 may calculate the natural language content and output description information of the operator required for the user task and at least one query task. In step 503, the data processing device may obtain the description information of the operator required for the user task and at least one query task output by the large language model.

[0071] In some embodiments, large language model 110 outputs description information of the operators required for the user task and the at least one query task based on the natural language content and operator package 120. In other words, the description information of the operators required for the user task output by large language model 110 based on the natural language content describes the operators included in operator package 120.

[0072] As described above, through training and fine-tuning, the large language model 110 has learned the ability to process user tasks based on the operators in the operator package 120. This ability includes selecting which or which operators from the operator package 120 to process user tasks. Among them, the operator used to process the user task can be called the operator required for the user task. In this way, the large language model 110 can understand the natural language content and output descriptive information of the operator used to process the user task based on the understanding result. Among them, the operator has input parameters, that is, the information required for the operator to perform calculations or the information required to process the user task. Based on the input parameters of the operator, at least one query task can be obtained, and the at least one query task is used to query the input parameters of the operator, that is, the information required to process the user task. Among them, each query task corresponds to at least one plug-in. The plug-in corresponding to the query task is used to query the information required for the query task.

[0073] In some embodiments, the plugin corresponding to each query task in the at least one query task belongs to a preset plugin package; the large language model outputs the description information and the at least one query task based on the natural language content, the operator package, and the plugin package. In other words, the description information of the operator required for the user task output by large language model 110 based on the natural language content describes an operator included in operator package 120, and the plugin corresponding to the query task output is included in plugin package 130.

[0074] Specifically, as described above, through training and fine-tuning, the large language model 110 has learned the ability to process user tasks based on the operators in the operator package 120 and the plug-ins in the plug-in package 130. This ability is specifically to select which or which operators from the operator package 120 and which or which plug-ins from the plug-in package 130 to process user tasks. Therefore, the large language model 110 can understand the natural language content and output the description information of the operator used to process the user task and the description information of the plug-in used to process the user task based on the understanding result. Among them, the plug-in used to process the user task is used to query the information required to process the user task, that is, to execute the query task. The plug-in used to process the task corresponds to the query task. Therefore, in step 401 or step 502, the description information of the query task and the plug-in corresponding to the query task is output.

[0075] Continue reading Figure 3 In step 402, the data processing device can obtain the required operator of the user task from the preset operator package 120 based on the description information of the operator required by the user task; and call the plug-in corresponding to the query task to obtain the query result of the query task.

[0076] See Figure 4 Step 402 includes step 505 of identifying the required operators for the user task in operator package 120. The data processing apparatus may identify the required operators for the user task in operator package 120 based on the description information of the required operators for the user task. As described above, the operators in operator package 120 are associated with description information. In step 504, the operators associated with the description information of the required operators for the user task may be identified and used as the required operators for the user task.

[0077] The data processing device can identify the plug-in corresponding to the query task. Exemplarily, the large language model 110 also outputs description information of the plug-in corresponding to the query task. In step 505, the data processing device can identify the plug-in corresponding to the query task in the plug-in package 130 based on the description information of the plug-in corresponding to the query task. As described above, the plug-ins in the plug-in package 130 are associated with description information. In step 505, the plug-in associated with the description information of the plug-in corresponding to the query task can be identified, and the plug-in associated with the description information of the plug-in corresponding to the query task can be used as the plug-in corresponding to the query task.

[0078] After identifying the plug-in corresponding to the query task, the data processing device may call the plug-in corresponding to the query task in step 506 to perform information query and obtain the query result of the query task.

[0079] In some embodiments, the plug-in has an interface, such as an API, and the data processing device can call the plug-in through the plug-in interface.

[0080] As mentioned above, the information that a query task searches for is the input parameters of the operator required by the user task. The operator required by the user task can constrain the query task. The details are as follows.

[0081] Table 1

[0082]

[0083] As shown in Table 1, operators can be divided into operators for numerical comparison, operators for set operations, operators for counting quantities, operators for set operations, operators for character comparison, etc. according to their functions.

[0084] Operators can perform operator (OP) operations on the information retrieved by the query task. OP operations refer to generating corresponding operation instructions in the plug-in call chain.

[0085] For example, operators for numerical comparison can perform OP operations on fields such as time, location, person, company, amount, category, and value. Plugins can perform constrained queries based on the input parameters of operators for numerical comparison. String fuzzy matching can also be performed during queries.

[0086] Operators used for numerical comparison can compare time, amount, and value.

[0087] Operators used for set operations can support operations such as intersection, union, and difference. Operators used for set operations can also perform differences on time, amount, and numerical values.

[0088] Operators used for counting quantities can count numbers, amounts, etc. Operators used for counting quantities can sort by time, amount, value, etc. Operators used for counting quantities can sum amounts, values, etc.

[0089] Operators used for character comparison can be used to determine consistency.

[0090] The data processing method provided in the embodiments of the present application can be applied to single-hop scenarios. A single-hop scenario refers to obtaining the information required for processing a task with only one plug-in call. Depending on the number of OP operations required, single-hop scenarios can be further divided into single-hop single-intent and single-hop multi-intent.

[0091] Single-hop single-intent means a query has only one correct intent. Single-hop multi-intent means a query has multiple intents, and any one of them can yield the correct answer. For single-hop multi-intent, a large language model is required to generate the plugin call chains for all intents simultaneously.

[0092] The data processing method provided in the embodiments of the present application can be applied to multi-hop parallelization scenarios. Multi-hop parallelization refers to the process of obtaining the information required for processing a task through multiple plug-in calls, with no dependencies between the multiple plug-in calls. That is, the input parameters of a plug-in call do not depend on the results of other plug-in calls, and multiple plug-in calls can be executed in parallel. The plug-ins called by the multiple plug-in calls can be single or multiple. Multi-hop parallelization allows operators to perform OP operations.

[0093] The data processing method provided in the embodiments of the present application can be applied to scenarios involving multi-hop sequencing. Multi-hop sequencing refers to the requirement to perform multiple plug-in calls to obtain the information required for processing a task. These plug-in calls are in a progressive relationship and must be executed sequentially. The result of the first plug-in call becomes the input of the second plug-in call. Multiple plug-in calls can call a single or multiple plug-ins. Multi-hop sequencing allows operators to perform OP operations.

[0094] Continue reading Figure 3 In step 403, the query results of each query task in the at least one query task are calculated using the operator required by the user task to obtain a first processing result of the user task;

[0095] See Figure 4 Step 403 includes step 507, where the data processing device obtains the query results of each query task in the at least one query task. The query results of the query tasks are obtained by calling the plug-in corresponding to the query result from the relevant information source (such as a database).

[0096] Next, in step 508, the query results of each of the at least one query task are used as input parameters for the operator required by the user task, so that the operator required by the user task outputs the first processing result of the user task. The operator can calculate the query results of each query task according to its calculation logic to obtain the first processing result.

[0097] In step 404 , the data processing device may output the first processing result.

[0098] Wherein, step 403 includes step 509, the data processing device outputs the first processing result to the user. For example, in step 509, the data processing device can send the first processing result to the user's user equipment, so that the user's user equipment displays the first processing result.

[0099] In some embodiments, the first processing result may not be the correct processing result or the processing result that the user wants. In this case, the user can adjust the required operator of the user task to obtain the correct processing result or the processing result that the user wants.

[0100] In one example, if Figure 5 As shown, the data processing device may output the calculation logic of the operator required for the user task to the user in step 510, so that the user can determine whether the operator required for the user task is a correct operator. In step 510, the data processing device may send the calculation logic of the operator required for the user task to the user's user device, so that the user's user device displays the calculation logic of the operator required for the user task.

[0101] In an example, let's assume that the user's task is to calculate the monthly synchronization of consumption in April 2023. Figure 6 As shown, the calculation logic of the operator required for the user task obtained in step 402 is: "Year-on-year growth = (April 2023 consumption amount - April 2022 consumption amount) / April 2022 consumption amount × 100%." ​​The data processing device can send this calculation logic to the user's user device, so that the user's user device displays the calculation logic, allowing the user to easily determine whether the calculation logic is correct.

[0102] In another example, let's say the user's task is to find out what other planets there are in the solar system besides the Earth. Figure 6 As shown, the calculation logic of the operator required for the user task obtained in step 402 is: "all planets in the solar system diff Earth." The data processing device can send this calculation logic to the user's user device, so that the user's user device displays the calculation logic, allowing the user to easily determine whether the calculation logic is correct.

[0103] In some embodiments, the required operators of a user task may be adjusted as follows.

[0104] In step 511, the data processing device may receive an operator adjustment operation issued by the user. In step 512, the data processing device may adjust the operator required for the user task based on the operator adjustment operation to obtain an adjusted operator. The operator adjustment operation may include operator description information. In response to the operator adjustment operation, the data processing device may adjust the operator required for the user task to the operator described in the description information, i.e., the adjusted operator is the operator described in the description information. Next, in step 513, the query results of each query task are calculated based on the adjusted operator to obtain a second processing result for the user task. For example, the required operator for the user task obtained in step 402 may be set to operator B1. In step 512, the required operator for the user task is adjusted from operator B1 to operator B2. If the adjusted operator is operator B2, then in step 513, the query results of each query task are calculated using operator B2 to obtain a second processing result for the user task. The data processing device may then output the second processing result for the user task in step 514. In step 514 , the data processing device may send the second processing result to the user's user equipment, so that the user's user equipment displays the second processing result.

[0105] In some embodiments, a user can add an operator to the operator package 120. Specifically, the data processing device can receive an operator addition operation and the operator to be added from the user. Then, the data processing device can respond to the operator addition operation and add the operator to be added to the operator package 120.

[0106] In some embodiments, a user can delete an operator from operator package 120. Specifically, the data processing device can receive an operator deletion operation issued by the user and the description of the operator to be deleted. Then, the data processing device can respond to the operator deletion operation and delete the operator to be deleted from operator package 120 based on the description of the operator to be deleted.

[0107] In some embodiments, the data processing device may receive a parameter adjustment operation issued by a user. The data processing device may adjust the parameters of the user task based on the operator adjustment operation to obtain the adjusted parameters. The parameters may refer to the calculation objects of the operator. For example, Figure 6 In the example shown, "Earth" is a parameter. Next, the adjusted parameter is calculated using the operator required for the user task to obtain a third processing result for the user task. The data processing device can then output the third processing result for the user task. The data processing device can send the third processing result to the user's user device, causing the user's user device to display the third processing result.

[0108] In summary, the data processing method provided in the embodiment of the present application can obtain the required operators for user tasks from the preset operator package without the need to develop a glue function, saving manpower and cost, and without the need to generate Python code, saving resources.

[0109] In addition, the operator package 120 can be used to perform secondary orchestration and integration of the plug-ins in the plug-in package 130, which can improve the flexibility and convenience of data processing, simplify the development process, reduce human resources and costs, enable refined business operations, provide a superior user experience, and thus enhance the competitiveness of the product.

[0110] The data processing method provided in the embodiment of the present application can improve the coverage capability of the large language model agent in different application scenarios, including better understanding and processing different types of plug-in combination calls, so that the agent can more comprehensively handle and adapt to various situations in customer scenarios, thereby improving its applicability and coverage.

[0111] The data processing methods provided in this application are more user-friendly and can improve the interpretability of the results of user tasks, enabling users to understand or learn the degree to which large language models make decisions or generate results. They also provide more flexible user input and an engaging user experience, enhancing product interactivity.

[0112] The embodiment of the present application provides an operator package 120 and a plug-in package 130, which can improve the adaptability and processing capabilities of a large language model or a large language model agent to different scenarios, enabling it to better cover and handle various tasks or situations, reuse the customer's existing plug-ins, and reduce the development workload of the glue function.

[0113] The data processing method provided in the embodiment of the present application can clearly display the calculation logic and final results of the user task in the user interface, improve the friendliness and interpretability of the results of the large language model processing the user task, and improve the user's understanding of the processing process of the user task and the query results.

[0114] In the data processing method provided in the embodiments of this application, users can modify the calculation logic and parameters to enhance user participation and interactivity. Users can evaluate the quality of the processing results of their user tasks based on the displayed calculation logic and processing results. The data processing method provided in the embodiments of this application can correct errors based on user feedback, and the modified calculation logic can be used to re-obtain the processing results of the user tasks.

[0115] See Figure 8 , this embodiment of the application provides a data processing device 800. Figure 8 As shown, the apparatus 800 includes:

[0116] An input module 810 is configured to input natural language content describing a user task into a large language model, so that the large language model outputs description information of operators required for the user task and at least one query task; wherein each query task in the at least one query task corresponds to at least one plug-in;

[0117] The obtaining module 820 is configured to obtain the operator required for the user task from a preset operator package based on the description information of the operator required for the user task; and to call the plug-in corresponding to the query task to obtain the query result of the query task;

[0118] A calculation module 830 is configured to calculate the query results of each query task in the at least one query task using the operator required by the user task to obtain a first processing result of the user task;

[0119] The output module 840 is configured to output the first processing result.

[0120] In some embodiments, the device 800 further includes: a receiving module (not shown) and an adjustment module (not shown); wherein the receiving module is used to: receive an operator adjustment operation issued by a user for the user task; the adjustment module is used to: adjust the required operator of the user task based on the operator adjustment operation to obtain an adjusted operator; the calculation module 830 is also used to: use the adjusted operator to calculate the query results of each query task in the at least one query task to obtain a second processing result of the user task; the output module 840 is also used to: output the second processing result.

[0121] In some embodiments, the output module 840 is further configured to output the calculation logic of the operator required for the user task.

[0122] In some embodiments, the device 800 also includes: a receiving module (not shown) and an adding module (not shown); the receiving module is used to: receive an operator adding operation and an operator to be added issued by a user; and in response to the operator adding operation, add the operator to be added to the operator package.

[0123] In some embodiments, the large language model outputs the description information and the at least one query task based on the natural language content and the operator package.

[0124] In some embodiments, the plug-in corresponding to each query task in the at least one query task is included in a preset plug-in package; the large language model outputs the description information and the at least one query task based on the natural language content, the operator package and the plug-in package.

[0125] Among them, the input module 810, the obtaining module 820, the calculation module 830, and the output module 840 can all be implemented by software or by hardware. For example, the implementation of the input module 810 is described below using the input module 810 as an example. Similarly, the implementation of the obtaining module 820, the calculation module 830, and the output module 840 can refer to the implementation of the input module 810.

[0126] As an example of a software functional unit, the input module 810 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the input module 810 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.

[0127] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.

[0128] As an example of a hardware functional unit, the input module 810 may include at least one computing device, such as a server. Alternatively, the input module 810 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0129] The multiple computing devices included in the input module 810 can be distributed in the same region or in different regions. The multiple computing devices included in the input module 810 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the input module 810 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.

[0130] It should be noted that, in other embodiments, the input module 810 can be used to execute Figure 4 Any step in the method shown, module 820 can be used to perform Figure 4 In any step of the method shown, the computing module 830 can be used to perform Figure 4 In any step of the method shown, the output module 840 can be used to perform Figure 4 The steps implemented by the input module 810, the obtaining module 820, the calculating module 830 and the output module 840 can be specified as needed, and the steps implemented by the input module 810, the obtaining module 820, the calculating module 830 and the output module 840 can be specified as needed. Figure 4 The different steps in the method shown implement the overall functionality of the apparatus 800 .

[0131] The present application also provides a computing device 900. Figure 9 As shown, computing device 900 includes a bus 902, a processor 904, a memory 906, and a communication interface 908. Processor 904, memory 906, and communication interface 908 communicate with each other via bus 902. Computing device 900 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 900.

[0132] The bus 902 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 The fact that only one line is used in the figure does not mean that there is only one bus or only one type of bus. Bus 902 may include a path for transmitting information between various components of computing device 900 (eg, memory 906, processor 904, communication interface 908).

[0133] The processor 904 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0134] The memory 906 may include volatile memory, such as random access memory (RAM). The memory 906 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0135] The memory 906 stores executable program codes, and the processor 904 executes the executable program codes to respectively implement the functions of the aforementioned input module 810, the obtaining module 820, the calculating module 830, and the output module 840, thereby realizing Figure 4 That is, the memory 906 stores the method for executing Figure 4 Instructions for the method shown.

[0136] The communication interface 908 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 900 and other devices or a communication network.

[0137] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0138] like Figure 10 As shown, the computing device cluster includes at least one computing device 900. The memory 906 in one or more computing devices 900 in the computing device cluster may store the same Figure 4 Instructions for the method shown.

[0139] In some possible implementations, the memory 906 of one or more computing devices 900 in the computing device cluster may also store a program for executing Figure 4In other words, the combination of one or more computing devices 900 can jointly execute instructions for performing Figure 4 Instructions for the method shown.

[0140] It should be noted that the memory 906 in different computing devices 900 in the computing device cluster may store different instructions, each for executing part of the functions of the apparatus 800. That is, the instructions stored in the memory 906 in different computing devices 900 may implement the functions of one or more of the input module 810, the obtaining module 820, the calculating module 830, and the output module 840.

[0141] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network, which may be a wide area network or a local area network. Figure 11 A possible implementation is shown. Figure 11 As shown, two computing devices 900A and 900B are connected via a network. Specifically, the connection to the network is achieved through a communication interface in each computing device. In this possible implementation, the memory 906 in computing device 900A stores instructions for executing the functions of input module 810 and deriving module 820. Simultaneously, the memory 906 in computing device 900B stores instructions for executing the functions of calculation module 830 and output module 840.

[0142] It should be understood that Figure 11 The functionality of the computing device 900A shown in FIG. 1 may also be implemented by multiple computing devices 900. Similarly, the functionality of the computing device 900B may also be implemented by multiple computing devices 900.

[0143] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similarly referred to as Figure 10 and Figure 11 The difference is that the memory 906 of one or more computing devices 900 in the computing device cluster may store the same memory for executing Figure 4 Instructions for the method shown.

[0144] In some possible implementations, the memory 906 of one or more computing devices 900 in the computing device cluster may also store a program for executing Figure 4 In other words, the combination of one or more computing devices 900 can jointly execute instructions for performing Figure 4 Instructions for the method shown.

[0145] The present application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes Figure 4 The method shown.

[0146] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a host migration device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute Figure 4 The method shown.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.

Claims

1. A data processing method based on a large language model, characterized in that: The method comprises: Inputting natural language content describing a user task into a large language model, so that the large language model outputs description information of operators required for the user task and at least one query task; wherein each query task in the at least one query task corresponds to at least one plug-in; Based on the description information of the operator required by the user task, obtain the operator required by the user task from a preset operator package; and call the plug-in corresponding to the query task to obtain the query result of the query task; Using the required operator of the user task, calculating the query results of each query task in the at least one query task to obtain a first processing result of the user task; The first processing result is output.

2. The method according to claim 1, characterized in that The method further comprises: Receiving an operator adjustment operation for the user task issued by the user; Based on the operator adjustment operation, adjusting the operator required by the user task to obtain an adjusted operator; Using the adjusted operator, calculating the query result of each query task in the at least one query task to obtain a second processing result of the user task; The second processing result is output.

3. The method according to claim 1 or 2, characterized in that The method further includes: outputting the calculation logic of the operator required for the user task.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Receive operator addition operations and operators to be added from users; In response to the operator adding operation, the operator to be added is added to the operator package.

5. The method according to any one of claims 1 to 4, characterized in that The large language model outputs the description information and the at least one query task based on the natural language content and the operator package.

6. The method according to any one of claims 1 to 5, characterized in that The plug-in corresponding to each query task in the at least one query task is included in a preset plug-in package; the large language model outputs the description information and the at least one query task based on the natural language content, the operator package and the plug-in package.

7. A data processing device, characterized in that: The device comprises: An input module, configured to input natural language content describing a user task into a large language model, so that the large language model outputs description information of operators required for the user task and at least one query task; wherein each query task in the at least one query task corresponds to at least one plug-in; An obtaining module is used to obtain the operator required for the user task from a preset operator package based on the description information of the operator required for the user task; and to call the plug-in corresponding to the query task to obtain the query result of the query task; a calculation module, configured to calculate the query results of each query task in the at least one query task using the operator required by the user task, to obtain a first processing result of the user task; An output module is used to output the first processing result.

8. The device according to claim 7, characterized in that The device further includes: a receiving module and an adjusting module; wherein, The receiving module is used to: receive an operator adjustment operation for the user task issued by the user; The adjustment module is used to: adjust the operator required by the user task based on the operator adjustment operation to obtain an adjusted operator; The calculation module is further configured to: use the adjusted operator to calculate the query results of each query task in the at least one query task to obtain a second processing result of the user task; The output module is further used to: output the second processing result.

9. The device according to claim 7 or 8, characterized in that The output module is further used to output the calculation logic of the operator required for the user task.

10. The device according to any one of claims 7 to 9, characterized in that The device further comprises: a receiving module and an adding module; The receiving module is used to: receive operator addition operations and operators to be added issued by users; In response to the operator adding operation, the operator to be added is added to the operator package.

11. The device according to any one of claims 7 to 10, characterized in that The large language model outputs the description information and the at least one query task based on the natural language content and the operator package.

12. The device according to any one of claims 7 to 11, characterized in that The plug-in corresponding to each query task in the at least one query task is included in a preset plug-in package; the large language model outputs the description information and the at least one query task based on the natural language content, the operator package and the plug-in package.

13. A computing device cluster, characterized in that: comprising at least one computing device, each computing device including a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in a memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 6.

14. A computer-readable storage medium, characterized in that The method comprises computer program instructions, which, when executed by a computing device cluster, cause the computing device cluster to perform the method according to any one of claims 1 to 6.

15. A computer program product comprising instructions, characterized in that When the instructions are executed by a computer device cluster, the computer device cluster is caused to perform the method according to any one of claims 1 to 6.