Policy content generation method and device, equipment, storage medium and program product

By splitting and distributing policy generation requirements to multiple role agents for collaboration and correction, the problem of lack of multi-angle considerations in policy content generation is solved, and a higher quality and effective policy content generation is achieved.

CN119599125APending Publication Date: 2025-03-11CHINA MOBILE INFORMATION SYST INTEGRATION CO LTD +3
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411577435.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The policy content generation method based on the large language model lacks consideration of a wider policy scope, resulting in insufficient effectiveness of the generated policy content.

Method used

Through task processing agents, split the policy generation requirements into target problems and send these target problems to the corresponding role agents. Role agents perform tasks based on their responsibilities and logical reasoning abilities, generating policy solutions. The initial policy content is finally generated through corrections and feedback from multiple role agents.

Benefits of technology

Through multi-agent collaboration and feedback mechanisms, the policy solutions and correction results provided by multiple parties are integrated, and the policy generation needs are analyzed and recommended from a more comprehensive dimension to improve the quality and effectiveness of policy content generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599125A_ABST
    Figure CN119599125A_ABST
Patent Text Reader

Abstract

The invention discloses a policy content generation method and device, equipment, a storage medium and a program product, and belongs to the technical field of artificial intelligence. The method is applied to a task processing agent, and comprises the following steps: in response to an input policy generation demand, splitting the policy generation demand into at least one target problem; the method comprises the following steps: sending at least one target problem to a corresponding role agent, and obtaining a policy solution determined by each role agent; determining initial policy content according to the policy solution determined by each role agent, sending the initial policy content to each role agent, and performing content correction on the initial policy content through each role agent to obtain a policy correction result; and according to the policy correction result of each role agent, generating target policy content corresponding to the policy generation demand. In this way, the problem of policy failure caused by limitation to a certain aspect can be avoided, and the quality and effectiveness of policy content generation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to a policy content generation method, device, equipment, storage medium and program product. Background Art

[0002] Large Language Model (LLM) is a model based on deep learning technology, especially in the field of Natural Language Processing (NLP). The model learns the structure, grammar, semantics and context of a language by analyzing a large amount of text data, so that it can understand and generate natural language.

[0003] Although large language models can generate seemingly reasonable texts, they have limited logical reasoning capabilities and are prone to misunderstanding or misinterpreting information in the text. Especially when generating policy content, the model can only be based on the knowledge and capabilities acquired during its training process, which limits its consideration of a wider range of policies, thereby affecting the effectiveness of the policy content. Summary of the invention

[0004] The embodiments of the present application provide a policy content generation method, apparatus, device, storage medium and program product to at least solve the problem that the related policy content generation method based on a large language model lacks consideration of a wider policy scope and the effectiveness of the generated policy content is insufficient.

[0005] In order to solve the above technical problems, this application is implemented as follows: In the first aspect, an embodiment of the present application provides a policy content generation method, which is applied to a task processing agent, comprising: in response to an input policy generation requirement, splitting the policy generation requirement into at least one target problem, determining a role agent corresponding to each of the target problems, wherein the role agent is an agent that performs tasks according to the responsibilities and logical reasoning capabilities of the set role; obtaining a policy solution determined by each of the role agents by sending the at least one target problem to the corresponding role agent; determining an initial policy content based on the policy solution determined by each of the role agents, and sending the initial policy content to each of the role agents, and having each of the role agents perform content correction on the initial policy content to obtain a policy correction result; generating a target policy content corresponding to the policy generation requirement based on the policy correction result of each of the role agents.

[0006] In the second aspect, an embodiment of the present application provides a policy content generation method, which is applied to a role agent, including: obtaining a target problem sent by a task processing agent, wherein the target problem is the policy generation requirement generated by the task processing agent in response to an input, and the policy generation requirement is split; querying role-related knowledge that meets the description of the set role, and adjusting historical decisions based on the role-related knowledge, pre-stored historical discussion results and historical data; generating a policy solution corresponding to the target problem based on the adjusted historical decisions, and storing the policy solution in a memory module; wherein the task processing agent is used to obtain the policy solution from the memory module and determine the initial policy content based on the policy solution.

[0007] In the third aspect, an embodiment of the present application provides a policy content generation device, including: a demand analysis module, which is used to respond to an input policy generation demand, split the policy generation demand into at least one target problem, and determine the role agent corresponding to each of the target problems, wherein the role agent is an agent that performs tasks according to the responsibilities and logical reasoning ability of the set role; a solution acquisition module, which is used to obtain the policy solution determined by each of the role agents by sending the at least one target problem to the corresponding role agent; a content correction module, which is used to determine the initial policy content according to the policy solution determined by each of the role agents, and send the initial policy content to each of the role agents, and perform content correction on the initial policy content by each of the role agents to obtain a policy correction result; a content generation module, which is used to generate the target policy content corresponding to the policy generation demand according to the policy correction result of each of the role agents.

