Information processing method and device, electronic equipment and storage medium

By receiving questions, disassembling tasks, and adjusting processing tasks in the automatic question-and-answer system, the low-profile answer accuracy and effectiveness of existing systems are solved, and more accurate and efficient user answer generation is achieved, improving user experience.

CN120216627APending Publication Date: 2025-06-27CHINA TELECOM CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510141327.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

When answering user questions, the existing automatic question-and-answer system has low accuracy and effectiveness, and cannot provide an efficient, accurate and personalized service experience.

Method used

By receiving target problems, disassembly of tasks, generating a thinking stack, performing each processing task according to the task relationship between processing tasks in the thinking stack, obtaining processing results, and adjusting the processing task according to the results until an accurate answer is generated.

Benefits of technology

It improves the accuracy and effectiveness of answering questions, makes the generated answers more accurate and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216627A_ABST
    Figure CN120216627A_ABST
Patent Text Reader

Abstract

The invention discloses an information processing method and device, electronic equipment and a storage medium, and the information processing method comprises the steps: carrying out the task disassembly of a target problem, and generating a thinking stack; executing each processing task in the thinking stack according to a task relationship between the processing tasks in the thinking stack to obtain a processing result corresponding to each processing task; based on the processing result, generating and outputting an answer to the target question; wherein for the processing task of each target type in the thinking stack, if the processing result corresponding to the current processing task does not conform to the expected target of the current processing task, the current processing task is adjusted, the adjusted current processing task is executed, and a new processing result corresponding to the adjusted current processing task is obtained. By applying the technical scheme provided by the invention, the accuracy of the processing result corresponding to each processing task is improved, so that the answer generated based on the processing result corresponding to each processing task is more accurate, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer application technologies, and particularly to an information processing method, apparatus, electronic device, and storage medium. Background Art

[0002] With the continuous advancement of digital transformation, government services are gradually developing towards intelligence and convenience. Currently, multiple government service platforms have integrated government Q&A systems to provide automated information services and consultations. However, the public's expectations for government services are increasing day by day. They not only require the Q&A system to answer their questions about government affairs but also hope to obtain a more efficient, accurate, and personalized service experience.

[0003] However, currently, the automatic Q&A system can only provide simple answers to user questions, with relatively low accuracy and effectiveness of the answers. Summary of the Invention

[0004] The purpose of this application is to provide an information processing method, apparatus, electronic device, and storage medium to improve the accuracy and effectiveness of answering questions.

[0005] To solve the above technical problems, this application provides the following technical solutions:

[0006] In a first aspect, an information processing method is provided, including:

[0007] Receiving a target question;

[0008] Decomposing the target question into tasks to generate a thought stack, where the thought stack includes at least one processing task;

[0009] Executing each processing task in the thought stack according to the task relationship between the processing tasks in the thought stack to obtain a processing result corresponding to each processing task;

[0010] Generating and outputting an answer to the target question based on the processing result corresponding to each processing task;

[0011] Among them, for each processing task of each target type in the thought stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected target of the current processing task, then adjust the current processing task and execute the adjusted current processing task to obtain a new processing result corresponding to the adjusted current processing task.

[0012] Optionally, the task relationship includes a dependency relationship and / or a parallel relationship. The step of executing each processing task in the thought stack according to the task relationship between the processing tasks in the thought stack to obtain a processing result corresponding to each processing task includes at least one of the following:

[0013] For the first processing task and the second processing task with a dependency relationship in the thinking stack, execute the first processing task to obtain the processing result corresponding to the first processing task, and based on the processing result corresponding to the first processing task, execute the second processing task;

[0014] For the third processing task and the fourth processing task with a parallel relationship in the thinking stack, execute the third processing task and the fourth processing task simultaneously or sequentially to obtain the processing results corresponding to the third processing task and the fourth processing task.

[0015] Optionally, the processing task includes a first type of task, and the first type of task is executed through the following steps:

[0016] Convert the requirement description information corresponding to the first type of task into a requirement vector;

[0017] Search for multiple text vectors related to the requirement vector in the vector database;

[0018] Generate the processing result corresponding to the first type of task based on the multiple text vectors.

[0019] Optionally, the vector database stores a question-and-answer pair data table, a reference document data table, and a to-do item data table. The text vectors include question-and-answer pair vectors and to-do item vectors, or the text vectors include question-and-answer pair vectors, reference document vectors, and to-do item vectors;

[0020] The searching for multiple text vectors related to the requirement vector in the vector database includes:

[0021] Search for question-and-answer pair vectors related to the requirement vector in the question-and-answer pair data table;

[0022] If the number of found question-and-answer pair vectors is less than or equal to a preset quantity threshold, search for reference document vectors related to the requirement vector in the reference document data table;

[0023] Search for to-do item vectors related to the requirement vector in the to-do item data table;

[0024] Among them, the searching for question-and-answer pair vectors related to the requirement vector in the question-and-answer pair data table and the searching for to-do item vectors related to the requirement vector in the to-do item data table are performed in parallel or sequentially.

[0025] Optionally, the processing task includes a second type of task, and the second type of task is executed through the following steps:

[0026] According to the requirement description information and application tool information corresponding to the second type of task, call the application programming interface of the external service to obtain the processing result corresponding to the second type of task.

[0027] Optionally, based on the processing result corresponding to each processing task, generate and output the answer to the target question, including:

[0028] Merge the processing results corresponding to the processing tasks with a parallel relationship through prompt engineering to obtain the answer to the target question;

[0029] Output the answer to the target question.

[0030] Optionally, the task decomposition of the target question to generate a thought stack includes:

[0031] Use the task decomposition self-planning model to decompose the target question and generate a thought stack;

[0032] After obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, adjust the current processing task, including:

[0033] After obtaining the processing result corresponding to the current processing task, use the reflection model to determine whether the processing result corresponding to the current processing task meets the expected goal of the current processing task. If not, adjust the current processing task;

[0034] Among them, the task decomposition self-planning model and the reflection model are models obtained by fine-tuning the large model.

[0035] In a second aspect, an information processing device is provided, including:

[0036] A receiving module, configured to receive a target question;

[0037] A generating module, configured to perform task decomposition on the target question to generate a thought stack, where the thought stack includes at least one processing task;

[0038] An execution module, configured to execute each processing task in the thought stack according to the task relationship between the processing tasks in the thought stack to obtain the processing result corresponding to each processing task;

[0039] An output module, configured to generate and output the answer to the target question based on the processing result corresponding to each processing task;

[0040] Among them, for each processing task of the target type in the thinking stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, then adjust the current processing task and execute the adjusted current processing task to obtain a new processing result corresponding to the adjusted current processing task.

[0041] In a third aspect, an electronic device is provided, including:

[0042] A memory for storing a computer program;

[0043] A processor for implementing the steps of the information processing method as described in the first aspect when executing the computer program.

[0044] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the information processing method as described in the first aspect are implemented.

