Method and device for data preprocessing and business processing of intelligent system
By constructing and filtering candidate path units offline, and optimizing path planning using MCTS algorithm, the problem of slow path planning and poor accuracy of intelligent system path planning is solved, and business processing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510289012.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-07-08
AI Technical Summary
Existing intelligent systems are slow in the path planning process and have high risk of error calls, resulting in low business processing efficiency and poor accuracy.
Through offline data preprocessing, candidate path units are built, including the starting state, target state and execution operations. Use search algorithms such as MCTS to optimize path planning to filter out efficient and feasible execution path units.
It improves the response speed and business processing efficiency of the intelligent system, reduces the generation of illusory information, and enhances the accuracy and success rate of business processing.
Smart Images

Figure CN120278357A_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this specification relate to the field of computer technology, and in particular, to methods and devices for data preprocessing and service processing of intelligent systems. Background Art
[0002] Artificial Intelligence (AI) is an important part of the intelligent discipline. It attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial Intelligence is a very broad science, including robots, speech recognition, image recognition, natural language processing, expert systems, machine learning, computer vision, etc. With the development of artificial intelligence, various intelligent systems are involved in all aspects of human life. For example, large language models can perform various natural language information processing through semantic recognition, intelligent analysis systems can automatically generate data analysis reports, intelligent question-and-answer systems can automatically generate answers to user questions, robots can automatically complete a series of actions according to instructions, and so on. In the process of service processing of intelligent systems, a series of instructions may need to be executed, and these instructions may include function calls, data acquisition, etc. This series of instructions, for example, constitutes a service execution path. This involves the path planning problem in the process of service processing. Whether the path planning can be achieved quickly and effectively directly affects the service processing efficiency and the accuracy of service results. Summary of the Invention
[0003] One or more embodiments of this specification describe a method and device for data preprocessing of an intelligent system to solve one or more problems mentioned in the background art.
[0004] According to a first aspect, there is provided a method for service processing of an intelligent system, including: retrieving a number of target path units from each candidate path unit according to a first service target input by a current user, and each candidate path unit is determined by offline data preprocessing, and the offline data preprocessing includes: for each service target in a candidate service set, retrieving in candidate actions respectively to determine a number of execution paths; using the execution data groups extracted from each step of each execution path as candidate path units, and a single execution data group includes a starting state, a target state, and an executed operation; planning a service processing path based on the number of target path units to complete the relevant service processing of the first service target.
[0005] According to a second aspect, a data preprocessing method for an intelligent system is provided, which is used to pre-determine candidate path units for the intelligent system, so that during the business processing of the intelligent system, a target path unit can be selected from the candidate path units for relevant business processing; the method includes: obtaining a current business objective under a predetermined business scenario; expanding and searching among various candidate actions according to the current business objective to obtain a number of execution paths, where a single candidate action includes several operations of calling relevant modules or changing at least one item in the current business objective; extracting a number of execution data groups from each execution path, where a single execution data group includes a corresponding starting state, target state, and executed operations; screening each execution data group according to a predetermined rule to obtain each candidate path unit.
[0006] In one embodiment, the current business objective is obtained from a number of business objectives determined by one of the following methods: scraping from historical business objectives of the same type of business; presetting according to the predetermined business scenario.
[0007] In one embodiment, the expanding and searching among various candidate actions according to the current business objective to obtain a number of execution paths includes: initializing a search tree: initializing the root node of the current search tree according to the current business objective; path searching: simulating multiple paths through a predetermined search algorithm to generate the current search tree, where a single node in the current search tree corresponds to a single candidate action, and the termination condition of a single path is: completing the current business objective, or reaching a predetermined maximum search depth; score evaluation: calculating respective evaluation scores for each path in the current search tree; determining an execution path: determining a path whose corresponding evaluation score meets the following valid conditions as an execution path: exceeding a predetermined threshold, or being among the top predetermined number of paths arranged from high to low.
[0008] In a further embodiment, before determining the execution path, for the current business objective, the following steps are iteratively executed in sequence: the initializing search tree step, the path searching step, and the score evaluation step. During the iterative execution of each step, the evaluation score in a single path is traced back to each node in the path.
[0009] In one embodiment, the extracting a number of execution data groups from each execution path includes: extracting each candidate action in the execution path; determining an execution data group according to the front and back states corresponding to each node and the corresponding candidate action.
[0010] In one embodiment, the predetermined rule includes at least one of the following: removing duplicates; performing a trial call of the candidate action in a validation set to detect its accuracy or call success rate in a real environment, and determining that the result is that the accuracy is greater than a predetermined threshold, or the call success rate is greater than a predetermined threshold; filtering the execution data group link to screen out a link whose link success rate is lower than a predetermined threshold.
[0011] According to a third aspect, there is provided a service processing apparatus for an intelligent system, including:
[0012] A retrieval unit configured to retrieve a plurality of target path units from each candidate path unit according to a first service objective input by a current user. Each candidate path unit is determined through offline data preprocessing, and the offline data preprocessing includes: for each service objective in a candidate service set, retrieving respectively in candidate actions to determine a plurality of execution paths; taking an execution data group extracted from each step of each execution path as a candidate path unit, and a single execution data group includes a starting state, a target state, and an executed operation;
[0013] A processing unit configured to plan a service processing path based on the plurality of target path units to complete service processing related to the first service objective.
[0014] According to a fourth aspect, there is provided a data preprocessing apparatus for an intelligent system, which is used to pre-determine candidate path units for the intelligent system, so that during the service processing of the intelligent system, target path units are selected from the candidate path units for related service processing; the apparatus includes:
[0015] An acquisition unit configured to acquire a current service objective under a predetermined service scenario;
[0016] A search unit configured to expand and search in each candidate action according to the current service objective to obtain a plurality of execution paths, where a single candidate action includes a plurality of operations for calling related modules or at least one item for changing the current service objective;
[0017] An extraction unit configured to extract a plurality of execution data groups from each execution path, and a single execution data group includes a corresponding starting state, a target state, and an executed operation;
[0018] A screening unit configured to screen each execution data group according to a predetermined rule to obtain each candidate path unit.
[0019] According to a fifth aspect, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute the method according to the first aspect or the second aspect.
[0020] According to a sixth aspect, there is provided a computing device, including a memory and a processor, characterized in that an executable code is stored in the memory, and when the processor executes the executable code, the method according to the first aspect or the second aspect is implemented.
[0021] Through the methods and devices provided in the embodiments of this specification, for specific business scenarios, multiple business objectives can be determined in advance, and multiple candidate path units can be determined offline. During the business processing, a series of target path units are selected from the candidate path units to form a business processing path for business processing. In this way, the response speed can be significantly improved, thereby improving the efficiency and accuracy of business processing.
[0022] To determine candidate path units that are fast, effective, and have a high success rate, a data preprocessing method for path planning of an intelligent system is also provided. For a single business objective, search can be extended among various candidate actions to obtain several execution paths. Then, several execution data groups are extracted from each execution path, and each execution data group is screened according to a predetermined rule to obtain each candidate path unit. Among them, a single candidate action includes at least one of calling a relevant module or changing the current business objective, and a single execution data group may include the corresponding starting state, target state, and executed operations. This solution conducts path search based on tool calls and can establish a complete path generation, verification, and optimization system, bringing significant performance improvement. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0024] Figure 1 FIG. shows an architectural diagram of path planning and related business processing for business instructions provided by an Agent proxy platform for users;
[0025] Figure 2 FIG. shows a specific example of an intelligent dialogue system using a large model;
[0026] Figure 3 is a flowchart of a data preprocessing method for an intelligent system according to an embodiment of this specification;
[0027] Figures 4 to 7 are schematic diagrams of the selection, expansion, simulation, and backtracking operations in the MCTS search algorithm respectively;
[0028] Figure 8 is a flowchart of a business processing method for an intelligent system according to an embodiment of the technical concept of this specification;
[0029] Figure 9 is a schematic block diagram of a data preprocessing device for an intelligent system according to an embodiment of this specification;
[0030] Figure 10 Schematic block diagram of a service processing device of an intelligent system according to an embodiment. Detailed implementation manners
[0031] The solutions provided in this specification will be described below with reference to the accompanying drawings.
[0032] First, clarify several professional terms that may be used in this specification:
[0033] Large model, in the field of artificial intelligence, refers to a machine learning model with an extremely large scale, especially a deep learning model. Its characteristic is having hundreds of millions or even billions of parameters, and being able to capture and learn complex data patterns. Large models have strong performance capabilities in tasks such as natural language understanding, tool invocation, and task planning.
[0034] Path planning (Planning): In an intelligent system, path planning refers to the ability and process of a model to pre-determine activity steps when dealing with complex tasks. This process involves starting from the current state and reaching the user-defined target state through a series of reasonable steps. In tool invocation and complex scenarios, path planning not only needs to ensure the optimization and feasibility of the path, but also needs to cope with the changes that may occur in a dynamic environment, so as to maintain the flexibility and robustness of task execution. An effective planning strategy can improve the efficiency and accuracy of task completion, and can also significantly enhance the user experience.
[0035] Agent platform aims to provide various capabilities such as tool invocation (modules used for certain functions, usually called through APIs), knowledge recall, and table query QA. The core feature of the platform lies in its tool invocation function. Users can upload the OpenAPI documents of tools related to the scenario, and the Agent platform will generate an efficient Agent, which can accurately and efficiently complete the user's instructions by invoking these tools. For a specific application example, refer to Figure 1 The specific application example shown. Here, the user can be various users using the Agent platform client, which can be ordinary client users, or service providers providing other business supports for other user terminal applications, such as service providers providing support for weather applications, etc.
[0036] An intelligent system can be various systems that can make autonomous decisions on business goals, such as: intelligent question-answering systems, which can search and summarize the questions raised by users and give corresponding answers; intelligent analysis systems, which execute relevant analysis instructions for the analysis requirements raised by users and give analysis results; intelligent decision-making systems, which make decisions according to user instructions and clarify the business logic for each step to be executed; and so on. Figure 2An intelligent dialogue system using a large model is shown. Based on the questions raised by users, detailed analysis and answers can be provided. Robots, autonomous driving systems, etc. can include intelligent decision-making systems, which determine detailed operations according to user instructions. For example, when a robot receives the instruction "do a somersault" from a user, it decides a series of limb movements. In some cases, the division of intelligent systems may not be very clear. For example, an intelligent Q&A system can include intelligent analysis functions, and a robot may perform intelligent Q&A, intelligent analysis, intelligent decision-making, etc. through a large model.
[0037] In conventional technologies, some intelligent systems rely on the system's autonomous exploration of tool calls (such as APIs), that is, the system tries to call different tools to solve problems. In this way, it may lead to a slow speed of the intelligent system model during reasoning and may generate illusory and fact-inconsistent information. That is to say, randomly exploring in a huge and complex tool space may cause technical problems such as excessive user waiting time and a high risk of incorrect calls.
[0038] In view of this, this specification provides a technical concept. For a specific business scenario, offline path units can be constructed as candidate path units according to some possible user business requirements (such as question-asking requirements, data analysis requirements, etc.). A single candidate path unit can be an execution data group determined from preset business requirements. A single execution data group can, for example, include the current state (State), the target state (Goal), and actions (Action) (abbreviated as the SGA triple), and so on. During the process of processing real user requirements, a service platform that provides support for user services (such as a business service provider or Figure 1 the Agent platform in it, etc.) can retrieve from the candidate path units and select a suitable candidate path unit as the target path unit. The target path unit forms a path for performing relevant business processing. In this way, the response speed of the intelligent system can be greatly improved, and the business processing efficiency can be enhanced. When the candidate path unit is an optimization of the execution data group, the business processing accuracy can be further improved.
[0039] The technical concept of this specification will be described in detail below with reference to the accompanying drawings.
[0040] Figure 3 The data preprocessing process of an intelligent system according to an embodiment of this specification is shown. The execution subject of this process can be a computer, device, or server with a certain computing ability. This data preprocessing process can be used to determine candidate path units for the business processing process of the intelligent system.
[0041] Refer to Figure 3 As shown, the data preprocessing process of an intelligent system according to an embodiment can include the following steps:
[0042] Step 301, obtain the current business objective in a predetermined business scenario; Step 302, expand the search among various candidate actions according to the current business objective to obtain a number of execution paths, where a single candidate action includes several operations of calling relevant modules or changing at least one item in the current business objective; Step 303, extract a number of execution data groups from each execution path, and a single execution data group includes the corresponding starting state, target state, and executed operations; Step 304, screen each execution data group according to a predetermined rule to obtain each candidate path unit.
[0043] First, in Step 301, obtain the current business objective in a predetermined business scenario.
[0044] It can be understood that multiple business objectives related to the business scenario can be preset for a single business scenario. The predetermined business scenario can be understood as the current specific application environment, for example, it can be determined by the following index items: the type of the APP / miniprogram applied (such as consultation, customer service, data analysis, etc.), the target group (such as students, scientific researchers, all user groups), the relevant business field (such as medical, technology, weather, shopping, etc.), and so on.
[0045] Based on different business scenarios, a single business objective can be a single user problem, a single analysis requirement, a single adjustment instruction (such as the behavior instruction of a robot), and so on.
[0046] A single business objective can be determined in the following way: analyze the business needs of the user to determine the required toolset; generate a business template according to the business needs and the toolset; and specify the business template through a specific business to obtain the corresponding business objective.
[0047] Among them, the business needs of the user can be designed by experts, proposed by relevant product requirement personnel, or collected from the historical business objectives of similar business scenarios, which is not limited here. The toolset can be the modules that need to be called during the business processing process (such as corresponding to various APIs, that is, Application Programming Interface, application programming interface). The business template can be an instruction template for processing relevant businesses. For example, for an application related to weather, a business need is to inquire about the weather in a specific city, then the corresponding instruction template is the question template, such as "What's the weather like in **?" At this time, the specific business objective can fill in the specific city, such as "What's the weather like in Beijing", and so on.
[0048] A single business need can correspond to several business templates, and a single business template can generate several specific business objectives. The current business objective can be a single business objective corresponding to a single business template under any business need.
[0049] Next, through step 302, expand the search among various candidate actions according to the current business objective to obtain several execution paths.
[0050] Among them, a single candidate action includes at least one instruction to call a relevant module or modify the business objective. For example, in the case of calling a relevant module, an instruction to obtain the transaction amount from the blockchain based on the hash value provided by the user, an instruction to obtain the historical weather trajectory from historical weather data based on the period provided by the user (such as within half a year); in the case of modifying the business objective, try to correct the typos in the business objective when the result cannot be obtained, such as modifying the current business objective "What's the weather like in Beijin" to "What's the weather like in Beijing", and so on.
[0051] Candidate actions can be various operations determined according to the list of tool APIs provided by the user. Here, the user can be the business party that needs to plan the path of the intelligent system. For example, the service provider of a weather forecast application, the designer of a robot intelligent system, and so on. Those skilled in the art can understand that some predefined functions (i.e., modules that implement certain functions) can be called through the API, aiming to provide the application program and developers with the ability to access a set of routines based on a certain software or hardware without accessing the source code or understanding the details of the internal working mechanism. The API itself is abstract, and it only defines an interface without involving the specific operations in the actual implementation process of the application program. According to the API, multiple actions can be implemented. For example, operations such as querying, inserting, updating, and deleting data can be implemented according to the database API. These actions are all used as candidate actions.
[0052] The candidate action as a node can also be denoted as an atomic action. In an atomic action, it can include one action or a series of actions. In other words, if multiple operations are usually used together in sequence, one action is often followed by another action, or one action is often preceded by another action, then they can be bound into an atomic action. For example, for the data acquisition or deletion operation of the database, the previous action is usually query, so query - acquisition can be used as an atomic action corresponding to a node, and query - deletion can be used as an atomic action corresponding to a node.
[0053] For the current business objective, the corresponding action can be searched from each candidate action through a search algorithm to obtain the corresponding execution path. The search algorithm is a method that uses the high performance of the computer to purposefully exhaust some or all possible situations in the solution space of a problem to find the solution of the problem. The search algorithm here can be, for example, one of the following: enumeration algorithm, depth - first search, breadth - first search, A* algorithm, backtracking algorithm, Monte Carlo tree search, hash function, and so on.
[0054] Taking the Monte Carlo Tree Search (MCTS) algorithm as an example, its core idea is to find better decisions through simulation and selection. Its implementation steps mainly include several parts: Selection, Expansion, Simulation, and Backpropagation. The MCTS algorithm can, through the process of simulation and selection, help the machine make better decisions in complex environments. The MCTS algorithm has high efficiency and flexibility, can find better solutions within limited time, is especially suitable for problems with huge exploration spaces, and can combine different strategies and simulation methods to adapt to different application scenarios.
[0055] Figures 4 to 7 Describes a specific example of each part of the MCTS algorithm.
[0056] In the Selection part, starting from the root node, select child nodes according to a certain strategy (such as the Upper Confidence Bound, UCB strategy) until a leaf node is reached. During the selection process, the value scores of each node (such as UCB values) are calculated, and the node with the highest score is selected as the current node. As Figure 4 shown, in the Selection part of the MCTS algorithm, node types can include, for example, "single step", "backward", "change", etc. For each node, it can be selected as a child node of the root node according to the value score. This score usually comprehensively considers the exploration rate of the node and its past success rate, such as the UCB value. The UCB value can be understood as consisting of two parts: the expected value of the path and the exploration value. Among them, the expected value describes the past success rate, and the exploration value describes the desire of the node to be exploited. Usually, the fewer the number of visits, the higher the exploration value. For example, the exploration value can be determined by the reciprocal of the number of historical visits. In a specific example, the value score of a node can be the weighted sum of the expected value and the exploration value to balance "Exploitation vs. Exploration". Through the operation of the "Selection" part, nodes with high potential can be preferentially selected to improve the search efficiency and quality.
[0057] In the Expansion part, if the selected leaf node has no child nodes, create new child nodes, so that new possibilities can be explored. As Figure 5As shown, assume that the "single step" node is selected. When the path termination condition is not met, child nodes are created to continue the search and selection. Specifically, the root node can be determined based on the current business objective, and then multiple different directions of reasoning or actions can be set based on the state of the current node to create multiple possible child nodes, which represent different actions that can be taken in the current state. In this way, by generating diverse child nodes, the diversity of the exploration path can be ensured, enabling the search process to cover more possible paths and increasing the chance of finding a better solution.
[0058] Simulation part: Execute a random policy on the selected child node for simulation until the termination condition is met, so as to obtain the value estimation of this child node. Figure 6 The simulation part example is shown. Execute a random policy on the selected child node for simulation until the termination condition is met to obtain the result. This part can correspond to simulating multiple complete paths starting from the expanded nodes to evaluate the possible effects of these paths when reaching the target state. Specifically, perform a quick simulation for each expanded node, usually by randomly selecting actions to explore possible results in the policy space. Simulate the complete path until the termination condition is reached (such as reaching the maximum depth or completing the business target state). The purpose is to quickly evaluate the potential value of each possible path and provide reliable data support for subsequent optimization.
[0059] Backtracking part: Transmit the simulation results back to the tree and update the statistical information of each node, such as the number of visits, the number of victories, the value score, etc. Figure 7 This is a backtracking schematic. After the simulation ends, backtrack and update the simulation results to the passed nodes and update the score information for each node. That is, starting from the terminal node, transmit the result information obtained from the simulation (such as the reward value) back to all its ancestor nodes. Update the scores of these nodes to reflect the adjusted path potential under the new simulation data. For example, according to whether the search path obtains a result, a reward value can be determined, and this reward value can be used to update the node values of each node on the path. For example, the score of a node is updated to v = v + δ, where δ is the update value determined based on whether a result is obtained in the update rule (such as the reward value). If a result is obtained, δ takes the first value, such as 1; if no result is obtained, δ takes the second value, such as -1, etc. The purpose is to continuously optimize the selection strategy by accurately updating the value information of each node, enabling the search tree to be closer to the global optimal solution.
[0060] In an alternative embodiment, the reward value of a single path can be an evaluation score obtained by scoring based on at least one of the success rate, efficiency, and accuracy of tool calls. Among them, the scoring process can be implemented, for example, through a pre-trained scoring model or through a large model, which is not limited here. The reward value can be directly and equally transmitted back to each node on the path.
[0061] A specific search process using the MCTS algorithm, for example, includes the following steps: Initializing the search tree: According to the current business objective, initialize the root node of the current search tree; Path search: Simulate multiple paths through a predetermined search algorithm to generate the current search tree, where a single node in the current search tree corresponds to a single candidate action; Score evaluation: Calculate various evaluation scores for each path in the current search tree respectively; Determine the execution path: Determine the path whose corresponding evaluation score meets the valid condition as the execution path.
[0062] It should be noted that the termination condition in path search can be determined in advance or judged in each search step. In an example where it is judged in each search step, the termination condition can be to complete the current business objective. For example, it can be judged whether the current business objective has been completed via a large model in each search step. In the case of completing the current business objective, determine that the corresponding search path ends. In an alternative embodiment, a maximum search depth (such as 20) can also be set to avoid infinite search in the case where other path termination conditions are not met.
[0063] In this way, multiple paths can be formed according to a business objective. Under the MCTS search algorithm, these paths can form the branches of the search tree. The leaf nodes of the search tree can be nodes that have completed the corresponding business objective, or nodes that have not completed the corresponding business objective but have reached other termination conditions (such as reaching the maximum search depth). Through path search, various paths from the current state to the target state can be explored to ensure the rationality and feasibility of path planning.
[0064] According to some possible designs, for a current business objective, a corresponding search algorithm can be iterated multiple times (such as 50 times). On the one hand, more exploration of possible paths can be carried out, and on the other hand, the weights of each path can be superimposed according to the probability of being searched. For example, under the MCTS search algorithm, the steps of initializing the search tree, path search, and score evaluation are iteratively executed. And during the iterative execution of each step, the evaluation scores in a single path are traced back to each node in the path.
[0065] According to the path search result, an effective path for the current business objective, or a so-called successful path, can be determined and recorded as the execution path. It can be understood that the effective or successful path in the search tree can be understood as the path that successfully reaches the current business objective. For example Figure 2In the example, the weather conditions of the two cities, "Zhengzhou" and "Beijing", are successfully analyzed. In an optional embodiment, all paths to achieve the current business goal can be determined as execution paths. In another embodiment, the paths that meet the following valid conditions according to the final score can be determined as execution paths: exceeding a predetermined threshold, or the top predetermined number (such as 50) of paths arranged from high to low. In other embodiments, the execution paths can also be determined by other means, which are not limited herein.
[0066] Then, in step 303, several execution data groups are extracted from each execution path. A single execution data group includes the corresponding starting state, target state, and executed operations.
[0067] It can be understood that an execution path can contain multiple actions, and one action corresponds to the transition from one business state to another. In this specification, this kind of state transition can be recorded as an execution data group. Among them, an execution data group can include the corresponding starting state, target state, and executed operations. Among them, the starting state can be represented by State, the target state can be represented by Goal, and the action can be represented by Action. Then, in this specification, the execution data group can also be recorded as an SGA triple. The action A here can correspond to a node or atomic action described above, and it can include one or more operations. The business state can be transformed from the starting state S to the target state G under the relevant operations of the action A.
[0068] In one embodiment, the SGA triples can be extracted from each execution path one by one. During the process of extracting the SGA triples from a single execution path, the execution path can be first parsed to identify the nodes in the path. Then, the starting state, target state, and corresponding operations of each step (for example, corresponding to a single node) are extracted from the execution path to form an SGA triple. Among them, the operation here can be the operation corresponding to the corresponding node. For example, after identifying the corresponding node, it can be obtained through the atomic action defined by the corresponding node.
[0069] In another embodiment, according to the connection relationship between nodes, the nodes in the execution path can be identified, and according to the number of child nodes of each node, the corresponding starting state, target state, and corresponding operations can be determined to determine multiple SGA triples. It can be understood that in the case where an intermediate node corresponds to a single parent node and a single child node, or a leaf node corresponds to a single parent node, the corresponding SGA triple is unique. Optionally, in the search tree, multiple paths can be detected together to avoid the repeated occurrence of SGA triples on multiple partially overlapping paths. In the case where chains corresponding to multiple consecutive nodes usually appear together, the chains corresponding to multiple nodes can also be taken together as an execution data group.
[0070] In other embodiments, the SGA triples can also be determined in other ways, which will not be elaborated here.
[0071] As a specific example, assume that a business goal given by a user is "0x88df01 6429689c079f3b2f6ad39fa0 52532c56 795b733d a78a91eb e6a71394 4b Analyze the two parties of this transaction", then by constructing a search tree, the SGA triples split from different successful paths can include, for example: "{'sga':{'goal':'Obtain the details of the specified transaction','state':'The user provided the transaction hash', 'action':['getTransactionByHash']}}" ({SGA: {Goal state: 'Obtain the details of the specified transaction', Current state: 'The user provided the transaction hash', Action: Obtain the transaction by hash}), "{'sga':{'goal':'Obtain the balances of the sender and receiver of the specified transaction and compare which is more','state':'The transaction hash is known', 'action':
[0072] ['getTransactionByHash', 'getBalance', 'getBalance']}" ({SGA: {Goal state: 'Obtain the balances of the sender and receiver of the specified transaction and compare which is more', Current state: 'The transaction hash is known', Action: Obtain the transaction by hash, Obtain the balance, Obtain the balance}), and so on.
[0073] Precisely extract the key steps in the path and construct a clear and operable execution data group, which can provide a basis for subsequent optimization and storage.
[0074] Furthermore, through step 304, each can be screened according to a predetermined rule to obtain each candidate path unit.
[0075] Here, the predetermined rule can be various rules for screening the execution data group (SGA triples). The predetermined rule can include, for example, but is not limited to at least one of the following: deduplication; perform a trial call on the candidate actions in the validation set to detect their accuracy or call success rate in the real environment, and the judgment result is that the accuracy is greater than a predetermined threshold, or the call success rate is greater than a predetermined threshold; filter the execution data group link and screen out the link with a link success rate lower than the predetermined threshold; and so on.
[0076] Among them, deduplication is to detect duplicate and redundant triples in the SGA triples. For example, for a business objective to compare three business entities A, B, and C, in one execution path, A and B are compared first, then B and C, then A and C, and finally the comparison result is obtained. In another execution path, B and C are compared first, then A and C, and then A and B, and finally the comparison result is obtained. These comparison processes are independent of each other, so they may appear in two execution paths simultaneously, resulting in duplicates. The deduplication process can be achieved by comparing the three elements S, G, and A in the triples, which will not be elaborated here. Deduplication can ensure that each SGA entry is unique and necessary.
[0077] Call verification is a process of, for each SGA triple, according to the given current state S, calling the corresponding API (performing action A) on the verification set to verify whether the target state G can be obtained. The calling process on the verification set can verify the real result after the corresponding action is performed in the face of the actual scenario. Generally, when the target state G is obtained, it can be considered that the SGA triple verification is successful; otherwise, when the target state G is not obtained, it can be considered that the SGA triple verification fails. In some alternative embodiments, the API call may be affected by various factors. Therefore, it can be called multiple times on multiple samples in the verification set, and the success rate is determined. The SGA triples with a success rate higher than the predetermined threshold are used as valid SGA triples, and other triples are screened out. The success rate is determined, for example, according to the ratio of the number of successful times to the total number of calls.
[0078] In some embodiments, the execution data group link can also be filtered to screen out the links with a link success rate lower than the predetermined threshold. In this case, the links formed by multiple execution data groups can be tested together, so as to test the combined performance of the cooperation between the execution data groups.
[0079] In other embodiments, other predetermined rules can also be used to screen the execution data groups. In this way, accurate and feasible execution data groups can be screened out. The screened execution data groups can be stored as candidate path units.
[0080] Under the technical concept of this specification, the candidate path unit can be used in the online usage process, such as in the process of the business party providing corresponding business support to users for path planning.
[0081] Figure 8 Shows the path planning process of an intelligent system according to an embodiment. The execution subject of this process can be a computer, device, server with certain computing capabilities, such as Figure 1 the Agent platform shown. The candidate path units determined by processes such as Figure 3 are stored on the execution subject or other devices (such as database devices) connected thereto. According to the technical concept of this specification,Figure 8 The path planning process of the shown intelligent system may include the following steps: Step 801, according to the first service objective input by the current user, retrieve several target path units from each candidate path unit. Each candidate path unit is determined through offline data preprocessing. The above offline data preprocessing includes: for each service objective in the candidate service set, retrieve in the candidate actions respectively to determine several execution paths; the execution data groups extracted from each step of each execution path are used as candidate path units, and a single execution data group includes the starting state, the target state, and the executed operations; Step 802, based on the above several target path units, plan a service processing path to complete the relevant service processing of the first service objective.
[0082] First, in Step 801, according to the first service objective input by the current user, retrieve several target path units from each candidate path unit.
[0083] The current user here can be a user who is currently using a client device to perform a certain service, such as a user who uses a weather application client to query weather conditions. Correspondingly, the first service objective can be determined through the current service information sent by the current user, such as the question raised, the search term input, etc. For example, the first service objective is "What's the weather like today?" and so on.
[0084] As the name implies, a candidate path unit is a pre-determined operation unit that may be involved in the operation paths for completing service objectives under various corresponding service requirements in the current service scenario. It may include the corresponding operations and the corresponding states before and after the operations. A candidate path unit can be regarded as a whole. After performing the corresponding operations from a current state, it usually reaches another state, that is, the target state. Thus, it can appear in various relevant paths to achieve the transformation from the included current state to the target state.
[0085] Each candidate path unit can be determined through offline data preprocessing. The so-called offline data preprocessing can be understood as a preparatory processing process based on offline data before the relevant service platform is used online. The above offline data preprocessing process may include the following steps, for example: for each service objective in the candidate service set, retrieve in the candidate actions respectively to determine several execution paths; the corresponding execution data groups are extracted from each step of each execution path as candidate path units, and a single action unit includes the starting state, the target state, and the executed operations.
[0086] Among them, the candidate service set may include various specific service objectives that may be involved in advance for the corresponding application. For example, user query statements (such as "What's the weather like in Beijing") or task instructions (such as "Help me analyze the weather trends in March in Beijing in the past thirty years") collected from similar applications for weather applications, etc.
[0087] The candidate actions can be determined by various tools (APIs) that can be called according to the current business scenario. A single candidate action can be an atomic action, and a single atomic action can include one or more operations performed using the corresponding tool. For example, querying and reading operations using a database interface can be used as a candidate action. According to the tools that can be called in the current business scenario, various possible actions can be determined in advance as candidate actions.
[0088] Based on a single business objective, various possible execution paths can be searched from each candidate action using a search algorithm (such as the MCTS described above). The execution path determination rules here include, for example, at least one of the following: successfully completing the corresponding business objective, and the path scores are arranged from high to low in the top predetermined number / the path score exceeds a predetermined threshold. Taking the MCTS search algorithm as an example, paths with path scores exceeding the predetermined threshold can be selected as execution paths among the paths that successfully complete the objective. A specific execution path can be, for example: initial state → action 1 → first state → action 2 → second state...
[0089] The execution path can be segmented to extract the corresponding path units. A single path unit can include a starting state, a target state, and the operations performed. For example, in the above example, the path units obtained by segmentation can include: initial state → action 1 → first state, first state → action 2 → second state, etc. In one embodiment, the deduplicated path units obtained by segmenting each execution path can all be used as candidate path units. In another embodiment, each action can also be scored during the search process, or the path units obtained by segmentation can be scored by call verification, so as to select the path units with higher score values as candidate path units. A specific implementation scheme for determining candidate path units is as Figure 3 shown.
[0090] For the current first business objective, the target path unit for completing this business objective can be retrieved from each candidate path unit. The retrieval process can be similar to the retrieval in the offline path unit determination process, which will not be elaborated here. The difference is that the retrieval in the offline path unit determination process includes more possibilities, while the path retrieval for the first business objective is based on the selected high-quality candidate path units. In this way, the response speed of business processing can be improved.
[0091] Then, via step 802, based on the above-mentioned several target path units, plan the service processing path to complete the service processing related to the first service objective.
[0092] After relevant target path units are searched, relevant execution plans can be formulated using the corresponding target paths. Then, relevant tools are called according to the tool interfaces (APIs) in the execution plans to complete the service processing of the first service objective. Among them, the process of formulating a plan is similar to the way of specifying a plan in conventional technologies. For example, the logical relationships between target path units can be detected by an intelligent system to form a task list, and then relevant tools are called according to the task list for execution.
[0093] As a specific example, assume that the first service objective is:
[0094] "tasks":
[0095] Query the smart contract code of the initiating address of the fifth transaction in block 0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35, and the receipts of all transactions in this block
[0096] After searching in the candidate path units, three target units are obtained, namely: "get_transaction", "get_contract_code", "get_block_receipts". The three target units are converted into a task list by the intelligent system as follows:
[0097]
[0098] Calling relevant task tools according to the above task list (the call is completed by the tool indicated by "tool_name") can complete the first service objective.
[0099] In the path planning process of this intelligent system, since offline path exploration and candidate path unit extraction are adopted, time-consuming links in the online reasoning and decision-making of the intelligent system can be advanced to before task execution, thereby reducing the computational burden during real-time reasoning and enabling the intelligent system to quickly respond to user requests.
[0100] Looking back on the above process, for the path planning problem in the service processing process of the intelligent system, an offline pre-path exploration method is adopted to extract candidate path units. Thereby reducing the time-consuming links in path planning during the service processing process and improving the response speed and processing efficiency of the intelligent system for the service objectives input by users.
[0101] On the other hand, during the process of extracting candidate path units, in the process of path search and extracting candidate path units, through simulation and backtracking updates, it is ensured that paths with better simulation effects are selected for candidate path unit extraction, reducing the possibility of illusory generation, and ensuring that the stored candidate path units are feasible and accurate in practical applications. Integrating such a data preprocessing process with the technical concept of pre-offline extraction of candidate path units in this specification can improve the efficiency and success rate of path planning by the intelligent system when facing complex problems.
[0102] According to an embodiment of the other aspect, there is also provided a data preprocessing device for an intelligent system, which can be disposed in a computer, device, or server with certain computing capabilities. Figure 9 Fig. 900 shows a data preprocessing device for an intelligent system according to an embodiment, including:
[0103] An acquisition unit 901, configured to acquire the current service objective in a predetermined service scenario;
[0104] A search unit 902, configured to expand and search among various candidate actions according to the current service objective to obtain a number of execution paths, where a single candidate action includes several operations of calling relevant modules or at least one item of changing the current service objective;
[0105] An extraction unit 903, configured to extract a number of execution data groups from each execution path, where a single execution data group includes the corresponding starting state, target state, and executed operations;
[0106] A screening unit 904, configured to screen each execution data group according to a predetermined rule to obtain each candidate path unit.
[0107] According to an embodiment of still another aspect, there is also provided a service processing device for an intelligent system, which can be disposed in a computer, device, or server with certain computing capabilities. Figure 10 Fig. 1000 shows a service processing device for an intelligent system according to an embodiment, including: a retrieval unit 1001, configured to retrieve a number of target path units from each candidate path unit according to the first service objective input by the current user, and each candidate path unit is determined through offline data preprocessing, and the offline data preprocessing includes: retrieving respectively among candidate actions for each service objective in the candidate service set to determine a number of execution paths; taking the execution data groups extracted from each step of each execution path as candidate path units, and a single execution data group includes a starting state, a target state, and executed operations; a processing unit 1002, configured to plan a service processing path based on a number of target path units to complete the relevant service processing of the first service objective.
[0108] It is worth noting that Figure 9 、Figure 10 The illustrated apparatuses 900 and 1000 respectively correspond to Figure 3 , Figure 8 the illustrated method embodiments. Therefore, Figure 3 , Figure 8 the corresponding descriptions in the method embodiments of can also be correspondingly applied to Figure 9 , Figure 10 the illustrated apparatuses 900 and 1000, which will not be elaborated herein.
[0109] According to an embodiment of another aspect, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed on a computer, the computer is caused to execute the method described in conjunction with Figure 3 , Figure 8 and so on.
[0110] According to an embodiment of still another aspect, a computing device is further provided, including a memory and a processor. An executable code is stored in the memory. When the processor executes the executable code, the method described in conjunction with Figure 3 , Figure 8 and so on is implemented.
[0111] Those skilled in the art should be able to realize that in the above one or more examples, the functions described in the embodiments of this specification can be implemented by hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0112] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the technical concept of this specification. It should be understood that the above description is only the specific embodiments of the technical concept of this specification and is not used to limit the protection scope of the technical concept of this specification. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of this specification should be included in the protection scope of the technical concept of this specification.
Claims
1. A method for business processing of an intelligent system, comprising: Retrieving a number of target path units from each candidate path unit according to a first business objective input by a current user, where each candidate path unit is determined through offline data preprocessing, and the offline data preprocessing includes: retrieving for each business objective in a candidate business set respectively in candidate actions to determine a number of execution paths; taking the execution data groups extracted from each step of each execution path as candidate path units, and a single execution data group includes a starting state, a target state, and an executed operation; Planning a business processing path based on the number of target path units to complete the relevant business processing of the first business objective.
2. A data preprocessing method for an intelligent system, which is used to determine candidate path units for the intelligent system in advance, so that during the business processing of the intelligent system, a target path unit can be selected from the candidate path units for relevant business processing; The method includes: Obtaining a current business objective under a predetermined business scenario; Expanding and searching in each candidate action according to the current business objective to obtain a number of execution paths, where a single candidate action includes a number of operations for calling relevant modules or changing at least one item in the current business objective; Extracting a number of execution data groups from each execution path, and a single execution data group includes a corresponding starting state, a target state, and an executed operation; Screening each execution data group according to a predetermined rule to obtain each candidate path unit.
3. The method according to claim 2, wherein, The current business objective is obtained from a number of business objectives determined by one of the following methods: scraping from historical business objectives of the same type of business; presetting according to the predetermined business scenario.
4. The method according to claim 2, wherein, The expanding and searching in each candidate action according to the current business objective to obtain a number of execution paths includes: Initializing a search tree: initializing the root node of the current search tree according to the current business objective; Path searching: simulating multiple paths through a predetermined search algorithm to generate the current search tree, where a single node in the current search tree corresponds to a single candidate action, and the termination condition of a single path is: completing the current business objective, or reaching a predetermined maximum search depth; Score evaluation: calculating respective evaluation scores for each path in the current search tree; Determining an execution path: determining the path whose corresponding evaluation score meets the following valid conditions as an execution path: exceeding a predetermined threshold, or being among the top predetermined number of paths arranged from high to low.
5. The method according to claim 4, wherein Before determining the execution path, for the current business objective, iteratively and sequentially execute the following steps: the step of initializing the search tree, the step of path searching, and the step of score evaluation. During the iterative execution of each step, the evaluation score in a single path is traced back to each node in the path.
6. The method according to claim 2, wherein, The extracting a number of execution data groups from each execution path includes: Extracting each candidate action in the execution path; Determining an execution data group according to the front and back states corresponding to each node and the corresponding candidate action.
7. The method according to claim 2, wherein, The predetermined rule includes at least one of the following: Removing duplicates; Performing a trial call of the candidate action in a validation set to detect its accuracy or call success rate in a real environment, and determining that the result is that the accuracy is greater than a predetermined threshold, or the call success rate is greater than a predetermined threshold; Filtering the execution data group link, and screening out the link with a link success rate lower than a predetermined threshold.
8. A business processing apparatus for an intelligent system, comprising: A retrieval unit, configured to retrieve a number of target path units from each candidate path unit according to a first business objective input by the current user. Each candidate path unit is determined through offline data preprocessing, and the offline data preprocessing includes: for each business objective in a candidate business set, retrieving in candidate actions respectively to determine a number of execution paths; taking the execution data groups extracted from each step of each execution path as candidate path units, and a single execution data group includes a starting state, a target state, and an executed operation. A processing unit, configured to plan a business processing path based on the number of target path units to complete the relevant business processing of the first business objective.
9. A data preprocessing device for an intelligent system, which is used to determine candidate path units for the intelligent system in advance, so that during the business processing of the intelligent system, a target path unit can be selected from the candidate path units for relevant business processing; The device includes: An acquisition unit, configured to acquire the current business objective in a predetermined business scenario. A search unit, configured to expand and search in each candidate action according to the current business objective to obtain a number of execution paths, where a single candidate action includes a number of operations for calling relevant modules or at least one item for changing the current business objective. An extraction unit, configured to extract a number of execution data groups from each execution path, and a single execution data group includes a corresponding starting state, a target state, and an executed operation. A screening unit, configured to screen each execution data group according to a predetermined rule to obtain each candidate path unit.
10. A computing device, comprising a memory and a processor, characterized in that, An executable code is stored in the memory, and when the processor executes the executable code, the method according to any one of claims 1-7 is implemented.