[0008] In a fourth aspect, an embodiment of the present application provides a policy content generation device, comprising: a problem acquisition module, used to acquire a target problem sent by a task processing agent, wherein the target problem is obtained by splitting the policy generation requirement in response to an input policy generation requirement of the task processing agent; a decision adjustment module, used to query role-related knowledge that meets the description of a set role, and adjust historical decisions according to the role-related knowledge, pre-stored historical discussion results and historical data; a solution generation module, used to generate a policy solution corresponding to the target problem according to the adjusted historical decisions, and store the policy solution in a memory module; wherein the task processing agent is used to acquire the policy solution from the memory module and determine the initial policy content according to the policy solution.

[0009] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect or the second aspect above are implemented.

[0010] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the second aspect above are implemented.

[0011] In the seventh aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the steps of the method described in the first or second aspect above.

[0012] In an embodiment of the present application, in response to an input policy generation requirement, the task processing agent splits the policy generation requirement into at least one target problem, and determines the role agent corresponding to each target problem; obtains the policy solution determined by each role agent by sending at least one target problem to the corresponding role agent; determines the initial policy content according to the policy solution determined by each role agent, and sends the initial policy content to each role agent, and modifies the initial policy content through each role agent to obtain the policy modification result; generates the target policy content corresponding to the policy generation requirement according to the policy modification result of each role agent. In this way, when the policy generation requirement is obtained, the task processing agent integrates the policy solutions and policy modification results provided by multiple parties through the collaboration and feedback mechanism between the role agents, and can analyze and recommend the policy generation requirement from a more comprehensive dimension, avoid the problem of policy failure caused by being limited to one aspect, and improve the quality and effectiveness of policy content generation.

[0013] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0015] Figure 1 A schematic diagram of a process flow of a policy content generation method provided by an embodiment of the present application is shown; Figure 2Another schematic diagram of the process of generating policy content provided by an embodiment of the present application is shown; Figure 3 A schematic diagram of the structure of a role agent provided in an embodiment of the present application is shown; Figure 4 Another flow chart of the policy content generation method provided by the embodiment of the present application is shown; Figure 5 A schematic diagram of the structure of a role agent provided in an embodiment of the present application is shown; Figure 6 A schematic diagram of a multi-agent architecture provided by an embodiment of the present application is shown; Figure 7 A schematic diagram of a workflow between multiple role agents provided in an embodiment of the present application is shown; Figure 8 A schematic diagram of data sharing between multiple role agents provided in an embodiment of the present application is shown; Fig. 9 A schematic diagram showing a process flow of a policy content verification method provided by an embodiment of the present application is shown; Fig.10 One of the structural schematic diagrams of the policy content generating device provided in the embodiment of the present application is shown; Fig.11 The second structural diagram of the policy content generating device provided in the embodiment of the present application is shown; Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0016] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0017] The policy content generation method based on large language models aims to use natural language processing (NLP), machine learning (ML) and other related technologies to assist policymakers to better understand problems, collect information, analyze data, predict impacts and generate policy content. Based on large language models, text mining and data analysis can be performed, for example, assessing the public's emotional response to existing policies, automatically identifying and classifying major topics or concerns in texts, and comparing similarities and differences between different policy documents; machine learning-assisted policy simulation, for example, assessing long-term impacts by simulating different decision paths, using historical data to predict future trends, providing a basis for policies, and assessing the impact of policy changes on specific results; dialogue systems and chatbots, for example, answering questions about policies, collecting public opinions and feedback to be incorporated into the policy-making process, etc.; natural language generation, for example, automatically generating report summaries based on analysis results, and automatically generating new policy drafts based on existing policy frameworks and goals.

[0018] Although large language models can generate some policies for a certain problem, they have at least the following shortcomings when applied to policy generation: 1) Limited logical reasoning ability; While large language models are able to generate plausible-looking text, they do not actually possess true language understanding, which can lead to misunderstandings or misinterpretations of information in the text.

[0019] 2) Data bias; If the training data is biased, the large language model will also inherit this bias, which will affect the quality of policy recommendations.

[0020] 3) The policy and regulations are generated with a single dimension of consideration; When using large language models to generate policies, the policy scope it considers is limited to the capabilities of the model itself, and lacks the assessment of policy impact from multiple perspectives; 4) The generated policy provisions lack implementation evaluation; The policies and regulations generated by the model are often open-loop results. They do not evaluate the policies from multiple dimensions, simulate the actual situation, make appropriate policy adjustments after the evaluation, and then re-evaluate the policy.