[0045] In a fifth aspect, a computer program product is provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium, and are adapted to be read and executed by a processor so that a computer device having the processor executes the steps of the information processing method as described in the first aspect.

[0046] Applying the technical solution provided by the embodiments of the present application, for each processing task of the target type in the thinking stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, then adjust the current processing task and execute the adjusted current processing task to obtain a new processing result corresponding to the adjusted current processing task. In this way, when executing other processing tasks that depend on the current processing task, it can be carried out based on the new processing result corresponding to the current processing task, which helps to improve the accuracy of the processing result corresponding to each processing task, makes the answer generated based on the processing result corresponding to each processing task more accurate, and helps to improve the user experience.

[0047] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. Description of the Drawings

[0048] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0049] Figure 1 It is the implementation flowchart of an information processing method in the embodiments of the present application;

[0050] Figure 2 It is a schematic diagram of the main process of information processing in the embodiments of the present application;

[0051] Figure 3 It is a schematic diagram of the RAG structure based on government affairs Q&A guidance in the embodiments of the present application;

[0052] Figure 4 It is a schematic diagram of the execution process of the AI Agent in the embodiments of the present application;

[0053] Figure 5 It is a schematic diagram of the working process of the thinking stack in the embodiments of the present application;

[0054] Figure 6 It is a schematic diagram of the structure of an information processing device in the embodiments of the present application;

[0055] Figure 7 It is a schematic diagram of the structure of an electronic device in the embodiments of the present application. Detailed implementation manners

[0056] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0057] The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, so that the embodiments of this application can be implemented in an order other than those illustrated or described here. The objects distinguished by "first" and "second" are usually of the same category, and do not limit the number of objects. For example, the first object can be one or more. In addition, "or" in this application means at least one of the connected objects. For example, the protection scope of "A or B" covers at least three scenarios, namely, Scenario 1: including A and not including B; Scenario 2: including B and not including A; Scenario 3: including both A and B. In addition, the terms "A and / or B", "at least one of A and B", and "at least one of A or B" also cover at least the above three scenarios respectively. The character " / " generally indicates that the objects before and after are in an "or" relationship.

[0058] The core of this application is to provide an information processing method, device, electronic device, and storage medium, which can be applied to various scenarios of an integrated question-and-answer system, such as government service scenarios, customer service scenarios, education consultation scenarios, medical consultation scenarios, financial service scenarios, etc.

[0059] See Figure 1 As shown, it is a flowchart of the implementation of an information processing method provided by an embodiment of this application. The method may include the following steps:

[0060] S110: Receive a target question.

[0061] In the embodiments of this application, the user can ask questions according to actual needs. The target question can be any question asked by the user. After receiving the target question, the operations of the subsequent steps can be continued.

[0062] S120: Decompose the target question into tasks to generate a thought stack.

[0063] The thought stack includes at least one processing task.

[0064] After receiving the target question, the target question can be decomposed into tasks to determine the processing tasks required to answer the target question, and a thought stack is generated. The thought stack can include at least one processing task. Each processing task corresponds to an expected goal, and these expected goals together constitute an overall solution to solve the target question.

[0065] In the case where the thought stack includes multiple processing tasks, there are corresponding task relationships between different processing tasks in the thought stack, such as a dependency relationship or a parallel relationship.

[0066] Each processing task in the thinking stack corresponds to requirement description information, application tool information, and knowledge base information. Application tools may include search software, navigation software, etc. For each processing task, the requirement description information corresponding to the current processing task is used to clarify the specific problem to be solved by the current processing task, the application tool information corresponding to the current processing task is used to specify the specific tool or application programming interface to be called when executing the current processing task, and the knowledge base information corresponding to the current processing task is used to specify the knowledge base or data source to be referred to when executing the current processing task.

[0067] S130: Execute each processing task in the thinking stack according to the task relationship between the processing tasks in the thinking stack, and obtain the processing result corresponding to each processing task.

[0068] Among them, for each processing task of each target type in the thinking stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, then adjust the current processing task, and execute the adjusted current processing task to obtain the new processing result corresponding to the adjusted current processing task.

[0069] The thinking stack includes at least one processing task, and there is a certain task relationship between the processing tasks in the thinking stack, such as a dependency relationship, a parallel relationship, etc. The processing tasks with a dependency relationship are arranged in sequence and executed in turn. The processing tasks with a parallel relationship do not have a dependency relationship and can be executed simultaneously or in turn.

[0070] According to the task relationship between the processing tasks in the thinking stack, each processing task in the thinking stack can be executed to obtain the processing result corresponding to each processing task. For example, the thinking stack includes processing task A, processing task B, and processing task C. Among them, processing task B depends on processing task A, processing task A and processing task B are arranged in sequence, processing task C has no dependency relationship with processing task A and processing task B, and processing task C is arranged in parallel with processing task A and processing task C. According to the task relationship between the processing tasks in the thinking stack, processing task A can be executed first, and then processing task B. Processing task C can be executed while processing task A or processing task B is being executed, or processing task C can be executed before or after processing task A or processing task B.

[0071] Optionally, for each processing task in the thinking stack, the current processing task can be executed based on the requirement description information, application tool information, and knowledge base information corresponding to the current processing task to obtain the processing result corresponding to the current processing task.

[0072] For each processing task of each target type in the thinking stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, then adjust the current processing task and execute the adjusted current processing task to obtain the new processing result corresponding to the adjusted current processing task

[0073] It can be understood as a reflection process. Each processing task in the thinking stack corresponds to a corresponding expected goal

[0074] For each processing task of each target type included in the thinking stack, after executing the current processing task and obtaining the processing result corresponding to the current processing task, the processing result corresponding to the current processing task can be compared with the expected goal of the current processing task. If the processing result corresponding to the current processing task meets the expected goal of the current processing task, then the processing result corresponding to the current processing task can be considered valid. If the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, then the processing result corresponding to the current processing task can be considered invalid, and the current processing task in the thinking stack can be adjusted, such as adding the associated processing task of the current processing task, or modifying the current processing task. Adding the associated processing task of the current processing task can be understood as inserting the associated processing task of the current processing task in the thinking stack

[0075] After adjusting the current processing task in the thinking stack, the adjusted current processing task can be executed to obtain the new processing result corresponding to the adjusted current processing task. If the adjustment of the current processing task includes adding the associated processing task of the current processing task, then executing the adjusted current processing task can be understood as executing the current processing task and the associated processing task of the current processing task according to the task relationship between the current processing task and the associated processing task of the current processing task, and the new processing result corresponding to the adjusted current processing task includes the processing results corresponding to the current processing task and the associated processing task of the current processing task

[0076] After obtaining the new processing result corresponding to the adjusted current processing task, the new processing result can be compared with the expected goal of the adjusted current processing task. If the new processing result does not meet the expected goal of the adjusted current processing task, then continue to adjust the current processing task in the thinking stack, execute the adjusted current processing task, and obtain the new processing result again. The above process can be repeated multiple times until the processing result corresponding to the current processing task meets the expected goal of the current processing task, and the processing result corresponding to the current processing task is used as the valid processing result

