Training sample construction method and device and agent training method and device

By constructing component call flowcharts and action instruction sequences to generate training samples, the problem of low sample generation efficiency in agent training is solved, and efficient and accurate automatic generation of training samples is achieved.

CN120653988APending Publication Date: 2025-09-16BAIDU INT TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510798498.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing intelligent agents rely on sample annotations in specific fields to understand intent. The sample size is large and the cost is high, making it difficult to generate training samples efficiently.

Method used

By determining the agent type and functional component set corresponding to the sample query information, building a component call flowchart, and generating training samples based on the action instruction sequence, automated training sample generation is achieved.

Benefits of technology

It effectively saves labor costs, improves the efficiency and accuracy of training sample generation, and simplifies the sample labeling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653988A_ABST
    Figure CN120653988A_ABST
Patent Text Reader

Abstract

The invention provides a training sample construction method and device and an agent training method and device, and relates to the technical field of artificial intelligence, in particular to the technical fields of large models, automatic driving, intelligent traffic and the like. According to the specific implementation scheme, the method comprises the steps of determining an agent type corresponding to sample query information and a functional component set associated with the agent type; constructing a component calling flow chart based on an arrangement operation on a target component corresponding to the sample query information in the functional component set; and generating a training sample based on the action instruction sequence and the sample query information corresponding to the component calling flow chart. According to the mode, the construction efficiency of the training sample is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to technical fields such as large models, autonomous driving, and intelligent transportation, and more particularly to a method and device for constructing training samples and training intelligent agents. Background Art

[0002] To accurately understand intent, current intelligent agents rely on annotated examples in specific domains. These examples provide standard guidelines for understanding user problems and how to think about and solve them. Intelligent agents have a wide range of capabilities, and the sample size is also large, reaching tens of thousands. Summary of the Invention

[0003] The embodiments of the present disclosure provide a method, apparatus, device, and storage medium for constructing a training sample and training an intelligent agent.

[0004] In the first aspect, an embodiment of the present disclosure provides a method for constructing a training sample, which includes: determining the agent type corresponding to the sample query information and the set of functional components associated with the agent type; constructing a component call flowchart based on the orchestration operation of the target component corresponding to the sample query information in the functional component set; and generating a training sample based on the action instruction sequence corresponding to the component call flowchart and the sample query information.

[0005] In a second aspect, an embodiment of the present disclosure provides an intelligent agent training method, the method comprising: obtaining training samples; and training the intelligent agent based on the training samples, wherein the training samples are training samples obtained by the method described in any implementation of the first aspect above.

[0006] In the third aspect, an embodiment of the present disclosure provides a training sample construction device, which includes: a determination module, a construction module and a generation module, wherein the determination module is configured to determine the agent type corresponding to the sample query information and the set of functional components associated with the agent type; the construction module is configured to construct a component call flowchart based on the orchestration operation of the target component corresponding to the sample query information in the functional component set; the generation module is configured to generate a training sample based on the action instruction sequence corresponding to the component call flowchart and the sample query information.

[0007] In a fourth aspect, an embodiment of the present disclosure provides an intelligent agent training device, which includes: an acquisition module and a training module, wherein the acquisition module is configured to acquire training samples; the training module is configured to train the intelligent agent based on the training samples, wherein the training samples are training samples obtained by the method described in any implementation method of the first aspect above.

[0008] In a fifth aspect, an embodiment of the present disclosure provides an electronic device comprising one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect or the second aspect.

[0009] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner of the first aspect or the second aspect.

[0010] In a seventh aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in any implementation of the first aspect or the second aspect.

[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is an exemplary system architecture diagram in which the present disclosure may be applied; Figure 2 is a flowchart of an embodiment of a training sample construction method according to the present disclosure; Figure 3 is a flowchart of another embodiment of the training sample construction method according to the present disclosure; Figure 4 is a schematic diagram of an application scenario of the training sample construction method according to the present disclosure; Figure 5 is a flow chart of an embodiment of an agent training method according to the present disclosure; Figure 6 is a schematic diagram of an embodiment of a training sample construction apparatus according to the present disclosure; Figure 7 is a schematic diagram of an embodiment of an intelligent agent training device according to the present disclosure; Figure 8 It is a structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0013] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0014] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0015] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the training sample construction method of the present disclosure can be applied.

[0016] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0017] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages, etc.

[0018] Terminal devices 101, 102, and 103 may be hardware or software. When terminal devices 101, 102, and 103 are software, they may be installed in the electronic devices listed above. They may be implemented as multiple software programs or software modules, or as a single software program or software module. This is not specifically limited here.

[0019] Server 105 can be a server that provides various services, for example, determining the agent type corresponding to the sample query information and the set of functional components associated with the agent type; constructing a component call flowchart based on the orchestration operation of the target component corresponding to the sample query information in the functional component set; generating training samples based on the action instruction sequence corresponding to the component call flowchart and the sample query information.

[0020] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules (for example, to provide training sample construction services), or as a single software program or software module. This is not specifically limited here.