[0021] In response to the above-mentioned problems existing in the process of policy content generation based on a large language model, an embodiment of the present application provides a policy content generation method. When obtaining policy generation requirements, the task processing agent integrates the policy solutions and policy correction results provided by multiple parties through the collaboration and feedback mechanism between various role agents, so as to analyze and recommend policy generation requirements from a more comprehensive dimension, thereby avoiding the problem of policy failure caused by being limited to one aspect.

[0022] Figure 1 A flow chart of a policy content generation method provided by an embodiment of the present application is shown. The execution subject of the method is a task processing agent. As shown in the figure, the policy content generation method 100 may include the following steps: Step 101: In response to an input policy generation requirement, split the policy generation requirement into at least one target problem, and determine a role agent corresponding to each target problem.

[0023] The role agent is an agent that performs tasks according to the responsibilities and logical reasoning ability of the set role.

[0024] In specific implementation, the generation of policy content usually involves interaction and collaboration between multiple departments. A Large Language Model MiltiAgent (LLM-MA) can be constructed based on the hierarchical relationship between departments. The LLM-MA collaborates multiple LLMs in the form of agents to simulate the cooperation between departments and generate more comprehensive and diverse policy content through communication and collaboration. Among them, the LLM-MA can include a task processing agent and at least one role agent. The task processing agent has the ability to decompose policy generation requirements, clarify the role of each role agent, and understand the impact of the policy on each role agent. When obtaining the policy generation requirements input by the user, it can analyze the policy generation requirements, split the policy generation requirements into at least one target problem, and determine the role agent corresponding to each target problem.

[0025] Step 102: Obtain the policy solution determined by each role agent by sending the at least one target problem to the corresponding role agent.

[0026] In the specific implementation, the task processing agent sends at least one split target problem to the corresponding role agent. Each role agent performs the task according to the responsibilities and logical reasoning ability of the set role, responds to the target problem sent by the task processing agent, and gives the corresponding policy solution. Here, the set role can be a department involved in the policy content generation process, for example, Department A, Department B, Department C, and different departments have different responsibilities and logical reasoning abilities. Then, the task processing agent obtains the policy solution determined by each role agent.

[0027] Optionally, if the target role agent in at least one role agent determines that the target problem sent by the task processing agent is not a problem that it can handle, it can return the target problem to the task processing agent, and the task processing agent reallocates the target problem. If the reallocated role agent is still the target role agent, it carries a detailed reason for the allocation when sending the target problem. In practical applications, the number of repeated allocation round trips does not exceed a set number, for example, 5 times.

[0028] Step 103: Determine the initial policy content according to the policy solution determined by each of the role agents, and send the initial policy content to each of the role agents. Each of the role agents modifies the initial policy content to obtain a policy modification result.

[0029] In the specific implementation, the task processing agent can integrate the policy solutions determined by each role agent to obtain the initial policy content; evaluate the initial policy content, specifically, the initial policy content can be sent to each role agent, and the initial policy content can be modified by each role agent to obtain the policy modification result.

[0030] Step 104: Generate target policy content corresponding to the policy generation requirement based on the policy revision results of each of the role agents.

[0031] In the specific implementation, the task processing agent generates the target policy content corresponding to the policy generation requirements based on the policy modification results of each role agent.

[0032] Among them, the process of evaluating the initial policy content in step 103 can be a multi-cycle process, and the generation of each policy content is revised and evaluated multiple times through the large language model multi-agent LLM-MA. Among them, the revision not only includes the evaluation of the policy content after the role agent denies it during the evaluation process, but also includes the re-iterative evaluation process after the task processing agent actively optimizes and modifies the policy content. After a limited number of iterations, the policy correction result is obtained. Here, the iteration termination condition can be that the number of iterations reaches a set iteration threshold, for example, the iteration threshold is set to 10 times, or the policy correction results after two adjacent iterations are compared. If the similarity is higher than the preset similarity threshold, the iteration is terminated.

[0033] In an exemplary embodiment, if Figure 2 As shown in , the above-mentioned policy content generation method may include the following steps: Step 201: The user inputs policy generation requirements; Step 202: performing demand analysis on the policy generation demand, and splitting the policy generation demand into at least one target problem; Step 203: Send at least one target question to a corresponding role agent; Step 204: Each role agent feeds back a policy solution; Step 205: According to the policy generation requirements, the policy solutions fed back by each role agent are integrated to generate initial policy content; Step 206: Each role agent verifies the impact of the initial policy content. If the verification is successful, the process proceeds to step 207; if the verification is not successful, the policy revision result is given and the process proceeds to step 204; Step 207: Generate target policy content corresponding to the policy generation requirement.

[0034] In this way, through the collaboration and feedback mechanism among various role agents and the integration of policy solutions and policy correction results provided by multiple parties, it is possible to analyze and suggest policy generation needs from a more comprehensive dimension, avoid the problem of policy failure caused by being limited to one aspect, and improve the quality and effectiveness of policy content generation.

