Training method of dialogue model, computer device and storage medium

By using a dialogue model training method, combined with information processing, function selection, and invocation sub-models, the problem of agent dependence in online housing sales services is solved, achieving intelligent, real-time response, and efficient user service.

CN117708295BActive Publication Date: 2026-06-05KE COM (BEIJING) TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KE COM (BEIJING) TECHNOLOGY CO LTD
Filing Date
2023-12-15
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In online home sales services, users’ complex needs rely on human intervention by real real estate agents, which leads to unstable service quality, affects user trust and satisfaction, and existing AI-assisted technologies cannot effectively support agents in completing online services.

Method used

The dialogue model training method is adopted, including information processing sub-model, function selection sub-model and function invocation sub-model. By acquiring sample data for training, the dialogue model can achieve intelligence and real-time response, and can understand user needs and perform complex tasks.

Benefits of technology

It enables real-time online responses in the dialogue model, improving housing sales efficiency, ensuring consistent service quality, reducing user wait times, and enhancing user experience and trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117708295B_ABST
    Figure CN117708295B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method for training a dialogue model, a computer device and a storage medium. The method comprises obtaining sample data; inputting sample question information into an information processing sub-model; training the information processing sub-model based on first sample reply strategy information and first predicted reply strategy information; inputting the first sample reply strategy information into a function selection sub-model; inputting first predicted function information into a function calling sub-model; training the function selection sub-model and the function calling sub-model based on first sample function calling information and first predicted function calling information; calling a function corresponding to the first sample function calling information; inputting first feedback information into the information processing sub-model; and training the information processing sub-model based on second sample reply strategy information and second predicted reply strategy information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a method for training a dialogue model, a computer device, and a storage medium. Background Technology

[0002] In online home sales services, users' complex needs rely on human intervention by real real estate agents. However, limited by agents' online time and skill levels, the quality of service cannot be guaranteed. Substandard service will reduce users' trust and satisfaction with home sales services.

[0003] The methods described in this section are not necessarily methods that had been previously conceived or adopted. Unless otherwise specified, no method described in this section should be assumed to be prior art simply because it is included in this section. Similarly, unless otherwise specified, the issues mentioned in this section should not be considered to be accepted in any prior art. Summary of the Invention

[0004] It would be beneficial to provide a mechanism to alleviate, reduce, or even eliminate one or more of the aforementioned problems.

[0005] According to one aspect of this disclosure, a method for training a dialogue model is provided. The dialogue model includes an information processing sub-model, a function selection sub-model, and a function invocation sub-model. The method includes: acquiring sample data, the sample data including sample question information, first sample response strategy information, first sample function invocation information, and second sample response strategy information; inputting the sample question information into the information processing sub-model to output first predicted response strategy information; training the information processing sub-model based on the first sample response strategy information and the first predicted response strategy information; and inputting the first sample response strategy information into the function selection sub-model to output first predicted function invocation information. The first predicted function information indicates the function selected for invocation based on the first sample response strategy information; the first predicted function information is input into the function invocation sub-model to output first predicted function invocation information; the function selection sub-model and the function invocation sub-model are trained based on the first sample function invocation information and the first predicted function invocation information; the function corresponding to the first sample function invocation information is invoked to obtain first feedback information; the first feedback information is input into the information processing sub-model to output second predicted response strategy information; and the information processing sub-model is trained based on the second sample response strategy information and the second predicted response strategy information.

[0006] According to one aspect of this disclosure, a method for generating a response is provided, the method being applied to a computing device running a dialogue model, the dialogue model being trained according to any one of claims 1 to 8, the method comprising: acquiring target question information from a user; inputting the target question information into a trained information processing sub-model to output first target response strategy information; inputting the first target response strategy information into a trained function selection sub-model to output first target function information, the first target function information indicating a function selected for invocation based on the first target response strategy information; inputting the first target function information into a trained function invocation sub-model to output first target function invocation information; invoking a function corresponding to the first target function invocation information to obtain first target feedback information; and inputting the first target feedback information into the trained information processing sub-model to output second target prediction response strategy information.

[0007] According to one aspect of this disclosure, a computer device is provided, comprising: at least one processor; and at least one memory having a computer program stored thereon, wherein the computer program, when executed by the at least one processor, causes the at least one processor to perform the method described above.

[0008] According to one aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the above-described method.

[0009] According to one aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, causes the processor to perform the methods described above.

[0010] These and other aspects of this disclosure will be apparent from the embodiments described below, and will be elucidated with reference to the embodiments described below. Attached Figure Description

[0011] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements. Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0012] Figure 1 This is a schematic diagram illustrating an example system in which various methods described herein may be implemented according to exemplary embodiments;

[0013] Figure 2 This is an exemplary flowchart illustrating a training method for a dialogue model according to some exemplary embodiments;

[0014] Figure 3 This is an exemplary flowchart illustrating a method for generating a response according to some exemplary embodiments;

[0015] Figure 4 This is a schematic diagram illustrating a method for generating a response according to some exemplary embodiments;

[0016] Figure 5 This is a schematic block diagram illustrating a training apparatus for a dialogue model according to an exemplary embodiment;

[0017] Figure 6 This is a schematic block diagram illustrating an apparatus for generating a response according to an exemplary embodiment;

[0018] Figure 7 This is a block diagram illustrating an exemplary computer device that can be applied to an exemplary embodiment. Detailed Implementation

[0019] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.

[0020] The terminology used in the description of the various examples described in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. As used herein, the term "multiple" means two or more, and the term "based on" should be interpreted as "at least partially based on". Furthermore, the terms "and / or" and "at least one of..." cover any one of the listed items and all possible combinations thereof.

