Task processing method and device based on multi-agent system, equipment and medium

By introducing an empirical knowledge base in the multi-agent system, quickly searching for adaptive agent information, the high cost and inefficiency problems caused by relying on large pre-trained language models in the existing technology are solved, and more efficient and stable task processing is achieved.

CN119622103APending Publication Date: 2025-03-14BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411772295.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Existing multi-agent systems rely on large pre-trained language models in task processing, resulting in high call costs, computing resources and storage space requirements, and reduced processing speed and response time in high concurrency scenarios.

Method used

Introduce an empirical knowledge base to quickly search for adaptive agent information through the association relationship between the target task and the task description in the knowledge base, reducing dependence on large pre-trained language models.

Benefits of technology

It reduces the operation and maintenance costs of multi-agent systems, improves task processing speed and response efficiency, and enhances the accuracy and stability of agent decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622103A_ABST
    Figure CN119622103A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a task processing method and device based on a multi-agent system, equipment and a medium. The method comprises the steps of obtaining a to-be-processed target task; searching a target knowledge base based on the target task to generate a search result; wherein the target knowledge base is used for storing an association relationship between task description and agent information; the agent information comprises an identifier of at least one agent in the multi-agent system; determining target agent information corresponding to the target task based on the search result; and determining an intelligent agent corresponding to the target intelligent agent information as a target intelligent agent, and processing the target task through the target intelligent agent. Therefore, by introducing the experience knowledge base into the multi-agent system, the cost of the system is reduced, and the processing speed and the response efficiency of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a task processing method, device, equipment and medium based on a multi-agent system. Background Art

[0002] With the continuous development of artificial intelligence technology, intelligent task processing methods based on multi-agent systems (MAS) have been widely used in various complex tasks / problems. The basic idea of ​​multi-agent systems is to share and solve complex tasks through the collaboration of multiple independent agents.

[0003] The current multi-agent system mainly relies on large pre-trained language models (such as GPT-4) to parse the tasks input by users, determine the agent in the system that is suitable for handling the task, and send the task to the agent for processing.

[0004] However, the above method of selecting agents from the system requires calling a large pre-trained language model, which has a high calling cost. Even if the large pre-trained language model is deployed locally, it still faces huge computing resources and storage space requirements, which leads to high operating and maintenance costs of the multi-agent system. In addition, when processing repetitive tasks, it is necessary to repeatedly call the large pre-trained language model, resulting in low efficiency in task processing. Especially during the peak period of concurrency, the system's processing speed and response time may drop significantly. Summary of the invention

[0005] In order to solve the above technical problems, the present disclosure provides a task processing method, device, equipment and medium based on a multi-agent system.

[0006] In a first aspect, an embodiment of the present disclosure provides a task processing method based on a multi-agent system, the method comprising:

[0007] Get the target tasks to be processed;

[0008] Searching a target knowledge base based on the target task to generate search results; wherein the target knowledge base is used to store the association between the task description and the agent information; the agent information includes the identification of at least one agent in the multi-agent system;

[0009] Based on the search results, determine the target agent information corresponding to the target task;

[0010] The agent corresponding to the target agent information is determined as the target agent, and the target task is processed by the target agent.

[0011] In a second aspect, the present disclosure also provides a task processing device based on a multi-agent system, the device comprising:

[0012] A target task acquisition module is used to acquire the target tasks to be processed;

[0013] A search result generation module, used to search a target knowledge base based on the target task to generate search results; wherein the target knowledge base is used to store the association between the task description and the agent information; the agent information includes the identification of at least one agent in the multi-agent system;

[0014] An agent information determination module, used to determine target agent information corresponding to the target task based on the search results;

[0015] The task processing module is used to determine the agent corresponding to the target agent information as the target agent, and process the target task through the target agent.

[0016] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0017] Processor and memory;

[0018] The processor is used to execute the task processing method based on the multi-agent system described in any embodiment of the present disclosure by calling the program or instruction stored in the memory.

[0019] An embodiment of the present disclosure also provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the task processing method based on a multi-agent system described in any embodiment of the present disclosure.

[0020] The task processing solution based on a multi-agent system provided by the embodiment of the present disclosure can obtain a target task to be processed; search a target knowledge base based on the target task to generate search results; the target knowledge base is used to store the association between the task description and the agent information; the agent information contains the identifier of at least one agent in the multi-agent system; based on the search results, the target agent information corresponding to the target task is determined; the agent corresponding to the target agent information is determined as the target agent, and the target task is processed by the target agent; the experience knowledge base is introduced into the multi-agent system to quickly search for agent information suitable for the target task with the help of the experience knowledge base, avoiding calling a large-scale pre-trained language model with high cost each time, which not only reduces the cost of the multi-agent system, but also improves the processing speed and response efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0023] Figure 1 A flowchart of a task processing method based on a multi-agent system provided in an embodiment of the present disclosure;

[0024] Figure 2 A flowchart of another task processing method based on a multi-agent system provided in an embodiment of the present disclosure;

[0025] Figure 3 A data flow diagram of a task processing process based on a multi-agent system provided in an embodiment of the present disclosure;

[0026] Figure 4 A schematic diagram of the structure of a task processing device based on a multi-agent system provided in an embodiment of the present disclosure;

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

