Intelligent question-oriented multi-agent evolutionary game method and device
Patent Information
- Application Number
- CN202610836599.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-10-16
AI Technical Summary
在一些或者相关实施例中,通过获取第一智能体集合中各第一智能体对应的初始种群,并从所述初始种群中获取与所述各第一智能体对应的策略变种,其中,所述第一智能体集合包括第一意图决策智能体、第一Schema适配智能体、第一SQL生成智能体和第一结果交互智能体,所述初始种群包括至少一种策略变种;根据任务集合和所述策略变种,按照所述第一智能体集合对应的协作链路执行任务,获取所述策略变种对应的基础得分;根据所述基础得分和协同得分,获取所述策略变种对应的适应度量化评估结果;根据所述适应度量化评估结果,对所述各第一智能体进行迭代演化博弈,并在演化博弈结果满足结果要求的情况下,获取第二智能体集合和所述第二智能体集合中各第二智能体对应的目标种群,并采用所述第二智能体集合执行智能问数相关任务。因此,因此,可以解决单一策略智能体灵活性不足、无法应对多样化场景的问题,可以实现多智能体系统的动态适配与协同进化,提升系统对不同优先级、复杂度智能问数任务的适配能力。其中,种群化设置可通过策略变种的差异化竞争与协同,结合演化博弈逻辑实现策略优胜劣汰,使系统逐步收敛至最优协作状态,同时依托适应度评估实现系统自优化,兼顾任务处理的准确率、效率与用户满意度,降低多智能体协作成本。
Smart Images