[0021] The collection, storage, use, processing, transmission, provision, and disclosure of user information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0022] In the context of related technologies, various challenges remain in online home sales services. For example, real estate agents are not always online. In traditional home sales processes, agents cannot always be online to answer user questions and provide services, resulting in long waiting times and impacting transaction efficiency and user experience. Furthermore, differences in the professional skills and knowledge levels of different agents and sales personnel can lead to inconsistent service quality, reducing user trust and satisfaction with home sales services.

[0023] Existing AI-assisted technologies often fail to effectively help brokers complete online services.

[0024] For example, rule-based systems that trigger different response methods by manually defining rules are costly, have low coverage, their performance depends on the person defining the rules, and their responses are rigid, making them unsuitable for complex online home sales service scenarios. As for small AI models, they require extensive definition work (e.g., intent systems, slot systems, etc.). Furthermore, due to the use of natural language understanding, dialogue state tracking, dialogue strategy management, and natural language generation, each module of a small model requires an independent model, leading to limitations in learning and understanding capabilities, and the accumulation of errors across multiple modules.

[0025] Generative AI large-scale models have demonstrated powerful capabilities in open-domain dialogue (e.g., task planning, dialogue, context learning, code generation). However, after pre-training and supervised fine-tuning (SFT), the model parameters of large models are fixed, making it impossible to update them in real time to new knowledge or domain-specific information. For example, in the housing sales field, this includes new housing sales policies and information about specific housing complexes. Furthermore, large models lack the ability to perform tasks requiring specialized skills or precise calculations, such as recommending properties or calculating taxes in the housing sales field.

[0026] Based on this, this disclosure proposes a training method for a dialogue model and a method for generating responses. By leveraging the powerful task understanding, task planning, and context learning capabilities of large artificial intelligence models, combined with domain tools and long short-term memory mechanisms, a digital real estate salesperson can automatically generate responses to user questions.

[0027] It should be understood that the methods proposed in this disclosure can be applied to brokers, intermediaries, sales personnel, and service providers in any other field besides real estate.

[0028] Exemplary embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0029] Figure 1This is a schematic diagram illustrating an example system 100 in which various methods described herein may be implemented according to exemplary embodiments.

[0030] refer to Figure 1 The system 100 includes a client device 110, a server 120, and a network 130 that communicatively couples the client device 110 and the server 120.

[0031] Client device 110 includes a display 114 and a client application (APP) 112 that can be displayed on the display 114. Client application 112 can be an application that needs to be downloaded and installed before running, or a lightweight application (liteapp). If client application 112 is an application that needs to be downloaded and installed before running, client application 112 can be pre-installed on client device 110 and activated. If client application 112 is a mini-app, user 102 can directly run client application 112 on client device 110 without installing it, by searching for client application 112 in the host application (e.g., by the name of client application 112) or scanning the graphic code of client application 112 (e.g., barcode, QR code, etc.). In some embodiments, client device 110 can be any type of mobile computing device, including mobile computers, mobile phones, wearable computing devices (e.g., smartwatches, head-mounted devices including smart glasses, etc.), or other types of mobile devices. In some embodiments, the client device 110 may alternatively be a fixed computer device, such as a desktop computer, server computer, or other type of fixed computer device.

[0032] Server 120 is typically a server deployed by an Internet Service Provider (ISP) or Internet Content Provider (ICP). Server 120 can represent a single server, a cluster of multiple servers, a distributed system, or a cloud server providing basic cloud services (such as cloud databases, cloud computing, cloud storage, and cloud communications). It will be understood that, although... Figure 1 The diagram shows that server 120 communicates with only one client device 110, but server 120 can provide background services to multiple client devices simultaneously.

[0033] Examples of network 130 include combinations of local area networks (LANs), wide area networks (WANs), personal area networks (PANs), and / or communication networks such as the Internet. Network 130 can be wired or wireless. In some embodiments, technologies and / or formats including Hypertext Markup Language (HTML), Extensible Markup Language (XML), etc., are used to process data exchanged through network 130. Furthermore, encryption technologies such as Secure Sockets Layer (SSL), Transport Layer Security (TLS), VPN, and Internet Protocol Security (IPsec) can be used to encrypt all or some of the links. In some embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0034] For the purposes of this disclosure's embodiments, Figure 1 In the example, client application 112 can be an application for generating responses, which can answer user questions about home rentals, home sales, and real estate knowledge. Correspondingly, server 120 can be a server used in conjunction with the application for generating responses. Server 120 can provide services such as generating responses and training dialogue models to client application 112 running on client device 110. Alternatively, client application 112 running on client device 110 can also provide these services.

[0035] Figure 2 This is an exemplary flowchart illustrating a training method 200 for a dialogue model according to some exemplary embodiments.