[0021] It should be noted that the training sample construction method provided in the embodiments of the present disclosure can be executed by the server 105, or by the terminal devices 101, 102, 103, or by the server 105 and the terminal devices 101, 102, 103 in cooperation with each other. Accordingly, the various parts (e.g., various units, sub-units, modules, and sub-modules) included in the training sample construction apparatus can be all provided in the server 105, or all provided in the terminal devices 101, 102, 103, or provided separately in the server 105 and the terminal devices 101, 102, 103.

[0022] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0023] Figure 2 A process 200 of an embodiment of a training sample construction method is shown. The training sample construction method may specifically include the following steps: Step 201: Determine the agent type corresponding to the sample query information and the set of functional components associated with the agent type.

[0024] In this embodiment, since different types of sample query information correspond to different types of agents, the execution subject (e.g. Figure 1 After obtaining the sample query information, the server 105 or terminal devices 101, 102, 103) can first determine the type of the sample query information, and then determine the agent type corresponding to the sample query information based on the preset correspondence between the type of the sample query information and the agent type.

[0025] Here, an intelligent agent refers to a system or entity that can perceive its environment, make decisions based on the perceived results, and take actions to achieve a specific goal. It can be physical (such as a robot) or in the form of software (such as a virtual assistant based on a large model).

[0026] The agent type, that is, the functional type of the agent, can be divided into multiple types according to the functions implemented by the agent, for example, map type, translation type, financial type, etc.

[0027] It should be noted that the sample query information here may include one or multiple query information. If the sample query information includes multiple query information, the multiple query information may be semantically related (e.g., the semantic correlation between the multiple query information is greater than or equal to a preset correlation threshold), for example, "How do I get to place A? What shopping malls are near place A?"; the multiple query information may also not be semantically related (e.g., the semantic correlation between the multiple query information is less than a preset correlation threshold), for example, "How do I get to place B? Forget it, let's go to place A?"

[0028] After determining the agent type, the execution subject can further determine the set of functional components associated with the agent type.

[0029] Among them, the functional components in the functional component set are used to execute action instructions to realize corresponding functions, and different functional components correspond to different action instructions.

[0030] Here, the functional component sets associated with different intelligent agent types are different. For example, the functional components in the functional component set associated with the map type are mainly used to process map data; the functional components in the functional component set associated with the translation type are mainly used to process translation data; and the functional components in the functional component set associated with the financial type are mainly used to process financial data.

[0031] Step 202: construct a component call flow chart based on the orchestration operation of the target component corresponding to the sample query information in the functional component set.

[0032] In this embodiment, the execution entity can directly present the functional component set and sample query information, and construct a component call flowchart based on the received orchestration operation on the target component corresponding to the sample query information in the functional component set; or it can first filter the functional component set according to the sample query information, and present the filtered functional component set, and construct a component call flowchart based on the received orchestration operation on the filtered functional component. This application does not limit this.

[0033] Here, the orchestration operation may include multiple items, such as process design operations, parameter configuration operations, etc.

[0034] Step 203: Generate training samples based on the action instruction sequence corresponding to the component call flow chart and the sample query information.

[0035] In this embodiment, after obtaining the call flow chart, the execution subject may determine the action instruction sequence corresponding to the component call flow chart, and associate the action instruction sequence with the sample query information and save it as a training sample.

[0036] Here, the execution result of the action instruction sequence corresponding to the component call flowchart is the response information corresponding to the sample query information.

[0037] The above-mentioned embodiments of the present disclosure determine the agent type corresponding to the sample query information and the set of functional components associated with the agent type; construct a component call flowchart based on the orchestration operation of the target component corresponding to the sample query information in the functional component set; generate training samples based on the action instruction sequence corresponding to the component call flowchart and the sample query information, that is, based on the orchestration operation of the functional components, the sample query information can be quickly labeled, compared with manually entering action instructions for sample labeling, it effectively saves labor costs and improves the efficiency of generating training samples.

[0038] In some optional embodiments, the functional components in the functional component set are generated based on the following steps: based on the agent type, determining the agent function that needs to be implemented; based on the agent function, determining multiple sub-functions, and generating a functional component for each sub-function.

[0039] In this implementation, the functional components in the functional component set can be generated in the following manner: the execution entity can determine the agent functions to be implemented based on the agent type, such as mapping and translation. Furthermore, the execution entity can split the agent functions into multiple sub-functions based on at least one of the business scenario, the function implementation process, and the function implementation logic.

[0040] Specifically, the agent type is a map type, and the execution subject can split the agent function into multiple sub-functions according to the implementation logic of the function, such as a judgment sub-function, a sorting sub-function, etc.

[0041] Here, the number of sub-functions depends on the degree of segmentation of the business scenario, the implementation process of the function or the implementation logic of the function. That is, the higher the degree of segmentation of the business scenario, the implementation process of the function or the implementation logic of the function, the more sub-functions are generated.

[0042] This implementation method determines the intelligent agent functions that need to be implemented based on the intelligent agent type; determines multiple sub-functions based on the intelligent agent functions, and generates a functional component for each sub-function, thereby achieving effective decomposition of the intelligent agent functions and improving the rationality and diversity of the generated functional components.