[0028] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described in detail below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0029] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0030] In the related art, when solving the user's target task through a multi-agent system (MAS), a prompt word of a large pre-trained language model is constructed based on the target task and the relevant description of each agent with task processing function contained in the system, and the prompt word is input into the model so that the model can decide the adapted agent for the target task. However, the accuracy of the adapted agent output by this method depends on the rationality and accuracy of the prompt word, resulting in insufficient stability and accuracy; in addition, this method needs to call a large pre-trained language model each time, whether it is calling a large pre-trained language model on the network side or deploying a large pre-trained language model locally, the implementation cost is high, and in the high-concurrency task processing scenario, the response speed of the large pre-trained language model will be reduced, resulting in a reduction in the task processing speed of the MAS.

[0031] Based on the above situation, the embodiment of the present disclosure provides a task processing method based on a multi-agent system, which introduces an empirical knowledge base into the system, greatly reducing the dependence on large pre-trained language models in the process of assigning tasks to their adapted agents. It can not only improve the decision-making accuracy and stability of the agent through the accuracy of the empirical knowledge base, but also reduce the implementation cost and increase the determination speed of the agent adapted to the task, thereby improving the processing speed and response efficiency of the multi-agent system.

[0032] Figure 1 It is a flow chart of a task processing method based on a multi-agent system provided by an embodiment of the present disclosure. The task processing method based on a multi-agent system provided by an embodiment of the present disclosure is mainly applicable to scenarios where a multi-agent system is used to process tasks. The task processing method based on a multi-agent system provided by an embodiment of the present disclosure can be executed by a task processing device based on a multi-agent system, which can be implemented by software and / or hardware. The device can be integrated in an electronic device with certain data processing functions, such as an electronic device responsible for global scheduling in a multi-agent system, or an independent electronic device in a multi-agent system, etc. The electronic device can include but is not limited to a laptop computer, a desktop computer, a server, etc.

[0033] See also Figure 1 The task processing task solving method based on the multi-agent system specifically includes:

[0034] S110: Obtain target tasks to be processed.

[0035] Among them, the target task is the task to be assigned to a suitable agent in the multi-agent system. It can be a general task input by the user or issued by the upstream system, or it can be a sub-task with smaller granularity and more single task content obtained by decomposing the general task. The task here can be a question / topic that needs to be answered or explained in the traditional sense, or it can be a description of a task that needs to be completed in a broad sense (such as writing an article, creating multimedia content, etc.). An agent refers to an agent with certain task processing functions. An agent refers to an entity that can act autonomously, perceive the environment and make decisions. For example, it can be a software program (such as a large-scale machine learning model), a robot or other forms of intelligent systems. Exemplarily, if the agent is implemented as a large-scale generative model, it can be a large model of a role that at least has a task processing function, such as a large language model.

[0036] Specifically, the electronic device obtains the target task from the human-computer interaction interface or the upstream of the system. Alternatively, the electronic device obtains the target task after decomposing the total task. Alternatively, the electronic device obtains the total task and then decomposes it to obtain the target task.

[0037] S120, searching a target knowledge base based on a target task to generate search results; the target knowledge base is used to store the association between the task description and the agent information; the agent information includes an identifier of at least one agent in the multi-agent system.

[0038] The search result is the information of the agent that is suitable for the target task, and may also be a prompt message of search failure (i.e., search failure information). The target knowledge base is a pre-built experience knowledge base, which at least stores the description of the pre-built task (i.e., task description) and the agent information suitable for processing the task. The agent information here is the relevant information describing the agent. Exemplarily, the agent information may include a globally unique identifier of at least one agent in the multi-agent system. For example, the agent information may be the identifier of an agent, or it may be a processing link composed of the identifiers of multiple agents.

[0039] Specifically, in order to speed up the determination of the agent information adapted to the target task, the target task is not directly input into a large language model for processing in the disclosed embodiment, but a target knowledge base is used to quickly search for agent information. The electronic device can match the task description of the target task with each task description stored in the target knowledge base (such as text matching or vector matching, etc.). If the match is successful, the agent information corresponding to the successfully matched task description is used as the search result. If the match fails, the feedback information of the search failure (i.e., the search failure information) is used as the search result.

[0040] In some embodiments, the target knowledge base includes an expert knowledge base and / or a local knowledge base. The expert knowledge base is a knowledge base pre-established based on human experience, which is used to store the association between pre-set standard task descriptions and their corresponding standard agent information. The local knowledge base records the processing experience in actual processing, that is, the local knowledge base stores the association between the task descriptions of the tasks that have been successfully processed by the multi-agent system in the historical time period and the agent information of the Agent that undertakes the task.

[0041] It should be noted that if the above association relationships that have failed to be processed are also stored in the local knowledge base, each group of the above association relationships can be labeled with whether it has been successfully processed to assist the electronic device in information screening.

[0042] In some embodiments, the target knowledge base includes an expert knowledge base and a local knowledge base, and the task descriptions in the expert knowledge base and the task descriptions in the local knowledge base are both stored in the form of feature vectors.