[0035] In a possible implementation, in the above step 102, the policy solution determined by each of the role agents is obtained by sending the at least one target problem to the corresponding role agent, including: Sending the at least one target problem to a corresponding role agent; wherein each of the role agents is used to query role-related knowledge that meets the description of the set role, and adjust historical decisions based on the role-related knowledge, pre-stored historical discussion results and historical data; generating a policy solution corresponding to the target problem based on the adjusted historical decisions, and storing the policy solution in a memory module; obtaining the policy solution determined by each of the role agents from the memory modules of each of the role agents.

[0036] In the embodiment of the present application, the task processing agent sends at least one target problem to the corresponding role agent, and obtains the policy solution determined by each role agent from the memory module of each role agent. Figure 3 As shown in , the role agent includes an input module 310, a core component 320, a planning module 330, a memory module 340, and a tool use module 350. The input module 310 of the role agent can be a target question sent by the task processing agent to express user needs, or it can be the output of other role agents; the core component 320 is the agent core of the coordinator; the planning module 330 helps the agent to plan for future actions; and the memory module 340 is used to manage the historical behavior and experience of the agent.

[0037] Specifically, the core component 320 is mainly the large language model LLM. Since LLM has semantic understanding and logical analysis capabilities, this part can be regarded as the core of the large model agent. This part is responsible for parsing the input target problem, converting the target problem into a task that can be executed by the large model, and gradually carrying out the work according to the task. The planning module 330, the memory module 340, and the tool use module 350 are all modules that provide support for the large model to execute tasks.

[0038] The planning module 330 is used to plan the path for LLM to execute tasks in advance, specifying that LLM makes logical inferences and decisions based on existing knowledge after receiving the target problem, sets action steps according to the target, and can adjust strategies to cope with changing situations.

[0039] The memory module 340 is used to store some knowledge needed by LLM, as well as long-term and short-term memory storage; short-term memory includes information used to store the current dialogue turn or the recent interaction history, and long-term memory is used to store factual knowledge or information learned from past experience.

[0040] The tool usage module 350 includes but is not limited to calling code functions and calling application programming interfaces (APIs). This module provides the character agent with a way to execute code and call more computer tools, giving the character agent the ability to execute almost all existing computer and Internet tools.

[0041] Based on the above-mentioned role agent structure, when the target problem is obtained, the role agent queries the memory module 340 for role-related knowledge that meets the description of the set role, and adjusts historical decisions based on the role-related knowledge, pre-stored historical discussion results and historical data; the planning module 330 generates a policy solution corresponding to the target problem based on the adjusted historical decisions, and stores the policy solution in the memory module 340; furthermore, the task processing agent can obtain the policy solutions determined by each role agent from the memory module 340.

[0042] Figure 4 Another flow chart of the policy content generation method provided by the embodiment of the present application is shown. The execution subject of the method is a role agent. As shown in the figure, the policy content generation method 400 may include the following steps: Step 401: Obtain the target problem sent by the task processing agent, where the target problem is generated by the task processing agent in response to an input policy generation requirement, and is obtained by splitting the policy generation requirement.

[0043] In a specific implementation, the task processing agent responds to the input policy generation requirements, splits the policy generation requirements into at least one target problem, and sends the target problem to the corresponding role agent. The role agent obtains the target problem sent by the task processing agent, performs the task according to the set role's responsibilities and logical reasoning ability, and responds to the target problem.

[0044] Step 402: Query role-related knowledge that matches the description of the set role, and adjust historical decisions based on the role-related knowledge, pre-stored historical discussion results and historical data.

[0045] Among them, the description of the set role can be the description of the functions of the government department as a constraint for constructing a single intelligent agent.

[0046] In an exemplary embodiment, the role agent finds its own position according to the description of the set role, and searches the memory module 340 for role-related knowledge that matches the set role according to the description of the set role; further, the LLM of the role agent adjusts the historical decision according to the role-related knowledge, combined with the pre-stored historical discussion results and historical data. Figure 5As shown in the figure, LLM responds to the decision of the previous stage according to the discussion results of the previous stage, and then summarizes the content of the discussion process of the previous stage and makes corresponding plans for these contents; according to the planning content and the reaction content, LLM uses its own role and refers to the materials it needs to refer to, calls the code tool to search for materials, analyzes the data, and gives its own response and conclusion to obtain the adjusted historical decision.

[0047] The historical data of a single role agent can be stored in shared storage, and the conclusions it makes can be placed in group memory for other role agents to call.

[0048] Step 403: Generate a policy solution corresponding to the target problem according to the adjusted historical decision, and store the policy solution in a memory module.

[0049] The task processing agent is used to obtain a policy solution from the memory module and determine the initial policy content according to the policy solution.