[0077] After obtaining the valid processing result corresponding to the current processing task, other processing tasks that depend on the current processing task can be continued to be executed, so that when executing subsequent processing tasks, it can be carried out based on the valid processing result corresponding to the current processing task, which helps to improve the accuracy and efficiency of the execution of subsequent processing tasks.

[0078] The processing tasks of the target type can include processing tasks that have a dependency relationship with other processing tasks, or can be understood as processing tasks that are depended on by other processing tasks.

[0079] Alternatively, the processing tasks of the target type can also include processing tasks that have no dependency relationship with other processing tasks, that is, for each processing task in the thinking stack, a reflection operation is performed to improve the accuracy of the processing result corresponding to the processing task.

[0080] S140: Generate and output the answer to the target question based on the processing result corresponding to each processing task.

[0081] Execute each processing task in the thinking stack. Through the reflection process, a valid processing result corresponding to each processing task can be obtained. Based on the processing result corresponding to each processing task, the answer to the target question can be generated, and then the answer to the target question can be output.

[0082] For example, the thinking stack includes processing task A, processing task B, and processing task C. Processing task A has a dependency relationship with processing task B, and processing task C is in a parallel relationship with processing task A and processing task B. After obtaining the processing results corresponding to processing task A, processing task B, and processing task C, since the execution of processing task B is carried out based on the processing result corresponding to processing task A, the processing results corresponding to processing task B and processing task C can be merged to generate the answer to the target question.

[0083] Applying the method provided by the embodiments of the present application, for each processing task of the target type in the thinking stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, then adjust the current processing task, and execute the adjusted current processing task to obtain the new processing result corresponding to the adjusted current processing task. In this way, when executing other processing tasks that depend on the current processing task, it can be carried out based on the new processing result corresponding to the current processing task, which helps to improve the accuracy of the processing result corresponding to each processing task, makes the answer generated based on the processing result corresponding to each processing task more accurate, and helps to improve the user experience.

[0084] In some embodiments of the present application, the task relationships include dependency relationships and / or parallel relationships. According to the task relationships between the processing tasks in the thought stack, each processing task in the thought stack is executed to obtain the processing result corresponding to each processing task, including at least one of the following:

[0085] For a first processing task and a second processing task in the thought stack having a dependency relationship, execute the first processing task to obtain the processing result corresponding to the first processing task, and based on the processing result corresponding to the first processing task, execute the second processing task;

[0086] For a third processing task and a fourth processing task in the thought stack having a parallel relationship, execute the third processing task and the fourth processing task simultaneously or sequentially to obtain the processing results corresponding to the third processing task and the fourth processing task.

[0087] In the embodiments of the present application, the task relationships between the processing tasks in the thought stack may include dependency relationships and / or parallel relationships.

[0088] For a first processing task and a second processing task in the thought stack having a dependency relationship, it is considered that the execution of the second processing task depends on the processing result corresponding to the first processing task. The first processing task can be executed first to obtain the processing result corresponding to the first processing task, and then based on the processing result corresponding to the first processing task, the second processing task is executed.

[0089] It should be noted that after executing the first processing task to obtain the processing result corresponding to the first processing task, if the processing result corresponding to the first processing task does not meet the expected goal of the first processing task, then adjust the first processing task and execute the adjusted first processing task to obtain the new processing result corresponding to the adjusted first processing task. When the new processing result corresponding to the adjusted first processing task meets the expected goal of the processed first processing task, based on the new processing result corresponding to the adjusted first processing task, execute the second processing task. This can ensure that the processing result corresponding to the first processing task on which the second processing task is based is valid and can improve the accuracy of the processing result corresponding to the second processing task. Of course, after obtaining the processing result corresponding to the second processing task, it is also possible to determine whether the second processing task needs to be adjusted through a reflection process to obtain an effective processing result corresponding to the second processing task.

[0090] The first processing task and the second processing task are any two processing tasks in the thought stack having a dependency relationship.

[0091] For the third processing task and the fourth processing task with a parallel relationship in the thinking stack, the third processing task and the fourth processing task can be executed simultaneously, or the third processing task and the fourth processing task can be executed sequentially. For example, the third processing task can be executed first and then the fourth processing task, or the fourth processing task can be executed first and then the third processing task, so as to obtain the processing results corresponding to the third processing task and the fourth processing task.

[0092] It should be noted that after executing the third processing task and obtaining the processing result corresponding to the third processing task, it can be determined whether the third processing task needs to be adjusted through a reflection process to obtain an effective processing result corresponding to the third processing task. Similarly, after executing the fourth processing task and obtaining the processing result corresponding to the fourth processing task, it can be determined whether the fourth processing task needs to be adjusted through a reflection process to obtain an effective processing result corresponding to the fourth processing task.

[0093] The third processing task and the fourth processing task are any two processing tasks with a parallel relationship in the thinking stack. The third processing task may have a dependency relationship with other processing tasks except the fourth processing task, and the fourth processing task may have a dependency relationship with other processing tasks except the third processing task.

[0094] In some embodiments of the present application, the processing task includes a first type of task, and the first type of task is executed through the following steps:

[0095] Convert the requirement description information corresponding to the first type of task into a requirement vector;

[0096] Search for multiple text vectors related to the requirement vector in the vector database;

[0097] Generate a processing result corresponding to the first type of task based on the multiple text vectors.

[0098] For the convenience of description, the above steps are combined for explanation.

[0099] In the embodiments of the present application, the processing tasks in the thinking stack may include a first type of task, and the first type of task can be understood as a task of retrieving internal information.

[0100] The requirement description information corresponding to the first type of tasks can be converted into a requirement vector, that is, text vectorization processing is performed, and the valid information in the requirement description information corresponding to the first type of tasks is stored in the requirement vector. This can be achieved through embedding models such as the word to vector (word2vec) model, the open-source general embedding (BAAI General Embedding, BGE) model developed by the Beijing Academy of Artificial Intelligence (BAAI), and the Bidirectional Encoder Representations from Transformers (BERT) model from the Transformers model, etc.

[0101] In the vector database, multiple text vectors related to the requirement vector can be searched for. A vector database is a special type of database used to store and process a large amount of vector data. Vector data usually consists of a set of numerical values representing the characteristics of a specific entity in multiple dimensions.

[0102] Optionally, the search can be performed through similarity calculation. Optionally, first, based on the requirement description information corresponding to the first type of tasks, the target topic to be searched for can be determined, and multiple text vectors related to the requirement vector can be searched for in the target topic of the vector database to improve the search efficiency.

[0103] Taking the government service scenario as an example, the target topic can be one or more of the topics such as household registration handling, social security handling, tax handling, traffic management, and education services.

[0104] Parsing the multiple text vectors related to the requirement vector found can generate the processing result corresponding to the first type of tasks.