[0043] Specifically, in order to improve the information volume and accuracy of the target knowledge base, the embodiment can simultaneously maintain the expert knowledge base and the local knowledge base. In this way, the expert knowledge base can provide more standardized and accurate task descriptions and agent information; and the local knowledge base can continuously accumulate successful experience in the actual processing process to make up for the problem of slow update frequency of the expert knowledge base. In this way, the probability of obtaining a successful matching search result through the target knowledge base can be increased, thereby further improving the processing efficiency and accuracy of the multi-agent system.

[0044] In addition, in order to further improve the search efficiency and accuracy of the target knowledge base, in this embodiment, the task descriptions in the target knowledge base can be stored in the digital form of feature vectors, that is, the task descriptions in the two knowledge bases are converted from text to feature vectors for storage. In this way, the speed and accuracy of task matching can be improved by vector calculation.

[0045] Based on the above embodiment, S120 includes the following steps A to F:

[0046] Step A: Extract features of the target task and generate a target feature vector.

[0047] Specifically, the electronic device extracts features of the target task according to the vectorization method of the task description in the target knowledge base to obtain a vectorization result, that is, a feature vector of the target task (ie, a target feature vector).

[0048] Step B: perform feature matching on the target feature vector and the feature vectors of each task description in the target knowledge base to determine the matching degrees.

[0049] Specifically, the electronic device performs vector calculation for feature matching (such as calculating cosine similarity, Euclidean distance, etc.) between the target feature vector and the feature vector of each task description in the target knowledge base, and obtains a vector calculation result as the matching degree corresponding to the feature vector of each task description in the target knowledge base.

[0050] It should be noted that the vector calculation between the target feature vector and each first feature vector may be performed in a sequential traversal manner or in a parallel operation manner.

[0051] Step C: If there is a matching degree greater than the matching degree threshold, the association relationship is searched based on the task description corresponding to the corresponding matching degree, and the intelligent agent information obtained from the search is determined as the search result.

[0052] The matching degree threshold is a pre-set matching degree used to determine whether the vector matching result is usable.

[0053] Specifically, the electronic device compares each matching degree with the matching degree threshold. If there is at least one matching degree greater than the matching degree threshold, it means that there is a successfully matched task description in the target knowledge base. If only one matching degree is greater than the matching degree threshold, then the intelligent agent information associated with the task description in the target knowledge base corresponding to the matching degree is determined as the search result. If there are multiple matching degrees greater than the matching degree threshold, then one can be randomly selected from the successfully matched matching degrees, or the matching degree with the largest value can be selected, or the matching degree of a certain distribution percentile (such as 97% of the distribution) can be selected, and the intelligent agent information associated with the task description in the target knowledge base corresponding to the selected matching degree can be determined as the search result.

[0054] Step D: If all matching degrees are less than or equal to the matching degree threshold, the search failure information is determined as the search result.

[0055] Specifically, the electronic device compares each matching degree with a matching degree threshold. If no matching degree is greater than the matching degree threshold, it means that there is no agent information capable of processing the target task in the target knowledge base, and the search failure information is determined as the search result.

[0056] Through the settings of the above steps A to D, the electronic device can match the task description in the form of feature vectors and filter it through the matching degree threshold, which can improve the matching accuracy and simplify the information search process, thereby improving the search efficiency of the intelligent agent information, and further improving the efficiency of the multi-agent system in processing the target task.

[0057] In some embodiments, the above step B may be specifically implemented as follows: performing feature matching on the target feature vector and the feature vectors of each task description in the expert knowledge base, and determining each matching degree of the expert knowledge base.

[0058] Specifically, since the information in the expert knowledge base is pre-determined information with high accuracy, the reliability of its search results is higher. Therefore, in this embodiment, the target feature vector can be firstly subjected to feature matching vector calculation with the feature vectors of each task description in the expert knowledge base to obtain the vector calculation result as the matching degree corresponding to each task description in the expert knowledge base.

[0059] It should be noted that the vector calculation between the target feature vector and each first feature vector may be performed in a sequential traversal manner or in a parallel operation manner.

[0060] Based on the above, the above step D can be specifically implemented as the following steps D1 to D3:

[0061] Step D1: If the matching degrees of the expert knowledge base are less than or equal to the matching degree threshold, then feature matching is performed on the target feature vector and the feature vectors of each task description in the local knowledge base to determine the matching degrees of the local knowledge base.

[0062] Specifically, the electronic device compares each matching degree corresponding to the expert knowledge base with the matching degree threshold. If there is no matching degree greater than the matching degree threshold, that is, when each matching degree is less than or equal to the matching degree threshold, it means that there is no agent information adapted to the target task in the expert knowledge base. At this time, the electronic device continues to perform vector calculation of feature matching between the target feature vector and the feature vector of each task description in the local knowledge base, and obtains the vector calculation result as the matching degree corresponding to each task description in the local knowledge base.

[0063] Step D2: If there is a matching degree of the local knowledge base greater than the matching degree threshold, the association relationship is searched based on the task description corresponding to the corresponding matching degree, and the intelligent agent information obtained from the search is determined as the search result.