[0043] In some optional methods, multiple sub-functions are determined based on the intelligent agent function, including: splitting the intelligent agent function into multiple sub-functions according to different business scenarios and / or function implementation processes.

[0044] In this implementation, the execution entity can split the intelligent body functions according to different business scenarios and / or function implementation processes.

[0045] Specifically, the intelligent body type is a map type, and the executing entity can split the intelligent body function into multiple sub-functions according to different business scenarios, for example, tourism service sub-function, travel navigation sub-function, etc.; the intelligent body function can be split into multiple sub-functions according to the implementation process of the intelligent body function, for example, search sub-function, inquiry sub-function, etc.; the intelligent body function can also be split into multiple sub-functions according to different business scenarios and function implementation processes, for example, search sub-function and inquiry sub-function in tourism service scenarios; search sub-function and inquiry sub-function in travel navigation scenarios, etc. This application does not limit this.

[0046] This implementation method realizes the splitting of intelligent body functions based on business scenarios and / or function implementation processes, further improving the rationality and effectiveness of the split sub-functions.

[0047] In some optional embodiments, the agent type includes a map type.

[0048] In this implementation, if the executing entity determines that the agent type corresponding to the sample query information is a map type based on the preset mapping relationship between the type of sample query information and the agent type, a component call flowchart can be constructed based on the orchestration operation of the target component corresponding to the sample query information in the set of functional components associated with the map type.

[0049] Here, the functional component set associated with the map type may include multiple functional components for acquiring map data, such as a search component, a query component, and the like.

[0050] The search component is used to search for location locations and / or routes between locations; the query component is used to query for associated information of location locations and / or associated information of routes.

[0051] Specifically, the sample query information is "A place with delicious sweet shrimps", and the intelligent entity type corresponding to the sample query information is a map type. The execution subject can build a component call flowchart based on the orchestration operation of the target components (for example, search components and query components) corresponding to the sample query information in the set of functional components associated with the map type.

[0052] This implementation method realizes the construction of training samples for training map type agents by setting the agent type to include the map type.

[0053] In some optional embodiments, the functional component set includes at least one of the following: a point search component, a general route search component, a sub-route search component, a general route-asking component, a sub-route-asking component, a point-asking component, a clarification component, and a prompt component.

[0054] In this implementation, if the functional components in the functional component set are generated in the following manner: the intelligent agent function is split into multiple sub-functions according to the implementation process of the intelligent agent function, and a functional component is generated for each sub-function, then the functional component set may include at least one of the following: a point search component, a general route search component, a sub-route search component, a general route inquiry component, a sub-route inquiry component, a point inquiry component, a clarification component, and a prompt component.

[0055] Among them, the point search component can be used to search for location; the general route search component can be used to search for routes between locations; the sub-route search component can be used to search for routes between locations corresponding to transportation methods; the general route-asking component can be used to inquire about the associated information of routes; the sub-route-asking component can be used to inquire about the associated information corresponding to routes and transportation methods; the point-asking component can be used to inquire about the associated information of location; the clarification component can be used to retrieve sample query information; and the prompt component can be used to output prompt information if the sample query information processing fails.

[0056] Here, the number of sub-route search components may include multiple, and different sub-route search components correspond to different modes of transportation. For example, the number of sub-route search components may be four, namely the first sub-route search component, the second sub-route search component, the third sub-route search component and the fourth sub-route search component. The transportation mode corresponding to the first sub-route search component is walking, the transportation mode corresponding to the second sub-route search component is cycling, the transportation mode corresponding to the third sub-route search component is public transportation, and the transportation mode corresponding to the fourth sub-route search component is driving.

[0057] There may be multiple sub-components for directions, and different sub-components for directions correspond to different modes of transportation. For example, there may be four sub-components for directions, namely, a first sub-component for directions, a second sub-component for directions, a third sub-component for directions, and a fourth sub-component for directions. The first sub-component for directions corresponds to walking, the second sub-component for directions corresponds to cycling, the third sub-component for directions corresponds to public transportation, and the fourth sub-component for directions corresponds to driving.

[0058] The execution subject may present a set of functional components and construct a component call flow chart based on the orchestration operation on the target component corresponding to the sample query information in the set of functional components.

[0059] Here, the target component may include one or more functional components in the functional component set.

[0060] Specifically, the sample query information is "Where is place A?", and the target component corresponding to the sample query information may include a point search component, which is used to determine the location of place A; the sample query information is "How long does it take to get from place A to place B?", and the target component corresponding to the sample query information may include a point search component, a total route search component, and a total route-asking component, and the point search component is used to determine the location of places A and B, the total route search component is used to search for routes between places A and B, and the total route-asking component is used to inquire about the associated information of the routes; the sample query information is "How long does it take to get from place A to place B by bus?", and the target component corresponding to the sample query information may include a point search component, a sub-route search component (such as the third sub-route search component), and a sub-route-asking component (such as the third sub-route-asking component), and the point search component is used to determine the location of places A and B, the sub-route search component is used to search for bus routes between places A and B, and the sub-route-asking component is used to inquire about the associated information of bus routes.