[0050] In a specific implementation, the role agent can generate a policy solution corresponding to the target problem based on the adjusted historical decisions, and store the policy solution in the memory module 340, so that the task processing agent can obtain the policy solution from the memory module 340 of the role agent and determine the initial policy content based on the policy solution.

[0051] In this way, a single role agent maintains role-related knowledge that conforms to the set role and gives policy solutions to the target problem based on the role-related knowledge, which is conducive to analyzing the policy content in various dimensions, avoiding the problem of policy failure caused by being limited to one aspect, and improving the quality and effectiveness of policy content generation.

[0052] In a possible implementation, in the above step 402, generating a policy solution corresponding to the target problem according to the adjusted historical decision includes: Based on the adjusted historical decisions, an action path for the target problem is determined; based on the action path for the target problem, the application program interface of the search engine is called to perform data retrieval and analysis to generate a policy solution corresponding to the target problem.

[0053] In an embodiment of the present application, an action path for the target problem can be determined based on the adjusted historical decisions, for example, clarifying the target problem, analyzing the current situation, setting goals, exploring solutions, etc., and then calling the corresponding search engine's application programming interface API from the tool usage module 350 according to the action path to perform data retrieval and analysis to generate a policy solution corresponding to the target problem.

[0054] In a possible implementation, in the above step 403, generating a policy solution corresponding to the target problem according to the adjusted historical decision includes: Generate candidate policy solutions corresponding to the target problem based on the adjusted historical decisions; obtain associated policy solutions from the memory modules of other role agents other than the role agent in the at least one role agent; and generate a policy solution corresponding to the target problem by cooperating and debating the candidate policy solutions and the associated policy solutions.

[0055] In the embodiments of this application, the single agent driven by LLM has demonstrated relatively good cognitive ability in many application scenarios, and the research on single agents mainly focuses on the construction of internal mechanisms and the interaction with the external environment. On the other hand, the large language model multi-agent LLM-MA emphasizes the process of diversified agent configuration, interaction between agents and collective decision-making.

[0056] In a multi-agent system, each single agent is equipped with unique strategies and behaviors and can communicate with each other. It is an agent architecture with collective intelligence. The architecture diagram is as follows: Figure 6 As shown in . Multiple agents can respond and change to the external environment, or they can just conduct internal debates without being affected by the external environment.

[0057] In the LLM-MA system, in order to achieve specific goals, a single agent needs to define its own characteristics, actions to be taken, and its own skills. A single agent takes on different roles, and each role has a comprehensive description, including characteristics, capabilities, behaviors, and limitations. In the process of policy content generation, role agents may be designated as departments such as the Department of Education and the Department of Science and Technology to simulate the departments that need to participate in the discussion during the policy content generation process. Usually, agent configurations can be divided into predefined, model-generated, and data-driven agents.

[0058] The communication between agents in the LLM-MA system is the key foundation for supporting collective intelligence. The current LLM-MA communication paradigm mainly includes three types: cooperation, debate and competition. In the process of policy content generation, the embodiment of the present application adopts the paradigm of cooperation and debate. The communication structure of the agent includes a hierarchical structure, a centralized structure, a decentralized structure, and an information sharing pool structure, but according to the goal of policy content generation, the communication structure is established by modeling various government departments based on information in social sciences.

[0059] The acquisition of agent capabilities is an important process of LLM-MA, which enables agents to learn and evolve dynamically. The data feedback for agent capability acquisition comes from three main sources: feedback from the external environment, feedback from agents to each other, and direct feedback from humans. There are three main strategies for agents to adjust themselves to complex problems: retrieval of valuable memories, self-evolution, and dynamic generation. Due to the particularity of policy content generation, we can refer to sociology to define a single agent, and we can also refer to sociology to build a communication network among multiple agents.

[0060] The so-called sociological multi-agent collaborative network refers to a multi-agent communication and interaction network based on the social relationship graph network of government departments in sociology. In the interactive network here, there are two layers of construction, one is the flow of communication data, and the other is the construction of data storage sharing. Considering that there are not only superior-subordinate and peer-to-peer collaborative working relationships between departments, but also data sharing relationships between some departments, the communication network interaction network is divided into a workflow diagram and a data flow diagram. Figure 7 -As shown in Figure 8, each department may include multiple role agents, and the role agents generate candidate policy solutions corresponding to the target problem based on the adjusted historical decisions; obtain associated policy solutions from the memory modules of other role agents other than the role agent in at least one role agent; and generate policy solutions corresponding to the target problem by cooperating and debating the candidate policy solutions and the associated policy solutions. In this way, mutual collaboration between multiple role agents can be achieved.