[0064] Specifically, the electronic device compares each matching degree corresponding to the local knowledge base with the matching degree threshold. If there is at least one matching degree greater than the matching degree threshold, it means that there is a successfully matched task description in the local knowledge base. If there is only one matching degree greater than the matching degree threshold, then the intelligent agent information associated with the task description in the local knowledge base corresponding to the successfully matched matching degree is determined as the search result. If there are multiple matching degrees greater than the matching degree threshold, then one can be randomly selected from the successfully matched matching degrees, or the matching degree with the largest value can be selected, or the matching degree of a certain distribution percentile (such as 97% of the distribution) can be selected, and the intelligent agent information associated with the task description in the local knowledge base corresponding to the selected matching degree is determined as the search result. If there is no second matching degree greater than the matching degree threshold, then step F can be executed.

[0065] Step D3: If the matching degrees of the local knowledge base are all less than or equal to the matching degree threshold, the search failure information is determined as the search result.

[0066] Specifically, the electronic device compares each matching degree corresponding to the local knowledge base with the matching degree threshold. If there is no matching degree greater than the matching degree threshold, that is, when the electronic device determines that each matching degree is less than or equal to the matching degree threshold, it means that there is no intelligent agent information adapted to the target task in the local knowledge base. At this time, the electronic device generates a search failure information as the search result. In the above embodiments, the electronic device first searches the expert knowledge base for intelligent agent information, and then searches the expert knowledge base for intelligent agent information when the search fails. The accuracy of the information in the expert knowledge base can be used to improve the search accuracy of the intelligent agent information, and the richness of the information in the local knowledge base can be used to improve the search range of the intelligent agent information, thereby further improving the search accuracy and search success rate of the intelligent agent information, and further improving the efficiency of the multi-agent system in processing target tasks.

[0067] S130. Determine the target agent information corresponding to the target task based on the search results.

[0068] Specifically, if the search result is a search failure message, it means that the intelligent agent information suitable for the target task has not been found in the target knowledge base. At this time, the electronic device can feedback the conclusion that the target task cannot be processed, or the electronic device can use other methods (such as a large pre-trained language model) to determine the intelligent agent information suitable for the target task as the final target intelligent agent information.

[0069] If the search result is certain agent information, the electronic device can directly use the agent information in the search result as the final target agent information.

[0070] S140: Determine the agent corresponding to the target agent information as the target agent, and process the target task through the target agent.

[0071] Specifically, when the electronic device has the task allocation / scheduling function, it can deliver the target task to the corresponding target agent according to the target agent information. Alternatively, when the electronic device does not have the task allocation / scheduling function, it can feed back the target agent information associated with the target task to the component / assembly / device in the MAS that has the task allocation / scheduling function, so that the component / assembly / device delivers the target task to the target agent corresponding to the target agent information. After the agent obtains the target task, it can process the target task.

[0072] The above-mentioned technical scheme of the embodiment of the present disclosure can obtain the target task to be processed; search the target knowledge base based on the target task to generate search results; the target knowledge base is used to store the association relationship between the task description and the agent information; the agent information contains the identification of at least one agent in the multi-agent system; based on the search results, the target agent information corresponding to the target task is determined; the agent corresponding to the target agent information is determined as the target agent, and the target task is processed by the target agent; it realizes the introduction of an experience knowledge base into the multi-agent system, so as to use the experience knowledge base to quickly search for agent information adapted to the target task, avoiding calling a large-scale pre-trained language model with high cost each time, which not only reduces the cost of the multi-agent system, but also improves the processing speed and response efficiency of the system.

[0073] Figure 2 It is a flowchart of another method for task processing and task solving based on a multi-agent system provided by an embodiment of the present disclosure.

[0074] In some embodiments, see Figure 2 , the above Figure 1 S110 in the task processing method based on a multi-agent system can implement S210 to S230.

[0075] S210. Obtain the initial task received by the multi-agent system.

[0076] Among them, the initial task is the total task received by the multi-agent system, which can be a task input by the user or a task issued by the upstream of the system.

[0077] Specifically, there is a data communication interface between the multi-agent system and the user or its upstream system. Therefore, the multi-agent system can receive the initial task input by the user or sent by the upstream through the communication interface. Then, the electronic device can obtain the initial task from the storage space storing the initial task.

[0078] S220: Perform word segmentation processing on the initial task and perform semantic analysis on the word segmentation result to generate multiple subtasks corresponding to the initial task.

[0079] Specifically, the electronic device performs word segmentation and sentence segmentation on the initial task, and divides the complex initial task into several semantically related sub-problems. For example, a word segmentation tool such as Jieba word segmentation can be used to perform word segmentation on the initial task to obtain multiple words of the initial task. Then, using the relevant algorithms for syntactic and semantic analysis, these words are semantically analyzed, combined and sorted to generate multiple sentences with relatively weak semantic correlation between each other and greater semantic correlation between internal words. One sentence can be a subtask.

[0080] S230: Determine any subtask as a target task.

[0081] Specifically, the electronic device may determine any subtask as a target task to process the decision-making of the processing agent.

[0082] See also Figure 3 The electronic device can process the obtained initial task by word segmentation and sentence segmentation to obtain multiple subtasks, each of which can be used as a target task, such as target task 1, target task 2, ..., target task n.

[0083] Through the above-mentioned technical solution of decomposing the initial task into multiple subtasks to determine the target task, the complex initial task can be decomposed into more specific and easier to understand small semantic units - target tasks, so that subsequent processing is more efficient and accurate, reducing the processing overhead of the overall process of processing the initial task.