[0061] This implementation method sets a functional component set including at least one of the following through an implementation process of the intelligent agent function based on a map-type intelligent agent: a point search component, a general route search component, a sub-route search component, a general route inquiry component, a sub-route inquiry component, a point inquiry component, a clarification component, and a prompt component, thereby achieving effective configuration of the functional component set and effectively improving the flexibility of the component call flowchart configuration.

[0062] Further references Figure 3 , which shows Figure 2 The process 300 of another embodiment of the training sample construction method is shown. In this embodiment, the process 300 of the training sample construction method may include the following steps: Step 301: Determine the agent type corresponding to the sample query information and the set of functional components associated with the agent type.

[0063] In this embodiment, the implementation details and technical effects of step 301 can be found in the description of step 201 and will not be repeated here.

[0064] Step 302: Filter the functional component set based on the sample query information and present the filtered functional component set.

[0065] In this embodiment, the manner in which the execution subject screens the functional component set based on the sample query information may be associated with the manner in which the functional components in the functional component set are constructed.

[0066] Specifically, if the functional components in the functional component set are constructed based on business scenarios (for example, tourism service scenarios, travel navigation scenarios, etc.), the execution entity can first perform semantic recognition on the sample query information, determine the business scenario corresponding to the sample query information, and then filter the functional component set according to the determined business scenario to obtain the filtered functional component set.

[0067] Specifically, if the functional component set includes functional components corresponding to tourism service scenarios and functional components corresponding to travel navigation scenarios, and the business scenario corresponding to the current query information is a tourism service scenario, the functional component set can be filtered according to the tourism service scenario to obtain a filtered functional component set.

[0068] If the functional components in the functional component set are constructed based on the implementation process of the intelligent agent function (for example, if the implementation process of the intelligent agent function is inquiry, the functional component set may include functional components corresponding to the inquiry; if the implementation process of the intelligent agent function is search-inquiry, the functional component set may include functional components corresponding to the inquiry and functional components corresponding to the search, wherein the search can be further divided into searching for points, searching for routes, etc., and the inquiry can be further divided into asking for points, asking for routes, etc., that is, the functional components corresponding to the inquiry can be divided into functional components corresponding to asking points and functional components corresponding to asking for routes, and the functional components corresponding to the search can be divided into functional components corresponding to searching points and functional components corresponding to searching for routes), the execution subject can first perform semantic recognition on the query information, determine the process required to answer the sample query information, filter the functional component set, and obtain the filtered functional component set.

[0069] Specifically, if the functional component set includes functional components corresponding to inquiries and functional components corresponding to searches, and the process required to reply to sample query information is an inquiry, then the functional component set can be filtered according to the process required to reply to sample query information, i.e., the inquiry, to obtain a filtered functional component set.

[0070] If the functional components in the functional component set are constructed based on business scenarios and the implementation process of intelligent body functions, the execution entity first performs semantic recognition on the sample query information, determines the business scenario corresponding to the sample query information and the process required to reply to the sample query information, and then preliminarily screens the functional component set according to the business scenario. According to the process required to reply to the sample query information, the preliminarily screened functional component set is further screened to obtain the screened functional component set.

[0071] Specifically, if the functional component set includes functional components corresponding to tourism service scenarios and functional components corresponding to travel navigation scenarios, and the functional components corresponding to tourism service scenarios and the functional components corresponding to travel navigation scenarios are further divided into functional components corresponding to inquiries and functional components corresponding to searches, respectively; and the business scenario corresponding to the sample query information is a tourism service scenario, and the process required to answer the current query information is an inquiry, then the functional component set can be preliminarily screened based on the tourism service scenario, and the preliminarily screened functional component set can be further screened based on the process required to answer the sample query information, i.e., the inquiry, to obtain a screened functional component set. Furthermore, the execution entity can present the functional components in the screened functional component set.

[0072] Here, the execution entity can present functional components in the form of graphics, icons, interface elements, etc., and convey the function, purpose or prompt information of the component to the user through concise text descriptions, such as the text labels on the icon "Search point", "Ask point", etc. Users can use the components through visual recognition and interactive operations.

[0073] Step 303: Based on the received process design operation on the filtered functional component set, determine the target components and the calling relationships between the target components.

[0074] In this embodiment, the execution subject may monitor the process design operation on the filtered set of functional components, and in response to receiving the process design operation on the filtered set of functional components, determine the target components and the calling relationship between the target components based on the process design operation.

[0075] The process design operation may include at least one of a drag operation, a connection operation, a replacement operation, an adjustment operation, and the like.

[0076] Step 304 : Parameter configuration is performed on the target component, and based on the parameter-configured target component and the calling relationship between the target components, a component calling flow chart is determined.

[0077] In this embodiment, the execution entity may configure the parameters of the target component based on user input, or may automatically configure the parameters of the target component according to sample query information, and this application does not limit this.

[0078] Furthermore, based on the calling relationship between the target component and the target functional component after parameter configuration, a component calling flow chart is determined.

[0079] Step 305: Generate training samples based on the action instruction sequence corresponding to the component call flow chart and the sample query information.