[0105] By performing text vectorization processing on the requirement description information corresponding to the first type of tasks, through vector correlation or similarity, multiple text vectors related to the requirement vector can be accurately searched for in the vector database, thereby improving the accuracy of generating the processing result corresponding to the first type of tasks.

[0106] In some embodiments of the present application, the vector database stores a question-and-answer pair data table, a reference document data table, and a guidance matter data table. The text vectors include question-and-answer pair vectors and guidance matter vectors, or the text vectors include question-and-answer pair vectors, reference document vectors, and guidance matter vectors;

[0107] Searching for multiple text vectors related to the requirement vector in the vector database includes:

[0108] Searching for question-and-answer pair vectors related to the requirement vector in the question-and-answer pair data table;

[0109] If the number of retrieved Q&A pair vectors is less than or equal to a preset quantity threshold, search for reference document vectors related to the requirement vector in the reference document data table;

[0110] Search for task guidance vectors related to the requirement vector in the task guidance data table;

[0111] Among them, searching for Q&A pair vectors related to the requirement vector in the Q&A pair data table and searching for task guidance vectors related to the requirement vector in the task guidance data table can be performed in parallel or sequentially.

[0112] For the sake of convenient description, the above steps are combined for illustration.

[0113] In the embodiment of the present application, the vector database can store the Q&A pair data table, the reference document data table, and the task guidance data table. Optionally, for each topic in the vector database, the Q&A pair data table, the reference document data table, and the task guidance data table can be stored.

[0114] Searching for multiple text vectors related to the requirement vector in the vector database can include Q&A pair vectors and task guidance vectors, or can include Q&A pair vectors, reference document vectors, and task guidance vectors.

[0115] Specifically, Q&A pair vectors related to the requirement vector can be searched in the Q&A pair data table. Optionally, the Q&A pair vectors in the Q&A pair data table with a similarity to the requirement vector greater than or equal to a preset first similarity threshold can be determined as the Q&A pair vectors related to the requirement vector.

[0116] After the Q&A pair vectors are retrieved, it can be determined whether the number of retrieved Q&A pair vectors is less than or equal to a preset quantity threshold. If it is less than or equal, it is considered that the retrieved Q&A pair vectors are insufficient and it is difficult to accurately generate the processing result corresponding to the first type of task. Reference document vectors related to the requirement vector can be searched in the reference document data table to enhance the retrieval. Optionally, the reference document vectors in the reference document data table with a similarity to the requirement vector greater than or equal to a preset second similarity threshold, or the top N1 reference document vectors with the highest similarity to the requirement vector in the reference document data table, can be determined as the reference document vectors related to the requirement vector. If the number of retrieved Q&A pair vectors is greater than the preset quantity threshold, it is considered that the retrieved Q&A pair vectors are sufficient to accurately generate the processing result corresponding to the first type of task, and the step of searching for reference document vectors related to the requirement vector in the reference document data table can be omitted to save computing resources.

[0117] In the data table of guidance matters, the guidance matter vectors related to the demand vector can be searched. Optionally, the guidance matter vectors in the data table of guidance matters with a similarity to the demand vector greater than or equal to a preset third similarity threshold, or the top N2 guidance matter vectors with the highest similarity to the demand vector in the data table of guidance matters, can be determined as the guidance matter vectors related to the demand vector.

[0118] N1 and N2 are positive integers.

[0119] It should be noted that searching for the Q&A pair vectors related to the demand vector in the Q&A pair data table and searching for the guidance matter vectors related to the demand vector in the data table of guidance matters are carried out in parallel or sequentially. A guidance matter can be understood as a matter guiding the handling.

[0120] The vector database stores a Q&A pair data table, a reference document data table, and a data table of guidance matters. Searching for the text vectors related to the demand vector in the Q&A pair data table, the reference document data table, and the data table of guidance matters respectively can provide a basis for generating the processing results corresponding to the first type of task.

[0121] In some embodiments of the present application, the processing task includes a second type of task, and the second type of task is executed through the following steps:

[0122] According to the demand description information and application tool information corresponding to the second type of task, call the application programming interface of the external service to obtain the processing result corresponding to the second type of task.

[0123] In the embodiments of the present application, the processing tasks in the thinking stack may include a second type of task, and the second type of task can be understood as a task of querying external information.

[0124] According to the demand description information and application tool information corresponding to the second type of task, the application programming interface of the external service can be called to obtain the processing result corresponding to the second type of task. External services such as mathematical calculation services, weather forecast services, traffic planning services, etc.

[0125] By calling the application programming interface of the external service, the processing result corresponding to the second type of task can be obtained, which helps to improve the integrity of the answer to the target question.

[0126] In some embodiments of the present application, based on the processing result corresponding to each processing task, generating and outputting the answer to the target question includes:

[0127] Based on the prompt words, merge the processing results corresponding to the processing tasks with a parallel relationship to obtain the answer to the target question;

[0128] Output the answer to the target question.

[0129] For ease of description, the above steps will be combined and described together.

[0130] In the embodiments of the present application, a prompt can be preset to guide the generation of an answer or assist in the generation of an answer. A prompt refers to a piece of text provided to the model to indicate what the model is to do. Prompt engineering refers to a series of designs for prompts to guide the large model to generate specific content.

[0131] After obtaining the processing results corresponding to each processing task in the thought stack, the processing results corresponding to the processing tasks with a parallel relationship can be merged based on the prompt to obtain the answer to the target question, and then the answer to the target question can be output so that the user can obtain the answer to the target question in a timely manner.

[0132] Merging the processing results corresponding to the processing tasks with a parallel relationship based on the prompt can ensure the quality of the generation of the answer to the target question.

[0133] In some embodiments of the present application, task decomposition of the target question is performed to generate a thought stack, including:

[0134] Using a task decomposition self-planning model to perform task decomposition on the target question to generate a thought stack;

[0135] After obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, the current processing task is adjusted, including:

[0136] After obtaining the processing result corresponding to the current processing task, use a reflection model to determine whether the processing result corresponding to the current processing task meets the expected goal of the current processing task. If not, adjust the current processing task;

[0137] Among them, the task decomposition self-planning model and the reflection model are models obtained by fine-tuning the large model. Large model fine-tuning refers to the process of further training the model using a new, specific task-related dataset on the basis of a pre-trained large deep learning model. The main purpose of this fine-tuning technology is to enable the model to adapt to new, specific tasks or fields without training an entirely new model from scratch.

[0138] A large model refers to a neural network model with a huge number of parameters and a complex structure. By fine-tuning the large model, a task decomposition self-planning model and a reflection model can be obtained, and the training data corresponding to the task decomposition self-planning model and the reflection model are different.

[0139] Using a task decomposition self-planning model to perform task decomposition on the target question to generate a thought stack can improve the efficiency and accuracy of thought stack generation.

[0140] After obtaining the processing result corresponding to the current processing task, the reflection model is used to determine whether the processing result corresponding to the current processing task meets the expected goal of the current processing task. If not, the current processing task can be adjusted to ensure the smooth progress of the reflection process.