[0084] S240, searching a target knowledge base based on the target task to generate search results; the target knowledge base includes an expert knowledge base and a local knowledge base.

[0085] In some embodiments, see Figure 2 , the above Figure 1 S130 in the task processing method based on the multi-agent system can be implemented as S250~S270.

[0086] S250. If the search result is processing agent information in the expert knowledge base or processing agent information in the local knowledge base, the searched processing agent information is determined as target processing agent information.

[0087] S260. If the search result is search failure information, the target task is input into the information prediction model, and the agent information and information confidence are output.

[0088] Among them, the information prediction model is obtained by training the deep learning model using the data in the target knowledge base as training samples.

[0089] Specifically, see Figure 3 In combination with the relevant descriptions of the above embodiments, the electronic device can match the target task 1 with the task descriptions in the expert knowledge base. If the match is successful, it can obtain the agent information adapted to the target task 1. Subsequently, the target task 1 can be sent to the corresponding processing Agent 1 for task processing based on the agent information to obtain the execution result.

[0090] For target task 2, if the expert knowledge base fails to match, the electronic device can continue to match target task 2 with each task description in the local knowledge base. If the match is successful, it can obtain the agent information adapted to target task 2. Subsequently, based on the agent information, target task 2 can be sent to the corresponding processing Agent 2 for task processing to obtain the execution result.

[0091] For the target task (n-1), if both the expert knowledge base and the local knowledge base fail to match, that is, the search result obtained is search failure information, then given that the information prediction model has learned the relevant knowledge of the adaptation relationship between the task and the agent information, the electronic device can input the target task (n-1) into the pre-trained information prediction model. After model calculation, it can output the agent information that is adapted to the target task (n-1) and the confidence level (that is, information confidence level) that the agent information is adapted to the target task (n-1).

[0092] Exemplarily, the deep learning model includes Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN). CNN is used to extract local features of the task, and RNN is used to model the time series characteristics of the task.

[0093] Based on the above example, the information prediction model is pre-trained through the following steps G to I.

[0094] Step G: Based on the data in the target knowledge base, determine the paired task description samples and agent information samples, and use the agent information samples as reference classification categories for the task description samples.

[0095] Among them, the reference classification category is the standard value of the information category during the model training process.

[0096] Specifically, in the embodiment of the present disclosure, paired task descriptions and agent information in the target knowledge base are used to construct training samples of the deep learning model, and the process of matching agent information to new tasks is simplified to a classification decision process. Therefore, the electronic device can extract the above-mentioned paired information from the target knowledge base as task description samples and agent information samples, and the agent information samples are used as reference classification categories.

[0097] Step H: Input the task description samples into the convolutional neural network and the recurrent neural network in sequence, and output the predicted classification category of the task description samples.

[0098] Specifically, the electronic device can input the task description sample into the CNN and RNN to be trained in sequence, and after the two have been calculated in sequence, the classification result corresponding to the task description sample can be output, that is, the predicted classification category. The predicted classification category is the intelligent agent information adapted to the task description sample predicted by the deep learning model.

[0099] Step I: Based on the reference classification category and the predicted classification category, the convolutional neural network and the recurrent neural network are iteratively trained to obtain an information prediction model.

[0100] Specifically, the electronic device uses the reference classification category and the predicted classification category to calculate the loss function, obtains the loss value, and then uses the loss value to perform error back propagation processing to update the model parameters of CNN and RNN. Repeat the above process until the model convergence conditions are met (such as the loss value is small enough or the number of training iterations reaches a preset number, etc.). The model parameters at this time can be used as the final model parameters to obtain the information prediction model.

[0101] S270: If the information confidence is greater than the confidence threshold, the output agent information is determined as the target agent information.

[0102] The confidence threshold is a preset confidence level used to determine whether the model output result is reliable.

[0103] Specifically, the electronic device compares the information confidence with the confidence threshold. If the information confidence is not greater than the confidence threshold, the electronic device can feedback that the target task (n-1) has failed to be processed, or continue to search for its adapted agent information through other means (such as a large pre-trained language model).

[0104] If the information confidence is greater than the confidence threshold, it means that the agent information output by the information prediction model is suitable for the target task (n-1), and it can be determined as the target agent information. Subsequently, the target task (n-1) can be sent to the corresponding processing Agent 3 for task processing based on the agent information to obtain the execution result.

[0105] When the above search results are search failure information, the target task is input into the information prediction model to obtain the target intelligent agent information whose information confidence is greater than the confidence threshold. In the case of failure to match the experience knowledge base, a deep learning model with a relatively small model scale is used to perform more intelligent feature understanding and processing decisions on new tasks. This will not significantly increase the system cost, but also improve the system's ability to handle unknown tasks, thereby further improving the efficiency of the system's decision-making agent.

[0106] In some embodiments, see Figure 2 , the above Figure 1S130 in the task processing method based on a multi-agent system can also be implemented as S250-S260 and S280.

[0107] S280. If the information confidence is less than or equal to the confidence threshold, the target task is input into the preset language model, and the output agent information is used as the target agent information.

[0108] Among them, the preset language model is a natural language processing model whose pre-trained model scale exceeds the preset scale.