[0080] In this embodiment, the implementation details and technical effects of step 305 can be found in the description of step 203 and will not be repeated here.

[0081] The above-mentioned embodiments of the present disclosure screen the functional component set based on sample query information and present the screened functional component set, determine the target component and the calling relationship between the target components based on the received process design operation on the screened functional component set, configure the parameters of the target component, and determine the component call flowchart based on the target component after parameter configuration and the calling relationship between the target components, and generate training samples based on the action instruction sequence and sample query information corresponding to the component call flowchart, that is, perform process design based on the screened functional component set, and configure the parameters of the target component to generate training samples, which narrows the screening range of the target component, further improves the efficiency of generating training samples, and ensures the effectiveness of the generated training samples.

[0082] In some optional manners, the process design operation may include a drag operation and a connection operation.

[0083] In this implementation, the drag operation is used to adjust the position of the functional component, for example, to adjust the position of the functional component to the target area, such as the page editing area, layout container, etc.; the connection operation is used to determine the calling relationship between target components. The types of connection operations can include multiple types, such as lines, arrows, icons or symbols, text annotations, data binding, etc.

[0084] Specifically, the execution entity can monitor the drag operations on the functional components in the presented filtered functional component set. If a drag operation on one or more functional components is received, such as dragging one or more functional components to the page editing area, the one or more functional components can be determined as target components; further, based on the connection operation received on the target component, for example, an arrow connection operation, the calling relationship between the target components can be determined based on the connection operation.

[0085] This implementation method determines the target components and the calling relationships between target components based on drag operations and connection operations, and builds a component call flowchart based on the target components and the calling relationships between target components. It is easy to modify and adjust the flowchart, and improves the flexibility and efficiency of flowchart construction.

[0086] In some optional manners, configuring parameters of the target component includes: determining parameter values ​​that match the target component based on sample query information; and configuring parameters in the target component based on the parameter values.

[0087] In this implementation, after determining the target components and the calling relationship between target components, for each target component, the execution entity can first determine the parameters of the target component, that is, the parameter name, and then determine the parameter value that matches the parameter in the sample query information, and configure the parameters in the target component according to the parameter value.

[0088] The target component may include multiple parameters, such as location name parameters, transportation mode parameters, time point parameters, and the like.

[0089] This implementation method determines the parameter value that matches the target component based on sample query information; and configures the parameters in the target component based on the parameter value, thereby realizing automatic configuration of the target component parameters.

[0090] In some optional methods, the parameters of the point search component include at least one of a place name parameter, a place category parameter, a place feature parameter, and a place quantity parameter; the parameters of the total route search component include at least one of a transportation mode parameter and a time point parameter; the parameters of the sub-route search component include a time point parameter; the parameters of the total route-asking component and the sub-route-asking component respectively include a route intention parameter; the parameters of the point-asking component include a place intention parameter; the parameters of the clarification component include at least one of a clarification content parameter and a query intention parameter; and the parameters of the prompt component include a complexity parameter.

[0091] In this implementation, the target component may include at least one of a point search component, a general route search component, a sub-route search component, a general route-asking component, a sub-route-asking component, a point-asking component, a clarification component, and a prompt component.

[0092] The parameters of the point search component may include at least one of a place name parameter, a place category parameter, a place feature parameter, and a place quantity parameter.

[0093] Specifically, the sample query information is "Where is Park A?", the target component may include a point search component, and the parameter value that matches the location name parameter of the point search component determined based on the sample query information is Park A.

[0094] The parameters of the overall route search component may include at least one of a traffic mode parameter and a time point parameter, the parameters of the sub-route search component may include a time point parameter, and the parameters of the overall route asking component and the sub-route asking component may respectively include a route intention parameter.

[0095] Specifically, the sample query information is "How long does it take to take the subway from place A to place B at 6 pm on Sunday?" The target components may include a point search component, a total route search component, and a total route-asking component. The calling relationship between the target components is that the total route-asking component calls the total route search component, and the total route search component calls the point search component. The parameter values ​​that match the place name parameters of the point search component determined based on the sample query information are places A and B, the parameter values ​​that match the transportation mode parameters and time point parameters of the total route search component are subway and 6 pm on Sunday respectively, and the parameter value that matches the route intention parameters of the total route-asking component is the overall time.

[0096] Here, the action instructions corresponding to the point search component, the overall route search component, and the overall route inquiry component can be as follows: 1. p1 = search_for_ poi (name = 'Place A') p2 = search_for_ poi (name = 'B') / / Search point components to find the first occurrence of A and B 2.r1 = search_for_rsn (transportation mode = 'subway', departure time = 'Sunday 06:00pm', starting point = p1, end point = p2) / / Total route search component, departure time is [Sunday 06:00pm], transportation mode is [subway], starting point is [p1], end point is [p2], check whether there is a standard route 3. m1 = ask_for_navigation (target = 'overall time', route_target = [r1]) / / The total route-asking component queries [r1] for information about [overall time] The question point component may include a location intent parameter.