[0061] In a possible implementation, after the above step 403, in which a policy solution corresponding to the target problem is generated according to the adjusted historical decision, the following is further included: Acquire the initial policy content sent by the task processing agent; query the knowledge base content related to the initial policy content, evaluate the content similarity and influence of the initial policy content according to the knowledge base content and the set role corresponding to the role agent, and obtain the evaluation result; modify the content of the initial policy content according to the evaluation result, and determine the policy modification result; store the policy modification result in the memory module, and the task processing agent is used to obtain the policy modification result from the memory module, and generate the target policy content corresponding to the policy generation requirement based on the policy modification result.

[0062] In the embodiment of the present application, after the task processing agent generates the initial policy content, it will send the initial policy content to each role agent for policy content verification. After receiving the initial policy content sent by the task processing agent, each role agent will deduce the implementation of the initial policy content based on existing knowledge and data, mainly including the deduction content of policy content and data: In terms of policy content, a single agent will call the content of its own knowledge base to review the policy content, evaluate the similarity between the initial policy content and the existing policy content, use the principle of Retrieval Augmented Generation (RAG) to query the existing policies and clauses, and compare the duplication, content, and logic of the generated policy clauses with those of the existing policies. In terms of data, the single agent generalizes the policy content, and uses the RAG principle to expand the deduction of the impact of the initial policy content, and quantifies it as much as possible. Finally, it predicts future data based on historical structured data, and adds the derived quantitative factors to finally predict the data. Among them, the data deduction is time series data deduction, which is an existing data simulation prediction model automatically selected by the large language model. The simulation prediction model can be a classic mathematical model or a black box neural network model.

[0063] Through the above-mentioned deduction of policy content and data, the evaluation result is obtained; then, the initial policy content is modified according to the evaluation result to determine the policy modification result; the policy modification result is stored in the memory module so that the task processing agent can obtain the policy modification result from the memory module, and generate the target policy content corresponding to the policy generation requirement based on the policy modification result.

[0064] In an exemplary embodiment, if Fig. 9 As shown in , the above policy content verification method may include the following steps: Step 901: The role agent obtains the initial policy content A sent by the task processing agent; Step 902: The role agent analyzes the content similarity and influence of the initial policy content A based on existing knowledge and data, and predicts the trend of future data to obtain an evaluation result; Step 903: making a decision based on the evaluation result; Step 904: Determine whether to agree with the initial policy content A; Step 905: If the role agent agrees with the initial policy content A, whether it agrees, the policy revision result, and the predicted future data result are stored in the memory module; Step 906: If the role agent disagrees with the initial policy content A, it generates corresponding prompt words, puts forward opinions on the initial policy content A, and modifies the initial policy content A based on the opinions, generates a policy modification result B, and returns to step 902.

[0065] In this way, a single role agent can improve the effectiveness and adaptability of the policy revision results by analyzing, evaluating and revising the initial policy content multiple times, making it more in line with current needs and environment, which is conducive to improving the quality and effectiveness of policy content generation.

[0066] Fig.10 FIG. 1 shows one of the structural diagrams of the policy content generating device provided in an embodiment of the present application. The policy content generating device can be implemented as follows: Figure 1 In the embodiment shown, all or part of the content, the policy content generating device 1000 includes: The demand analysis module 1010 is used to respond to the input policy generation demand, split the policy generation demand into at least one target problem, and determine the role agent corresponding to each target problem, wherein the role agent is an agent that performs tasks according to the responsibilities and logical reasoning ability of the set role; A solution acquisition module 1020 is used to acquire a policy solution determined by each of the role agents by sending the at least one target problem to a corresponding role agent; The content correction module 1030 is used to determine the initial policy content according to the policy solution determined by each of the role agents, and send the initial policy content to each of the role agents, and perform content correction on the initial policy content by each of the role agents to obtain a policy correction result; The content generation module 1040 is used to generate the target policy content corresponding to the policy generation requirement according to the policy modification results of each of the role agents.

[0067] In a possible implementation, the solution acquisition module 1020, when used to acquire the policy solution determined by each role agent by sending the at least one target problem to the corresponding role agent, is specifically used to: Sending the at least one target problem to a corresponding role agent; wherein each role agent is used to query role-related knowledge that meets the description of the set role, and adjust historical decisions based on the role-related knowledge, pre-stored historical discussion results and historical data; generating a policy solution corresponding to the target problem based on the adjusted historical decisions, and storing the policy solution in a memory module; Obtain the policy solutions determined by each of the role agents from the memory modules of each of the role agents.