[0141] The technical solution provided by the embodiment of the present application has been described above. Below, the application of the embodiment of the present application in the government service scenario will be used as an example for description.

[0142] Artificial Intelligence (AI) technology, especially large model technology, is developing more and more rapidly. These technologies enable machines to understand and generate natural language, making communication with humans more natural and efficient. As an application of AI technology, an AI agent can simulate human intelligent behavior based on the understanding of user questions, execute tasks, and make decisions in a specific environment. The current AI Agent technology mainly relies on user intent recognition and generates decision answers by means of chain of thought, calling external functions through Application Programming Interface (API), etc. However, for government affairs Q&A, the current AI Agent still has some limitations. There is no model specifically trained for this field in common user intent recognition, and user questions cannot be effectively disassembled into actions and decisions that meet the needs of the government service field; the chain of thought method is relatively fixed after generation, and the error in the middle layer of the chain output will expand the error of the final result, which cannot meet the scenario of government affairs Q&A that requires high accuracy.

[0143] The large model itself is limited by the time of training data and cannot effectively answer questions with high timeliness. For fields with strong professionalism, such as the government service field, there is also a lack of corresponding corpus basis. Retrieval-Augmented Generation (RAG) technology can relatively effectively make up for this part of the defects of the large model. Its principle is to inform the large model of this part of the content by retrieving content based on the existing new knowledge according to the user's question and adding it to the input, and then let it generate an answer. In the government service field, due to the requirements of the government affairs guiding process, higher requirements are put forward for RAG, and it is required to support the ability to find multiple relevant link URLs in a large amount of text.

[0144] For the government affairs Q&A system with automatic answers, it is easy to have problems such as being unable to better understand the demands of citizens, the Q&A information cannot be updated in time, and there is only a general answer without a function of guiding how to handle. For some users who are not familiar with Internet operations, they cannot find the network path of the matter handling process according to the answers provided by the Q&A system. These problems not only reduce the service efficiency but also affect the user satisfaction.

[0145] The technical solution provided by the embodiments of this application can improve the understanding and decision-making abilities of the government affairs Q&A system, accurately analyze complex government affairs questions, and finally provide a guiding path to complete the handling of matters.

[0146] Under the AI Agent technical framework, the embodiments of this application have the following capabilities:

[0147] Dynamic self-planning ability: Based on the user's needs, a Stack of Thought is established. The advantage of the Stack of Thought compared to the Chain of Thought is that the AI Agent will process the content and order of tasks in the dynamically adjusted Stack of Thought based on the reflection model, ensuring the accuracy and professionalism of the answers in the government affairs service scenario to the greatest extent;

[0148] Interface call ability: Automatically call relevant corresponding interfaces based on user intention recognition to perform decision-making actions required to meet user needs;

[0149] Optimize the Retrieval-Augmented Generation (RAG) technology, which can retrieve real-time government affairs data and handling processes as support for Q&A guiding, reduce the generation of large model hallucinations, and improve the accuracy of answers;

[0150] Use large model fine-tuning technology to train the large model's dynamic self-planning ability in the government affairs service scenario, making the generated answers more accurate;

[0151] Prompt words are used to assist in answer generation and implement the reflection model for generating answers, ensuring the quality of answer generation;

[0152] Flexibility and scalability: As government business expands and changes, the above technologies can flexibly adapt to new business needs and support the expansion and upgrade of the system.

[0153] As Figure 2 shown, the main process is as follows:

[0154] 1. The user sends a government affairs-related question request;

[0155] 2. The task decomposition self-planning model fine-tuned based on the government affairs service scenario conducts logical analysis on the user's question, generates a Stack of Thought, and each processing task in the Stack of Thought corresponds to requirement description information, application tool information, and knowledge base information;

[0156] 3. According to the task relationship between the processing tasks in the Stack of Thought, execute each processing task in the Stack of Thought, and the answer can be obtained through RAG or the result can be returned by calling an external service;

[0157] 4. The process of obtaining an answer through RAG is as follows:

[0158] Text vectorization is to convert the requirement description information corresponding to the processing task in the thinking stack into a requirement vector, and store the valid information in the requirement description information in this requirement vector. It can be achieved through embedding models such as the word2vec model, BGE model, BERT model, etc.

[0159] Match the recommended search vector database topic for the processing task in the thinking stack;

[0160] Vector database retrieval: Calculate the cosine similarity (or other similarity calculation methods) between the requirement vector and the text vectors in the data table of this topic in the vector database to recall the most relevant k text vectors. Each topic in the vector database corresponds to three stored data tables: Q&A pair data table, reference document data table, and to-do item data table. These data tables are constructed as follows: Store all preprocessed and vectorized text data in a structured vector knowledge base, such as milvus (an open-source vector search engine), faiss (an efficient vector similarity search library), chroma (a database system specifically designed to efficiently manage and query vector data), etc. To balance query efficiency and query accuracy, build an ivf-flat (an approximate nearest neighbor search method for accelerating vector search) index for the vector library. To ensure the accuracy of government affairs Q&A and guidance, the search will be carried out in the order of first searching the Q&A pair data table, and if no answer exceeding the preset threshold is recalled, then searching the document data table. The to-do item data table will be retrieved in parallel to return the closest to-do item guidance.

[0161] If the answer is enhanced and retrieved through the content of the reference document data table, then use algorithms such as BGE-RERANK (a re-ranking model) or BERT to perform fine-grained ranking and screening on the cited documents to select the most matching reference document;

[0162] 5. The process of external service call is as follows:

[0163] Based on the requirement description information, application tool information, etc. corresponding to the processing task in the thinking stack, call the API of the relevant external service to return the required results. For example, external mathematical calculation modules, weather forecasts, traffic planning, etc.;

[0164] 6. The reflection process carried out by the reflection model:

[0165] The reflection model reflects based on the expected goal and the actual return result of the current processing task, whether the actual return result matches the expected goal, and what processing tasks need to be added or how to adjust the processing tasks if they do not match. Dynamically self-plan and adjust the processing tasks in the thinking stack. Finally, the AI Agent outputs the adjusted thinking stack and executes the adjusted processing tasks.

[0166] 7. Merge the results to generate the final answer

[0167] In the case where external services and vector databases both return results under different processing tasks, it is necessary to merge the results at this time. The results are merged and output through prompt words.

[0168] The following introduces the AI Agent training and execution processes involved in the above process.

[0169] I. Fine-tuning training of the large model for the task decomposition self-planning model and reflection model:

[0170] In the AI Agent, the task decomposition self-planning model and reflection model are mainly trained through large model fine-tuning.

[0171] Task decomposition self-planning model:

[0172] 1. Training data preparation

[0173] An example of the training data structure of the task decomposition self-planning model is as follows:

[0175] {

[0176] "instruction": "You are good at decomposing user problems and solving them using existing tools and knowledge bases. The following are the tools you can use {tool list}, and the following are the knowledge bases you can query {knowledge base list}. Please decompose the user problem according to the following thinking steps: 1. Deeply understand the user's intention and requirements from the user's question; 2. How to decompose the problem to achieve the requirements; 3. What tools or knowledge bases to use for each step.",

[0177] "input": "I have a household registration in Haidian District, Beijing. My house is in Dongcheng District, and my spouse's household registration is in Jinan. Can it be transferred to my house?",

[0178] "output": "User intention: The user is asking about the feasibility of household registration transfer and how to handle it, specifically involving household registration policies and handling procedures for cross-district (within Beijing) and cross-city (from Beijing to Jinan) transfers.\nThought stack: [{'step': 'Find out whether a non-Beijing household registration can be transferred to Beijing based on the spouse's property in the urban area of Beijing', 'tool': 'None', 'knowledge base': 'Beijing Household Registration Handling Knowledge Base'}, {'step': 'Find out whether the same-city but different-district household registration of the house owner and the property address has an impact on the transfer of a non-Beijing household registration to the property household registration', 'tool': 'None', 'knowledge base': 'Beijing Household Registration Handling Knowledge Base'}, {'step': 'Provide the handling steps and addresses for transferring a non-Beijing household registration to Beijing', 'tool': 'Gaode Map API', 'knowledge base': 'Beijing Household Registration Handling Guide Library'}]"

[0179] }, ​

[0180] ……

[0182] When preparing data, it is necessary to first adjust the system instruction so that the large model has a probability of more than 70% of generating reasonable results. Then, based on the pre-prepared user questions, use the system instruction to automatically generate training data. Then, manually correct and adjust to obtain the final training data.

[0183] 2. Training process

[0184] The large model can be fine-tuned using Low-Rank Adaptation (LoRA) or its derivatives.

[0185] The principle of LoRA is as follows:

[0186] The core idea of LoRA is to fine-tune the model by injecting low-rank matrices into each layer of the model, rather than directly modifying the pre-trained weights. Specifically, LoRA adds two low-rank matrices A and B to each layer of the model, and these two matrices update the original weight matrix ΔW through matrix multiplication, thereby achieving fine-tuning of the model. This method not only reduces the number of parameters to be trained, but also improves the adaptability of the model on new tasks or datasets while retaining the capabilities of the pre-trained model.

[0187] During the fine-tuning process, only the weight vectors of matrix A and matrix B are adjusted, without affecting the original pre-trained weights.

[0188] Fine-tuning process:

[0189] Set the low-rank parameters d of matrix B and matrix A;

[0190] Matrix B is initialized by a Gaussian function, b i ~N(0, σ b 2 );

[0191] Matrix A is initialized to all zeros;

[0192] Randomly divide the training dataset into a training set and a validation set according to a certain ratio;

[0193] Freeze the gradient descent of the original pre-trained weights and only train and optimize the weights of matrix B and matrix A;

[0194] Save the weights of matrix B and matrix A.

[0195] Reflection on the model:

[0196] The training process, fine-tuning process, and task decomposition of the reflection model are consistent with the self-planning model, except for the differences in training data. ​

[0197] Examples are as follows:

[0199] {

[0200] "instruction": "You are good at judging whether the requirements are met based on the requirements and the answers generated by the large model. The following is the knowledge base {knowledge base name} and tool {tool} referred to for generating answers. The input will provide you with user requirements, generated answers, and the name of the reference knowledge base or tool. Please check whether the answer meets the requirements. If not, provide a solution.",

[0201] "input": "User question: Provide the procedures and addresses for non-local household registration to move to Beijing.\nAnswer: The procedures were not found, and the address is xxx.\nReference knowledge base or tool name: {'tool': 'Gaode Map API', 'knowledge base': 'Beijing Household Registration Handling Guide Database'}",

[0202] "output": "Reflection: Unsatisfied point: The procedures for non-local household registration to move to Beijing.\nInvalid knowledge base or tool: Beijing Household Registration Handling Guide Database\nThought stack: [{'step': 'Query the procedures for non-local household registration to move to Beijing', 'tool': 'Baidu Search', 'knowledge base': 'None'}]",

[0203] }

[0204] ……

[0206] Reflection result feedback:

[0207] Insert the task of processing the reflection result into the existing thought stack and execute it first.

[0208] As Figure 3 shown, it is a schematic diagram of the RAG structure based on government affairs Q&A guidance. This structure includes a prompt engineering layer, a text merging layer, a retrieval layer, and a vector database layer. Among them, the prompt engineering is used to provide corresponding prompts, the text merging layer is used for context merging, attachment merging, table merging, text sorting, etc. The retrieval layer includes a HybridSearch algorithm and a RERANK algorithm. The vector database includes a Q&A pair data table, a reference document data table, and a guidance matter data table.

[0209] II. AI Agent Execution Process

[0210] As Figure 4 shown, it is executed by dividing it into 3 intelligent agents.

[0211] 1. Task decomposition and self-planning agent

[0212] ​​For the user's question, the model fine-tuned based on the large model is split into multiple processing tasks, and the processing tasks are placed on the thought stack for subsequent execution. Among them, there are two relationship types for processing tasks. One is the parallel relationship, which can also be understood as the juxtaposition relationship, and the other is the serial relationship, which can also be understood as the dependency relationship.

[0213] For the parallel relationship, such as "Help me query the location for handling provident fund in Wangjing and the weather conditions tomorrow", this question will be split into two parallel processing tasks:

Query the location for handling provident fund in Wangjing

Query the weather conditions tomorrow

[0214] For the serial relationship, such as "Help me query the weather conditions for the next three days and find out the day with clear weather". This question will be split into two serial processing tasks:

Query the weather conditions for the next three days

Which day among the next three days has clear weather

[0215] 2. Tool execution agent

[0216] Taking four tools as an example, including: query weather, query traffic, query service location, query Internet. Each processing task has a corresponding tool. Using the semantic understanding and classification capabilities of the large model, the functions of each tool and the requirements of the processing task are described to the large model, and the large model will automatically identify which processing task needs to use which tool for execution.

[0217] During the execution of the processing task, based on the usage instructions of the application tool corresponding to each processing task and the corresponding API documentation, Python (a computer programming language) code will be automatically generated, and then the Python code will be processed subsequently, and the final executable Python code will be automatically executed using exec (a command for calling and executing instructions). And the execution result will be returned.

[0218] 3. Reflection agent

[0219] Judge whether the processing result corresponding to the processing task has achieved the established goal. If not, summarize the unfulfilled points and generate solutions to adjust the thought stack.

[0220] III. Thought stack scheduling process

[0221] As Figure 5 shown, the working process of the thought stack is as follows:

[0222] The execution Agent pulls processing tasks from the unfinished list and executes them, and vectorizes and stores the processing results corresponding to the processing tasks;

[0223] The context Agent performs context retrieval and returns the context;