[0109] Specifically, see Figure 3 , for target task n, if the expert knowledge base and the local knowledge base fail to match, and the information confidence output by the information prediction model is less than or equal to the confidence threshold, it means that target task n fails to obtain more suitable agent information. At this time, the electronic device can call the preset language model based on the target task n to use its powerful natural language processing capabilities to predict the agent information suitable for target task n in the multi-agent system as the target agent information. Subsequently, the target task n can be sent to the corresponding processing Agent 4 for task processing based on the agent information to obtain the execution result.

[0110] Through the application of the above-mentioned large-scale preset language model, a bottom-line guarantee mechanism is provided for the agent information adapted to the decision-making target tasks of the multi-agent system, ensuring the accuracy and reliability of the system in handling complex tasks and improving the robustness of the system.

[0111] In some embodiments, see Figure 2 , in the above Figure 1 After S140 in the task processing method based on a multi-agent system, the task processing method based on a multi-agent system may further include S290.

[0112] S290, storing the target task, target agent information, and a processing result label indicating whether the target task is successfully processed in a local knowledge base, so as to update the training samples of the information prediction model for continuous optimization training of the model.

[0113] Specifically, after the multi-agent system solves the target task through the processing agent corresponding to the target agent information, it can obtain the answer when the solution is successful, or obtain feedback when the solution fails. At this time, the target task, the target agent information, and the processing result label of successful or failed processing can be associated and stored in the local knowledge base. Afterwards, the task description and agent information of the processing result label of the successful processing can be associated as positive samples to continue to optimize the information prediction model; the task description and agent information of the processing result label of the failed processing can also be associated as negative samples to continue to optimize the information prediction model.

[0114] In this way, the multi-agent system can continuously learn and accumulate experience in the process of continuously processing tasks, and continuously optimize the performance of the local knowledge base and information prediction model, so that the system can continuously improve its intelligence level, gradually optimize the processing strategy, and better adapt to the ever-changing task environment and needs, thereby achieving long-term self-optimization capabilities and improving the overall processing efficiency and accuracy of the system.

[0115] In some embodiments, see Figure 2 , in the above Figure 1 After S140 in the task processing method based on a multi-agent system, the task processing method based on a multi-agent system may further include S290′.

[0116] S290′: When the processing result label is successfully processed, the local knowledge base is updated using the target task and target agent information.

[0117] Specifically, the electronic device associates and stores the target task, target agent information, and processing result labels of successful or failed processing in the local knowledge base. In addition, the local knowledge base can be updated with the processing result labels of the successfully processed task description and agent information to provide more search candidates for agent information. In this way, the data in the local knowledge base can be continuously enriched in the process of continuously processing tasks, and the search success rate of agent information corresponding to the task can be improved, thereby further improving the overall processing efficiency and accuracy of the system.

[0118] On the basis of the above embodiments, the task processing method based on the multi-agent system can simultaneously include the processing process of word segmentation and sentence segmentation, the search process of the target knowledge base, the prediction process of the information prediction model, the backup process of the large preset language model, the continuous learning mechanism of the information prediction model and the update mechanism of the local knowledge base, thereby effectively reducing the operation and maintenance costs of the multi-agent system, improving the task processing efficiency, and enabling the system to continuously learn and optimize by continuously accumulating experience and knowledge, thereby continuously improving its own intelligence level, so as to better adapt to the ever-changing application needs and environment, and significantly improve the accuracy and robustness of task processing.

[0119] Figure 4 The structure diagram of a task processing device based on a multi-agent system provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the task processing device 400 based on the multi-agent system includes:

[0120] The target task acquisition module 410 is used to acquire the target task to be processed;

[0121] The search result generation module 420 is used to search the target knowledge base based on the target task and generate search results; wherein the target knowledge base is used to store the association between the task description and the agent information; the agent information includes the identification of at least one agent in the multi-agent system;

[0122] An agent information determination module 430, for determining target agent information corresponding to a target task based on the search results;

[0123] The task processing module 440 is used to determine the agent corresponding to the target agent information as the target agent, and process the target task through the target agent.

[0124] A task processing device based on a multi-agent system provided by the embodiment of the present disclosure can obtain a target task to be processed; search a target knowledge base based on the target task to generate search results; the target knowledge base is used to store the association between the task description and the agent information; the agent information contains the identifier of at least one agent in the multi-agent system; based on the search results, the target agent information corresponding to the target task is determined; the agent corresponding to the target agent information is determined as the target agent, and the target task is processed by the target agent; the experience knowledge base is introduced into the multi-agent system, so as to use the experience knowledge base to quickly search for agent information suitable for the target task, avoid calling a large-scale pre-trained language model with high cost each time, which not only reduces the cost of the multi-agent system, but also improves the processing speed and response efficiency of the system.

[0125] In some embodiments, the target task acquisition module 410 is specifically used to:

[0126] Obtaining the initial task received by the multi-agent system;

[0127] Perform word segmentation on the initial task and perform semantic analysis on the word segmentation results to generate multiple subtasks corresponding to the initial task;

[0128] Identify any subtask as the target task.

[0129] In some embodiments, the target knowledge base includes an expert knowledge base and / or a local knowledge base; the expert knowledge base is used to store the association relationship between pre-set task descriptions and agent information; the local knowledge base is used to store the association relationship between task descriptions and agent information that have been successfully processed within a historical time period.