Figure CN122927356A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method and apparatus for multi-agent evolutionary game theory oriented towards intelligent problem solving. Background Technology
[0002] With the deepening of digital transformation, cross-departmental spreadsheet data is surging across various fields. Intelligent data querying, as a core technology for natural language and structured data interaction, can automatically convert multimodal user queries into accurate data-driven answers, significantly improving data query and decision-making efficiency. It has been widely applied in various scenarios such as healthcare and transportation. Therefore, improving the collaboration efficiency and task adaptability of multi-agent systems has become a key focus. Summary of the Invention
[0003] This disclosure provides a multi-agent evolutionary game theory method and apparatus for intelligent question solving, which can improve the cooperation efficiency and task adaptability of multi-agents. The technical solution of this disclosure is as follows:
[0004] According to a first aspect of the present disclosure, a multi-agent evolutionary game theory method for intelligent question solving is provided, comprising: Obtain an initial population corresponding to each first agent in a first agent set, and obtain policy variants corresponding to each first agent from the initial population. The first agent set includes a first intent decision agent, a first schema adaptation agent, a first structured query language (SQL) generation agent, and a first result interaction agent. The initial population includes at least one policy variant. Based on the task set and the policy variant, the task is executed according to the cooperative link corresponding to the first intelligent agent set, and the basic score corresponding to the policy variant is obtained. Based on the base score and the collaborative score, obtain the adaptive quantification evaluation result corresponding to the strategy variant; Based on the adaptive quantification evaluation results, iterative evolutionary game is performed on each of the first agents. If the evolutionary game results meet the result requirements, a set of second agents and the target population corresponding to each second agent in the set of second agents are obtained. The set of second agents is then used to perform intelligent questioning related tasks.
[0005] According to some embodiments, the second set of intelligent agents includes a second intent decision-making intelligent agent, a second schema adaptation intelligent agent, a second SQL generation intelligent agent, and a second result interaction intelligent agent. The step of using the second set of intelligent agents to perform intelligent query-related tasks includes: The second intent decision-making agent is used to identify the input information and obtain structured intent information; The structured intent information is processed using the second schema-adapting agent to obtain the target schema; Based on the target schema and the structured intent information, the second SQL generation agent generates the target subtask SQL and performs query processing on the database. The second result interaction agent obtains and displays the response result corresponding to the input information.
[0006] According to some embodiments, the step of using the second schema-adapting agent to process the structured intent information and obtain the target schema includes: Based on the structured intent information, the BM25 algorithm in the second schema-adaptive agent is used to filter the table set to obtain a candidate table set; The candidate table set and the structured intent information are semantically matched using a SQL-specific code model (Code for SQL, CodeS) to obtain the target table; The second schema-adapting agent is used to map the fields in the structured intent information to the fields in the target table to obtain the target schema, wherein the target schema includes field mapping relationships and inter-table relationships.
[0007] According to some embodiments, the step of generating target subtask SQL using the second SQL generation agent based on the target schema and the structured intent information, performing query processing on the database, and obtaining and displaying the response result corresponding to the input information using the second result interaction agent includes: Based on the target schema and the structured intent information, the CodeS model in the second SQL generation agent is invoked to generate the target subtask SQL; Based on the target subtask SQL, the database is queried, and the response result corresponding to the input information is obtained and displayed using the second result interaction agent.
[0008] According to some embodiments, the method further includes: Based on the scenario information corresponding to the input information, the database is adjusted to obtain the adjusted database. The adjustment process includes at least one of the following: index addition processing, pagination adjustment processing, table-order intent network (TOIN) order adjustment processing, SQL error repair processing, and SQL secondary verification processing.
[0009] According to some embodiments, obtaining the adaptive quantification evaluation result corresponding to the strategy variant based on the base score and the collaborative score includes: Based on the dimension weights, obtain the basic score corresponding to each strategy variant, where the dimensions include task accuracy, execution time, number of collaborative reworks, and satisfaction rating. Based on any strategy variant and the strategy type of upstream and downstream agents, obtain the collaborative score; Based on the base score and collaborative score corresponding to each strategy variant, obtain the adaptive quantification evaluation result corresponding to the strategy variant; Based on the quantitative assessment results of the aforementioned adaptation and the strategy adjustment method, the proportion of each strategy variant in the next generation population is adjusted.
[0010] According to some embodiments, the method further includes: A policy mutation is triggered and the operation corresponding to the policy mutation is executed if any of the following conditions are met: The fitness of the strategy variant continuously decreases and the decrease meets the requirement. The proportion of the strategy variant in the initial population is greater than the proportion threshold.
[0011] According to a second aspect of the present disclosure, a multi-agent evolutionary game-playing device for intelligent question-solving is provided, comprising: A population acquisition unit is used to acquire an initial population corresponding to each first agent in a first agent set, and to acquire a policy variant corresponding to each first agent from the initial population. The first agent set includes a first intent decision agent, a first schema adaptation agent, a first SQL generation agent, and a first result interaction agent. The initial population includes at least one policy variant. The scoring unit is used to execute tasks according to the collaborative link corresponding to the first set of intelligent agents based on the task set and the policy variant, and obtain the basic score corresponding to the policy variant. The result acquisition unit is used to obtain the adaptive quantification evaluation result corresponding to the strategy variant based on the base score and the collaborative score. The evolutionary game unit is used to perform iterative evolutionary game on each of the first agents according to the fitness metric evaluation results, and when the evolutionary game results meet the result requirements, obtain the second agent set and the target population corresponding to each second agent in the second agent set, and use the second agent set to perform intelligent questioning related tasks.
[0012] According to a third aspect of the present disclosure, an apparatus is provided, comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the multi-agent evolutionary game method for intelligent question-solving as described in any of the preceding aspects.
[0013] According to a fourth aspect of the present disclosure, a storage medium is provided that, when instructions in the storage medium are executed by a processor of a device, enables the device to perform any of the preceding aspects of the multi-agent evolutionary game method for intelligent questions.
[0014] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described in any one of the preceding aspects.
[0015] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: In some or related embodiments, an initial population corresponding to each first agent in a first agent set is obtained, and a policy variant corresponding to each first agent is obtained from the initial population. The first agent set includes a first intent decision agent, a first schema adaptation agent, a first SQL generation agent, and a first result interaction agent. The initial population includes at least one policy variant. Based on the task set and the policy variant, tasks are executed according to the collaborative link corresponding to the first agent set, and a base score corresponding to the policy variant is obtained. Based on the base score and the collaborative score, an adaptation metric evaluation result corresponding to the policy variant is obtained. Based on the adaptation metric evaluation result, iterative evolutionary game is performed on each first agent. If the evolutionary game result meets the result requirements, a second agent set and a target population corresponding to each second agent in the second agent set are obtained, and the second agent set is used to execute intelligent question-and-answer related tasks. Therefore, this approach can solve the problem of insufficient flexibility and inability to cope with diverse scenarios of a single policy agent, enabling dynamic adaptation and collaborative evolution of multi-agent systems, and improving the system's adaptability to intelligent question-and-answer tasks of different priorities and complexities. Among them, population-based settings can achieve the survival of the fittest through differentiated competition and cooperation among strategy variants, combined with evolutionary game logic, so that the system gradually converges to the optimal cooperative state. At the same time, the system can achieve self-optimization by relying on fitness evaluation, taking into account the accuracy, efficiency and user satisfaction of task processing, and reducing the cost of multi-agent cooperation.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0018] Figure 1 This is a flowchart of the first multi-agent evolutionary game method for intelligent questioning provided in this disclosure embodiment; Figure 2 This is a flowchart of the second multi-agent evolutionary game method for intelligent questioning provided in this disclosure embodiment; Figure 3 This is a flowchart of the third multi-agent evolutionary game method for intelligent questioning provided in this disclosure embodiment; Figure 4 This is a schematic diagram of the overall architecture of a response system provided in an embodiment of this disclosure; Figure 5 A schematic diagram illustrating an example of a policy variant of an agent population according to an embodiment of this disclosure is shown. Figure 6 This diagram illustrates an example of an evolutionary game of strategy variants in an agent population according to an embodiment of the present disclosure. Figure 7 This is a block diagram illustrating a multi-agent evolutionary game device for intelligent question solving, according to an exemplary embodiment. Figure 8 This is an example schematic diagram of a device according to an exemplary embodiment. Detailed Implementation
[0019] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0020] This disclosure presents a method and apparatus for multi-agent evolutionary game theory oriented towards intelligent problem-solving. In some embodiments, the terms "multi-agent evolutionary game theory oriented towards intelligent problem-solving" can be interchanged with "information processing method" and "communication method," and the terms "multi-agent evolutionary game theory apparatus oriented towards intelligent problem-solving" can be interchanged with "information processing apparatus" and "communication apparatus," and the terms "information processing system" and "communication system" can be interchanged.
[0021] This disclosure is not exhaustive, but merely illustrative of some embodiments, and is not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment can be arbitrarily interchanged. Furthermore, the optional implementation methods in a particular embodiment can be arbitrarily combined; moreover, the embodiments can be arbitrarily combined, for example, some or all steps of different embodiments can be arbitrarily combined, and a particular embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.
[0022] In each of the disclosed embodiments, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of the embodiments are consistent and can be referenced by each other. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0023] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of this disclosure.
[0024] In this disclosure, unless otherwise stated, elements expressed in the singular form, such as "a," "an," "the," "the," "the," "the," "the," "the," "this," etc., can mean "one and only one," or "one or more," "at least one," etc. For example, when using articles such as "a," "an," "the," etc. in translation, the noun following the article can be understood as either a singular or a plural expression.
[0025] In the embodiments disclosed herein, "multiple" refers to two or more.
[0026] In some embodiments, the terms “at least one of,” “one or more,” “a plurality of,” and “multiple” may be used interchangeably.
[0027] The prefixes "first," "second," etc., used in the embodiments of this disclosure are merely for distinguishing different descriptive objects and do not impose restrictions on the position, order, priority, quantity, or content of the descriptive objects. The description of the descriptive objects is found in the claims or the context of the embodiments, and the use of prefixes should not constitute unnecessary restrictions. For example, if the descriptive object is a "field," the ordinal numbers preceding "field" in "first field" and "second field" do not restrict the position or order of the "fields." "First" and "second" do not restrict whether the "fields" they modify are in the same message, nor do they restrict the order of "first field" and "second field." Similarly, if the descriptive object is a "level," the ordinal numbers preceding "level" in "first level" and "second level" do not restrict the priority between "levels." Furthermore, the number of descriptive objects is not limited by ordinal numbers and can be one or more. For example, in "first device," the number of "devices" can be one or more. Furthermore, the objects modified by different prefixes can be the same or different. For example, if the object being described is "device", then "first device" and "second device" can be the same device or different devices, and their types can be the same or different. Similarly, if the object being described is "information", then "first information" and "second information" can be the same information or different information, and their content can be the same or different.
[0028] In some embodiments, "terminal" or "terminal device" may be referred to as "user equipment (UE)," "user terminal," "mobile station (MS)," "mobile terminal (MT)," "subscriber station," "mobile unit," "subscriber unit," "wireless unit," "remote unit," "mobile device," "wireless device," "wireless communication device," "remote device," "mobile subscriber station," "access terminal," "mobile terminal," "wireless terminal," "remote terminal," "handset," "user agent," "mobile client," "client," etc.
[0029] In some embodiments, data, information, etc., may be obtained with the user's consent.
[0030] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0031] According to some embodiments, intelligent data querying can, for example, adopt a multi-agent collaborative architecture to break down the entire process of requirement analysis, data location, SQL generation, and result output. However, multi-agent strategy adaptation and collaborative optimization have become key bottlenecks restricting its performance improvement. Among them, the multi-agent intelligent data querying technology in some embodiments has obvious shortcomings, especially in the multi-agent evolutionary game adaptation level: most solutions do not introduce evolutionary game mechanisms, the agent strategies are fixed and singular, and cannot be dynamically adjusted according to task complexity and priority; some solutions that introduce game theory do not build a scientific fitness evaluation system, lack a collaborative scoring mechanism, and are difficult to achieve the collaborative evolution of the multi-agent population; and they do not set reasonable strategy mutation rules, which easily leads to problems such as insufficient strategy diversity and slow convergence speed, resulting in low multi-agent collaboration efficiency and poor task adaptability.
[0032] Figure 1 This is a flowchart of the first multi-agent evolutionary game method for intelligent question solving provided in this disclosure embodiment, such as... Figure 1 As shown, it includes the following steps: In step S11, the initial population corresponding to each first agent in the first agent set is obtained, and the policy variant corresponding to each first agent is obtained from the initial population. The first agent set includes a first intention decision agent, a first schema adaptation agent, a first SQL generation agent, and a first result interaction agent. The initial population includes at least one policy variant. In some embodiments, the executing entity of this disclosure may be a device, for example. This device does not specifically refer to a particular fixed device. For example, when the device identifier changes, the device may also change accordingly. For example, when the structure of the device changes, the device may also change accordingly. The executing entity of this disclosure may be, for example, a terminal, an electronic device, etc.
[0033] In some embodiments, an agent may be an entity capable of perceiving the environment, making autonomous decisions, and performing actions to achieve a goal. In embodiments of this disclosure, different agents may perform different actions to achieve different goals. The first agent set may be a collective comprised of at least one agent before the evolutionary game. The first agent set may include a first intent-decision agent, a first schema-adapting agent, a first SQL-generating agent, and a first result-interaction agent. This first agent set does not specifically refer to a fixed set. For example, when the acquisition time of the first agent set changes, the first agent set may also change accordingly. For example, when a certain agent in the first agent set changes, the first agent set may also change accordingly.
[0034] According to some embodiments, the initial population may be, for example, the population prior to the evolutionary game. This population may, for example, be a population including strategy variants. The initial population is not specifically defined as any particular population. For example, the initial population may change accordingly when the number of strategy variants it includes changes. For example, the initial population may also change accordingly when a particular strategy variant it includes changes.
[0035] In some embodiments, policy variants may be, for example, different execution logic, matching rules, scheduling methods, retrieval logic, and generation logic sub-policy versions.
[0036] In some embodiments, an initial population corresponding to each first agent in a first agent set can be obtained, and a policy variant corresponding to each first agent can be obtained from the initial population. The first agent set includes a first intent decision agent, a first schema adaptation agent, a first SQL generation agent, and a first result interaction agent, and the initial population includes at least one policy variant.
[0037] The method for obtaining the strategy variant is not limited. For example, a strategy variant can be randomly selected, a strategy variant can be determined according to a selection instruction, or a strategy variant can be selected according to the strategy selection order. This embodiment of the disclosure does not limit this method.
[0038] In step S12, based on the task set and policy variant, the task is executed according to the cooperative link corresponding to the first intelligent agent set, and the basic score corresponding to the policy variant is obtained. In some embodiments, the task set may be a collection of at least one acquired tasks to be executed. This task set is not specifically a fixed set. For example, the task set may change when the number of tasks included in it changes. Similarly, the task set may change when a particular task within it changes.
[0039] According to some embodiments, the base score may be, for example, the score corresponding to each strategy variant. This base score does not specifically refer to a fixed score. For example, when a strategy variant changes, the base score corresponding to that strategy variant may also change accordingly. For example, when the method of obtaining the base score changes, the base score corresponding to that strategy variant may also change accordingly.
[0040] In some embodiments, tasks can be executed according to the collaborative links corresponding to the first set of intelligent agents, based on the task set and policy variant, to obtain the basic score corresponding to the policy variant.
[0041] In step S13, the adaptive quantification evaluation results corresponding to the strategy variant are obtained based on the base score and the collaborative score. In some embodiments, the collaboration score can be, for example, a score obtained based on the matching degree between a certain policy variant and the policy types of upstream and downstream agents. This collaboration score is not specifically a fixed score. For example, the collaboration score can change when the method of obtaining it changes. Similarly, the collaboration score can change when the specific value of the collaboration score changes. The collaboration score can also be, for example, a score obtained from the interaction between multiple agents.
[0042] In some embodiments, the adaptive quantification evaluation result may be, for example, the result obtained by evaluating the policy variant. This adaptive quantification evaluation result is not specifically a fixed result. For example, the adaptive quantification evaluation result may change when the method of obtaining the result changes. Similarly, the adaptive quantification evaluation result may change when the policy variant changes. The adaptive quantification evaluation result may be used, for example, to determine whether to replicate or eliminate the policy variant.
[0043] In some embodiments, the adaptive quantification evaluation results corresponding to the strategy variant can be obtained based on the base score and the collaborative score.
[0044] In step S14, based on the fitness quantification evaluation results, an iterative evolutionary game is performed on each first agent. If the evolutionary game results meet the requirements, the target population corresponding to each second agent in the second agent set is obtained, and the second agent set is used to perform intelligent questioning related tasks.
[0045] According to some embodiments, the second set of agents may be, for example, the set obtained after evolutionary game play on the first set of agents. This second set of agents does not specifically refer to a fixed set. For example, the second set of agents may change accordingly when the evolutionary game method changes.
[0046] According to some embodiments, the target population may be, for example, a population obtained after evolutionary game theory. This target population does not specifically refer to a fixed population. For example, when the processing method corresponding to the initial population changes, the target population may also change accordingly.
[0047] In some embodiments, based on the quantification evaluation results of the adaptation, each first agent is subjected to iterative evolutionary game. If the evolutionary game result meets the requirements, a set of second agents is obtained, and the target population corresponding to each second agent in the second agent set is used to execute intelligent query-related tasks. Intelligent query-related tasks can be, for example, tasks that directly query a database using natural language.
[0048] In some or related embodiments, an initial population corresponding to each first agent in a first agent set is obtained, and policy variants corresponding to each first agent are obtained from the initial population. The first agent set includes a first intent decision agent, a first schema adaptation agent, a first SQL generation agent, and a first result interaction agent; the initial population includes at least one policy variant. Based on the task set and policy variants, tasks are executed according to the collaborative links corresponding to the first agent set, and a basic score corresponding to the policy variant is obtained. Based on the basic score and collaborative score, an adaptive quantification evaluation result corresponding to the policy variant is obtained. Based on the adaptive quantification evaluation result, iterative evolutionary game is performed on each first agent, and if the evolutionary game result meets the result requirements, a second agent set is obtained, and a target population corresponding to each second agent in the second agent set is obtained. The second agent set is then used to execute intelligent question-and-answer related tasks. Therefore, this approach can solve the problem of insufficient flexibility and inability to cope with diverse scenarios with a single policy agent, enabling dynamic adaptation and collaborative evolution of multi-agent systems, and improving the system's adaptability to intelligent question-and-answer tasks of different priorities and complexities. Among them, population-based settings can achieve the survival of the fittest through differentiated competition and cooperation among strategy variants, combined with evolutionary game logic, so that the system gradually converges to the optimal cooperative state. At the same time, the system can achieve self-optimization by relying on fitness evaluation, taking into account the accuracy, efficiency and user satisfaction of task processing, and reducing the cost of multi-agent cooperation.
[0049] Figure 2 This is a flowchart of the second multi-agent evolutionary game method for intelligent question solving provided in this disclosure embodiment, such as... Figure 2 As shown, it includes the following steps: In step S21, the second intent decision agent is used to identify the input information and obtain structured intent information; In some embodiments, the executing entity of this disclosure may be a device, for example. This device does not specifically refer to a particular fixed device. For example, when the device identifier changes, the device may also change accordingly. For example, when the structure of the device changes, the device may also change accordingly. The executing entity of this disclosure may be, for example, a terminal, an electronic device, etc.
[0050] According to some embodiments, an intelligent agent may be an entity capable of sensing the environment, making autonomous decisions, and performing actions to achieve a goal. In embodiments of this disclosure, different intelligent agents may perform different actions to achieve different goals.
[0051] In some embodiments, the second intent decision-making agent may be, for example, an agent that acquires intent information. This second intent decision-making agent is not specifically defined by any single, fixed agent. For instance, the second intent decision-making agent may change accordingly when the operations it can perform change.
[0052] In some embodiments, the input information may be, for example, information to be answered received by the executing entity, which may be, for example, natural language information. The name of the input information is not limited. The input information may be referred to as information to be answered, question information, etc. The input information does not specifically refer to any fixed information. For example, when the method of obtaining the input information changes, the input information may also change accordingly. For example, when the time point of obtaining the input information changes, the input information may also change accordingly. The input information includes, but is not limited to, voice input, click input, and text input. The input information may, for example, be a multimodal query request.
[0053] In some embodiments, structured intent information may be, for example, decomposing and standardizing the user's ambiguous natural language input into structured field data that the intelligent agent can directly recognize and execute, with a fixed format, clear fields, and no ambiguity. The structured intent information in this disclosure does not specifically refer to any fixed information. For example, when the input information changes, the structured intent information may also change accordingly. For example, when the method of obtaining the structured intent information changes, the structured intent information may also change accordingly. The name of the structured intent information is not limited. For example, the structured intent information may also be called intent information, etc.
[0054] In some embodiments, a second intent decision agent can be used to identify the input information and obtain structured intent information.
[0055] In step S22, the second schema-adapting agent processes the structured intent information to obtain the target schema; According to some embodiments, the second schema adaptation agent uses a data schema / interface schema as a constraint base to automatically understand user natural language, automatically align field structures, adapt to differences in multi-source heterogeneous schemas, and complete intent parsing → field mapping → structure verification → automatic adaptation and invocation. The schema adaptation agent in this disclosure embodiment may, for example, be an agent that performs operations such as filtering, matching, and intelligent judgment.
[0056] In some embodiments, the target schema can be, for example, a schema obtained by processing structured intent information. The schema can be used to specify the appearance of the data, what fields it contains, what its types are, whether it is required or optional, and its value range. The name of the target schema is not limited. For example, it can also be called the schema corresponding to the input information, the first schema, etc. The target schema does not specifically refer to a fixed schema. For example, when the method of obtaining the target schema changes, the target schema can also change accordingly.
[0057] According to some embodiments, a second schema-adapting agent can be used to process structured intent information to obtain the target schema.
[0058] In step S23, based on the target schema and structured intent information, the second SQL generation agent generates the target subtask SQL, performs query processing on the database, and uses the second result interaction agent to obtain and display the response results corresponding to the input information.
[0059] According to some embodiments, the second SQL generation agent may be an agent used to obtain the final executable SQL. This SQL generation agent does not specifically refer to a particular fixed agent. For example, the SQL generation agent may be an agent capable of understanding natural language → automatically understanding table structure (Schema) → generating executable SQL → validating and correcting errors → executing / returning results.
[0060] In some embodiments, the target subtask SQL may be, for example, the SQL corresponding to the input information. This target subtask SQL does not specifically refer to a single, fixed SQL. For example, the target subtask SQL may change accordingly when the SQL-generating agent changes. Similarly, the target subtask SQL may change accordingly when the input information changes.
[0061] In some embodiments, the database may be, for example, a database that includes at least one input and response information. This database is not specifically a fixed database. For example, when an update instruction is received for the database, the database can be updated, and the database may change accordingly. For example, when a specific piece of information included in the database changes, the database may also change accordingly. For example, when the amount of information included in the database changes, the database may also change accordingly.
[0062] According to some embodiments, the second result interaction agent may be, for example, an agent used for interaction. This result interaction agent may perform operations such as result generation, semantic enhancement, agent optimization, and response result updating.
[0063] In some embodiments, the response result may be, for example, the response information obtained corresponding to the input information. Different input information may correspond to different response information, and different response result acquisition methods may correspond to different response results.
[0064] In some embodiments, based on the target schema and structured intent information, an SQL generation agent is used to generate target subtask SQL, and the database is queried. A result interaction agent is used to obtain and display the response results corresponding to the input information.
[0065] According to some embodiments, the multi-agent collaborative work can be achieved by the second intent decision agent receiving multimodal query requests initiated by the user via voice or text and completing semantic parsing and demand structuring processing, outputting a standardized structured intent list; the second schema adaptation agent receiving the list, completing target table retrieval, field mapping, and multi-table association, outputting the target schema; the second SQL generation agent generating and optimizing executable SQL based on the target schema and structured intent, and executing the query by connecting to the database; and the second result interaction and optimization agent, namely the result interaction agent, receiving the raw data after SQL execution, completing result visualization, semantic enhancement, and feedback collection, outputting a friendly response to the user, and using the feedback data for system self-learning.
[0066] In some or related embodiments, a second intent decision-making agent is used to identify the input information and obtain structured intent information; a second schema adaptation agent is used to process the structured intent information and obtain the target schema; based on the target schema and the structured intent information, a second SQL generation agent is used to generate the target sub-task SQL and perform database query processing; and a second result interaction agent is used to obtain and display the response result corresponding to the input information. Therefore, different agents can perform corresponding operations, which can reduce the problems of insufficient intent recognition accuracy and poor multi-agent collaboration adaptability. The core responsibilities and collaboration links of the four agents—intent decision-making, schema adaptation, SQL generation, and result interaction—can be integrated to achieve multi-agent division of labor and collaboration, streamlining the entire process from requirement analysis, data location, query generation, to result output. This improves the accuracy of response result acquisition, enhances the collaboration efficiency and task adaptability of multiple agents, and improves the automation efficiency of cross-departmental table data queries.
[0067] Figure 3This is a flowchart of the third multi-agent evolutionary game method for intelligent question solving provided in this disclosure, as shown in the embodiments. Figure 3 As shown, it includes the following steps: In step S31, the second intent decision agent is used to identify the input information and obtain structured intent information; In some embodiments, the executing entity of this disclosure may be a device, for example. This device does not specifically refer to a particular fixed device. For example, when the device identifier changes, the device may also change accordingly. For example, when the structure of the device changes, the device may also change accordingly. The executing entity of this disclosure may be, for example, a terminal, an electronic device, etc.
[0068] The relevant processes can be as described above, and will not be repeated here.
[0069] According to some embodiments, Figure 4 This is a schematic diagram of the overall architecture of a response system provided in an embodiment of this disclosure, as shown below. Figure 4 As shown, this response system can also be called a multi-agent collaborative system. For example, this system can take the transformation from natural language to structured data queries as its core objective. Through division of labor and collaboration, it breaks down the entire process of demand understanding, data location, query generation, and result output. After receiving multimodal user input, the various agents work together in an orderly manner to complete demand parsing, data matching, SQL optimization, and result feedback, achieving an automated closed loop from user question to accurate response. This provides technical support for efficient querying and in-depth analysis of cross-departmental table data. Specifically, this system may include: Intent-based decision-making agents can serve as a central entry point for system requirements, responsible for requirement parsing and structured processing. They receive user voice or text input, and through a speech recognition interface and the Llama 3D model, perform multimodal semantic parsing and colloquialization removal. Simultaneously, they execute priority determination, complex requirement decomposition, and constraint completion operations. Specifically, the intent-based decision-making agent can perform multimodal request parsing, requirement priority determination, complex requirement decomposition, and constraint completion.
[0070] Schema-adaptive agents can, for example, take the structured requirement information output by the intent decision agent as input, use the BM25 algorithm to quickly filter candidate tables, combine the SBert model for semantic matching to determine the target table, realize the synonym mapping between requirement fields and table fields through schema dynamic matching, complete the multi-table association verification and establishment, and output the target schema containing field mapping and inter-table association rules.
[0071] For example, the SQL generation intelligent agent can serve as the core of query execution. Based on the target schema and structured requirements, it calls the CodeS model to generate corresponding sub-task SQL, ensures the compliance of the query statement through syntax and logic verification, implements adaptive optimization for large data volume scenarios, including index addition, pagination settings and JOIN order adjustment, and completes SQL error repair and secondary verification.
[0072] The result interaction and optimization agent can, for example, generate visual charts and natural language responses from the raw data after SQL execution, based on user preferences, supplement semantic enhancement analysis, collect user feedback and update the system's self-learning resources, and support multi-round contextual follow-up questions, achieving bidirectional empowerment of response optimization and system self-evolution. This system may include the aforementioned first agent set, the aforementioned second agent set, or other agent sets; this disclosure does not limit the specific examples.
[0073] In step S32, based on the structured intent information, the BM25 algorithm in the second schema-adaptive agent is used to filter the table set to obtain a candidate table set. The relevant processes can be as described above, and will not be repeated here.
[0074] In some embodiments, the BM25 algorithm can be, for example, an algorithm that filters based on text similarity. The higher the similarity, the higher the matching score.
[0075] According to some embodiments, a set of tables can be, for example, a collection of at least one table. This set of tables does not specifically refer to a fixed set. For example, the set of tables can change when the number of tables changes. Similarly, the set of tables can change when a particular table in the set changes.
[0076] In some embodiments, the candidate table set may be a collection of at least one table from a table set that is related to the structured intent information. This candidate table set does not specifically refer to a fixed set. For example, the candidate table set may change accordingly when the method of obtaining the candidate table set changes. The method of obtaining the candidate table set may include, for example, obtaining the candidate table set based on a similarity threshold or the number of tables.
[0077] According to some embodiments, the BM25 algorithm in the second schema-adaptive agent can be used to filter the table set based on structured intent information to obtain a candidate table set.
[0078] In step S23, the SBert model is used to perform semantic matching processing on the candidate table set and structured intent information to obtain the target table; The relevant processes can be as described above, and will not be repeated here.
[0079] In some embodiments, the SBert model can be, for example, a trained model ready for matching processing. This SBert model is used to generate fixed-length vectors from text and perform semantic similarity, retrieval, matching, and clustering operations. The SBert model is not specifically defined by any single fixed model. For example, the SBert model can change when its parameters change. Similarly, the SBert model can change when its training method changes.
[0080] According to some embodiments, the target table may be, for example, a table corresponding to the input information. This target table is not specifically defined as a fixed table. For example, the target table may also be a corresponding table when the input information changes.
[0081] In step S34, the second schema adaptation agent is used to map the fields in the structured intent information to the fields in the target table to obtain the target schema, wherein the target schema includes field mapping relationships and inter-table relationships; The relevant processes can be as described above, and will not be repeated here.
[0082] In some embodiments, the field mapping relationship can be, for example, a correspondence between structured intent information and fields in a target table. This field mapping relationship does not specifically refer to a particular fixed relationship.
[0083] In some embodiments, the relationship between tables can be, for example, a relationship between multiple tables.
[0084] In step S35, based on the target schema and structured intent information, an SQL generation agent is used to generate the target subtask SQL, and the database is queried. A result interaction agent is used to obtain and display the response results corresponding to the input information.
[0085] The relevant processes can be as described above, and will not be repeated here.
[0086] According to some embodiments, based on the target schema and structured intent information, a second SQL generation agent generates target subtask SQL, performs query processing on the database, and a second result interaction agent obtains and displays the response result corresponding to the input information, including: Based on the target schema and structured intent information, the CodeS model in the second SQL generation agent is invoked to generate the target subtask SQL; Based on the target subtask SQL, the database is queried and processed, and the second result interaction agent is used to obtain and display the response results corresponding to the input information.
[0087] In some embodiments, the CodeS model may be a trained model that can be used for SQL generation. Therefore, calling the CodeS model can improve the accuracy of the response results.
[0088] According to some embodiments, the method further includes: Based on the scenario information corresponding to the input information, the database is adjusted to obtain the adjusted database. This adjustment process includes at least one of the following: index addition, pagination adjustment, TOIN order adjustment, SQL error repair, and SQL secondary validation. Therefore, the accuracy of database retrieval and the accuracy of the response result determination can be improved.
[0089] In some embodiments, scene information can be used, for example, to indicate the scene currently corresponding to the input information.
[0090] In some embodiments, evolutionary game theory operations can be performed on the intelligent agent. Figure 5 This illustration shows an example diagram of a policy variant of an agent population according to an embodiment of the present disclosure, such as... Figure 5 As shown, each of the four intelligent agents corresponds to an independent population. The initial settings of each population follow evolutionary game adaptation principles, with a uniform initial size and including three types of differentiated strategy variants, each with a balanced initial proportion. The first type is precision-first, prioritizing task processing accuracy while sacrificing some efficiency to ensure output accuracy. The second is efficiency-first, focusing on improving task execution speed by simplifying some verification processes to shorten processing time. The third is flexible adaptation, dynamically adjusting execution strategies based on task priority, complexity, and user needs to balance accuracy and efficiency. Each population's strategy variants are designed around the core responsibilities of the corresponding intelligent agent, laying the foundation for subsequent generational iterations, strategy competition, and collaborative optimization in evolutionary game theory, forming a multi-agent population system adapted to intelligent data query scenarios. Therefore, a population can be constructed for each intelligent agent, with each population containing three types of differentiated strategy variants. The differentiation of these strategy variants constitutes the core of the game. An fitness evaluation system is established, and a collaborative bonus mechanism is introduced to provide additional incentives to intelligent agents with high upstream and downstream strategy matching. Following the dynamic rules of the replicator, the system achieves the survival of the fittest among policy variants through a single-round evolutionary process involving task execution, fitness evaluation, policy replication, and mutation triggering. Through multi-generational collaborative iteration, the system converges to an evolutionarily stable policy (ESS) that adapts to both high-priority complex tasks and low-priority simple tasks, thereby improving the collaborative adaptability of multi-agent systems and overall system performance.
[0091] According to some embodiments, the intention decision-making agent population may include strategy A: precision-first; strategy B: efficiency-first; and strategy C: flexible adaptation. Strategy A: precision-first may include prioritizing the use of the three Llama models in multimodal parsing, verifying constraint integrity after breaking down complex requirements, strictly adhering to system configuration in priority determination, and providing three supplementary options when guiding invalid requirements. Strategy B: efficiency-first may include prioritizing the use of lightweight models and rule completion in multimodal parsing, directly outputting results after breaking down complex requirements, flexibly adjusting priority determination, and providing only one core supplementary option when guiding invalid requirements. Strategy C: flexible adaptation may include autonomously selecting models based on requirement length in multimodal parsing, verifying complex requirements as needed after breaking them down, comprehensively determining priority based on type, and recommending supplementary options based on user history when guiding invalid requirements.
[0092] According to some embodiments, the schema-adapted agent population can include strategy A: precise matching; strategy B: efficient adaptation; and strategy C: fault-tolerant adaptation. Strategy A: precise matching can include prioritizing BM25+SBERT double verification for retrieval, using only strict synonym matching for field mapping, and verifying data relevance for multi-table joins. Strategy B: efficient adaptation can include autonomously selecting a single model for retrieval, using only lenient synonym matching for field mapping, and directly matching field names for multi-table joins. Strategy C: fault-tolerant adaptation can include using BM25+SBERT double verification for retrieval, using only fuzzy matching + manual correction for field mapping, and supporting weak joins (greater than or equal to 50%) for multi-table joins.
[0093] According to some embodiments, the SQL generation agent population can include strategy A: robust optimization; strategy B: rapid generation; and strategy C: dynamic balancing. Strategy A: robust optimization can include prioritizing the use of the CodeS large model for SQL generation, employing full rule verification + model verification for dual validation, enabling indexes + pagination + JOIN reordering by default for adaptive optimization, and providing three supplementary options when invalid requests are encountered. Strategy B: rapid generation includes prioritizing the use of the CodeS lightweight model for SQL generation, employing only core rule verification for dual validation, enabling only paginated queries for adaptive optimization, and providing three supplementary options when invalid requests are encountered. Strategy C: dynamic balancing can select the model for SQL generation based on the complexity of the request, adjust the priority of dual validation based on priority, dynamically enable adaptive optimization based on data volume, and provide three supplementary options when invalid requests are encountered.
[0094] According to some embodiments, the resulting interactive agent population may include strategy A: experience-first; strategy B: efficiency-first; and strategy C: personalized adaptation. Strategy A: experience-first may include prioritizing text and visualization in the result format, adding "year-on-year + month-on-month + industry average" by default for semantic enhancement, collecting user feedback using multi-dimensional scoring, and supporting unlimited follow-up questions in multi-round interactions. Strategy B: efficiency-first may include prioritizing plain text in the result format, adding only core indicators for semantic enhancement, collecting only accuracy scores for user feedback, and supporting only one follow-up question in multi-round interactions. Strategy C: personalized adaptation may include selecting the result format based on user historical preferences, adjusting semantic enhancement according to the type of need, adjusting user feedback collection according to user type, and supporting relevant follow-up questions and context preservation in multi-round interactions.
[0095] In some embodiments, iterative evolutionary games are performed on each agent, and the target population is obtained when the outcome of the evolutionary game meets the requirements. For example, meeting the evolutionary game termination condition may be achieved by satisfying the evolutionary game termination condition. This termination condition is not specifically defined by a single fixed condition.
[0096] According to some embodiments, the adaptive quantification evaluation results corresponding to the policy variant are obtained based on the base score and the collaborative score, including: Based on the dimension weights, obtain the basic score corresponding to each strategy variant, where the dimensions include task accuracy, execution time, number of collaborative reworks, and satisfaction rating. Based on any strategy variant and the strategy type of upstream and downstream agents, obtain the collaborative score; Based on the base score and synergy score corresponding to each strategy variant, obtain the adaptive quantification evaluation results corresponding to the strategy variant; Based on the quantified evaluation results of fitness metrics, strategy adjustment methods are obtained. This can reduce the problems of fixed strategies, poor collaborative adaptability, and inability to dynamically respond to diverse task scenarios in multi-agent intelligent question counting systems. It can provide an evolutionary game theory method for intelligent agent systems, which can improve system stability. Furthermore, evolutionary game theory can be deeply integrated with multi-agent collaborative mechanisms. Each agent corresponds to a population, and the differentiation of strategy variants within the population constitutes the core of the game. By establishing a multi-dimensional fitness evaluation system and introducing a collaborative bonus mechanism, the system follows the dynamic rules of replicators to achieve the survival of the fittest and mutation of strategy variants, enabling the system to converge to an evolutionarily stable strategy adapted to different task scenarios. This effectively solves the problems of poor multi-agent strategy adaptability and low collaborative efficiency in some embodiments, improving the accuracy and adaptability of intelligent question counting.
[0097] Among them, the strategy adjustment method can be determined based on the fitness in the fitness quantification evaluation results. Specifically, it can rely on the replicator dynamic formula, which states that the higher the fitness, the higher the replication probability.
[0098] According to some embodiments, the method further includes: Policy mutation is triggered and the corresponding operation is executed if any of the following conditions are met: The fitness of the strategy variant continues to decrease and the decrease meets the requirement. The proportion of strategy variants in the initial population exceeds a certain threshold. Therefore, a strategy mutation mechanism can be used to ensure the diversity of population strategies. By combining user feedback and task execution data, the system can achieve self-learning optimization, completing strategy iteration and adaptation adjustments without extensive manual intervention. This reduces the operational costs when adding new business scenarios or task types, helps the system quickly adapt to new data requirements, and improves the system's long-term availability and scalability.
[0099] In some embodiments, Figure 6 This diagram illustrates an example of an evolutionary game involving policy variants of an agent population according to an embodiment of this disclosure. Figure 6 As shown, it may include: 1. Preparations for evolutionary game theory: Complete population initialization, mixed task set input, and cooperative rule definition to provide basic conditions for subsequent evolutionary game theory, and clarify the initial state of the population, task input standards, and agent cooperation specifications.
[0100] 2. Single-round evolutionary game execution, as the basic unit of the game, sequentially completes four sub-steps: strategy extraction and task execution, fitness evaluation, strategy replication and elimination, and mutation triggering, thereby realizing the competition and initial optimization of strategies within a single generation.
[0101] 3. Multi-generational iteration and co-evolution: Repeatedly execute single-round evolutionary game steps, relying on positive and negative feedback of policy matching degree to promote the co-evolution of the four intelligent agent populations, and finally converge to an evolutionary stable policy that adapts to different task scenarios.
[0102] 4. When the evolutionary game terminates, determine whether the preset termination condition is met. If it is met, terminate the game and lock the evolutionary stable strategy to ensure that the system performance reaches the preset target and remains stable.
[0103] Specifically, it can include: S1: Preparatory work for evolutionary game theory: (1) Population initialization: The four intelligent agents of intent decision-making, schema adaptation, SQL generation, and result interaction and optimization are each assigned to an independent population. The initial size of each population is set to 3, corresponding to three types of strategy variants: robust and accurate, efficient and fast, and dynamically adaptable. Each type of strategy variant initially accounts for one-third of the total population to ensure a balanced diversity of strategies in the initial population. At the same time, an fitness evaluation system is defined, with task accuracy, execution efficiency, collaboration cost, and user satisfaction as the core dimensions.
[0104] (2) Mixed task set input: The system inputs a batch of mixed task sets, covering intelligent questioning needs of different priorities and complexities, specifically including: high-priority complex tasks, low-priority simple tasks, and mixed personalized tasks, simulating diverse task scenarios in actual applications.
[0105] (3) Definition of Collaboration Rules: It is clearly defined that agents collaborate according to a fixed link, and the collaboration order is: intent decision agent, schema adaptation agent, SQL generation and optimization agent, and result interaction and self-learning agent, to ensure that the task execution process is standardized and orderly. The fitness score adopts a mechanism of individual score plus collaboration bonus. The basic score of an individual agent is determined by its own task execution performance. If the strategy matching degree of upstream and downstream agents is high, additional collaboration points are added to strengthen the collaborative adaptation ability among the population.
[0106] S2: Single-round evolutionary game execution: The single-round evolutionary game is the basic unit of the entire evolutionary process. It executes the following four sub-steps in sequence to achieve competition, evaluation, optimization, and diversity assurance of strategies within a single generation: (1) Policy extraction and task execution: The system randomly selects one policy variant from each agent population to form a temporary collaborative team. Each collaborative team undertakes a set of pre-set mixed tasks and executes the tasks sequentially according to the pre-set agent collaborative link: ① The intent decision-making agent receives multimodal query requests from users, completes semantic parsing, priority determination, complex requirement decomposition and constraint completion, and outputs a structured list of requirement intents with high priority labels and complete constraints.
[0107] ②The schema-adapting agent receives a list of structured requirements and intents, completes candidate table filtering, semantic matching, field synonym mapping, and multi-table association verification, and outputs the target schema with field mapping and multi-table association rules.
[0108] ③ The SQL generation and optimization agent receives the target schema and structured requirement intent, generates executable SQL, performs syntax and logic verification, adaptive optimization and error correction, outputs the optimized executable SQL statement and connects to the database for execution.
[0109] ④ The result interaction and self-learning agent receives the raw data after SQL execution, completes result visualization, semantic enhancement, and user feedback collection, outputs user-friendly response results, and retains feedback data for system self-learning.
[0110] (2) Fitness assessment: The fitness of various strategy variants is quantitatively assessed by adding a co-operation bonus to the base score. ①Basic score calculation: Based on the dimension weights of the preset fitness evaluation system, the basic fitness score of each strategy variant is calculated. The specific calculation dimensions include: task accuracy, execution time, number of collaborative reworks, and user satisfaction score.
[0111] ② Collaborative bonus calculation: If a certain strategy variant has a high degree of matching with the strategy type of upstream and downstream agents, and there is no rework and the execution is smooth during the collaboration process, collaborative bonus is triggered.
[0112] (3) Strategy Replication and Elimination: Following the dynamic rule that higher fitness leads to higher replication probability, the strategy proportion of the next generation population is adjusted according to the dynamic formula of the replicator. The dynamic formula of the replicator is defined as shown in formula (1): (1) in: Let be the proportion of the i-th strategy variant in the t-th generation population. Let be the fitness score of the i-th strategy variant in the t-th generation population. is the average fitness score of all strategy variants in the t-th generation population.
[0113] The specific adjustment rules are as follows: dominant strategies are propagated, with the highest-scoring dominant strategy being retained; intermediate strategies are maintained, with moderately-scoring intermediate strategies being retained; and inferior strategies are eliminated, with the lowest-scoring inferior strategy being eliminated, ensuring that strategies with high fitness continue to propagate and strategies with low fitness are gradually eliminated. The specific strategy adjustment method can be determined based on the range of scores. Therefore, through evolutionary game theory and the dynamic rules of replicators, the co-evolution and dynamic optimization of strategies among the four intelligent agent populations are achieved. This allows for adaptive convergence to the optimal strategy combination based on the characteristics of the task scenario, effectively overcoming the limitations of insufficient flexibility of single-strategy intelligent agents. It flexibly adapts to diverse intelligent problem requirements of different priorities and complexities, avoiding inefficient collaboration or imbalance caused by fixed strategies.
[0114] (4) Mutation Trigger: Real-time monitoring of population strategy status. When any of the following preset conditions are met, strategy mutation is triggered to inject new strategy variants into the population, ensuring the diversity of population strategies and avoiding the decline in system adaptability due to strategy homogenization: ① The long-term fitness of a certain strategy has been declining and the decline is significant, making it unsuitable for the current task scenario. It needs to be optimized through mutation. ② A certain strategy has an excessively high proportion in the population, resulting in insufficient strategy diversity and difficulty in coping with diverse task requirements.
[0115] S3: Multi-generational iteration and co-evolution: Evolutionary game theory is not an independent optimization of a single population, but rather a collaborative evolution of four intelligent agent populations: intent decision-making, schema adaptation, SQL generation, and result interaction and optimization. Its core manifestation is co-evolution driven by policy matching degree, and the specific process is as follows: (1) Positive feedback of strategy matching degree: When the strategy types of different populations match, the overall fitness score of the system is significantly improved. The synergistic bonus is superimposed, and the fitness of various strategy variants is improved. This optimal strategy combination will continue to spread in multiple generations of iteration and gradually become the mainstream strategy of the population.
[0116] (2) Negative feedback of strategy matching degree: When the strategy types of different populations do not match, the rework rate of cooperation will increase and the fitness scores of upstream and downstream agents will decrease. Such poorly matched strategy combinations will be gradually eliminated in multiple generations of iteration, reducing the impact on the overall performance of the system.
[0117] (3) Evolutionary Stable Strategy (ESS) Convergence: After 10-20 iterations of the S2 single-round evolutionary game, the system converges to an evolutionary stable strategy—that is, the current strategy combination has the highest fitness score and cannot be invaded by new strategy variants, thus stably adapting to the corresponding task scenario. Therefore, relying on the intra-population strategy competition and intergenerational iteration mechanism, we can continuously screen for high-precision, high-efficiency, and low-collaboration-cost advantageous strategies, promote the performance improvement of the entire chain of intent parsing, data location, SQL generation, and result output, significantly reduce the collaboration rework rate, and at the same time ensure the reliability and stability of task processing, thereby improving the end-to-end processing quality of the intelligent data query system.
[0118] S4: Evolutionary game terminates: The system's evolutionary status is monitored in real time. When all of the following preset conditions are met, the evolutionary game terminates, the system locks in the current evolutionarily stable strategy, and subsequent intelligent questioning-related tasks are executed according to this strategy combination to ensure stable system performance: The overall fitness of the system remained stable over several generations, with fluctuations within a pre-set reasonable range. The strategy proportions of each agent population tend to stabilize, with no significant fluctuations; The accuracy, efficiency, and user satisfaction of the task execution all met the preset target requirements.
[0119] If none of the above conditions are met, continue repeating steps S2-S3 until the termination condition is met.
[0120] In one or related embodiments, based on the structured intent information, the BM25 algorithm in the schema-adapting agent is used to filter the set of tables to obtain a set of candidate tables; the SBert model is used to perform semantic matching processing on the candidate table set and the structured intent information to obtain the target table; the schema-adapting agent is used to map the fields in the structured intent information to the fields in the target table to obtain the target schema, wherein the target schema includes field mapping relationships and inter-table relationships. Therefore, the accuracy of obtaining the target schema can be improved, and the accuracy of obtaining the response result can be improved.
[0121] A block diagram of a multi-agent evolutionary game-playing device for intelligent question solving is shown according to an exemplary embodiment. (Refer to...) Figure 7 The device 700 includes: Population acquisition unit 701 is used to acquire the initial population corresponding to each first agent in the first agent set, and to acquire the policy variant corresponding to each first agent from the initial population. The first agent set includes a first intention decision agent, a first schema adaptation agent, a first SQL generation agent and a first result interaction agent, and the initial population includes at least one policy variant. The scoring unit 702 is used to execute tasks according to the cooperative link corresponding to the first set of intelligent agents based on the task set and the policy variant, and to obtain the basic score corresponding to the policy variant. The result acquisition unit 703 is used to obtain the adaptive measurement evaluation results corresponding to the strategy variant based on the base score and the collaborative score. The evolutionary game unit 704 is used to perform iterative evolutionary game on each first agent based on the fitness metric evaluation results, and when the evolutionary game results meet the result requirements, to obtain the target population corresponding to each second agent in the second agent set and to use the second agent set to perform intelligent questioning related tasks.
[0122] According to some embodiments, the second set of intelligent agents includes a second intent decision-making intelligent agent, a second schema adaptation intelligent agent, a second SQL generation intelligent agent, and a second result interaction intelligent agent. The evolutionary game unit 704, when using the second set of intelligent agents to perform intelligent question-and-answer related tasks, is specifically used for: A second intent decision-making agent is used to identify the input information and obtain structured intent information; The second schema-adaptive agent processes the structured intent information to obtain the target schema; Based on the target schema and structured intent information, the second SQL generation agent generates the target subtask SQL and performs query processing on the database. The second result interaction agent obtains and displays the response results corresponding to the input information.
[0123] According to some embodiments, the evolutionary game unit 704 is used to process structured intent information using a second schema-adapting agent, and when obtaining the target schema, it is specifically used for: Based on the structured intent information, the BM25 algorithm in the second schema-adapting agent is used to filter the table set and obtain a candidate table set. The SBert model is used to perform semantic matching processing on the candidate table set and structured intent information to obtain the target table; The second schema adaptation agent is used to map the fields in the structured intent information to the fields in the target table to obtain the target schema, which includes the field mapping relationship and the inter-table relationship.
[0124] According to some embodiments, the evolutionary game unit 704 is used to generate target subtask SQL using a second SQL generation agent based on the target schema and structured intent information, and to perform query processing on the database. When using a second result interaction agent to obtain and display the response result corresponding to the input information, it is specifically used for: Based on the target schema and structured intent information, the CodeS model in the second SQL generation agent is invoked to generate the target subtask SQL; Based on the target subtask SQL, the database is queried and processed, and the second result interaction agent is used to obtain and display the response results corresponding to the input information.
[0125] According to some embodiments, the evolutionary game unit 704 is also specifically used for: Based on the scenario information corresponding to the input information, the database is adjusted and processed to obtain the adjusted database. The adjustment process includes at least one of the following: index addition processing, pagination adjustment processing, TOIN order adjustment processing, SQL error repair processing, and SQL secondary verification processing.
[0126] According to some embodiments, when the evolutionary game unit 704 obtains the fitness metric evaluation result corresponding to the strategy variant based on the base score and the collaborative score, it is specifically used for: Based on the dimension weights, obtain the basic score corresponding to each strategy variant, where the dimensions include task accuracy, execution time, number of collaborative reworks, and satisfaction rating. Based on any strategy variant and the strategy type of upstream and downstream agents, obtain the collaborative score; Based on the base score and synergy score corresponding to each strategy variant, obtain the adaptive quantification evaluation results corresponding to the strategy variant; Based on the results of the adaptive quantitative assessment and the strategy adjustment method, the proportion of each strategy variant in the next generation population is adjusted.
[0127] According to some embodiments, the evolutionary game unit 704 is also specifically used for: Policy mutation is triggered and the corresponding operation is executed if any of the following conditions are met: The fitness of the strategy variant continues to decrease and the decrease meets the requirement. The proportion of strategy variants in the initial population is greater than the proportion threshold.
[0128] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0129] Figure 8 A schematic block diagram of an example device 800 that can be used to implement embodiments of the present disclosure is shown. Device 800 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0130] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0131] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0132] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the multi-agent evolutionary game method for intelligent questions. For example, in some embodiments, the multi-agent evolutionary game method for intelligent questions can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the multi-agent evolutionary game method for intelligent questions described above can be performed. Alternatively, in other embodiments, computing unit 801 may be configured, by any other suitable means (e.g., by means of firmware), to perform a multi-agent evolutionary game method oriented towards intelligent questions.
[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0134] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0135] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0137] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0138] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0139] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0140] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A multi-agent evolutionary game theory method for intelligent problem-solving, characterized in that, include: Obtain an initial population corresponding to each first agent in a first agent set, and obtain policy variants corresponding to each first agent from the initial population. The first agent set includes a first intent decision agent, a first schema adaptation agent, a first SQL generation agent, and a first result interaction agent. The initial population includes at least one policy variant. Based on the task set and the policy variant, the task is executed according to the cooperative link corresponding to the first intelligent agent set, and the basic score corresponding to the policy variant is obtained. Based on the base score and the collaborative score, obtain the adaptive quantification evaluation result corresponding to the strategy variant; Based on the adaptive quantification evaluation results, iterative evolutionary game is performed on each of the first agents. If the evolutionary game results meet the result requirements, a set of second agents and the target population corresponding to each second agent in the set of second agents are obtained. The set of second agents is then used to perform intelligent questioning related tasks.
2. The method according to claim 1, characterized in that, in, The second set of intelligent agents includes a second intent decision-making intelligent agent, a second schema adaptation intelligent agent, a second SQL generation intelligent agent, and a second result interaction intelligent agent. The step of using the second set of intelligent agents to perform intelligent query-related tasks includes: The second intent decision-making agent is used to identify the input information and obtain structured intent information; The structured intent information is processed using the second schema-adapting agent to obtain the target schema; Based on the target schema and the structured intent information, the second SQL generation agent generates the target subtask SQL and performs query processing on the database. The second result interaction agent obtains and displays the response result corresponding to the input information.
3. The method according to claim 1, characterized in that, The step of processing the structured intent information using the second schema-adapting agent to obtain the target schema includes: Based on the structured intent information, the BM25 algorithm in the second schema-adaptive agent is used to filter the table set to obtain a candidate table set; The SBert model is used to perform semantic matching processing on the candidate table set and the structured intent information to obtain the target table; The second schema-adapting agent is used to map the fields in the structured intent information to the fields in the target table to obtain the target schema, wherein the target schema includes field mapping relationships and inter-table relationships.
4. The method according to claim 2 or 3, characterized in that, The step of generating target subtask SQL using the second SQL generation agent based on the target schema and the structured intent information, querying the database, and obtaining and displaying the response result corresponding to the input information using the second result interaction agent includes: Based on the target schema and the structured intent information, the CodeS model in the second SQL generation agent is invoked to generate the target subtask SQL; Based on the target subtask SQL, the database is queried, and the response result corresponding to the input information is obtained and displayed using the second result interaction agent.
5. The method according to claim 4, characterized in that, The method further includes: Based on the scenario information corresponding to the input information, the database is adjusted to obtain the adjusted database. The adjustment process includes at least one of the following: index addition processing, pagination adjustment processing, TOIN order adjustment processing, SQL error repair processing, and SQL secondary verification processing.
6. The method according to claim 1, characterized in that, The step of obtaining the adaptive quantification evaluation result corresponding to the strategy variant based on the base score and the collaborative score includes: Based on the dimension weights, obtain the basic score corresponding to each strategy variant, where the dimensions include task accuracy, execution time, number of collaborative reworks, and satisfaction rating. Based on any strategy variant and the strategy type of upstream and downstream agents, obtain the collaborative score; Based on the base score and collaborative score corresponding to each strategy variant, obtain the adaptive quantification evaluation result corresponding to the strategy variant; Based on the quantitative assessment results of the aforementioned adaptation and the strategy adjustment method, the proportion of each strategy variant in the next generation population is adjusted.
7. The method according to claim 1 or 6, characterized in that, The method further includes: A policy mutation is triggered and the operation corresponding to the policy mutation is executed if any of the following conditions are met: The fitness of the strategy variant continuously decreases and the decrease meets the requirement. The proportion of the strategy variant in the initial population is greater than the proportion threshold.
8. A multi-agent evolutionary game-playing device for intelligent question solving, characterized in that, include: A population acquisition unit is used to acquire an initial population corresponding to each first agent in a first agent set, and to acquire a policy variant corresponding to each first agent from the initial population. The first agent set includes a first intent decision agent, a first schema adaptation agent, a first SQL generation agent, and a first result interaction agent. The initial population includes at least one policy variant. The scoring unit is used to execute tasks according to the collaborative link corresponding to the first set of intelligent agents based on the task set and the policy variant, and obtain the basic score corresponding to the policy variant. The result acquisition unit is used to obtain the adaptive quantification evaluation result corresponding to the strategy variant based on the base score and the collaborative score. The evolutionary game unit is used to perform iterative evolutionary game on each of the first agents according to the fitness metric evaluation results, and when the evolutionary game results meet the result requirements, obtain the second agent set and the target population corresponding to each second agent in the second agent set, and use the second agent set to perform intelligent questioning related tasks.