[0224] The task creation Agent is used to create new processing tasks and returns the new processing tasks to be added to the queue;

[0225] The priority sorting Agent is used to sort the processing tasks by priority and set the correct order of the processing tasks. If a processing task is completed, the priority sorting Agent can delete it from the unfinished list.

[0226] The overall process includes: task decomposition, tool selection, code generation, service call, answer generation, and task end.

[0227] In the embodiment of the present application, the large model is fine-tuned and trained with the data unique to the government service scenario. The generated model identifies and understands the intent of the user's question, decomposes it into multiple processing tasks to generate a thought stack, and matches the processing tasks with the corresponding tools or knowledge bases. This improves the accuracy of completing government-related tasks.

[0228] In addition, by fine-tuning and training the large model with the data unique to the government service scenario, the generated model reflects on whether the actual return result matches the expected goal based on the expected goal and the actual return result of the current processing task, and what processing tasks need to be added or how to adjust the processing tasks if they do not match. Dynamically self-plan and update the processing tasks in the thought stack. This improves the flexibility and accuracy of task execution.

[0229] Through task decomposition and reflection, the scheduling process of the task queue is carried out, realizing the automated management and execution of tasks. The task creation agent, task priority agent, and execution agent work together to ensure that tasks are executed in the correct order and the task status is updated in a timely manner.

[0230] As can be seen from the above, the technical solution provided by the embodiment of the present application has at least the following advantages:

[0231] 1. Improve efficiency:

[0232] Automatically process routine problems, reduce the dependence on human customer service, and can improve the response speed and processing efficiency of government services.

[0233] 2. Improve reliability and accuracy:

[0234] By using the method of solving problems with a thought stack through task decomposition and reflection, it reduces human intervention, reduces the error rate, and improves the reliability of the system and the accuracy of the answers.

[0235] 3. Flexibility and Scalability:

[0236] As the government's business expands and changes, the system can flexibly adapt to new business requirements, support the expansion and upgrade of the system, and ensure the long-term effectiveness of the system.

[0237] 4. Optimize User Experience:

[0238] Through agent training and task queue scheduling, the results desired by users are output more accurately, enabling users to obtain the required services and information through a single question, thus enhancing the overall user experience.

[0239] Corresponding to the above method embodiments, the embodiments of the present application also provide an information processing device, and the information processing device described below can be mutually referred to the information processing method described above.

[0240] See Figure 6 As shown, the information processing device 600 includes:

[0241] A receiving module 610, configured to receive a target question;

[0242] A generating module 620, configured to disassemble the target question into tasks to generate a thought stack, and the thought stack includes at least one processing task;

[0243] An execution module 630, configured to execute each processing task in the thought stack according to the task relationship between the processing tasks in the thought stack to obtain a processing result corresponding to each processing task;

[0244] An output module 640, configured to generate and output an answer to the target question based on the processing result corresponding to each processing task;

[0245] Among them, for each processing task of a target type in the thought stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected target of the current processing task, then adjust the current processing task, and execute the adjusted current processing task to obtain a new processing result corresponding to the adjusted current processing task.

[0246] When applying the device provided by the embodiments of the present application, for each processing task of a target type in the thinking stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, then adjust the current processing task and execute the adjusted current processing task to obtain the new processing result corresponding to the adjusted current processing task. In this way, when executing other processing tasks that depend on the current processing task, it can be based on the new processing result corresponding to the current processing task, which helps to improve the accuracy of the processing result corresponding to each processing task, makes the answer generated based on the processing result corresponding to each processing task more accurate, and helps to improve the user experience.

[0247] In some embodiments of the present application, the task relationship includes a dependency relationship and / or a parallel relationship. The execution module 630 is specifically configured to perform at least one of the following:

[0248] For the first processing task and the second processing task with a dependency relationship in the thinking stack, execute the first processing task to obtain the processing result corresponding to the first processing task, and based on the processing result corresponding to the first processing task, execute the second processing task;

[0249] For the third processing task and the fourth processing task with a parallel relationship in the thinking stack, execute the third processing task and the fourth processing task simultaneously or sequentially to obtain the processing results corresponding to the third processing task and the fourth processing task.

[0250] In some embodiments of the present application, the processing task includes a first type of task. The execution module 630 is used to execute the first type of task through the following steps:

[0251] Convert the requirement description information corresponding to the first type of task into a requirement vector;

[0252] Search for multiple text vectors related to the requirement vector in the vector database;

[0253] Generate the processing result corresponding to the first type of task based on the multiple text vectors.

[0254] In some embodiments of the present application, the vector database stores a question-and-answer pair data table, a reference document data table, and a to-do item data table. The text vectors include question-and-answer pair vectors and to-do item vectors, or the text vectors include question-and-answer pair vectors, reference document vectors, and to-do item vectors;

[0255] The execution module 630 is specifically configured to:

[0256] Search for question-and-answer pair vectors related to the requirement vector in the question-and-answer pair data table;

[0257] If the number of retrieved Q&A pair vectors is less than or equal to a preset quantity threshold, search for reference document vectors related to the demand vector in the reference document data table;

[0258] Search for the to-be-guided matter vectors related to the demand vector in the to-be-guided matter data table;

[0259] Among them, searching for the Q&A pair vectors related to the demand vector in the Q&A pair data table and searching for the to-be-guided matter vectors related to the demand vector in the to-be-guided matter data table are carried out in parallel or sequentially.

[0260] In some embodiments of the present application, the processing task includes a second type of task, and the execution module 630 is used to execute the second type of task through the following steps:

[0261] According to the demand description information and application tool information corresponding to the second type of task, call the application programming interface of the external service to obtain the processing result corresponding to the second type of task.

[0262] In some embodiments of the present application, the output module 640 is specifically used for:

[0263] Based on the prompt words, merge the processing results corresponding to the processing tasks with a parallel relationship to obtain the answer to the target question;

[0264] Output the answer to the target question.

[0265] In some embodiments of the present application, the generation module 620 is specifically used for:

[0266] Use the task decomposition self-planning model to decompose the target question into tasks and generate a thought stack;

[0267] The execution module 630 is specifically used for:

[0268] After obtaining the processing result corresponding to the current processing task, use the reflection model to determine whether the processing result corresponding to the current processing task meets the expected goal of the current processing task. If not, adjust the current processing task;

[0269] Among them, the task decomposition self-planning model and the reflection model are models obtained by fine-tuning and training a large model.

[0270] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0271] Corresponding to the above method embodiments, an embodiment of the present application further provides an electronic device, including:

[0272] A memory for storing a computer program;

[0273] A processor for implementing the steps of the above information processing method when executing a computer program.

[0274] As Figure 7 shown, it is a schematic diagram of the composition structure of an electronic device. The electronic device may include: a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, the memory 11, and the communication interface 12 all complete their mutual communication through the communication bus 13.

[0275] In the embodiments of the present application, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field programmable gate array, or other programmable logic devices, etc.