[0097] Specifically, the sample query information is "Where is the place with delicious sweet shrimp in place A?", the target component may include two search point components (a first search point component and a second search point component) and a question point component. The calling relationship between the target components is that the second search point component calls the first search point component, and the question point component calls the second search point component. The parameters of the first search point component may include a place name parameter, and the parameters of the second search point component may include a place category parameter, a place feature parameter, and a place quantity parameter. The parameter value that matches the place name parameter determined based on the sample query information is place A, the parameter value that matches the place category parameter is delicious food, the parameter value that matches the place feature parameter is sweet shrimp, the parameter value that matches the place quantity parameter is n, and the parameter value that matches the place intent parameter of the question point component is search introduction.

[0098] Here, the action instructions corresponding to the first search point component, the second search point component and the query point component can be as follows: 1.p1 = search_for_poi(name = 'Shanghai') / / First search point component, find the first occurrence of [A] 2.s1 = search_for_poi(location = p1, location category = 'food', location feature = 'sweet shrimp', quantity = 'n') / / Second search point component, find [n] POIs located at [p1] with category [food] and feature [sweet shrimp] 3.nil = qa_for_poi(qa_target = 'Introduction', poi_target = [s1]) / / Ask the component to inquire about information about [Introduction] of [s1] The clarification component may include at least one of a clarification content parameter and a query intent parameter, and the prompt component includes a complexity parameter.

[0099] Specifically, the sample query information is "Provide a recommended route?", the target component may include a clarification component, the parameters of the clarification component may include a clarification content parameter, and the parameter value that matches the clarification content parameter determined based on the sample query information may be what the starting point and end point are; the sample query information is "Please plan the best route from A to B for me based on real-time traffic conditions and historical data. The route needs to consider the following conditions: avoid all congested sections, avoid construction areas, give priority to public transportation, and provide detailed information and estimated arrival time for each transfer point", the target component may include a prompt component, the parameters of the prompt component may include a complexity parameter, and the parameter value that matches the complexity parameter determined based on the sample query information may be that the calculation steps exceed 10 steps.

[0100] This implementation method realizes flexible configuration of target components by ensuring that the parameters of the point search component include at least one of a place name parameter, a place category parameter, a place feature parameter, and a place quantity parameter; the parameters of the overall route search component include at least one of a transportation mode parameter and a time point parameter; the parameters of the sub-route search component include a time point parameter; the parameters of the overall route-asking component and the sub-route-asking component include a route intention parameter; the parameters of the point-asking component include a place intention parameter; the parameters of the clarification component include at least one of a clarification content parameter and a query intention parameter; and the parameters of the prompt component include a complexity parameter.

[0101] In some optional methods, training samples are generated based on the action instruction sequence and sample query information corresponding to the component call flowchart, including: generating and presenting preview information based on the action instruction sequence and sample query information corresponding to the component call flowchart; in response to receiving an instruction that passes the verification of the preview information, associating the action instruction sequence and sample query information corresponding to the component call flowchart and saving them as training samples.

[0102] In this implementation, after determining the component call flowchart, the execution subject may generate an action instruction sequence according to the component call flowchart, and generate and present preview information according to the action instruction sequence and sample query information.

[0103] Here, the execution subject may directly generate and present preview information based on the action instruction sequence and sample query information; or may generate and present preview information based on the action instruction sequence, the thinking process corresponding to the action instruction sequence, and sample query information.

[0104] Specifically, the sample query information is "How long does it take to take the subway from place A to place B at 6 pm on Sunday?", and the thinking process corresponding to the action instruction sequence is "Determine that the simplified and abstracted problem is [from (a) to (b) at 6 pm on Sunday], how long does it take to take the subway, and the destinations to be reached are: (a) [place A] that appears for the first time; (b) [place B] that appears for the second time, which are the starting point and end point of the route respectively, and the departure time is [06:00 pm on Sunday]." The execution subject can generate and present preview information based on the action instruction sequence, the thinking process corresponding to the action instruction sequence, and the sample query information.

[0105] If an instruction that passes the verification of the preview information is received, the action instruction sequence corresponding to the component call flow chart and the sample query information may be associated and saved as a training sample.

[0106] If an instruction indicating that the preview information verification fails is received, the component call flow chart may be modified and updated based on the received modification instruction.

[0107] This implementation method generates and presents preview information based on the action instruction sequence and sample query information corresponding to the component call flowchart; in response to receiving an instruction that verifies the preview information, the action instruction sequence and sample query information corresponding to the component call flowchart are associated and saved as training samples, thereby realizing verification of the training samples and improving the accuracy of the generated training samples.

[0108] Continue to see Figure 4 , Figure 4 It is a schematic diagram of an application scenario of the training sample construction method according to this embodiment.