[0130] In some embodiments, the search result generation module 420 includes:

[0131] The target feature vector generation submodule is used to extract features of the target task and generate the target feature vector;

[0132] A matching degree determination submodule is used to perform feature matching between the target feature vector and the feature vectors of each task description in the target knowledge base to determine each matching degree;

[0133] A first search result determination submodule is used to search for association relationships based on the task description corresponding to the corresponding matching degree if there is a matching degree greater than a matching degree threshold, and determine the intelligent agent information obtained from the search as the search result;

[0134] The second search result determination submodule is used to determine the search failure information as the search result if all matching degrees are less than or equal to the matching degree threshold.

[0135] In some embodiments, the target knowledge base includes an expert knowledge base and a local knowledge base, and the task description in the expert knowledge base and the task description in the local knowledge base are both stored in the form of feature vectors;

[0136] Accordingly, the matching degree determination submodule is specifically used for:

[0137] Perform feature matching on the target feature vector and the feature vectors of each task description in the expert knowledge base to determine the matching degree of the expert knowledge base;

[0138] Accordingly, the second search result determination submodule is specifically used for:

[0139] If the matching degrees of the expert knowledge base are all less than or equal to the matching degree threshold, feature matching is performed on the target feature vector and the feature vectors of each task description in the local knowledge base to determine the matching degrees of the local knowledge base;

[0140] If there is a matching degree of the local knowledge base greater than the matching degree threshold, then the association relationship is searched based on the task description corresponding to the corresponding matching degree, and the agent information obtained from the search is determined as the search result;

[0141] If the matching degrees of the local knowledge base are all less than or equal to the matching degree threshold, the search failure information is determined as the search result.

[0142] In some embodiments, the agent information determination module 430 is further configured to:

[0143] If the search result is search failure information, the target task is input into the information prediction model, and the agent information and information confidence are output; wherein the information prediction model is obtained by training the deep learning model using the data in the target knowledge base as training samples;

[0144] If the information confidence is greater than the confidence threshold, the output agent information is determined as the target agent information.

[0145] Further, deep learning models include convolutional neural networks and recurrent neural networks;

[0146] Accordingly, the task processing device 400 based on the multi-agent system further includes a model training module, which is used to pre-train and obtain an information prediction model in the following manner:

[0147] Based on the data in the target knowledge base, determine the paired task description samples and agent information samples, and use the agent information samples as reference classification categories for the task description samples;

[0148] Input the task description samples into the convolutional neural network and the recurrent neural network in sequence, and output the predicted classification category of the task description samples;

[0149] Based on the reference classification categories and the predicted classification categories, the convolutional neural network and the recurrent neural network are iteratively trained to obtain an information prediction model.

[0150] In some embodiments, the agent information determination module 430 is further configured to:

[0151] After the target task is input into the information prediction model and the agent information and information confidence are output, if the information confidence is less than or equal to the confidence threshold, the target task is input into the preset language model and the target agent information is output; wherein the preset language model is a natural language processing model whose pre-trained model scale exceeds the preset scale.

[0152] In some embodiments, the task processing device 400 based on the multi-agent system further includes an information storage module for:

[0153] After the agent corresponding to the target agent information is determined as the target agent and the target task is processed by the target agent, the target task, the target agent information and the processing result label of whether the target task is successfully processed are stored in the local knowledge base to update the training samples of the information prediction model for continuous optimization training of the model;

[0154] And / or, the task processing device 400 based on the multi-agent system further includes a knowledge base updating module, which is used to:

[0155] After the agent corresponding to the target agent information is determined as the target agent and the target task is processed by the target agent, when the processing result label is successfully processed, the local knowledge base is updated using the target task and the target agent information.

[0156] The task processing device based on a multi-agent system provided in the embodiments of the present disclosure can execute the task processing method based on a multi-agent system provided in any embodiment of the present disclosure, and has the functional modules and beneficial effects corresponding to the execution method.

[0157] It is worth noting that in the above-mentioned embodiment of the task processing device based on the multi-agent system, the various modules included are only divided according to the functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the various functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this disclosure.

[0158] Figure 5 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the electronic device 500 includes one or more processors 501 and a memory 502 .

[0159] The processor 501 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 500 to perform desired functions.

[0160] The memory 502 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 501 may execute the program instructions to implement the task processing method based on the multi-agent system of the embodiment of the present disclosure described above and / or other desired functions.

[0161] In one example, the electronic device 500 may further include: an input device 503 and an output device 504, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). The input device 503 may include, for example, a keyboard, a mouse, etc. The output device 504 may output various information to the outside. The output device 504 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.

[0162] Of course, to simplify, Figure 5 Only some of the components related to the present disclosure in the electronic device 500 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 500 may also include any other appropriate components.

[0163] In addition to the above-mentioned methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the task processing method based on a multi-agent system provided by the embodiments of the present disclosure.

[0164] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0165] In addition, the embodiments of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the task processing method based on a multi-agent system provided by the embodiments of the present disclosure.

[0166] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0167] It should be noted that the terms used in the present disclosure are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present disclosure specification and claims, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The term "and / or" includes any and all combinations of one or more related listed items. Relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method or device including the elements.