[0276] The processor 10 may call the program stored in the memory 11. Specifically, the processor 10 may execute the operations in the embodiments of the information processing method.

[0277] The memory 11 is used to store one or more programs. The program may include program codes, and the program codes include computer operation instructions. In the embodiments of the present application, the memory 11 stores at least a program for implementing the following functions:

[0278] Receive a target problem;

[0279] Perform task decomposition on the target problem to generate a thought stack, and the thought stack includes at least one processing task;

[0280] Execute each processing task in the thought stack according to the task relationship between the processing tasks in the thought stack to obtain the processing result corresponding to each processing task;

[0281] Generate and output an answer to the target problem based on the processing result corresponding to each processing task;

[0282] Among them, for each processing task of the target type in the thought stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, then adjust the current processing task and execute the adjusted current processing task to obtain the new processing result corresponding to the adjusted current processing task.

[0283] In a possible implementation manner, the memory 11 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function, etc.; the data storage area may store the data created during use.

[0284] In addition, the memory 11 may include a high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid-state storage devices.

[0285] The communication interface 12 may be an interface of a communication module for connecting to other devices or systems.

[0286] Of course, it should be noted that Figure 7 the structure shown does not constitute a limitation on the electronic device in the embodiments of the present application. In practical applications, the electronic device may include more or fewer components than Figure 7 those shown, or combine certain components.

[0287] Corresponding to the above method embodiments, the embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above information processing method are implemented.

[0288] In addition, it should be noted that: The embodiments of the present application also provide a computer program product or a computer program. The computer program product or the computer program may include computer instructions, and the computer instructions may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, so that the computer device executes the description of the information processing method in the corresponding embodiments described above. Therefore, the description will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated either. For the technical details not disclosed in the computer program product or the computer program embodiments of the present application, please refer to the description of the method embodiments of the present application.

[0289] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments may be referred to each other.

[0290] It should be noted that in this document, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising such element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0291] From the description of the above embodiments, those skilled in the art can also clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed in this document can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0292] The steps of the methods or algorithms described in combination with the embodiments disclosed in this document can be directly implemented by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), registers, hard disk, removable disk, compact disc read-only memory (CD-ROM), or any other form of storage medium known in the art, including several instructions for performing the methods described in various embodiments of the present application.

[0293] The embodiments of the present application have been described above in conjunction with the accompanying drawings. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present application. It should be noted that the present application is not limited to the above specific embodiments. The above specific embodiments are only illustrative and not restrictive. For those of ordinary skill in the art, without departing from the spirit of the present application and the scope protected by the claims, many forms of embodiments can be made, and several improvements and modifications can also be made to the present application. These embodiments, improvements and modifications are all within the protection scope of the present application.

Claims

1. An information processing method, characterized in that: include: Receive target questions; Decomposing the target problem into tasks to generate a thinking stack, wherein the thinking stack includes at least one processing task; According to the task relationship between the processing tasks in the thinking stack, execute each processing task in the thinking stack to obtain the processing result corresponding to each processing task; Based on the processing results corresponding to each processing task, generate and output the answer to the target question; Among them, for the processing tasks of each target type in the thinking stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, the current processing task is adjusted, and the adjusted current processing task is executed to obtain a new processing result corresponding to the adjusted current processing task.

2. The method according to claim 1, characterized in that: The task relationship includes a dependency relationship and / or a parallel relationship. According to the task relationship between the processing tasks in the thinking stack, each processing task in the thinking stack is executed to obtain a processing result corresponding to each processing task, including at least one of the following: For a first processing task and a second processing task having a dependency relationship in the thinking stack, executing the first processing task, obtaining a processing result corresponding to the first processing task, and executing the second processing task based on the processing result corresponding to the first processing task; For the third processing task and the fourth processing task that have a parallel relationship in the thinking stack, the third processing task and the fourth processing task are executed simultaneously or sequentially to obtain processing results corresponding to the third processing task and the fourth processing task.

3. The method according to claim 1, characterized in that The processing task includes a first type of task, and the first type of task is performed by the following steps: Converting the requirement description information corresponding to the first type of task into a requirement vector; Searching a vector database for a plurality of text vectors related to the requirement vector; Based on the multiple text vectors, a processing result corresponding to the first type of task is generated.

4. The method according to claim 3, characterized in that The vector database stores a question-answer pair data table, a reference document data table, and a directed action item data table, the text vector includes the question-answer pair vector and the directed action item vector, or the text vector includes the question-answer pair vector, the reference document vector, and the directed action item vector; The step of searching a vector database for a plurality of text vectors related to the requirement vector comprises: Searching the question-answer pair vector related to the demand vector in the question-answer pair data table; If the number of the found question-answer pair vectors is less than or equal to a preset number threshold, searching the reference document data table for a reference document vector related to the demand vector; Searching the task vector related to the demand vector in the task data table; The searching of the question-answer pair vector related to the demand vector in the question-answer pair data table and the searching of the directed action item vector related to the demand vector in the directed action item data table are performed in parallel or sequentially.

5. The method according to claim 1, characterized in that The processing task includes a second type of task, and the second type of task is performed by the following steps: According to the requirement description information and application tool information corresponding to the second type of task, the application programming interface of the external service is called to obtain the processing result corresponding to the second type of task.

6. The method according to claim 1, characterized in that The generating and outputting the answer to the target question based on the processing result corresponding to each processing task includes: Based on the prompt words, the processing results corresponding to the processing tasks having a parallel relationship are merged to obtain the answer to the target question; Output the answer to the target question.

7. The method according to any one of claims 1 to 6, characterized in that The step of breaking down the target problem into tasks and generating a thinking stack includes: Using the task decomposition self-planning model, the target problem is decomposed into tasks to generate a thinking stack; After obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, adjusting the current processing task includes: After obtaining the processing result corresponding to the current processing task, using the reflection model to determine whether the processing result corresponding to the current processing task meets the expected goal of the current processing task, and if not, adjusting the current processing task; Among them, the task decomposition self-planning model and the reflection model are models obtained after fine-tuning and training the large model.

8. An information processing device, characterized in that: include: A receiving module, used for receiving a target question; A generation module, used to decompose the target problem into tasks and generate a thinking stack, wherein the thinking stack includes at least one processing task; An execution module, used to execute each processing task in the thinking stack according to the task relationship between the processing tasks in the thinking stack, and obtain a processing result corresponding to each processing task; An output module, used to generate and output an answer to the target question based on the processing result corresponding to each processing task; Among them, for the processing tasks of each target type in the thinking stack, after obtaining the processing result corresponding to the current processing task, if the processing result corresponding to the current processing task does not meet the expected goal of the current processing task, the current processing task is adjusted, and the adjusted current processing task is executed to obtain a new processing result corresponding to the adjusted current processing task.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the information processing method according to any one of claims 1 to 7 when executing the computer program.

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

Citation Information

Cited By

  • Information processing method and device, electronic equipment and storage medium

    CN120911614A