[0109] The sample query information is "How long does it take to take the subway from point A to point B at 6 pm on Sunday?" 401, the execution subject can determine the agent type corresponding to the sample query information, for example, the map type, and the functional component set 402 associated with the agent type, and present the functional component set 402 in the presentation area on the left side of the page 403, wherein the functional components in the functional component set 402 are used to execute action instructions, and the functional components may include a point search component, a total route search component, a sub-route search component, a total route asking component, a sub-route asking component, a point asking component, a clarification component, and a prompt component; further, based on the functional component set corresponding to the sample query, the execution subject can determine the agent type corresponding to the sample query information, for example, the map type, and the functional component set 402 associated with the agent type, and present the functional component set 402 in the presentation area on the left side of the page 403, The component call flowchart 404 is constructed by performing the orchestration operation of the target component (e.g., the point search component, the overall route search component, and the overall route inquiry component) corresponding to the information. For example, a drag operation for dragging the target component to the orchestration area, a connection operation (arrow connection) and a configuration operation for the target component are received; further, the execution subject can generate and present preview information based on the action instruction sequence and sample query information 401 corresponding to the component call flowchart 404; in response to receiving an instruction that verifies the preview information, the action instruction sequence and sample query information 401 corresponding to the component call flowchart 404 are associated and saved as training.

[0110] Figure 5 A process 500 of an embodiment of an intelligent agent training method is shown. The intelligent agent training method may specifically include the following steps: Step 501: Obtain training samples.

[0111] In this embodiment, the execution subject can obtain the training sample locally or from a remote server storing the training sample, wherein the training sample is as follows: Figure 2 、 Figure 3 The training samples obtained by the method described in the corresponding embodiment will not be described in detail here.

[0112] Step 502: Train the agent based on the training samples.

[0113] In this embodiment, after obtaining the training samples, the execution subject can train the intelligent agent according to the training samples, that is, use the sample query information in the training samples as input and the action instruction sequence in the training samples as the expected output to train the intelligent agent.

[0114] The above-mentioned embodiments of the present disclosure achieve effective training of the intelligent agent by obtaining training samples and training the intelligent agent according to the training samples.

[0115] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a training sample construction device. Figure 2 The method embodiment shown corresponds to the embodiment shown.

[0116] like Figure 6 As shown, the training sample construction device 600 of this embodiment includes: a determination module 601 , a construction module 602 and a generation module 603 .

[0117] Among them, the determination module 601 can be configured to determine the agent type corresponding to the sample query information and the set of functional components associated with the agent type.

[0118] The construction module 602 may be configured to construct a component call flow chart based on the orchestration operation on the target component corresponding to the sample query information in the functional component set.

[0119] The generating module 603 may be configured to generate a training sample based on the action instruction sequence corresponding to the component call flow chart and the sample query information.

[0120] In some optional embodiments of this embodiment, the functional components in the functional component set are generated based on the following steps: based on the agent type, determining the agent function that needs to be implemented; based on the agent function, determining multiple sub-functions, and generating a functional component for each sub-function.

[0121] In some optional methods, multiple sub-functions are determined based on the intelligent agent function, including: splitting the intelligent agent function into multiple sub-functions according to different business scenarios and / or function implementation processes.

[0122] In some optional aspects of this embodiment, the agent type includes a map type.

[0123] In some optional embodiments of this embodiment, the functional component set includes at least one of the following: a point search component for searching for location locations; a general route search component for searching for routes between locations; a sub-route search component for searching for routes between locations corresponding to transportation modes; a general route inquiry component for inquiring about associated information of routes; a sub-route inquiry component for inquiring about associated information corresponding to routes and transportation modes; a point inquiry component for inquiring about associated information of location locations; a clarification component for reacquiring the sample query information; and a prompt component for outputting prompt information of failure in processing the sample query information.

[0124] In some optional embodiments of this embodiment, the construction module includes a screening unit, a design unit and a configuration unit, wherein the screening unit is configured to screen the functional component set based on sample query information and present the filtered functional component set; the design unit is configured to determine the target component and the calling relationship between the target components based on the received process design operation on the filtered functional component set; the configuration unit is configured to perform parameter configuration on the target component and determine the component call flowchart based on the target component after parameter configuration and the calling relationship between the target components.

[0125] In some optional aspects of this embodiment, the process design operation includes at least one of a drag operation and a connection operation.

[0126] In some optional aspects of this embodiment, the configuration unit is further configured to determine a parameter value matching the target component based on the sample query information; and configure the parameters in the target functional component based on the parameter value.

[0127] In some optional embodiments of this embodiment, the parameters of the point search component include at least one of a place name parameter, a place category parameter, a place feature parameter, and a place quantity parameter; the parameters of the overall route search component include at least one of a transportation mode parameter and a time point parameter; the parameters of the sub-route search component include a time point parameter; the parameters of the overall route-asking component and the sub-route-asking component include a route intention parameter; the parameters of the point-asking component include a place intention parameter; the parameters of the clarification component include at least one of a clarification content parameter and a query intention parameter; and the parameters of the prompt component include a complexity parameter.

[0128] In some optional embodiments of this embodiment, the generation module includes a preview unit and a saving unit. The preview unit is configured to generate and present preview information based on the action instruction sequence and sample query information corresponding to the component call flowchart; the saving unit is configured to, in response to receiving an instruction that passes the verification of the preview information, associate the action instruction sequence corresponding to the component call flowchart and the sample query information and save them as a training sample.

[0129] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an intelligent agent training device. Figure 5 The method embodiment shown corresponds to the embodiment shown.