[0068] The embodiment of the present application provides a policy content generation device, including a demand analysis module, a solution acquisition module, a content correction module and a content generation module; the demand analysis module responds to the input policy generation demand, splits the policy generation demand into at least one target problem, determines the role agent corresponding to each target problem, and the role agent is an agent that performs tasks according to the responsibilities and logical reasoning ability of the set role; the solution acquisition module sends the at least one target problem to the corresponding role agent to obtain the policy solution determined by each role agent; the content correction module determines the initial policy content according to the policy solution determined by each role agent, and sends the initial policy content to each role agent, and the initial policy content is corrected by each role agent to obtain the policy correction result; the content generation module generates the target policy content corresponding to the policy generation demand according to the policy correction result of each role agent. In this way, when the policy generation demand is obtained, the task processing agent integrates the policy solutions and policy correction results provided by multiple parties through the collaboration and feedback mechanism between the role agents, and can analyze and suggest the policy generation demand from a more comprehensive dimension, avoid the problem of policy failure caused by being limited to one aspect, and improve the quality and effectiveness of policy content generation.

[0069] Fig.11 The second structural diagram of the policy content generation device provided in the embodiment of the present application is shown. The policy content generation device can be implemented as follows: Figure 4 In the embodiment shown, all or part of the content, the policy content generating device 1100 includes: The problem acquisition module 1110 is used to acquire the target problem sent by the task processing agent, wherein the target problem is generated by the task processing agent in response to the input policy generation requirement, and is obtained by splitting the policy generation requirement; A decision adjustment module 1120 is used to query role-related knowledge that matches the description of the set role, and adjust the historical decision according to the role-related knowledge, pre-stored historical discussion results and historical data; The solution generation module 1130 is used to generate a policy solution corresponding to the target problem based on the adjusted historical decisions, and store the policy solution in the memory module; wherein the task processing agent is used to obtain the policy solution from the memory module and determine the initial policy content based on the policy solution.

[0070] In a possible implementation, the decision adjustment module 1120, when used to generate a policy solution corresponding to the target problem according to the adjusted historical decision, is specifically used to: Generating candidate policy solutions corresponding to the target problem based on the adjusted historical decisions; Acquire the associated policy solution from the memory modules of other role agents other than the role agent in the at least one role agent; A policy solution corresponding to the target problem is generated by cooperating and debating the candidate policy solutions and the associated policy solutions.

[0071] In a possible implementation, the policy content generating device 1100 further includes: A policy revision module, used to obtain the initial policy content sent by the task processing agent; Querying the knowledge base content related to the initial policy content, and evaluating the content similarity and influence of the initial policy content according to the knowledge base content and the set role corresponding to the role agent, to obtain an evaluation result; Modify the content of the initial policy according to the evaluation results and determine the policy modification results; The policy revision result is stored in the memory module, and the task processing agent is used to obtain the policy revision result from the memory module, and generate the target policy content corresponding to the policy generation requirement based on the policy revision result.

[0072] The embodiment of the present application provides a policy content generation device, including a problem acquisition module, a decision adjustment module and a solution generation module; the problem acquisition module acquires the target problem sent by the task processing agent; the decision adjustment module queries the role-related knowledge that meets the description of the set role, and adjusts the historical decision according to the role-related knowledge, pre-stored historical discussion results and historical data; the solution generation module generates a policy solution corresponding to the target problem according to the adjusted historical decisions, and stores the policy solution in the memory module. In this way, a single role agent maintains the role-related knowledge that meets the set role, and gives a policy solution to the target problem according to the role-related knowledge, which is conducive to analyzing the policy content in various dimensions, avoiding the problem of policy failure caused by being limited to a certain aspect, and improving the quality and effectiveness of policy content generation.

[0073] Fig.12The hardware structure diagram of the electronic device provided by the embodiment of the present application is shown. Referring to the figure, at the hardware level, the electronic device 1200 includes a processor 1210, and optionally, includes an internal bus 1220, a network interface 1230, and a memory 1240. Among them, the memory 1240 may include a memory 1241, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory 1242 (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0074] The processor 1210, the network interface 1230 and the memory may be interconnected via an internal bus 1220, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0075] The memory 1240 stores programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions. The memory 1240 may include a memory 1241 and a non-volatile memory 1242 , and provide instructions and data to the processor 1210 .

[0076] The processor 1210 reads the corresponding computer program from the non-volatile memory 1242 into the memory and then runs it, forming a device for locating the target user at the logical level. The processor 1210 executes the program stored in the memory and specifically performs: Figure 1 or Figure 4 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0077] The above application Figure 1 or Figure 4The method disclosed in the illustrated embodiment can be applied to the processor 1210 or implemented by the processor 1210. The processor 1210 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1210. The above processor 1210 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0078] The computer device can also execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.

