Information processing method, device, electronic device and readable storage medium
Through the functional disassembly of hierarchical dependencies and the support of multi-source databases, the problem of low accuracy in user question processing is solved, the parsing capabilities of large language models are improved, and the accurate processing of complex or personalized questions is ensured.
Patent Information
- Application Number
- CN202410571715.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-10
AI Technical Summary
The existing technology has low processing accuracy for user questions, fails to make full use of the hierarchical relationships contained in user input text, and relies on a single large language model, which cannot guarantee the accuracy of processing complex or personalized questions.
By obtaining the user's question information, the functions are disassembled according to hierarchical dependencies, and a hierarchical sequence of service interfaces is generated. The large language model is used to recursively analyze the target service interface tasks at each level, and the multi-source database and service interface parsing professional model are combined to enhance the analysis. Ability and accuracy.
It improves the processing accuracy of user questions, makes full use of the hierarchical relationship of user input text, enhances the scene matching and parsing capabilities of large language models, and ensures the accurate processing of complex or personalized questions.
Smart Images

Figure CN118152545B
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of artificial intelligence technology, and in particular, to an information processing method, device, electronic device, and readable storage medium. Background Art
[0002] Human-AI Interaction (HAII) is the interaction between humans and intelligent agents. It is a new design concept and cutting-edge technology direction brought about by the injection of artificial intelligence (AI) into human-computer interaction (HCI). The main form of human-AI interaction is to parse human command dialogue into machine operation command strings or service interface call sequences, thereby guiding intelligent agents to perform a series of operations.
[0003] Human-intelligence interaction can be achieved with the help of a large language model. However, currently, a large language model is usually used to perform task matching and parameter parsing on user questions without a thought process. That is, the user input text is directly converted into a service interface call sequence through a large language model. This processing method has a relatively low problem processing accuracy. Summary of the invention
[0004] The embodiments of the present invention provide an information processing method, device, electronic device and readable storage medium to solve the technical problem of low accuracy in processing user questions in the prior art.
[0005] In a first aspect, an embodiment of the present invention provides an information processing method, the method comprising:
[0006] Obtain the user's first question information;
[0007] Based on the first question information, function decomposition is performed according to the hierarchical dependency to obtain a service interface hierarchical sequence, wherein the service interface hierarchical sequence includes target service interface tasks sorted from top to bottom according to the functional hierarchies, the target service interface tasks of the first hierarchical level are generated based on the service interface hierarchical subsequence, the service interface hierarchical subsequence includes target service interface tasks of each functional hierarchical level above the first hierarchical level, and the first hierarchical level is any functional hierarchical level among the functional hierarchical levels involved in the service interface hierarchical sequence;
[0008] The task processing of the first question information is performed based on the service interface hierarchy sequence.
[0009] In a second aspect, an embodiment of the present invention provides an information processing device, the device comprising:
[0010] An acquisition module, used to acquire the user's first question information;
[0011] a function disassembly module, configured to perform function disassembly according to hierarchical dependencies based on the first question information to obtain a service interface hierarchical sequence, wherein the service interface hierarchical sequence includes target service interface tasks sorted from top to bottom according to functional hierarchies, wherein the target service interface tasks of the first hierarchical level are generated based on a service interface hierarchical subsequence, wherein the service interface hierarchical subsequence includes target service interface tasks of each functional hierarchical level above the first hierarchical level, wherein the first hierarchical level is any functional hierarchical level among the functional hierarchical levels involved in the service interface hierarchical sequence;
[0012] A task processing module is used to perform task processing of the first question information based on the service interface level sequence.
[0013] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the above-mentioned information processing method when executed by the processor.
[0014] In a fourth aspect, an embodiment of the present invention provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned information processing method are implemented.
[0015] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising computer instructions, which implement the steps of the above-mentioned information processing method when executed by a processor.
[0016] In the embodiment of the present invention, the user's first question information is obtained; based on the first question information, the function is decomposed according to the hierarchical dependency relationship to obtain the service interface hierarchical sequence; and the task processing of the first question information is performed based on the service interface hierarchical sequence. In this way, a large language model can be used to decompose the user's question according to the hierarchical dependency relationship, and the analysis of the target service interface task of each level can be realized in a recursive form. The target service interface task of each level only depends on the user's question information and the service interface hierarchical subsequence of each functional level above the level, so that the hierarchical relationship contained in the user input text can be fully utilized, and the service interface hierarchical sequence can be generated by using thought aggregation, thereby improving the accuracy of processing user questions. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0018] Figure 1 is a flowchart of an information processing method provided by an embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram of generating comprehensive prompt information of an example;
[0020] Figure 3 This is a schematic diagram of an example of a large language model recursively parsing a user's question;
[0021] Figure 4 This is an example of a flow chart from user questions to service interface level sequence calls;
[0022] Figure 5 is a schematic diagram of the structure of an information processing device provided by an embodiment of the present invention;
[0023] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] It should be noted that the information processing method provided by the embodiment of the present invention relates to the field of artificial intelligence technology, and in particular to the field of natural language processing technology.
[0026] In recent years, HAII research has developed rapidly at home and abroad. Researchers have conducted extensive explorations on the interaction between humans and AI systems such as intelligent recommendation systems, robots, virtual humans, and self-driving cars, which has greatly promoted the cross-integration of HCI and AI fields and the implementation of products such as intelligent customer service, intelligent operation and maintenance, smart homes, and smart driving.
[0027] However, the current human-intelligence interaction systems have problems such as limited interaction range and insufficient intelligence. With the rapid rise of large models such as ChatGPT, large language models can be used to solve the above problems, and user questions or user instructions can be converted into a series of service steps more flexibly and intelligently to complete human-intelligence interaction.
[0028] Currently, the following three treatment methods are mainly used:
[0029] 1. Use a large language model to perform task matching and parameter parsing on user questions without a thought process. That is, the user input text is directly converted into a corresponding service interface call sequence through a large language model. This processing method lacks the step of thinking and reasoning, and the accuracy is not high when dealing with problems with complex dependencies.
[0030] 2. Use a large language model to perform task matching and parameter parsing for user questions with a thought process. The generation methods with a thought process are divided into Chain-of-Thought (CoT) and Tree-of-Thought (ToT) methods. CoT is a chain generation method for designing prompts. In addition to the input and output of the task, the prompt also contains the intermediate steps of reasoning (i.e., intermediate thinking). However, since CoT is a single solution path, it is easy to miss the correct answer. Based on CoT, ToT can explore the coherent units of user input text as an intermediate step in solving the problem. ToT allows language models (LM) to decide the next course of action by considering multiple different reasoning paths and self-evaluation choices, and to make global choices by forward or backtracking when necessary, thereby executing decisions. However, this method strictly follows the tree structure and cannot perform thought selection and aggregation, which greatly limits the reasoning ability of large models.
[0031] 3. Based on the grammar rule tree, use the large language model to generalize the sentences of user questions, extract the action keywords in the sentence text data, and generalize the action keywords to obtain generalized action keywords, map the keywords to the behavior, and use the large language model to extract the behavior parameters from the user questions. This method only supports the understanding of action instructions and cannot be universal. In addition, the action parsing strongly depends on the construction of the grammar rule tree, which has certain scope limitations.
[0032] It can be seen that when generating service interface call sequences for user questions, related technologies usually use one-click generation without a thinking process, chain generation with a thinking process, or grammatical rule matching, which do not fully utilize the hierarchical relationship contained in the user input text, cannot guarantee that the optimal result is not missed, and have problems such as low accuracy and poor versatility. In addition, related technologies only rely on the capabilities of a single large language model, do not involve the integration of a general large model with other professional models, and do not use historical information as a prompt during the reasoning process, which cannot guarantee the accuracy of processing complex or personalized problems.
[0033] The purpose of the embodiment of the present invention is to use a large language model to perform functional decomposition according to hierarchical dependencies based on the first question information to obtain a service interface hierarchical sequence, so as to make full use of the hierarchical relationship contained in the user input text and improve the accuracy of processing user questions. The information processing method of the embodiment of the present invention can be executed by the information processing device of the embodiment of the present invention, and the information processing device can be deployed on an electronic device, which can be an intelligent device.
[0034] The following first describes the information processing method provided by the embodiment of the present invention.
[0035] See also Figure 1 , the figure shows a schematic diagram of the flow of the information processing method provided by the embodiment of the present invention. Figure 1 As shown, the method may include the following steps:
[0036] Step 101: Obtain the user's first question information.
[0037] The first question information refers to the question information submitted by the user on the electronic device, which can be text information. For example, the question Q of the current user Zhang San is "As of 8 o'clock this morning, how many work orders do I have that have not been processed? Please email the unprocessed task work orders to me."
[0038] Step 102, based on the first question information, perform functional decomposition according to hierarchical dependencies to obtain a service interface hierarchy sequence, wherein the service interface hierarchy sequence includes target service interface tasks sorted from top to bottom according to functional hierarchies, and the target service interface tasks of the first hierarchy are generated based on a service interface hierarchy subsequence, and the service interface hierarchy subsequence includes target service interface tasks of each functional hierarchy above the first hierarchy, and the first hierarchy is any functional hierarchy among the functional hierarchies involved in the service interface hierarchy sequence.
[0039] The service interface level sequence can include the thinking level sequence T queue and the service interface call sequence S queue , the two are one-to-one corresponding, the thinking level sequence T queue and the service interface call sequence S queue The definition is as follows:
[0040] T queue ={
[0041] l0:{ l 0-0 :[[], T 0-0 ], l 0-1 :[[], T 0-1 ],…},
[0042] l1:{ l 1-0:[['n1- n2'], T 1-0 ], l 0-1 :[[ 'n3- n4', 'n5- n6'], T 1-1 ],…},
[0043] …,
[0044] l N :{…}
[0045] }
[0046] T queue ={
[0047] l0:{ l 0-0 :[S 0-0 ,P 0-0 ], l 0-1 :[ S 0-1 ,P 0-1 ],…},
[0048] l1:{ l 1-0 :[S 1-0 ,P 1-0 ], l 0-1 :[ S 1-1 ,P 1-1 ],…},
[0049] …,
[0050] l N :{…}
[0051] }
[0052] Among them, l i represents the i-th level, l i-j represents the jth target service interface task in the i-th level, n i -n j Indicates the dependency on the jth target service interface task in the i-th level. The bottom layer (i=0) has no dependency, and the upper layer (i>0) has 0 or more dependencies. T i-j It represents the target service interface task obtained by decomposing the jth function in the i-th level, which is presented in the form of thought description; S i-j Indicates the service interface name matched by the jth target service interface task in the i-th level, P i-j Represents the parameters for parsing.
[0053] User questions in human-intelligence interaction can be broken down into different functions. Each function corresponds to a functional level, and each function can be implemented by a single or multiple service interfaces. There may be complex dependencies between functions, namely hierarchical dependencies.
[0054] By decomposing the functions according to the hierarchical dependencies, task parsing and service interface parsing can be realized in a recursive form. The target service interface task of each functional level only depends on the user's question information and the results of the execution of the previous layers of functions. Accordingly, when the target service interface task of each functional level is obtained, the service interface level subsequences of the previous layers can be aggregated with the target service interface task of the functional level, that is, through thinking aggregation, the service interface level sequence can be obtained after the functions involved in the user's question information are finally decomposed.
[0055] Optionally, step 102 specifically includes:
[0056] Based on the first question information, function decomposition is performed according to the hierarchical dependency relationship to generate the service interface hierarchical subsequence;
[0057] In the case where the function disassembly is not completed, generating comprehensive prompt information, the comprehensive prompt information including the first question information and the service interface level subsequence; and based on the comprehensive prompt information, generating the target service interface task of the first level, the service interface level subsequence synthesized by the service interface level subsequence and the target service interface task of the first level is used to perform function disassembly of the next function level located at the first level;
[0058] When the function disassembly is completed, the service interface level subsequence is determined as the service interface level sequence.
[0059] Among them, the generation of service interface hierarchy subsequence is the intermediate process of the recursive process of generating service interface hierarchy sequence. When the function decomposition is not completed, the service interface hierarchy subsequence is generated, and when the function decomposition is completed, the service interface hierarchy sequence is generated.
[0060] If the function disassembly is not completed, the next function level function disassembly needs to be performed, that is, the large language model is used to further generate the service interface tasks of the next function level. Comprehensive prompt information can be generated and input into the large language model for natural language processing to generate the first level service interface tasks.
[0061] The comprehensive prompt information at least includes the first question information and the service interface level subsequence. Optionally, the comprehensive prompt information also includes at least one of the following:
[0062] The historical question information of the user matching the first question information;
[0063] Second question information and third question information matching the first question information, the second question information being question information correctly parsed by the service interface hierarchy sequence, and the third question information being question information incorrectly parsed by the service interface hierarchy sequence;
[0064] a question example matching the first question information;
[0065] A scenario arrangement table, wherein the scenario arrangement table stores task processing scenario information and service interface information corresponding to the task processing scenario information;
[0066] The task description information of the first question information.
[0067] Figure 2 This is a schematic diagram of generating comprehensive prompt information of an example, such as Figure 2 As shown, the generation of comprehensive prompt information requires the use of a multi-source database, which can be pre-built and can store multi-dimensional information related to user questions. The multi-source database includes a scenario arrangement table, a question example database, a user question database, and a historical question cache database.
[0068] Scenario arrangement table: saves task processing scenario description and service interface related data. The relationship between task processing scenario and service interface is one-to-many. For example, "work order processing scenario" includes service interfaces such as "work order query", "work order submission", and "work order approval". The data elements of the scenario arrangement table include task processing scenario description, service interface name, service interface description, service interface parameter list and call level. The call level is used to evaluate the reliability of the service interface call. The higher the level, the higher the reliability. The reliability measurement indicators include response time, success rate, throughput, resource utilization, health status, etc. The above indicators are dynamically updated at certain time intervals.
[0069] Question example database: saves data related to question examples. Examples can come from question examples provided to users by the human intelligence interaction system; large language model training data set screening results. The data elements of the question example database include question examples, feature embeddings of question examples, corresponding thought level sequences, and service interface call sequences. The relevant definitions are as follows:
[0070] Feature Embedding of the question example, using E Q1 It means that we can use the feature extractor F Emb Get, F Emb The definition of E is: Q1 =F Emb (Q1)=Mean(LLM Emb (Tokenizer LLM(Q1)), dim=0). Q1 is a sample sentence of the question, Tokenizer LLM It is the Embedding layer of the large language model.
[0071] User question database: saves all the data related to the correctly parsed questions and the incorrectly parsed questions actually generated by the users. The data elements of the user question database include the user question identification ID, the user question, the feature embedding of the user question, the corresponding thought level sequence and service interface call sequence, and the identifier. Among them, the feature embedding of the user question is obtained by the same feature extractor; the identifier takes the value of 0 or 1, 1 means that the user question matches the service interface call sequence correctly, and 0 means the match is wrong. Whether the match is correct or not is obtained by user feedback.
[0072] Historical question cache: saves the data related to the questions actually generated by the current user within a certain time period. The data element of the historical question cache contains the user question ID. Among them, the user question ID is consistent with the user question ID in the user question database.
[0073] In the case of building a multi-source database, the generation process of the comprehensive prompt information is as follows:
[0074] Step 1: Use the feature extractor to calculate the semantic feature Embedding of question Q, and use E Q Indicates that E is calculated Q The cosine similarity between the feature embeddings of user questions in the user question database is used to take the first N1 correctly parsed data elements with the largest similarity values to form the positive case R1, that is, the second question information, and the first N2 incorrectly parsed data elements with the largest similarity values to form the reverse case R2, that is, the third question information.
[0075] Positive cases can guide the large language model to have a higher probability of generating correct thinking direction and service interface parsing results, while negative cases can guide the large language model to reduce the probability of generating wrong results.
[0076] Step 2: Calculate E Q The cosine similarity between the feature embedding of the user's question in the historical question cache of user Zhang San is used to take the first N3 data elements with the largest similarity value to form the prompt data R3, that is, the historical question information matching the first question information. R3 reflects the user's expression habits and contains the contextual knowledge associated with the question Q.
[0077] Step 3: Calculate E QThe cosine similarity between the feature embeddings of the user's questions in the question example database is used to take the first N4 data elements with the largest similarity values to form the sample data R4, that is, the question examples that match the first question information. R4 contains a wider range of question types and styles, which can play a good prompting role during cold start.
[0078] Step 4: Since there may be information overlap between R1, R2 and R3, the three can be filtered through the deduplication unit to obtain the historical question similarity data R 1-2-3 ;
[0079] Step 5: Question similar data R 1-2-3 , Similar example data R4, Service interface level subsequence I seq (t), the scenario arrangement table ST, the task description information IP of the first question information and the question Q are input into the prompt generator to obtain the comprehensive prompt information R concat . Defined as R concat =PromptGenerator(R 1-2-3 , R4, I seq (t),ST,IP,Q). Among them, I seq (t) is the service interface level subsequence located above the tth level, i.e., [0, t-1], which is used to guide the thought generation and service interface parsing of the tth level. The task description information IP is set according to the human-intelligence interaction scenario. The prompt generator can be a fixed template or a trainable generative model.
[0080] In the related art, in the process of human-intelligence interaction, when constructing the input of a large language model, it usually only includes user questions, lacks example prompts of scenes and positive and negative case prompts, and cannot cover the expression habits and contextual knowledge of different users, resulting in errors in the matching and parsing of some complex or personalized questions by the large language model. In this embodiment, by constructing a multi-source database, multi-dimensional information related to user questions is saved, and multi-dimensional information related to user questions is filtered out from the multi-source database using similarity calculation, and with the help of a prompt generator, the user questions and multi-dimensional information are synthesized to obtain the input of the large language model, which can respectively increase extensive example prompts, positive and negative case prompts, user expression habits and contextual knowledge, enhance the scene matching and parsing capabilities of the large language model, and improve the accuracy of the large language model problem parsing.
[0081] The number of service interface level sequences can be one or more, that is, there can be multiple ways to solve user questions.
[0082] The service interface tasks of each functional level can be recursively generated through the large language module, and the service interface level subsequence and the first question information can be input into the large language model for natural language processing to generate a service interface task of a functional level. It should be noted that in order to ensure the accuracy of the service interface level sequence generation, the service interface parameters of each functional level service interface task can be corrected through the service interface parsing professional model, and the service interface parameters of the service interface task can be checked to see if they are accurate, thereby obtaining the target service interface task of each functional level.
[0083] Optionally, the generating the target service interface task of the first level based on the comprehensive prompt information includes:
[0084] Based on the comprehensive prompt information, generating a first candidate service interface task of the first level;
[0085] Performing service interface parameter modification processing on the first candidate service interface task to obtain a second candidate service interface task;
[0086] A service interface parameter check is performed on the first candidate service interface task and the second candidate service interface task to obtain a target service interface task of the first level, where the target service interface task is a service interface task that passes the parameter check.
[0087] The comprehensive prompt information may be input into a large language model for natural language processing to obtain first-level first candidate service interface tasks, and the number of first candidate service interface tasks may be at least one.
[0088] Figure 3 It is a schematic diagram of the large language model recursively parsing user questions. The two dotted lines in the vertical direction, such as between step 1 and step 2, represent the large language model's parsing of a service interface task at a functional level, and obtaining the first candidate service interface task.
[0089] like Figure 3 As shown in the figure, the user asks "As of 8 o'clock this morning, how many work orders have not been processed? Please send me the unprocessed work orders by email." Step 1 to step 5 represent the hierarchical dependency relationship. The result in the dotted box 301 represents the solution path that fails the parameter check, and the result in the solid box 302 represents the solution path that passes the parameter check. The service interface task that passes the parameter check under the solution path is the target service interface task.
[0090] Correspondingly, when the functional decomposition is completed, the service interface hierarchy sequence can be obtained by sorting the target service interface tasks from top to bottom according to the functional hierarchy in step 1-step 5. Figure 3As shown, three service interface hierarchical sequences can be obtained, and the hierarchical dependencies are [subtask 1.1 under the solution path of step1, subtask 2.1 under the solution path of step2, subtask 3.1 under the solution path of step3, subtask 4.1 under the solution path of step4], [subtask 1.1 under the solution path of step1, subtask 2.2 under the solution path of step2, subtask 3.3 under the solution path of step3], and [subtask 1.1 under the solution path of step1, subtask 3.2 under the solution path of step3, subtask 4.2 under the solution path of step4].
[0091] The service interface parsing professional model can be used to perform service interface parameter correction processing on the first candidate service interface task to obtain the second candidate service interface task. Afterwards, the service interface parameters of the first candidate service interface task and the second candidate service interface task are converted and checked to remove erroneous results and obtain the first-level target service interface task.
[0092] In the related art, the large language model has strong capabilities in decomposing thought chains and concretizing abstract problems, but its performance in some basic classification tasks is not as good as that of professional models. For example, in information extraction tasks, the large language model will have low accuracy. The accuracy is not high when the large language model is used directly to complete classification tasks such as parameter parsing. In this embodiment, by training a professional model for service interface parsing, the parameters of the service interface are corrected for the results generated by the large language model to obtain the parsing results of the professional model. At the same time, the generation results of the large language model and the parsing results of the professional model are used equally as the input of the large language model for the service interface task parsing of the next functional level. This not only retains the flexibility of the large language model in dealing with complex or personalized problems, but also retains the stability and accuracy of the professional model in dealing with problems in most fields, which can ensure that the correct service interface level sequence is not missed to a greater extent.
[0093] In addition, the generation results of the large language model and the parsing results of the professional model will be filtered through the parameter conversion and inspection unit to remove invalid results, thereby ensuring the security of the service interface.
[0094] Step 103: Perform task processing of the first question information based on the service interface hierarchy sequence.
[0095] In some implementations, some service interface level sequences can be arbitrarily obtained from the service interface level sequence to obtain candidate service interface level sequences. In some implementations, the service interface level sequence can be scored for accuracy to select some service interface level sequences from the service interface level sequence according to the score value to obtain candidate service interface level sequences.
[0096] Optionally, the number of the service interface level sequences is greater than 1, and step 103 specifically includes:
[0097] Based on the first question information, each of the service interface hierarchy sequences is scored for accuracy to obtain a candidate service interface hierarchy sequence, wherein the score value of the candidate service interface hierarchy sequence is greater than or equal to the score values of other service interface hierarchy sequences;
[0098] The task processing of the first question information is performed based on the candidate service interface hierarchy sequence.
[0099] The first question information and each service interface level sequence can be input into the large language model for scoring processing to obtain a scoring value for each service interface level sequence, and the service interface level sequences with the top Nr scoring values are selected from the service interface level sequences as candidate service interface level sequences.
[0100] The target service interface tasks in the candidate service interface hierarchy sequence can be directly executed in a top-down order of the functional hierarchy. The candidate service interface hierarchy sequence can also be output to the user for modification or confirmation to obtain the target service interface hierarchy sequence.
[0101] Optionally, the performing task processing of the first question information based on the candidate service interface hierarchy sequence includes:
[0102] Execute the target service interface tasks in the target service interface hierarchy sequence in order from top to bottom of the functional hierarchy;
[0103] The target service interface level sequence is a service interface level sequence confirmed by the user from among the candidate service interface level sequences.
[0104] In this implementation, a certain number of candidate service interface hierarchical sequences can be reserved for users to select or modify slightly. Interface conversion and calling are performed only after the user confirms the target service interface hierarchical sequence. The entire process supports mind selection, which can ensure that only one service interface hierarchical sequence is called, effectively reducing resource consumption and reducing security issues caused by illegal calls.
[0105] like Figure 3 As shown in the figure, [subtask 1.1 under the solution path of step1, subtask 3.2 under the solution path of step3, subtask 4.2 under the solution path of step4] represents the target service interface hierarchy sequence confirmed by the user, and represents the optimal solution path confirmed by the user. Subtask 1.1 under the solution path of step1 is a required subtask under the solution path of the service interface hierarchy sequence, that is, subtask 1.1 must be included in the service interface hierarchy sequence, such as Figure 3The three generated service interface hierarchy sequences all include subtask 1.1 under the solution path of step1, and [subtask 1.1 under the solution path of step1, subtask 2.2 under the solution path of step2, subtask 3.3 under the solution path of step3] represents a non-optimal solution path.
[0106] In this embodiment, the service interface hierarchical subsequence generated by the large language model and passed the parameter check is used as the input of the next round of recursion to resolve the service interface task asked by the user, without introducing the call result of the service interface as the input of the next round. This method has a wider search space, ensuring that the optimal result is not missed, and there is no service interface call in the intermediate reasoning process, which can effectively reduce resource consumption.
[0107] In addition, the candidate service interface level sequences may be stored in the user question database and the user's historical question cache database, which may include the target service interface level sequences confirmed by the user and the target service interface level sequences denied by the user.
[0108] Figure 4 This is a flowchart from user questions to service interface hierarchical sequence calls, such as Figure 4 As shown, the following steps are included:
[0109] Step 1: User question Q and generated service interface hierarchy sequence I seq (t) The input R of the large language model is obtained through the prompt generator concat , the first candidate service interface task of the tth level is obtained through large language model reasoning, and the first Nt results R with high generation probability are taken g ;
[0110] Step 2: If the highest probability R is generated g [0] is the "end" flag, indicating that the recursion is over and a service interface level sequence can be generated, jumping to step 6; otherwise, the first candidate service interface task of level t is obtained;
[0111] Step 3: R g Each first candidate service interface task in the service interface is modified by the service interface analysis professional model to obtain the second candidate service interface task R p ;
[0112] Step 4: Use the parameter conversion and inspection unit to filter and remove duplicates from the generation results of the large language model and the analysis results of the service interface analysis professional model, retaining only the candidate results that meet the parameter specifications and pushing them to I seq (t) to update I seq (t);
[0113] Step 5: If the highest probability R is generatedg [0] is not the "end" sign, jump to step 1;
[0114] Step 6: Input the user's question and the service interface hierarchy sequence into another large language model for accuracy scoring, and retain the top Nr candidate service interface hierarchy sequences R with high scores. s Display to users;
[0115] Step 7: Users can s Select the solution path or make a small modification, and then proceed to step 8 after confirmation; if the analysis is completely wrong and the user feedback interaction fails, jump to step 10; the results of user confirmation success or feedback failure will be saved in the user question database and the user's historical question cache database;
[0116] Step 8: The confirmed target service interface level sequence path enters the conversion unit for function and parameter mapping;
[0117] Step 9: Based on the hierarchical dependencies, execute the service interface calls in order from top to bottom according to the functional hierarchy.
[0118] The information processing device provided by the embodiment of the present invention is described below.
[0119] See also Figure 5 , which shows a schematic diagram of the structure of an information processing device provided by an embodiment of the present invention. Figure 5 As shown, the information processing device 500 includes:
[0120] The acquisition module 501 is used to acquire the first question information of the user;
[0121] Functional decomposition module 502, used to perform functional decomposition according to hierarchical dependencies based on the first question information to obtain a service interface hierarchical sequence, wherein the service interface hierarchical sequence includes target service interface tasks sorted from top to bottom according to functional hierarchies, wherein the target service interface tasks of the first hierarchical level are generated based on a service interface hierarchical subsequence, wherein the service interface hierarchical subsequence includes target service interface tasks of each functional hierarchical level above the first hierarchical level, wherein the first hierarchical level is any functional hierarchical level among the functional hierarchical levels involved in the service interface hierarchical sequence;
[0122] The task processing module 503 is used to perform task processing of the first question information based on the service interface level sequence.
[0123] Optionally, the function decomposition module 502 includes:
[0124] A disassembly unit, configured to perform functional disassembly according to hierarchical dependencies based on the first question information to generate the service interface hierarchical subsequence;
[0125] A generating unit is used to generate comprehensive prompt information when the function disassembly is not completed, the comprehensive prompt information including the first question information and the service interface level subsequence; and based on the comprehensive prompt information, generate a target service interface task of the first level, the service interface level subsequence synthesized by the service interface level subsequence and the target service interface task of the first level is used to perform function disassembly of the next function level located at the first level;
[0126] A determination unit is used to determine the service interface level subsequence as the service interface level sequence when the function disassembly is completed.
[0127] Optionally, the comprehensive prompt information also includes at least one of the following:
[0128] The historical question information of the user matching the first question information;
[0129] Second question information and third question information matching the first question information, the second question information being question information correctly parsed by the service interface hierarchy sequence, and the third question information being question information incorrectly parsed by the service interface hierarchy sequence;
[0130] a question example matching the first question information;
[0131] A scenario arrangement table, wherein the scenario arrangement table stores task processing scenario information and service interface information corresponding to the task processing scenario information;
[0132] The task description information of the first question information.
[0133] Optionally, the generating unit is specifically used to:
[0134] Based on the comprehensive prompt information, generating a first candidate service interface task of the first level;
[0135] Performing service interface parameter modification processing on the first candidate service interface task to obtain a second candidate service interface task;
[0136] A service interface parameter check is performed on the first candidate service interface task and the second candidate service interface task to obtain a target service interface task of the first level, where the target service interface task is a service interface task that passes the parameter check.
[0137] Optionally, the number of the service interface level sequences is greater than 1, and the task processing module 503 includes:
[0138] A scoring unit, configured to score the accuracy of each of the service interface hierarchy sequences based on the first question information to obtain a candidate service interface hierarchy sequence, wherein the score of the candidate service interface hierarchy sequence is greater than or equal to the score of other service interface hierarchy sequences;
[0139] A task processing unit is used to perform task processing of the first question information based on the candidate service interface level sequence.
[0140] Optionally, the task processing unit is specifically used to:
[0141] Execute the target service interface tasks in the target service interface hierarchy sequence in order from top to bottom of the functional hierarchy;
[0142] The target service interface level sequence is a service interface level sequence confirmed by the user from among the candidate service interface level sequences.
[0143] The information processing device 500 can implement each process implemented in the above-mentioned information processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0144] See also Figure 6 , the figure shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 6 As shown, the electronic device 600 includes: a processor 601 , a memory 602 , a user interface 603 and a bus interface 604 .
[0145] The processor 601 is used to read the program in the memory 602 and execute the following process:
[0146] Obtain the user's first question information;
[0147] Based on the first question information, function decomposition is performed according to the hierarchical dependency to obtain a service interface hierarchical sequence, wherein the service interface hierarchical sequence includes target service interface tasks sorted from top to bottom according to the functional hierarchies, the target service interface tasks of the first hierarchical level are generated based on the service interface hierarchical subsequence, the service interface hierarchical subsequence includes target service interface tasks of each functional hierarchical level above the first hierarchical level, and the first hierarchical level is any functional hierarchical level among the functional hierarchical levels involved in the service interface hierarchical sequence;
[0148] The task processing of the first question information is performed based on the service interface hierarchy sequence.
[0149] exist Figure 6In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 601 and various circuits of memory represented by memory 602 are linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface 604 provides an interface. For different user devices, the user interface 603 may also be an interface that can be connected to external or internal devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.
[0150] The processor 601 is responsible for managing the bus architecture and general processing, and the memory 602 can store data used by the processor 601 when performing operations.
[0151] Optionally, the processor 601 is further configured to:
[0152] Based on the first question information, function decomposition is performed according to the hierarchical dependency relationship to generate the service interface hierarchical subsequence;
[0153] In the case where the function disassembly is not completed, generating comprehensive prompt information, the comprehensive prompt information including the first question information and the service interface level subsequence; and based on the comprehensive prompt information, generating the target service interface task of the first level, the service interface level subsequence synthesized by the service interface level subsequence and the target service interface task of the first level is used to perform function disassembly of the next function level located at the first level;
[0154] When the function disassembly is completed, the service interface level subsequence is determined as the service interface level sequence.
[0155] Optionally, the comprehensive prompt information also includes at least one of the following:
[0156] The historical question information of the user matching the first question information;
[0157] Second question information and third question information matching the first question information, the second question information being question information correctly parsed by the service interface hierarchy sequence, and the third question information being question information incorrectly parsed by the service interface hierarchy sequence;
[0158] a question example matching the first question information;
[0159] A scenario arrangement table, wherein the scenario arrangement table stores task processing scenario information and service interface information corresponding to the task processing scenario information;
[0160] The task description information of the first question information.
[0161] Optionally, the processor 601 is further configured to:
[0162] Based on the comprehensive prompt information, generating a first candidate service interface task of the first level;
[0163] Performing service interface parameter modification processing on the first candidate service interface task to obtain a second candidate service interface task;
[0164] A service interface parameter check is performed on the first candidate service interface task and the second candidate service interface task to obtain a target service interface task of the first level, where the target service interface task is a service interface task that passes the parameter check.
[0165] Optionally, the number of the service interface level sequences is greater than 1, and the processor 601 is further configured to:
[0166] Based on the first question information, each of the service interface hierarchy sequences is scored for accuracy to obtain a candidate service interface hierarchy sequence, wherein the score value of the candidate service interface hierarchy sequence is greater than or equal to the score values of other service interface hierarchy sequences;
[0167] The task processing of the first question information is performed based on the candidate service interface hierarchy sequence.
[0168] Optionally, the processor 601 is further configured to:
[0169] Execute the target service interface tasks in the target service interface hierarchy sequence in order from top to bottom of the functional hierarchy;
[0170] The target service interface level sequence is a service interface level sequence confirmed by the user from among the candidate service interface level sequences.
[0171] Preferably, an embodiment of the present invention further provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the computer program is executed by the processor 601, each process of the above-mentioned information processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0172] The embodiment of the present invention further provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned information processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0173] The embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the above-mentioned information processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0174] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0175] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0176] In the embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0177] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0178] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0179] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0180] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An information processing method, characterized in that: The method comprises: Obtain the user's first question information; Based on the first question information, function decomposition is performed according to the hierarchical dependency to obtain a service interface hierarchical sequence, wherein the service interface hierarchical sequence includes target service interface tasks sorted from top to bottom according to the functional hierarchies, the target service interface tasks of the first hierarchical level are generated based on the service interface hierarchical subsequence, the service interface hierarchical subsequence includes target service interface tasks of each functional hierarchical level above the first hierarchical level, and the first hierarchical level is any functional hierarchical level among the functional hierarchical levels involved in the service interface hierarchical sequence; Performing task processing of the first question information based on the service interface hierarchy sequence; The function is decomposed according to the hierarchical dependency relationship based on the first question information to obtain a service interface hierarchical sequence, including: Based on the first question information, function decomposition is performed according to the hierarchical dependency relationship to generate the service interface hierarchical subsequence; In the case where the function disassembly is not completed, generating comprehensive prompt information, the comprehensive prompt information including the first question information and the service interface level subsequence; and based on the comprehensive prompt information, generating the target service interface task of the first level, the service interface level subsequence synthesized by the service interface level subsequence and the target service interface task of the first level is used to perform function disassembly of the next function level located at the first level; When the function disassembly is completed, the service interface level subsequence is determined as the service interface level sequence.
2. The method according to claim 1, characterized in that The comprehensive prompt information also includes at least one of the following: The historical question information of the user matching the first question information; Second question information and third question information matching the first question information, the second question information being question information correctly parsed by the service interface hierarchy sequence, and the third question information being question information incorrectly parsed by the service interface hierarchy sequence; a question example matching the first question information; A scenario arrangement table, wherein the scenario arrangement table stores task processing scenario information and service interface information corresponding to the task processing scenario information; The task description information of the first question information.
3. The method according to claim 1, characterized in that The generating the target service interface task of the first level based on the comprehensive prompt information includes: Based on the comprehensive prompt information, generating a first candidate service interface task of the first level; Performing service interface parameter modification processing on the first candidate service interface task to obtain a second candidate service interface task; A service interface parameter check is performed on the first candidate service interface task and the second candidate service interface task to obtain a target service interface task of the first level, where the target service interface task is a service interface task that passes the parameter check.
4. The method according to claim 1, characterized in that The number of the service interface level sequences is greater than 1, and the task processing of the first question information based on the service interface level sequences includes: Based on the first question information, each of the service interface hierarchy sequences is scored for accuracy to obtain a candidate service interface hierarchy sequence, wherein the score value of the candidate service interface hierarchy sequence is greater than or equal to the score values of other service interface hierarchy sequences; The task processing of the first question information is performed based on the candidate service interface hierarchy sequence.
5. The method according to claim 4, characterized in that The task processing of the first question information based on the candidate service interface hierarchy sequence includes: Execute the target service interface tasks in the target service interface hierarchy sequence in order from top to bottom of the functional hierarchy; The target service interface level sequence is a service interface level sequence confirmed by the user from among the candidate service interface level sequences.
6. An information processing device, characterized in that: The device comprises: An acquisition module, used to acquire the user's first question information; a function disassembly module, configured to perform function disassembly according to hierarchical dependencies based on the first question information to obtain a service interface hierarchical sequence, wherein the service interface hierarchical sequence includes target service interface tasks sorted from top to bottom according to functional hierarchies, wherein the target service interface tasks of the first hierarchical level are generated based on a service interface hierarchical subsequence, wherein the service interface hierarchical subsequence includes target service interface tasks of each functional hierarchical level above the first hierarchical level, wherein the first hierarchical level is any functional hierarchical level among the functional hierarchical levels involved in the service interface hierarchical sequence; A task processing module, used for performing task processing of the first question information based on the service interface hierarchy sequence; The functional disassembly module includes: A disassembly unit, configured to perform functional disassembly according to hierarchical dependencies based on the first question information to generate the service interface hierarchical subsequence; A generating unit is used to generate comprehensive prompt information when the function disassembly is not completed, the comprehensive prompt information including the first question information and the service interface level subsequence; and based on the comprehensive prompt information, generate a target service interface task of the first level, the service interface level subsequence synthesized by the service interface level subsequence and the target service interface task of the first level is used to perform function disassembly of the next function level located at the first level; A determination unit is used to determine the service interface level subsequence as the service interface level sequence when the function disassembly is completed.
7. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the information processing method according to any one of claims 1 to 5 when executed by the processor.
8. A readable storage medium, characterized in that: The 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 5 are implemented.
9. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the information processing method according to any one of claims 1 to 5.