[0130] like Figure 7 As shown, the intelligent agent training device 700 of this embodiment includes: an acquisition module 701 and a training module 702.

[0131] The acquisition module 701 may be configured to determine the agent type corresponding to the sample query information and a set of functional components associated with the agent type.

[0132] The training module 702 can be configured to train the agent based on the training samples, wherein the training samples are as follows: Figure 2 、 Figure 3 The training samples obtained by the method described in the corresponding embodiment will not be described in detail here.

[0133] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0134] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0135] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0136] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. Computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to bus 804.

[0137] Various components in device 800 are connected to I / O interface 805, including an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0138] The computing unit 801 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the method for constructing training samples. For example, in some embodiments, the method for constructing training samples can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the method for constructing training samples described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to execute the method for constructing training samples using any other suitable means (e.g., via firmware).

[0139] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0140] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0141] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0143] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0144] A computer system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and virtual private server (VPS) services. Servers can also be classified as distributed system servers or servers integrated with blockchain.

[0145] According to the technical solution of the embodiment of the present disclosure, the efficiency of generating training samples is effectively improved.

[0146] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions provided by this disclosure can be achieved. This is not limited herein.

[0147] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A training sample construction method, comprising: Determine an agent type corresponding to the sample query information and a set of functional components associated with the agent type, wherein the functional components in the set of functional components are used to execute action instructions; Building a component call flow chart based on the orchestration operation of the target component corresponding to the sample query information in the functional component set; A training sample is generated based on an action instruction sequence corresponding to the component call flow chart and the sample query information.

2. The method according to claim 1, wherein The functional components in the functional component set are generated based on the following steps: Based on the agent type, determining the agent functions that need to be implemented; A plurality of sub-functions are determined based on the agent function, and a functional component is generated for each sub-function.

3. The method according to claim 2, wherein: The determining of a plurality of sub-functions based on the agent function includes: According to different business scenarios and / or function implementation processes, the intelligent agent function is split into multiple sub-functions.

4. The method according to any one of claims 1 or 2, wherein: The agent type includes a map type.

5. The method according to claim 4, wherein The functional component set includes at least one of the following: Search point component, used to search for location; The overall route search component is used to search for routes between locations; Sub-route search component, used to search for routes between locations corresponding to transportation methods; The general route-asking component is used to inquire about route-related information; The sub-direction component is used to inquire about the associated information between routes and transportation methods; The query point component is used to query the related information of the location; a clarification component, configured to retrieve the sample query information; And, a prompt component is used to output a prompt message indicating that the sample query information processing fails.

6. The method according to claim 4, wherein: The constructing of a component call flow chart based on the orchestration operation of the target component corresponding to the sample query information in the functional component set includes: Filtering the functional component set based on the sample query information, and presenting the filtered functional component set; Determining target components and call relationships between the target components based on the received process design operations on the filtered set of functional components; Parameters are configured for the target components, and a component calling flow chart is determined based on the target components after parameter configuration and the calling relationships between the target components.

7. The method according to claim 6, wherein: The process design operation includes at least one of a drag operation and a connection operation.

8. The method according to claim 6, wherein: The parameter configuration of the target component includes: Determining, based on the sample query information, a parameter value that matches the target component; Parameters in the target functional component are configured based on the parameter values.

9. The method according to claim 8, wherein The parameters of the point search component include at least one of a place name parameter, a place category parameter, a place feature parameter, and a place quantity parameter. The parameters of the overall route search component include at least one of a traffic mode parameter and a time point parameter, and the parameters of the sub-route search component include a time point parameter. The parameters of the main route-asking component and the sub-route-asking component respectively include route intention parameters, The parameters of the question point component include location intention parameters, The parameters of the clarification component include at least one of a clarification content parameter and a query intent parameter. The parameters of the prompt component include a complexity parameter.

10. The method according to any one of claims 1 to 9, wherein: The generating of training samples based on the action instruction sequence corresponding to the component call flow chart and the sample query information includes: Generate and present preview information based on the action instruction sequence corresponding to the component call flow chart and the sample query information; In response to receiving an instruction indicating that the preview information has passed verification, an action instruction sequence corresponding to the component call flow chart is associated with the sample query information and saved as a training sample.

11. A method for training an intelligent agent, comprising: Obtaining a training sample, where the training sample is a training sample obtained by the method according to any one of claims 1 to 10; The intelligent agent is trained based on the training samples.

12. A training sample construction device, comprising: a determination module configured to determine an agent type corresponding to the sample query information and a set of functional components associated with the agent type, wherein the functional components in the set of functional components are used to execute action instructions; A construction module is configured to construct a component call flow chart based on an orchestration operation on a target component corresponding to the sample query information in the functional component set; The generating module is configured to generate a training sample based on an action instruction sequence corresponding to the component call flow chart and the sample query information.

13. An intelligent agent training device, comprising: An acquisition module, configured to acquire a training sample, wherein the training sample is a training sample obtained by the method according to any one of claims 1 to 10; The training module is configured to train the intelligent agent based on the training samples.

14. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.

15. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 11.

16. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 11.