[0079] Of course, in addition to software implementation methods, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0080] The embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes Figure 1 or Figure 4 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0081] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0082] Furthermore, an embodiment of the present application also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the following process is implemented: Figure 1 or Figure 4 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0083] The embodiments of the present application can be applied to various electronic device collaboration or interconnection scenarios, including: collaboration and interconnection between mobile phones and laptops / tablet computers; collaboration and interconnection between mobile terminals and smart TVs / displays; collaboration and interconnection between mobile phones or tablet computers and in-car entertainment systems; collaboration and interconnection between mobile terminals and smart conference systems, etc., so as to meet the needs of users in various scenarios such as smart homes, smart offices, and smart travel.

[0084] In short, the above is only a preferred embodiment of the present application and does not limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0085] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0086] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0087] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0088] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A policy content generation method, applied to a task processing agent, characterized in that: include: In response to the input policy generation requirement, the policy generation requirement is split into at least one target problem, and a role agent corresponding to each target problem is determined, wherein the role agent is an agent that performs tasks according to the responsibilities and logical reasoning ability of the set role; Obtaining a policy solution determined by each of the role agents by sending the at least one target problem to a corresponding role agent; Determine the initial policy content according to the policy solution determined by each of the role agents, and send the initial policy content to each of the role agents, and use each of the role agents to modify the initial policy content to obtain a policy modification result; According to the policy revision results of each of the role agents, the target policy content corresponding to the policy generation requirements is generated.

2. The method according to claim 1, characterized in that The step of sending the at least one target problem to a corresponding role agent to obtain a policy solution determined by each role agent includes: Sending the at least one target problem to a corresponding role agent; wherein each role agent is used to query role-related knowledge that meets the description of the set role, and adjust historical decisions based on the role-related knowledge, pre-stored historical discussion results and historical data; generating a policy solution corresponding to the target problem based on the adjusted historical decisions, and storing the policy solution in a memory module; Obtain the policy solutions determined by each of the role agents from the memory modules of each of the role agents.

3. A policy content generation method, applied to a role agent, characterized in that: include: Obtaining a target problem sent by a task processing agent, wherein the target problem is a policy generation requirement that the task processing agent responds to an input, and the policy generation requirement is decomposed; Querying role-related knowledge that matches the description of the set role, and adjusting historical decisions based on the role-related knowledge, pre-stored historical discussion results and historical data; A policy solution corresponding to the target problem is generated according to the adjusted historical decisions, and the policy solution is stored in a memory module; wherein the task processing agent is used to obtain the policy solution from the memory module and determine the initial policy content according to the policy solution.

4. The method according to claim 3, characterized in that Generating a policy solution corresponding to the target problem according to the adjusted historical decision includes: Generating a candidate policy solution corresponding to the target problem based on the adjusted historical decisions; Acquire the associated policy solution from the memory modules of other role agents other than the role agent in the at least one role agent; A policy solution corresponding to the target problem is generated by collaborating and debating the candidate policy solutions and the associated policy solutions.

5. The method according to claim 3, characterized in that: After generating a policy solution corresponding to the target problem according to the adjusted historical decision, the method further includes: Obtaining the initial policy content sent by the task processing agent; Querying the knowledge base content related to the initial policy content, and evaluating the content similarity and influence of the initial policy content according to the knowledge base content and the set role corresponding to the role agent, to obtain an evaluation result; Modify the content of the initial policy according to the evaluation results and determine the policy modification results; The policy revision result is stored in the memory module, and the task processing agent is used to obtain the policy revision result from the memory module, and generate the target policy content corresponding to the policy generation requirement based on the policy revision result.

6. A policy content generating device, characterized in that: include: A demand analysis module is used to respond to the input policy generation demand, split the policy generation demand into at least one target problem, and determine the role agent corresponding to each target problem, wherein the role agent is an agent that performs tasks according to the responsibilities and logical reasoning ability of the set role; A solution acquisition module, configured to acquire a policy solution determined by each of the role agents by sending the at least one target problem to a corresponding role agent; A content correction module is used to determine the initial policy content according to the policy solution determined by each of the role agents, and send the initial policy content to each of the role agents, and perform content correction on the initial policy content through each of the role agents to obtain a policy correction result; The content generation module is used to generate the target policy content corresponding to the policy generation requirements according to the policy modification results of each of the role agents.

7. A policy content generating device, characterized in that: include: A problem acquisition module is used to acquire a target problem sent by a task processing agent, wherein the target problem is generated by the task processing agent in response to an input policy generation requirement, and is obtained by splitting the policy generation requirement; A decision adjustment module, used to query role-related knowledge that meets the description of the set role, and adjust historical decisions based on the role-related knowledge, pre-stored historical discussion results and historical data; A solution generation module is used to generate a policy solution corresponding to the target problem based on the adjusted historical decisions, and store the policy solution in the memory module; wherein the task processing agent is used to obtain the policy solution from the memory module and determine the initial policy content based on the policy solution.

8. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer is caused to perform the steps of the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Network service processing method, electronic equipment and device

    CN120676044A