[0168] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A task processing method based on a multi-agent system, characterized in that: include: Get the target tasks to be processed; Searching a target knowledge base based on the target task to generate search results; wherein the target knowledge base is used to store the association between the task description and the agent information; the agent information includes the identification of at least one agent in the multi-agent system; Based on the search results, determine the target agent information corresponding to the target task; The agent corresponding to the target agent information is determined as the target agent, and the target task is processed by the target agent.

2. The method according to claim 1, characterized in that The obtaining of the target task to be processed includes: Obtaining an initial task received by the multi-agent system; Performing word segmentation processing on the initial task and performing semantic analysis on the word segmentation result to generate multiple subtasks corresponding to the initial task; Any of the subtasks is determined as the target task.

3. The method according to claim 1, characterized in that The step of searching a target knowledge base based on the target task and generating search results includes: Extracting features of the target task to generate a target feature vector; Performing feature matching on the target feature vector and the feature vectors of each task description in the target knowledge base to determine each matching degree; If there is a matching degree greater than the matching degree threshold, searching for the association relationship based on the task description corresponding to the corresponding matching degree, and determining the intelligent agent information obtained from the search as the search result; If the matching degrees are all less than or equal to the matching degree threshold, the search failure information is determined as the search result.

4. The method according to claim 1 or 3, characterized in that: The target knowledge base includes an expert knowledge base and / or a local knowledge base; the expert knowledge base is used to store the association relationship between pre-set task descriptions and agent information; the local knowledge base is used to store the association relationship between task descriptions and agent information that have been successfully processed within a historical time period.

5. The method according to claim 3, characterized in that: The target knowledge base includes an expert knowledge base and a local knowledge base, and the task description in the expert knowledge base and the task description in the local knowledge base are both stored in the form of feature vectors; The performing feature matching on the target feature vector and the feature vectors of each task description in the target knowledge base to determine each matching degree includes: Performing feature matching on the target feature vector and the feature vectors of each task description in the expert knowledge base to determine each matching degree of the expert knowledge base; If the matching degrees are all less than or equal to the matching degree threshold, determining the search failure information as the search result includes: If the matching degrees of the expert knowledge base are all less than or equal to the matching degree threshold, feature matching is performed on the target feature vector and the feature vectors of the task descriptions in the local knowledge base to determine the matching degrees of the local knowledge base; If there is a matching degree of the local knowledge base greater than the matching degree threshold, searching for the association relationship based on the task description corresponding to the corresponding matching degree, and determining the intelligent agent information obtained from the search as the search result; If the matching degrees of the local knowledge base are all less than or equal to the matching degree threshold, the search failure information is determined as the search result.

6. The method according to claim 1, characterized in that The step of determining target agent information corresponding to the target task based on the search result includes: If the search result is search failure information, the target task is input into an information prediction model, and agent information and information confidence are output; wherein the information prediction model is obtained by training a deep learning model using the data in the target knowledge base as training samples; If the information confidence is greater than the confidence threshold, the output agent information is determined as the target agent information.

7. The method according to claim 6, characterized in that The deep learning model includes a convolutional neural network and a recurrent neural network; The information prediction model is pre-trained in the following way: Based on the data in the target knowledge base, determining pairs of task description samples and agent information samples, and using the agent information samples as reference classification categories of the task description samples; Inputting the task description sample into the convolutional neural network and the recurrent neural network in sequence, and outputting the predicted classification category of the task description sample; Based on the reference classification category and the predicted classification category, the convolutional neural network and the recurrent neural network are iteratively trained to obtain the information prediction model.

8. The method according to claim 6, characterized in that After inputting the target task into the information prediction model and outputting the agent information and the information confidence, the method further includes: If the information confidence is less than or equal to the confidence threshold, the target task is input into a preset language model and the target agent information is output; wherein the preset language model is a pre-trained natural language processing model whose model scale exceeds a preset scale.

9. The method according to any one of claims 6 to 8, characterized in that: After determining the agent corresponding to the target agent information as the target agent and processing the target task by the target agent, the method further includes: The target task, the target agent information and the processing result label of whether the target task is successfully processed are stored in the local knowledge base to update the training samples of the information prediction model for continuous optimization training of the model; And / or, when the processing result label is successfully processed, the local knowledge base is updated using the target task and the target agent information.

10. A task processing device based on a multi-agent system, characterized in that: include: A target task acquisition module is used to acquire the target tasks to be processed; A search result generation module, used to search a target knowledge base based on the target task to generate search results; wherein the target knowledge base is used to store the association between the task description and the agent information; the agent information includes the identification of at least one agent in the multi-agent system; An agent information determination module, used to determine target agent information corresponding to the target task based on the search results; The task processing module is used to determine the agent corresponding to the target agent information as the target agent, and process the target task through the target agent.

11. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the task processing method based on a multi-agent system as described in any one of claims 1 to 9 by calling the program or instruction stored in the memory.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores programs or instructions, which enable a computer to execute the task processing method based on a multi-agent system as described in any one of claims 1 to 9.

Citation Information

Cited By

  • Code generation method and device based on multi-intelligence collaboration, medium and equipment

    CN119960742A