[0036] Method 200 can be used on the client device (e.g., Figure 1 The execution is performed at the client device 110 shown, that is, the execution entity of each step of method 200 can be... Figure 1 The client device 110 shown. In some embodiments, method 200 can be performed on a server (e.g., Figure 1 The method 200 is executed at server 120 (as shown in the diagram). In some embodiments, method 200 may be executed in combination by a client device (e.g., client device 110) and a server (e.g., server 120). Hereinafter, the various steps of method 200 will be described in detail with server 120 as the executing entity.

[0037] refer to Figure 2 The dialogue model includes an information processing sub-model, a function selection sub-model, and a function call sub-model. Method 200 includes steps S202 to S218.

[0038] Step S202: Obtain sample data, which includes sample question information, first sample response strategy information, first sample function call information, and second sample response strategy information.

[0039] Step S204: Input the sample question information into the information processing sub-model to output the first predictive response strategy information;

[0040] Step S206: Train the information processing sub-model based on the first sample response strategy information and the first predicted response strategy information;

[0041] Step S208: Input the first sample response strategy information into the function selection sub-model to output the first prediction function information, which indicates the function selected for invocation based on the first sample response strategy information.

[0042] Step S210: Input the first prediction function information into the function call sub-model to output the first prediction function call information;

[0043] Step S212: Based on the first sample function call information and the first prediction function call information, train the function selection sub-model and the function call sub-model;

[0044] Step S214: Call the function corresponding to the function call information of the first sample to obtain the first feedback information;

[0045] Step S216: Input the first feedback information into the information processing sub-model to output the second predictive response strategy information; and

[0046] Step S218: Train the information processing sub-model based on the second sample response strategy information and the second predicted response strategy information.

[0047] Therefore, the various sub-models in the dialogue model can be trained, enabling the dialogue model to communicate with the user through the information processing sub-model, understand the user's goals and context, and convert user input into a comprehensible semantic representation; through the function selection sub-model and the function invocation sub-model, the most appropriate function can be selected. In some embodiments, this function is an external function or external application called via an application programming interface (API). Thus, the user's target task can be completed efficiently and accurately.

[0048] In some embodiments, the aforementioned sample data may be collected online real-time communication dialogues between real estate agents (e.g., top agents) and users. This sample data can be processed to supplement intermediate steps, including: goal understanding and task decomposition (e.g., the aforementioned first predictive response strategy information and second predictive response strategy information), tool selection (e.g., the aforementioned first predictive function information), tool execution (e.g., calling the function corresponding to the aforementioned first predictive function call information to obtain first feedback information), and response generation. The dialogue model trained by the above method 200 can decompose the user's target task into multiple sub-tasks and select corresponding functions for each sub-task. By calling various functions, the trained dialogue model can perform complex tasks requiring professional skills or precise calculations. Simultaneously, by updating various functions, the model output can be adjusted in real time according to policies in the real estate sales field and information about specific housing communities, without needing to adjust the dialogue model itself.

[0049] In some embodiments, the response strategy information includes an analysis of existing information and instructions for a response method. The analysis of existing information may include an analysis of the user's objectives and the results returned by the function in the previous subtask, and the instructions for the response method may include information required for the next subtask and response information.

[0050] The trained dialogue model can stay online at all times and respond to user needs in real time, including answering questions, recommending houses, and inviting viewings, without being limited by time and location, which greatly improves the efficiency of real estate sales.

[0051] According to some embodiments, step S216, inputting the first feedback information into the information processing sub-model to output the second predictive response strategy information, includes: inputting the first feedback information along with sample question information, first sample response strategy information, and first sample function call information into the information processing sub-model to output the second predictive response strategy information. Thus, the execution result of the function (e.g., the first feedback information) can be concatenated with the previous input, and the concatenated information can be used as input to continue generating further execution results until the final response is generated.

[0052] Specifically, in some embodiments, when a function corresponding to the function call information is invoked, the dialogue model pauses generation and waits for the function to return the corresponding feedback information. After the function returns the corresponding feedback information, the feedback information is appended to the original input for continued generation.

[0053] According to some embodiments, the sample data further includes sample response information, and method 200 further includes: determining whether the dialogue model can answer the sample question information based on the second sample response strategy information; in response to determining that the dialogue model can answer the sample question information: inputting the second sample response strategy information into the information processing sub-model to output predicted response information; and training the information processing sub-model based on the sample response information and the predicted response information.

[0054] In some embodiments, the second sample response strategy information may include an analysis of the function return results in the previous subtask. For example, when the previous subtask is a subtask to query the usable floor area ratio information of a house, the feedback information returned by the function may be "Usable floor area ratio: 75%", and the second sample response strategy information may include this usable floor area ratio information.

[0055] In some embodiments, when the second sample response strategy information includes response information but not the information required for the next subtask, it is determined that the dialogue model is already able to answer the question information without further function invocation. The second sample response strategy information can then be input into the information processing sub-model to output the corresponding response information.

[0056] According to some embodiments, the sample data further includes second sample function call information and third sample response strategy information. Method 200 further includes: determining whether the dialogue model can answer the sample question information based on the second sample response strategy information; in response to determining that the dialogue model cannot answer the sample question information: inputting the second sample response strategy information into a function selection sub-model to output second predicted function information, the second predicted function information indicating the function selected for invocation based on the second sample response strategy information; inputting the second predicted function information into a function call sub-model to output second predicted function call information; training the function selection sub-model and the function call sub-model based on the second sample function call information and the second predicted function call information; invoking the function corresponding to the second sample function call information to obtain second feedback information; inputting the second feedback information into an information processing sub-model to output third predicted response strategy information; and training the information processing sub-model based on the third sample response strategy information and the third predicted response strategy information.

[0057] In some embodiments, the analysis of the function's return result in the previous subtask may be insufficient to answer the user's question. For example, the user's question might be, "Could you tell me about the current market situation? Are houses in XX neighborhood selling well now?" For this question, simply calling a single function through a subtask (e.g., querying market housing price analysis) may not be enough to provide a response. After the function in the previous subtask provides feedback information (e.g., changes in market housing prices), the sample response information may include information needed for the next subtask but not the response information (e.g., including "I need to further query price change information for XX neighborhood to answer" but not the response information). At this point, if it is determined that the dialogue model cannot answer the question, it will further call the function corresponding to the second sample function call information based on the above steps to obtain second feedback information, and input the second feedback information into the information processing sub-model to output third predictive response strategy information.

[0058] Understandably, the above steps can be repeated until the response strategy information includes the response information but not the information required for the next subtask. At this point, it is determined that the dialogue model is capable of answering the question without further function calls.

[0059] According to some embodiments, inputting the second feedback information into the information processing sub-model to output the third predictive response strategy information includes: inputting the second feedback information, along with sample question information, first sample response strategy information, first sample function call information, first feedback information, second sample response strategy information, and second sample function call information, into the information processing sub-model to output the third predictive response strategy information.

[0060] Therefore, the execution results of subsequent functions (e.g., second feedback information) can be concatenated with the previous input, and the concatenated information can be used as input to continue generating further execution results until the final response is generated.

[0061] According to some embodiments, functions are stored in a function database, which also stores descriptions corresponding to the functions. The process of inputting first sample response strategy information into a function selection sub-model to output first predicted function information includes: the function selection sub-model retrieving descriptions corresponding to the functions to determine functions suitable for the first sample response strategy information; and outputting information indicating the determined functions as first predicted function information.

[0062] In some embodiments, functions in the function database can be stored using a modular strategy, categorized according to different function types. For example, this categorization may include classification by business type (e.g., new homes, used homes, etc.) or classification by entity type (e.g., community location, community characteristics, house size, etc.). Through a modular strategy, the function selection sub-model can quickly locate relevant functions and reduce the number of functions it needs to process. This helps simplify the function selection process and execute tasks more efficiently.

[0063] In some embodiments, the functional database includes multiple functions and stores specific functional information using a uniform document template, which includes one or more of the following information for each function:

[0064] Function Name: Provides a function overview and allows users to invoke the corresponding function by function name.

[0065] Parameter information: may include input parameters and return values, wherein, in some embodiments, each parameter has a corresponding name, description, data type and default value;

[0066] Function Description: Contains information about how the corresponding function works, its inputs and outputs, and potential errors or exceptions;

[0067] Application example: Demonstrating how to use this feature;

[0068] Combination Guide: Provides guidance on how to combine multiple functions to complete complex user commands.

[0069] Specifically, Table 1 below shows an example of a function database that includes 12 functions, each with a function name, input parameters, and function description.

[0070] Table 1 includes a functional database with 12 functions.

[0071]

[0072] According to some embodiments, the sample question information includes question information and response information for the same user in previous conversations. Therefore, the trained dialogue model can comprehensively consider the user's conversation history information, improving the accuracy and relevance of the responses.

[0073] In some embodiments, the dialogue model can process various types of information, such as text and voice. Specifically, according to some embodiments, the sample question information, the first sample response strategy information, the first sample function call information, and the second sample response strategy information include at least one of text information or voice information.

[0074] In some embodiments, the sample response information includes at least one of text information or voice information.

[0075] Therefore, the trained dialogue model can be applied to different types of input information.

[0076] Figure 3 This is an exemplary flowchart illustrating a method 300 for generating a response according to some exemplary embodiments.

[0077] Method 300 can be used on the client device (e.g., Figure 1 The execution is performed at the client device 110 shown, that is, the execution entity of each step of method 300 can be... Figure 1 The client device 110 shown. In some embodiments, method 300 can be performed on a server (e.g., Figure 1 The method 300 is executed at server 120 (as shown in the diagram). In some embodiments, method 300 may be executed in combination by a client device (e.g., client device 110) and a server (e.g., server 120). Hereinafter, the steps of method 300 will be described in detail with the client device 110 as the executing entity.

[0078] refer to Figure 3 Method 300 is applied to a computing device running a dialogue model, which is trained according to the above method (e.g., method 200), and method 300 includes steps S302 to S312.

[0079] Step S302: Obtain target problem information from the user;

[0080] Step S304: Input the target question information into the trained information processing sub-model to output the first target response strategy information;

[0081] Step S306: Input the first target response strategy information into the trained function selection sub-model to output the first target function information, which indicates the function selected for invocation based on the first target response strategy information.

[0082] Step S308: Input the first target function information into the trained function call sub-model to output the first target function call information;

[0083] Step S310: Invoke the function corresponding to the first target function call information to obtain the first target feedback information; and

[0084] Step S312: Input the first target feedback information into the trained information processing sub-model to output the second target prediction response strategy information.

[0085] Therefore, by communicating with the user through the information processing sub-model in the trained dialogue model, the system can understand the user's goals and context, converting user input into a comprehensible semantic representation. Through the function selection sub-model and function invocation sub-model, the most appropriate function can be selected. In some embodiments, this function is an external function or external application invoked via an application programming interface (API). This allows for the efficient and accurate completion of the user's target task.

[0086] According to some embodiments, method 300 further includes: determining whether the dialogue model can answer the target question information based on the second target response strategy information; in response to determining that the dialogue model can answer the target question information: inputting the second target response strategy information into the trained information processing sub-model to output the target response information.

[0087] Similar to the description of the combined training method 200 above, when the second target response strategy information includes response information but not the information required for the next subtask, it is determined that the dialogue model is already able to answer the question information without further calling functions. The second target response strategy information can be input into the information processing sub-model to output the corresponding response information.

[0088] According to some embodiments, method 300 further includes: determining whether the dialogue model can answer the target question information based on the second target response strategy information; in response to determining that the dialogue model cannot answer the target question information: inputting the second target response strategy information into a trained function selection sub-model to output second target function information, the second target function information indicating the function selected for invocation based on the second target response strategy information; inputting the second target function information into a trained function invocation sub-model to output second target function invocation information; invoking the function corresponding to the second target function invocation information to obtain second target feedback information; and inputting the second target feedback information into a trained information processing sub-model to output third target response strategy information.

[0089] Similar to the description of the combined training method 200 above, when the second target response strategy information also includes information required for the next subtask, it is determined that the dialogue model cannot answer the question information. Based on the above steps, the function corresponding to the second target function call information will be further called to obtain the second feedback information. The second feedback information will be input into the information processing sub-model to output the third target response strategy information.

[0090] Understandably, the above steps can be repeated until the target response strategy information includes the response information but not the information required for the next subtask. At this point, it is determined that the dialogue model is capable of answering the question without further function calls.

[0091] According to some embodiments, functions are stored in a function database, which also stores descriptions corresponding to the functions. The first target response strategy information is input into a trained function selection sub-model to output first target function information. This includes: the trained function selection sub-model retrieving descriptions corresponding to the functions to determine functions suitable for the first target response strategy information; and outputting information indicating the determined functions as first target function information.

[0092] In some embodiments, the functional database may be the functional database described above in conjunction with Table 1, and the descriptions corresponding to the functions may be the descriptions in Table 1.

[0093] According to some embodiments, method 300 further includes: retraining the information processing sub-model based on the user's feedback on the target response information.

[0094] This allows for continuous monitoring of the dialogue model's performance and behavior, with real-time updates and optimizations based on user feedback, constantly improving its intelligence and adaptability to ensure that the dialogue model always meets user needs.

[0095] In some embodiments, the user's feedback on the target response can be a rating of the service provided by the dialogue model. In some embodiments, the user's feedback on the target response can be collected through the user's conversation with the dialogue model.

[0096] Figure 4 This is a schematic diagram illustrating a method for generating a response according to some exemplary embodiments.

[0097] In some embodiments, the dialogue model 400 is responsible for communicating with the user 410, understanding the user's goals and context, and generating executable code to complete the task. Specifically, such as Figure 4 As shown, the dialogue model 400 may include a function call sub-model 401, a function selection sub-model 402, and an information processing sub-model 403. The information processing sub-model 403 communicates with the user 410. In some embodiments, the information processing sub-model 403 uses natural language processing technology to convert the user 410's input into an understandable semantic representation and outputs response strategy information to the function selection sub-model 402.

[0098] The function selection sub-model 402 selects the corresponding function based on the information processing sub-model 403's understanding of the user 410's input (e.g., the aforementioned response strategy information). In some embodiments, the function selection sub-model 402 may select the most suitable function from the function database 430 to perform the task based on reinforcement learning and natural language processing.

[0099] The function invocation sub-model 401 provides the corresponding invocation code based on the function selected by the function selection sub-model 402 and the corresponding function in the function database 430. This invocation code is transmitted to the function executor 420. The function executor 420 invokes the corresponding function in the function database 430 using the invocation code, executes the operation code, and returns the execution result (e.g., the feedback information mentioned above) to the information processing sub-model 403. In some examples, this execution result may be an intermediate execution result (i.e., the dialogue model still needs to invoke more functions) or a final execution result (i.e., the dialogue model can answer the user's question based on this execution result).

[0100] In some embodiments, the function database 430 stores all functions and provides a unified function documentation. Different tasks can be accomplished by calling different functions. In some examples, the function is an external function or external application called via an API. In some examples, the function database may include the functions described above in conjunction with Table 1.

[0101] In some embodiments, the dialogue model 400 also receives initialization model parameters to initialize one or more of the function call sub-model 401, function selection sub-model 402, and information processing sub-model 403.

[0102] In some embodiments, the dialogue model 400 supports multimodal input processing and can receive input information in the form of text, audio, video, or images.

[0103] In some embodiments, the dialogue model 400 includes a code verification mechanism that compares the calling code generated by the function calling sub-model 401 with the calling codes in the function database 430. Exemplarily, this comparison includes comparing the number of parameters, parameter types, parameter value ranges, etc. In response to a mismatch in the comparison result, an error message is sent to the function calling sub-model 401, which then regenerates the calling code. This improves the accuracy and reliability of function execution, ensuring that the dialogue model obtains accurate results when executing the corresponding function.

[0104] For example, this functionality may include HTTP requests, predefined algorithms, artificial intelligence models, and so on.

[0105] During the training process of dialogue model 400 (e.g., the above combination) Figure 2 The training method described in 200 can utilize real-time online message conversation data between real estate agents and users. The agent's original responses can be adjusted in post-processing.

[0106] To enable the trained dialogue model to possess capabilities in the real estate domain, such as goal understanding, task decomposition, tool selection, tool execution, and response generation, reverse operations can be performed on existing dialogues. This involves supplementing the goal understanding, task decomposition, tool selection, tool execution, and response generation processes based on existing questions and answers. In some embodiments, the supplemented sample data is shown in Figure 2 below.

[0107] Among them, Thought can represent the response strategy information output by the information processing sub-model;

[0108] Action can represent the function call information output by the function call sub-model, including function information indicating the function to be called (e.g., "cell price change"), and the parameters required to call the function (e.g., "block_id");

[0109] An Observation can represent the feedback information obtained from calling the above functions;

[0110] Action: Finish can represent the final response message output by the information processing sub-model to the user.

[0111] Example of sample data in Table 2

[0112]

[0113]

[0114]

[0115] In the examples shown in Table 2, calling only a single function may not be enough to answer the user's question. For example, in the first example, the functions "Action: Market Analysis [city_id]" and "Action: Block Price Changes [block_id]" were called twice. Understandably, more calls to the function are possible until a final response is generated. Specifically, when the response strategy information still includes information needed for the next subtask (e.g., "I need to query block price change information to answer him"), it is determined that the dialogue model cannot answer the question, and more functions will be called. However, when the response strategy information includes the response information (e.g., "I can tell the customer the current market situation and the sales status of houses at XX Research Institute"), it is determined that the dialogue model can already answer the question without further function calls. The sample response strategy information can then be input into the information processing sub-model to output the corresponding response.

[0116] In some embodiments, multiple function call information can be generated based on a single response strategy information, and multiple functions can be called accordingly.

[0117] In some embodiments, the various types of information described above are transmitted in the form of natural language (e.g., Chinese as shown in Table 2) (e.g., transmitted between function call sub-model 401, function selection sub-model 402, and information processing sub-model 403). Each sub-model in the dialogue model has a corresponding natural language processing encoder and decoder to decode the input natural language into the corresponding semantic representation and to encode the output semantic representation into the corresponding natural language.

[0118] In some embodiments, the various types of information described above may be transmitted in any suitable computer language or encoded information format, without limitation herein.

[0119] According to another aspect of this disclosure, a training apparatus for a dialogue model is also provided. Figure 5 This diagram illustrates the structural block of a training device 500 for a dialogue model. The dialogue model includes an information processing sub-model, a function selection sub-model, and a function invocation sub-model. Figure 5 As shown, the device 500 includes:

[0120] The acquisition module 510 acquires sample data, which includes sample question information, first sample response strategy information, first sample function call information, and second sample response strategy information.

[0121] The first output module 520 is configured to input sample question information into the information processing sub-model to output first predictive response strategy information;

[0122] The first training module 530 is configured to train the information processing sub-model based on the first sample response strategy information and the first predicted response strategy information.

[0123] The second output module 540 is configured to input the first sample response strategy information into the function selection sub-model to output the first prediction function information, which indicates the function selected for invocation based on the first sample response strategy information.

[0124] The third output module 550 is configured to input the first prediction function information into the function call sub-model and output the first prediction function call information.

[0125] The second training module 560 is configured to train a function selection sub-model and a function call sub-model based on the first sample function call information and the first prediction function call information.

[0126] The calling module 570 is configured to call the function corresponding to the first sample function call information in order to obtain the first feedback information.

[0127] The fourth output module 580 is configured to input the first feedback information into the information processing sub-model to output the second predictive response strategy information; and

[0128] The third training module 590 is configured to train the information processing sub-model based on the second sample response strategy information and the second predicted response strategy information.

[0129] It should be understood that Figure 5 The various modules of the device 500 shown can be connected to the reference. Figure 2 The steps in method 200 described correspond to each other. Therefore, the operations, features, and advantages described above for method 200 also apply to apparatus 500 and its included modules. For the sake of brevity, some operations, features, and advantages will not be repeated here.

[0130] According to another aspect of this disclosure, an apparatus for generating a response is also provided. Figure 6 This is a block diagram illustrating a response generation device 600, which is applied to a computing device running a dialogue model trained using the aforementioned device 500. The response generation device 600 includes:

[0131] Module 610 is configured to acquire target problem information from the user.

[0132] The first output module 620 is configured to input the target question information into the trained information processing sub-model to output the first target response strategy information.

[0133] The second output module 630 is configured to input the first target response strategy information into the trained function selection sub-model to output the first target function information, which indicates the function selected for invocation based on the first target response strategy information.

[0134] The third output module 640 is configured to input the first target function information into the trained function call sub-model in order to output the first target function call information.

[0135] Module 650 is configured to invoke the function corresponding to the first target function invocation information to obtain the first target feedback information; and

[0136] The fourth output module 660 is configured to input the first target feedback information into the trained information processing sub-model to output the second target prediction response strategy information.

[0137] It should be understood that Figure 6 The various modules of the device 600 shown can be connected to the reference. Figure 3 The steps in method 300 described correspond to each other. Therefore, the operations, features, and advantages described above for method 300 also apply to apparatus 600 and its included modules. For the sake of brevity, some operations, features, and advantages will not be repeated here.

[0138] While specific functions have been discussed above with reference to specific modules, it should be noted that the functions of the modules discussed herein can be divided into multiple modules, and / or at least some functions of multiple modules can be combined into a single module. The specific module performing an action discussed herein includes the specific module itself performing the action, or alternatively, the specific module calling or otherwise accessing another component or module that performs the action (or performs the action in conjunction with the specific module). Therefore, a specific module performing an action may include the specific module performing the action itself and / or another module that the specific module calls or otherwise accesses to perform the action. For example, the acquisition module 610 and the first output module 620 may be combined into a single module in some embodiments. As another example, the acquisition module 610 may include the first output module 620 in some embodiments. As used herein, the phrase "entity A initiates action B" may mean that entity A issues an instruction to perform action B, but entity A itself does not necessarily perform action B.

[0139] It should also be understood that this article can describe various technologies in the general context of software and hardware components or program modules. The above regarding... Figure 5 and Figure 6 The various modules described can be implemented in hardware or in hardware in combination with software and / or firmware. For example, these modules can be implemented as computer program code / instructions configured to execute in one or more processors and stored in a computer-readable storage medium. Alternatively, these modules can be implemented as hardware logic / circuit. For example, in some embodiments, one or more of the acquisition module 610, the first output module 620, the second output module 630, the third output module 640, the calling module 650, and the fourth output module 660 can be implemented together in a System on Chip (SoC). The SoC may include an integrated circuit chip (which includes a processor (e.g., a Central Processing Unit (CPU), microcontroller, microprocessor, digital signal processor (DSP), etc.), memory, one or more communication interfaces, and / or one or more components of other circuitry) and may optionally execute received program code and / or include embedded firmware to perform functions.

[0140] According to one aspect of this disclosure, a computer device is provided, including at least one processor and at least one memory having a computer program stored thereon, which, when executed by the at least one processor, causes the at least one processor to perform the steps of any of the method embodiments described above.

[0141] According to one aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps of any of the method embodiments described above.

[0142] According to one aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the steps of any of the method embodiments described above.

[0143] In the following text, combined with Figure 7 Illustrative examples describing such computer devices, non-transitory computer-readable storage media, and computer program products.

[0144] Figure 7 An example configuration of a computer device 700 that can be used to implement the methods described herein is shown. For example, Figure 1 The server 120 and / or client device 110 shown may include an architecture similar to computer device 700. The aforementioned devices 500 and 600 may also be implemented wholly or at least partially by computer device 700 or similar devices or systems.

[0145] Computer device 700 can be a variety of different types of devices. Examples of computer device 700 include, but are not limited to: desktop computers, server computers, laptop or netbook computers, mobile devices (e.g., tablet computers, cellular or other wireless phones (e.g., smartphones), notebook computers, mobile stations), wearable devices (e.g., glasses, watches), entertainment devices (e.g., entertainment appliances, set-top boxes communicatively coupled to a display device, game consoles), televisions or other display devices, automotive computers, and so on.

[0146] Computer device 700 may include at least one processor 702, memory 704, multiple communication interfaces 706, display device 708, other input / output (I / O) devices 710, and one or more mass storage devices 712 capable of communicating with each other, such as via system bus 714 or other suitable connections.

[0147] Processor 702 may be a single processing unit or multiple processing units, and all processing units may include single or multiple computing units or multiple cores. Processor 702 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuits, and / or any device that manipulates signals based on operating instructions. Among other capabilities, processor 702 may be configured to acquire and execute computer-readable instructions stored in memory 704, mass storage device 712, or other computer-readable media, such as program code of operating system 716, program code of application program 718, program code of other program 720, etc.

[0148] Memory 704 and mass storage device 712 are examples of computer-readable storage media for storing instructions executed by processor 702 to perform the various functions described above. For example, memory 704 can generally include both volatile and non-volatile memory (e.g., RAM, ROM, etc.). Furthermore, mass storage device 712 can generally include hard disk drives, solid-state drives, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical disks (e.g., CDs, DVDs), storage arrays, network-attached storage, storage area networks, etc. Both memory 704 and mass storage device 712 can be collectively referred to herein as memory or computer-readable storage media, and can be non-transitory media capable of storing computer-readable, processor-executable program instructions as computer program code, which can be executed by processor 702 as a specific machine configured to perform the operations and functions described in the examples herein.

[0149] Multiple programs may be stored on mass storage device 712. These programs include operating system 716, one or more application programs 718, other programs 720, and program data 722, and they may be loaded into memory 704 for execution. Examples of such application programs or program modules may include, for example, computer program logic (e.g., computer program code or instructions) for implementing components / functions such as client application 112, method 200 (including any suitable steps of method 200), method 300 (including any suitable steps of method 300), and / or other embodiments described herein.

[0150] Although Figure 7The modules 716, 718, 720, and 722, or portions thereof, are illustrated as being stored in memory 704 of computer device 700; however, modules 716, 718, 720, and 722 may be implemented using any form of computer-readable medium accessible by computer device 700. As used herein, “computer-readable medium” includes at least two types of computer-readable media: computer-readable storage media and communication media.

[0151] Computer-readable storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, DVD, or other optical storage devices, magnetic cassettes, magnetic tapes, disk storage devices or other magnetic storage devices, or any other non-transmission medium that can be used to store information for access by a computer device. In contrast, communication media can embody computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms. Computer-readable storage media as defined herein do not include communication media.

[0152] One or more communication interfaces 706 are used for exchanging data with other devices, such as via a network, direct connection, etc. Such communication interfaces can be one or more of the following: any type of network interface (e.g., a network interface card (NIC)), wired or wireless (such as IEEE 802.11 Wireless LAN (WLAN)) wireless interface, Wi-MAX interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth™ interface, Near Field Communication (NFC) interface, etc. Communication interface 706 can facilitate communication across a variety of network and protocol types, including wired networks (e.g., LAN, cable, etc.) and wireless networks (e.g., WLAN, cellular, satellite, etc.), the Internet, etc. Communication interface 706 can also provide communication with external storage devices (not shown), such as storage arrays, network-attached storage, storage area networks, etc.

[0153] In some examples, a display device 708, such as a monitor, may be included for displaying information and images to the user. Other I / O devices 710 may be devices that receive various inputs from the user and provide various outputs to the user, and may include touch input devices, gesture input devices, cameras, keyboards, remote controls, mice, printers, audio input / output devices, and so on.

[0154] The technologies described herein can be supported by these various configurations of computer device 700, and are not limited to specific examples of the technologies described herein. For example, the functionality can also be implemented wholly or partially on a “cloud” using a distributed system. A cloud includes and / or represents a platform for resources. The platform abstracts the underlying functionality of the cloud’s hardware (e.g., servers) and software resources. Resources may include applications and / or data that can be used when performing computational processing on a server remote from computer device 700. Resources may also include services provided via the Internet and / or via subscriber networks such as cellular or Wi-Fi networks. The platform can abstract resources and functionality to connect computer device 700 to other computer devices. Therefore, the implementation of the functionality described herein can be distributed throughout the cloud. For example, the functionality may be implemented partly on computer device 700 and partly through a platform that abstracts the functionality of the cloud.

[0155] Although this disclosure has been described and illustrated in detail in the accompanying drawings and the foregoing description, such description and illustration should be considered illustrative and suggestive, not restrictive; this disclosure is not limited to the disclosed embodiments. By studying the drawings, the disclosure, and the appended claims, those skilled in the art will be able to understand and implement variations of the disclosed embodiments in practice with respect to the claimed subject matter. In the claims, the word "comprising" does not exclude other elements or steps not listed, the indefinite article "a" or "an" does not exclude a plurality, the term "a plurality" means two or more, and the term "based on" should be interpreted as "at least partially based on". The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be beneficial.

Claims

1. A method for training a dialogue model, wherein the dialogue model includes an information processing sub-model, a function selection sub-model, and a function invocation sub-model, wherein, The method includes: Obtain sample data, which includes sample question information, first sample response strategy information, first sample function call information, and second sample response strategy information; The sample question information is input into the information processing sub-model to output the first predictive response strategy information; The information processing sub-model is trained based on the first sample response strategy information and the first predicted response strategy information. The first sample response strategy information is input into the function selection sub-model to output the first predicted function information, which indicates the function selected for invocation based on the first sample response strategy information. The first prediction function information is input into the function call sub-model to output the first prediction function call information; Based on the first sample function call information and the first predicted function call information, train the function selection sub-model and the function call sub-model; Call the function corresponding to the function call information of the first sample to obtain the first feedback information; The first feedback information is input into the information processing sub-model to output the second predictive response strategy information; and The information processing sub-model is trained based on the second sample response strategy information and the second predicted response strategy information.

2. The method according to claim 1, wherein, The first feedback information is input into the information processing sub-model to output the second predictive response strategy information, including: The first feedback information, together with the sample question information, the first sample response strategy information, and the first sample function call information, are input into the information processing sub-model to output the second predictive response strategy information.

3. The method according to claim 1, wherein, The sample data also includes sample response information, and the method further includes: Based on the second sample response strategy information, it is determined whether the dialogue model can answer the sample question information; In response to determining that the dialogue model is able to answer the sample question information: The second sample response strategy information is input into the information processing sub-model to output predicted response information; and The information processing sub-model is trained based on the sample response information and the predicted response information.

4. The method according to claim 1, wherein, The sample data also includes second sample function call information and third sample response strategy information, and the method further includes: Based on the second sample response strategy information, it is determined whether the dialogue model can answer the sample question information; In response to determining that the dialogue model cannot answer the sample question: The second sample response strategy information is input into the function selection sub-model to output second predicted function information, which indicates the function selected for invocation based on the second sample response strategy information. The second prediction function information is input into the function call sub-model to output the second prediction function call information; Based on the second sample function call information and the second predicted function call information, train the function selection sub-model and the function call sub-model; Call the function corresponding to the second sample function call information to obtain the second feedback information; The second feedback information is input into the information processing sub-model to output the third predictive response strategy information; and The information processing sub-model is trained based on the third sample response strategy information and the third predicted response strategy information.

5. The method according to claim 4, wherein, The second feedback information is input into the information processing sub-model to output the third predictive response strategy information, including: The second feedback information, together with the sample question information, the first sample response strategy information, the first sample function call information, the first feedback information, the second sample response strategy information, and the second sample function call information, are input into the information processing sub-model to output the third predictive response strategy information.

6. The method according to claim 1, wherein, The function is stored in a function database, which also stores descriptions corresponding to the function. The first sample response strategy information is input into the function selection sub-model to output the first predicted function information, including: The function selection sub-model retrieves the description corresponding to the function to determine the function applicable to the first sample response strategy information; The information indicating the determined function is output as the first predicted function information.

7. The method according to claim 1, wherein, The sample question information includes questions and responses from previous conversations with the same user.

8. The method according to any one of claims 1 to 7, wherein, The sample question information, the first sample response strategy information, the first sample function call information, and the second sample response strategy information include at least one of text information or voice information.

9. A method for generating a response, the method being applied to a computing device running a dialogue model, the dialogue model being trained using the method according to any one of claims 1 to 8, the method comprising: Obtain target problem information from users; The target question information is input into the trained information processing sub-model to output the first target response strategy information; The first target response strategy information is input into the trained function selection sub-model to output the first target function information, which indicates the function selected for invocation based on the first target response strategy information. The first target function information is input into the trained function call sub-model to output the first target function call information; Call the function corresponding to the first target function call information to obtain the first target feedback information; as well as The feedback information of the first target is input into the trained information processing sub-model to output the prediction response strategy information of the second target.

10. The method according to claim 9, further comprising: Based on the second target response strategy information, it is determined whether the dialogue model can answer the target question information; In response to determining that the dialogue model is able to answer the target question: The second target response strategy information is input into the trained information processing sub-model to output the target response information.

11. The method according to claim 9, further comprising: Based on the second target response strategy information, it is determined whether the dialogue model can answer the target question information; In response to determining that the dialogue model cannot answer the target question: The second target response strategy information is input into the trained function selection sub-model to output second target function information, which indicates the function selected for invocation based on the second target response strategy information. The second target function information is input into the trained function call sub-model to output the second target function call information; Call the function corresponding to the second target function call information to obtain the second target feedback information; The feedback information of the second objective is input into the trained information processing sub-model to output the response strategy information of the third objective.

12. The method according to claim 9, wherein, The function is stored in a function database, which also stores descriptions corresponding to the function. The first target response strategy information is input into the trained function selection sub-model to output the first target function information, including: The trained function selection sub-model retrieves descriptions corresponding to the functions to determine the functions suitable for the first target response strategy information; The information indicating the determined function is output as the first target function information.

13. The method according to claim 9, further comprising: Based on the user's feedback on the target response information, the information processing sub-model is trained again.

14. A computer device, comprising: At least one processor; as well as At least one memory on which a computer program is stored, When the computer program is executed by the at least one processor, it causes the at least one processor to perform the method according to any one of claims 1 to 13.

15. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 13.

16. A computer program product comprising a computer program that, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 13.