Searching method and related device
By providing direct service links in conversational search, the problem of users having to cumbersome operations after conversational search is solved, and the efficiency of service applications is improved.
Patent Information
- Application Number
- CN202310678564.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-12-10
AI Technical Summary
When the existing conversational search method requires the user to exit the search interface and open the corresponding service application when the user needs to use a certain service, it requires the user to exit the search interface and open the corresponding service application, resulting in cumbersome operations and low efficiency.
通过获取待回复对话信息,确定其类型是否为服务类,如果是,返回包括服务结果数据和服务直达链接的回复,用户可以直接点击链接进入相应的服务应用。
The operation process of entering service applications is simplified and the efficiency of service applications is improved. Users can directly open the required service applications through direct links, reducing complex operation steps.
Smart Images

Figure CN119106111A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a search method and related devices. Background Art
[0002] With the rapid development of the Internet, information content is becoming more and more abundant, and there are more and more ways to search for information, such as conversational search. Conversational search allows users to have more rounds of conversations with machines, and users can eventually get satisfactory answers through interaction with machines.
[0003] At present, conversational search mainly relies on users inputting conversation information, understanding and extracting the conversation information to generate query words suitable for search, using the generated query to initiate a full-network search to obtain search results, and generating a final reply based on the search results, and giving the corresponding reference source in the generated reply.
[0004] However, in this method, when the user needs to use a certain service, the user needs to exit the conversational search interface and open the corresponding service application to complete the required service. In this process, the user needs to perform relatively cumbersome operations to use the service application, which is relatively inefficient. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a search method and related devices. After understanding the relevant answer content, if the user needs to enter the corresponding first service application, he can directly click the first service direct link to open the corresponding first service application and complete the required service, which simplifies the operation of entering the service application and improves the efficiency of using the service application.
[0006] The embodiments of the present application disclose the following technical solutions:
[0007] On the one hand, an embodiment of the present application provides a search method, the method comprising:
[0008] Get the conversation information to be replied;
[0009] If it is determined that the type of the conversation information to be replied is service type and the service category is the first category, first reply conversation information including service result data and a first service direct link is returned, the first reply conversation information is used to reply to the conversation information to be replied, the first service direct link is used to enter a first service application, and the first service application is a service application corresponding to the first category.
[0010] On the one hand, an embodiment of the present application provides a search device, the device comprising an acquisition unit and a return unit:
[0011] The acquisition unit is used to acquire the conversation information to be replied;
[0012] The return unit is used to return first reply dialogue information including service result data and a first service direct link if it is determined that the type of the dialogue information to be replied is service type and the service category is the first category, wherein the first reply dialogue information is used to reply to the dialogue information to be replied, and the first service direct link is used to enter a first service application, and the first service application is a service application corresponding to the first category.
[0013] In one aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:
[0014] The memory is used to store a computer program and transmit the computer program to the processor;
[0015] The processor is configured to execute the method described in any one of the preceding aspects according to instructions in the computer program.
[0016] On the one hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the processor executes the method described in any of the aforementioned aspects.
[0017] In one aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the method described in any of the aforementioned aspects when executed by a processor.
[0018] It can be seen from the above technical solution that when a conversational search is required, the conversation information to be replied is obtained, and it is determined whether the type of the conversation information to be replied is a service type, so as to determine whether to provide a service direct link that meets the user's needs when providing the corresponding reply conversation information. If it is determined that the type of the conversation information to be replied is a service type and the service category is the first category, the first reply conversation information including the service result data and the first service direct link is returned, so that the first reply conversation information contains both the relevant answer content itself and a link that can be directly opened and enter the first service application. In this way, when the user's demand is to use a certain service, after understanding the relevant answer content, if the user needs to enter the corresponding first service application, he can directly click on the first service direct link to open the corresponding first service application and complete the required service, which simplifies the operation of entering the service application and improves the efficiency of using the service application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technical members in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 An application scenario architecture diagram of a search method provided in an embodiment of the present application;
[0021] Figure 2 A flowchart of a search method provided in an embodiment of the present application;
[0022] Figure 3 An example diagram of an interface of a search method provided in an embodiment of the present application;
[0023] Figure 4a A flowchart of another search method provided in an embodiment of the present application;
[0024] Figure 4b An example diagram of an interface of another search method provided in an embodiment of the present application;
[0025] Figure 5 An example diagram of the overall process of a search method provided in an embodiment of the present application;
[0026] Figure 6 A structural diagram of a search device provided in an embodiment of the present application;
[0027] Figure 7 A structural diagram of a terminal provided in an embodiment of the present application;
[0028] Figure 8 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0030] In the related art, although the final reply can be given according to the dialogue information input by the user, when the user's demand is to use a certain service, the user needs to exit the dialogue search interface and open the corresponding service application to complete the required service. In this process, the user needs to perform relatively cumbersome operations to use the service application, which is relatively inefficient.
[0031] In order to solve the above technical problems, an embodiment of the present application provides a search method, which can determine whether the type of the acquired dialogue information to be replied is a service type, so as to determine whether to provide a service direct link that meets the user's needs when providing the corresponding reply dialogue information. When it is determined that the type of the dialogue information to be replied is a service type and the service category is the first category, the first reply dialogue information including the service result data and the first service direct link can be returned. In this way, when the user's demand is to use a certain service, if the user needs to enter the corresponding first service application, he can directly click on the first service direct link to open the corresponding first service application and complete the required service without complicated operation process, which simplifies the operation of entering the service application and improves the efficiency of using the service application.
[0032] The method provided in the embodiment of the present application can be applied to various conversational search products, so that when the user's demand is to use a certain service, a direct service link can be provided to the user, so that the user can directly click on the direct service link to open the corresponding service application and use the corresponding service.
[0033] It should be understood that the method provided in the embodiments of the present application can be executed by a computer device, which may be, for example, a server and / or a terminal. The server may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, a smart TV, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0034] For ease of understanding, the application scenario architecture of the search method provided in the embodiment of the present application is introduced. Figure 1 As shown, Figure 1 The application scenario architecture diagram of a search method is shown. The application scenario may include a terminal 100 and a server 200. The terminal 100 may use a conversational search product for searching. The conversational search product may provide search services in various forms, such as mini-programs, applications, or web pages. Among them, the conversational search product is a product that provides search services to users in the form of a conversation. The user inputs the conversation information to be replied in the form of a conversation, and the conversational search product replies to the conversation information to be replied in the form of a conversation. The server 200 may serve as a conversation service background to provide a conversational search service for the terminal 100.
[0035] When a conversational search is required, the user can input conversation information to be replied in the conversational search product through the terminal 100. The conversation information to be replied is conversation information input by the user and needs to be replied through the conversation product to meet the user's search needs. Generally, the conversation information to be replied can be a conversation question, for example, the conversation information to be replied can be "How is the weather in City A?".
[0036] After obtaining the dialogue information to be replied, the terminal 100 may send the dialogue information to be replied to the server 200 so that the server 200 performs a subsequent processing flow for the dialogue information to be replied. After obtaining the dialogue information to be replied, the server 200 may determine whether the type of the dialogue information to be replied is a service type. The way to determine whether the type of the dialogue information to be replied is a service type may be that the server 200 performs service intent recognition on the dialogue information to be replied. Service intent recognition mainly determines whether the type of the dialogue information to be replied is a service type, so as to determine whether to provide a service direct link that meets the user's needs when providing the corresponding reply dialogue information.
[0037] The server 200 can obtain a first recognition result by performing service intent recognition on the dialogue information to be replied. The first recognition result can indicate whether the type of the dialogue information to be replied is a service type, so as to determine whether to provide a service direct link that meets the user's needs when providing the corresponding reply dialogue information. If the first recognition result indicates that the type of the dialogue information to be replied is a service type and the service category is the first category, it means that the type of the dialogue information to be replied is a service type, and the server 200 can return the first reply dialogue information including the service result data and the first service direct link.
[0038] Specifically, the server 200 can call the first service application corresponding to the first category to obtain service result data, and generate a first service direct link based on the first application program interface of the first service application. The service result data can be the relevant answer content searched based on the dialogue information to be replied, and the first service direct link can be a link used to open the first service application, and the first service application can be an application that provides a certain service to the user. The server 200 can then generate first reply dialogue information based on the service result data and the first service direct link, and return the first reply dialogue information to the user, so that the first reply dialogue information contains both the relevant answer content itself and a link that can be directly opened and enter the first service application. The first reply dialogue information is dialogue information that replies to the dialogue information to be replied. For example, for the above-mentioned dialogue information to be replied, the first reply dialogue information can be referred to. Figure 1 As shown in 101, it includes service result data (for example, the weather in City A today is cloudy at 27 degrees, west wind level 2, humidity 43%, and strong ultraviolet rays, please pay attention to sun protection) and the first service direct link (for example, a link for weather query).
[0039] Specifically, the server 200 returns the first reply dialogue information to the user, which can be that the server 200 sends the first reply dialogue information to the terminal 100, and the terminal 100 displays the first reply dialogue information to the user. In this way, when the user's demand is to use a certain service, after understanding the relevant answer content, if the user needs to enter the corresponding first service application, he can directly click the first service direct link to open the corresponding first service application and complete the required service, which simplifies the operation of entering the service application and improves the efficiency of using the service application.
[0040] It should be noted that the entire process of processing the dialogue information to be replied (i.e., the search method) is executed by the server 200, but the user needs to input the dialogue information to be replied through the terminal 100, that is, the server 200 obtains the dialogue information to be replied through the terminal 100, and the computer device can be the server 200. In some cases, the search method can also be completed independently by the terminal 100. In this case, after the user inputs the dialogue information to be replied through the terminal 100, all subsequent processes can be executed by the terminal 100, that is, the computer device can be the terminal 100. In other cases, the search method can also be completed by the terminal 100 and the server 200 in cooperation, for example, the dialogue information to be replied can be obtained by the terminal 100, the server 200 performs service intent recognition on the dialogue information to be replied, calls the first service application corresponding to the first category to obtain service result data, and generates a first service direct link based on the first application program interface of the first service application, etc. The terminal 100 generates the first reply dialogue information based on the service result data and the first service direct link, and returns the first reply dialogue information to the user. Of course, the terminal 100 and the server 200 may also adopt other cooperation modes, and the embodiment of the present application does not limit the steps respectively performed by the two. In this case, the above-mentioned computer device includes the server 200 and the terminal 100.
[0041] It should be noted that in the specific implementation of the present application, user information and other related data may be involved in the process of data processing. When the above embodiments of the present application are applied to specific products or technologies, the user's separate consent or separate permission is required, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0042] Next, the search method provided by the embodiment of the present application will be described in detail with reference to the accompanying drawings. Figure 2 , Figure 2 A flow chart of a search method is shown, the method comprising:
[0043] S201, obtaining conversation information to be replied.
[0044] When a user needs to use a conversational search product to search, the user can enter the conversation information to be replied in the conversational search product in the form of a conversation, so that the terminal can obtain the conversation information to be replied, so that the conversational search product can reply to the conversation information to be replied in the form of a conversation. The conversation information to be replied contains the content to be searched. Usually, the conversation information to be replied can be a conversation question, for example, the conversation information to be replied can be "How is the weather in City A?", see Figure 3 As shown in Figure 301.
[0045] S202: If it is determined that the type of the dialogue information to be replied is service type and the service category is the first category, return the first reply dialogue information including the service result data and the first service direct link.
[0046] After obtaining the dialogue information to be replied, it can be determined whether the type of the dialogue information to be replied is a service type, so as to determine whether to provide a service direct link that meets the user's needs when providing the corresponding reply dialogue information. If it is determined that the type of the dialogue information to be replied is a service type and the service category is the first category, the first reply dialogue information including the service result data and the first service direct link is returned. The first reply dialogue information is used to reply to the dialogue information to be replied, and the first service direct link is used to enter the first service application, which is the service application corresponding to the first category.
[0047] In the embodiment of the present application, in order to reduce the amount of calculation of the terminal, the terminal can perform visualization steps, such as obtaining and displaying the dialogue information to be replied, displaying the first reply dialogue information, etc. The background processing steps can be performed by the server, such as determining whether the type of the dialogue information to be replied is a service type, generating the first reply dialogue information, etc. In this case, after the terminal obtains the dialogue information to be replied, it can send the dialogue information to be replied to the server, and the server performs subsequent processing procedures on the dialogue information to be replied. At this time, the server can serve as the background of the conversational search product. Specifically, the server can determine whether the type of the dialogue information to be replied is a service type, and return the first reply dialogue information to the terminal, and then the terminal returns the first reply dialogue information to the user.
[0048] Continue with Figure 3 For example, the dialogue information to be replied shown in 301 is "How is the weather in City A?". After the first reply dialogue information is returned, the display interface of the terminal changes from 301 to 302.
[0049] It can be seen from the above technical solution that when a conversational search is required, the conversation information to be replied is obtained, and it is determined whether the type of the conversation information to be replied is a service type, so as to determine whether to provide a service direct link that meets the user's needs when providing the corresponding reply conversation information. If it is determined that the type of the conversation information to be replied is a service type and the service category is the first category, the first reply conversation information including the service result data and the first service direct link is returned, so that the first reply conversation information contains both the relevant answer content itself and a link that can be directly opened and enter the first service application. In this way, when the user's demand is to use a certain service, after understanding the relevant answer content, if the user needs to enter the corresponding first service application, he can directly click on the first service direct link to open the corresponding first service application and complete the required service, which simplifies the operation of entering the service application and improves the efficiency of using the service application.
[0050] In an embodiment of the present application, there may be multiple ways to determine whether the type of the dialogue information to be replied is of the service class. In one possible implementation, the judgment may be made by service intent recognition. Based on this, in one possible implementation, the way to determine that the type of the dialogue information to be replied is of the service class and the service category is the first category may be to perform service intent recognition on the dialogue information to be replied, obtain a first recognition result, and then determine that the type of the dialogue information to be replied is of the service class and the service category is the first category based on the first recognition result. Normally, the first recognition result may indicate whether the type of the dialogue information to be replied is of the service class, and if it is of the service class, indicate the specific service category, so it may be determined that the type of the dialogue information to be replied is of the service class and the service category is the first category based on the first recognition result.
[0051] In one possible implementation, in order to return the first reply conversation information, before returning the first reply conversation information including the service result data and the first service direct link, the first service application corresponding to the first category can be called to obtain the service result data, and the first service direct link can be generated based on the first application program interface of the first service application, thereby generating the first reply conversation information based on the service result data and the first service direct link.
[0052] Based on the above introduction, the present application embodiment also provides another search method, see Figure 4a , Figure 4a A flow chart of another search method is shown, the method comprising:
[0053] S401, obtaining conversation information to be replied.
[0054] When a user needs to use a conversational search product to search, the user can enter the conversation information to be replied in the conversational search product in the form of a conversation, so that the terminal can obtain the conversation information to be replied, so that the conversational search product can reply to the conversation information to be replied in the form of a conversation. The conversation information to be replied contains the content to be searched. Usually, the conversation information to be replied can be a conversation question, for example, the conversation information to be replied can be "How is the weather in City A?", see Figure 3 As shown in Figure 301.
[0055] S402: Perform service intent recognition on the dialogue information to be replied to, and obtain a first recognition result.
[0056] After obtaining the dialogue information to be replied, the service intent can be identified for the dialogue information to be replied, so as to determine whether the type of the dialogue information to be replied is service-type, so as to determine whether to provide a direct service link that meets the user's needs when providing the corresponding reply dialogue information.
[0057] In an embodiment of the present application, in order to reduce the amount of calculation of the terminal, after obtaining the conversation information, the terminal can send the conversation information to be replied to the server, and the server performs subsequent processing procedures on the conversation information to be replied. At this time, the server can serve as the background of the conversational search product. Specifically, the server can perform service intent recognition on the conversation information to be replied to obtain a first recognition result. The first recognition result can indicate whether the type of the conversation information to be replied is a service type, so as to determine whether to provide a service direct link that meets the user's needs when providing the corresponding reply conversation information.
[0058] In an embodiment of the present application, there are many ways to identify the service intent of the dialogue information to be replied and obtain the first recognition result. In one possible implementation, the service intent can be identified through a language generation model. Specifically, the language generation model can be called, the dialogue information to be replied and the candidate service category are taken as input, and a suitable prompt description model (prompt) is selected. The suitable prompt description model can be, for example, a first prompt description model, and then based on the dialogue information to be replied and the candidate service category, the service intent is identified according to the first prompt description template through the language generation model to obtain the first recognition result.
[0059] In an embodiment of the present application, the candidate service categories may be all service categories supported by the conversational search product, that is, various types of services, such as weather inquiries, stock price inquiries, express inquiries, meal ordering services, cake ordering, train ticket ordering, flight ticket ordering, accommodation reservation services, route inquiries, etc.
[0060] Prompt can be understood as a way to start a machine learning model. It is a piece of text or sentence used to guide a machine learning model (such as a language generation model) to generate output of a specific type, theme or format. Here, the first prompt description template is used to guide the language generation model to identify whether the dialogue information to be replied has a service intent to obtain a first recognition result. To this end, in an embodiment of the present application, the first prompt description template can specify that the input is dialogue information to be replied, a candidate service category, and indicate whether the output dialogue information to be replied belongs to a certain service category. If it does, the service category to which it belongs is returned.
[0061] The embodiment of the present application does not limit the first prompt description template. In a possible implementation, the first prompt description template may be as follows:
[0062] You are a service analysis and identification assistant. The current supported service categories are: weather query, stock price query, express query, meal ordering, cake ordering, train ticket ordering, flight ticket ordering, route query. Please analyze whether the following question belongs to which category of service. If so, return the service category to which it belongs. Question: %question.
[0063] Among them, the service category is a complete list of service categories supported by the conversational search product, and %question is the conversation information to be replied to (for example, a conversation question) input by the user.
[0064] For example, if the user inputs "How is the weather in city A", it can be identified as a service of the "weather query" type, that is, the service category is weather query.
[0065] In an embodiment of the present application, the accuracy of service intent recognition is improved by selecting a suitable prompt template to guide the language generation model to perform service intent recognition.
[0066] It should be noted that, in order to implement the above steps, the background (eg, server) of the conversational search product may include a service intent recognition module, and S401 - S402 are executed by the service intent recognition module.
[0067] S403: If the first recognition result indicates that the type of the conversation information to be replied is a service type and the service category is a first category, call a first service application corresponding to the first category to obtain service result data, and generate a first service direct link based on a first application program interface of the first service application.
[0068] If the first recognition result indicates that the type of the conversation information to be replied is a service type and the service category is the first category, the server can call the first service application corresponding to the first category to obtain service result data, and generate a first service direct link based on the first application program interface of the first service application. The first application program interface is the application program interface (Application Programming Interface, API) of the first service application, the service result data can be the relevant answer content searched based on the conversation information to be replied, and the first service direct link can be a link for opening the first service application, and the first service application can be an application that provides a certain service to the user, such as a small program, an application that needs to be installed, etc.
[0069] Taking the above-mentioned user input of the dialogue message to be replied as "How is the weather in city A?" as an example, the first recognition result obtained can indicate that its type is service type and the service category is "weather query", that is, "weather query" is taken as the first category, and the first service application corresponding to the first category is a weather query application. Therefore, the weather query application can be called to query the corresponding weather to obtain service result data, and the first service direct link is generated based on the application program interface of the weather query application (i.e., the first application program interface).
[0070] It should be noted that, in order to implement the above steps, the background (eg, server) of the conversational search product may include a service summary module, and the service summary module executes S403. In addition, the background of the conversational search product also includes an application program interface between service categories and corresponding service applications.
[0071] It is understandable that the first service direct link can be a link for opening the first service application. Normally, by clicking on the first service direct link, you can directly open the first service application and directly provide services that meet the user's needs. For example, the conversation message to be replied is "How is the weather in City A?", that is, the service required by the user is to query the weather in City A. Then the first service application is a weather query application. Through the first service direct link, it should be possible to directly enter the first service application and provide the user with the weather in City A that the user needs to query. Therefore, in order to directly provide services that meet the user's needs, in one possible implementation method, the method of generating the first service direct link based on the first application program interface of the first service application can be to extract the slot content from the conversation message to be replied according to the first application program interface, and then fill the slot content into the first application program interface to obtain the first service direct link.
[0072] Among them, slot extraction can be to extract key information required for search, and slot content can be key information required for search. Usually, there is a blank field in the first application interface, and the blank field is the field required by the first application interface. The content represented by the field required by the first application interface is the slot content that needs to be extracted, so as to guide the search and provide users with services that meet their needs. When the first category is different, the first service application is different, the corresponding first application interface is also different, the required fields will also be different, and then the slot content obtained by the slot extraction may also be different.
[0073] For example, when the first category is "weather query", the first service application is a weather query application. At this time, the fields required by the first application interface may be time and geographic location. Then, the slot content obtained by slot extraction is the time and geographic location corresponding to the dialogue information to be replied. For another example, when the first category is "train ticket booking", the first service application is a train ticket booking application. At this time, the fields required by the first application interface may be departure time, departure city, and arrival city. Then, the slot content obtained by slot extraction is the departure time, departure city, and arrival city corresponding to the dialogue information to be replied.
[0074] Through the above method, a first service direct link that meets user needs can be obtained, so that the user can directly open and enter the first service application through the first service direct link, and directly provide services that meet user needs, thereby improving service utilization efficiency.
[0075] In the embodiment of the present application, there are many ways to extract the slot content from the dialogue information to be replied according to the first application interface. One way is to use natural language processing (NLP) technology to perform template matching, model recognition, etc. on the dialogue information to be replied input by the user to understand and extract the slot. Another way is to use a language generation model to design a corresponding prompt description template (such as a second prompt description template) for each service category according to the fields required by the first application interface to understand and extract the slot, so as to obtain the slot content through the language generation model according to the second prompt description template corresponding to the first application interface.
[0076] When the first category is different, the first service application is different, the corresponding first application program interface is also different, the required fields are also different, and the designed prompt template is also different. The following are examples of prompt templates (i.e., second prompt description templates) that can be selected for several service categories:
[0077]
[0078]
[0079] In an embodiment of the present application, a suitable prompt template is selected to guide the language generation model to extract the slot to obtain the slot content, thereby improving the accuracy of the slot extraction.
[0080] It should be noted that in the embodiment of the present application, the slot extraction step can be performed by the service summary module.
[0081] S404: Generate first reply dialogue information according to the service result data and the first service direct link, and return the first reply dialogue information.
[0082] After obtaining the service result data and the first service direct link, the server can generate first reply dialogue information according to the service result data and the first service direct link, and return the first reply dialogue information to the terminal, so as to return the first reply dialogue information to the user and complete the search service. The first reply dialogue information is information that replies to the dialogue information to be replied.
[0083] The embodiment of the present application recognizes service intent and replies to service-related dialogue messages through the first reply dialogue message generated above, which includes both service result data and the first service direct link, thereby improving the quality of answers to service-related questions.
[0084] Typically, the service result data obtained through the first service application may be very detailed and contain very rich information, while the user may need a very concise reply so that the key information desired to be queried can be quickly obtained. In this case, the method of generating the first reply dialogue information based on the service result data and the first service direct link can be based on the service result data, generating service summary information according to the third prompt description template through the language generation model, and then forming the first reply dialogue information based on the service summary information and the first service direct link.
[0085] The service summary information is the summary information of the service result data, which includes the key information of the service result data. Therefore, in this way, a more concise reply can be provided to the user, so that the user can quickly understand the key information and improve the user experience.
[0086] It can be understood that for the identified first category, the obtained service result data is used as input according to the data output format of the first application interface of the first category, and the document in its data output format is used as input information of the third prompt description template, and the language generation model generates service summary information according to the third prompt description template.
[0087] Take weather query as an example, if its data output format is:
[0088]
[0089]
[0090] The third prompt description template is not limited in the present application embodiment. Based on the above data output format, the third prompt description template can be designed as follows:
[0091] You are a weather query service interface parsing assistant. The interface data format is json format, described as %desc, where "weatherHour" is hourly weather data, "weatherLive" is real-time weather data, and the meaning of each sub-node is as follows. "airQuality": air quality, "airQualityDesc": air quality description, "hour": hour number, "hourDesc": hour text description, "temperature": temperature value, "temperatureMax": maximum temperature value, "temperatureMin": minimum temperature value, "weatherName": overall weather description, "humidity": humidity, "windDesc": wind force description, "windDirection": wind direction, "windLevel": wind force level. The current weather data is %input, please summarize the current weather overview.
[0092] Where %desc is replaced with the above weather output json format, and %input is the obtained service result data. In weather query, the service result data can be weather data.
[0093] It should be noted that in the embodiment of the present application, the step of generating the service summary information can be performed by the service summary module. In addition, in order to realize the step of generating the final first reply dialogue information, the background (such as a server) of the conversational search product can also include an answer generation module, and the answer generation module performs the step of forming the first reply dialogue information based on the service summary information and the first service direct link.
[0094] In a possible implementation, in order to facilitate the user to understand the detailed information, the service result data can also be returned to the user. In order to intuitively and clearly display the service result data, in the embodiment of the present application, the result data in the form of a chart can also be generated based on the service result data. In this way, when the first reply dialogue information is composed based on the service summary information and the first service direct link, the result data in the form of a chart, the service summary information and the first service direct link can be used to form the first reply dialogue information, so that the result data in the form of a chart is rendered on the terminal, and the first reply dialogue information is composed of the service summary information and the first service direct link and returned to the user. Among them, the result data in the form of a chart can be, for example, a curve, a symbol representing information, a graph, a table, etc.
[0095] In one possible implementation, the first reply dialogue information returned can be in the form of a service card, so that the first reply dialogue information can include the integration of various forms of content, pictures, texts, animation effects, videos, buttons, links, etc., which is more concise and orderly, thereby improving the quality of answers to service questions and improving user experience.
[0096] For example, the message to be replied is "How is the weather in city A?" Figure 3 As shown in 301, at this time, the first service application is a weather query application, and the service result data obtained through the first service application is the weather data of City A. Based on the service result data, service summary information can be generated, for example, "Today, the weather in City A is cloudy at 27 degrees, the west wind is level 2, the humidity is 43%, and the ultraviolet rays are strong. Please pay attention to sun protection", and a first service direct link of "Weather Query" is generated. In addition, based on the service result data, a chart form result data is generated, and the chart form result data can display the weather data of City A in the form of a chart, so that the chart form result data, the service summary information and the first service direct link form the first reply dialogue information and return it to the user. At this time, the display interface of the terminal changes from 301 to 302, the chart form result data is shown in 3021 in 302, the service summary information is shown in 3022 in 302, and the first service direct link is shown in 3023 in 302.
[0097] It can be seen from the above technical solution that when a conversational search is required, the conversation information to be replied is obtained, and the service intent is identified for the conversation information to be replied to, and a first identification result is obtained. The first identification result can indicate whether the type of the conversation information to be replied is a service type, so as to determine whether to provide a service direct link that meets the user's needs when providing the corresponding reply conversation information. If the first identification result indicates that the type of the conversation information to be replied is a service type and the service category is the first category, the first service application corresponding to the first category is called to obtain service result data, and a first service direct link is generated based on the first application program interface of the first service application. Among them, the service result data is the relevant answer content searched based on the conversation information to be replied, and the first service direct link is a link used to open the first service application, and then the first reply conversation information can be generated according to the service result data and the first service direct link, and the first reply conversation information is returned, so that the first reply conversation information contains both the relevant answer content itself and the link that can directly open and enter the first service application. In this way, when the user's need is to use a certain service, after understanding the relevant answer content, if the user needs to enter the corresponding first service application, he can directly click the first service direct link to open the corresponding first service application and complete the required service, which simplifies the operation of entering the service application and improves the use efficiency of the service application.
[0098] In an embodiment of the present application, service intent recognition can be used to determine whether the type of the dialogue information to be replied is a service class, so the first recognition result may indicate that the type of the dialogue information to be replied is a service class and the service category is the first category. Another possibility is that the first recognition result indicates that the type of the dialogue to be replied is a non-service class. If the first recognition result indicates that the type of the dialogue information to be replied is a non-service class, the server directly calls the search service to obtain the search results, then extracts the header of the search results to obtain the result content fragment, generates the second reply dialogue information based on the result content fragment, and returns the second reply dialogue information. Among them, the non-service class is a type other than the service class. At this time, when the dialogue information to be replied is a dialogue question, the dialogue information to be replied can also be called an ordinary question. The second reply dialogue information is the information that replies to the dialogue information to be replied. The content result fragment is the part of the search result that is most relevant to the dialogue information to be replied, thereby improving the relevance of the reply and then improving the accuracy of the reply.
[0099] In a possible implementation, the second reply dialogue information may be generated based on the result content fragments by splicing the extracted multiple result content fragments, and then inputting the spliced text into the language generation model to obtain the second reply dialogue information.
[0100] It should be noted that, in order to implement the above steps, the background (e.g., server) of the conversational search product may also include a search service module, and the search service module may execute the step of calling the search service to obtain the search results. In addition, the answer generation module may execute the step of extracting the header of the search results to obtain the result content fragment, generating the second reply dialogue information based on the result content fragment, and returning the second reply dialogue information.
[0101] In an embodiment of the present application, by performing header extraction on the search results to obtain result content fragments and then splicing them into the language generation model, the number of input tokens for one interaction of the language generation model can be reduced, and as many result content fragments as possible can be input into the language generation model to ensure the richness of the result content fragment input, thereby improving the accuracy of the second reply dialogue information.
[0102] In a possible implementation, the corresponding citation source and the reference source may be added to the second reply dialogue message.
[0103] See also Figure 4b As shown in 401, Figure 4b The dialogue message to be replied input by the user is “How do I apply for a pass in City A if I have a household registration outside the province?”, as shown in 4011. The generated second reply dialogue message can be seen in 4012. The second reply dialogue message also includes the source of citation, as shown in 4013, and also includes the reference source, as shown in 4014.
[0104] In many cases, whether the user's needs are service-related may be reflected in the input dialogue information to be replied, or in the reply to the reply information. Therefore, when the type of the dialogue information to be replied is non-service-related, the user may also have service-related needs, so at this time, it can be judged whether the user has service-related needs based on Dell's reply dialogue information. Depending on whether the user has service-related needs, the way of returning the second reply dialogue information may be different. In this case, the way of returning the second reply dialogue information may be to identify the service intent of the second reply dialogue information and obtain a second recognition result. In this way, it is identified whether there is a service-related content text in the second reply dialogue information. If the second recognition result indicates that there is a service-related content text in the second reply dialogue information and the service category is the second category, the server can generate a second service direct link based on the second application program interface of the second service application, and the second service application is a service application corresponding to the second category, and then add the second service direct link to the second reply dialogue information, and return the second reply dialogue information with the second service direct link added. Among them, the second service application can be a small program for providing services, an application that needs to be installed, etc.
[0105] In this way, whether the user may have service needs can be determined by whether there is service content text in the second reply dialogue message. Furthermore, when there is service content text in the second reply dialogue message, a direct link providing services to the user (such as a second service direct link) is returned to the dialogue in rich text. The user can directly click on the second service direct link to open the corresponding second service application to complete the required service, thereby improving the efficiency of direct service use.
[0106] For example Figure 4b As shown in 4012, the service content text in the second reply dialogue information may be, for example, "make an online appointment through the "A City Police" applet", and its corresponding service category is "appointment for card issuance", that is, the second category is "appointment for card issuance", and its corresponding second service application may be an appointment for card issuance application. Therefore, a second service direct link may be generated according to the application program interface of the appointment for card issuance application (i.e., the second application program interface) and added to the second reply dialogue information. The second service direct link may be referred to in Figure 4b When the user clicks the second service direct link, the interface of the appointment application can be opened and entered, for example Figure 4b As shown in 402.
[0107] It should be noted that, in the embodiment of the present application, the service intent identification module may perform the step of identifying the service intent of the second reply dialogue information.
[0108] It can be understood that the method of identifying the service intent of the second reply dialogue information can be similar to the method of identifying the service intent of the original reply dialogue information. For example, both can be implemented by using a language generation model. In this case, the method of identifying the service intent of the second reply dialogue information and obtaining the second recognition result can be based on the second reply dialogue information and candidate service categories, and identifying the service intent according to the fourth prompt description template through a language generation model to obtain the second recognition result.
[0109] Specifically, the server can call the language generation model, take the second reply dialogue information and all service categories (i.e., candidate service categories) supported by the conversational search product as input, and select a suitable prompt. The suitable prompt may be, for example, the fourth prompt description model. The language generation model then identifies the service intent of the second reply dialogue information according to the fourth prompt description model to obtain a second identification result.
[0110] The embodiment of the present application does not limit the fourth prompt description template. In a possible implementation, the fourth prompt description model may be as follows:
[0111] You are a service analysis and identification assistant. The currently supported service categories are: weather query, stock price query, express query, meal ordering, cake ordering, train ticket ordering, flight ticket ordering, route query. Please identify the service category contained in the second reply dialogue message %answer, and return the corresponding service content text and service category in the form of "text: service category".
[0112] The service category may be a complete enumeration of the service categories supported by the conversational search product, %answer is the generated second reply conversation information, and the returned service category is, for example, an identifiable second category.
[0113] In an embodiment of the present application, the accuracy of service intent recognition is improved by selecting a suitable prompt template to guide the language generation model to perform service intent recognition.
[0114] After obtaining the service content text and the second category, the service content text is used as input, and the slot content is obtained using the slot extraction method introduced above, and then spliced into the final second service direct link.
[0115] It should be noted that in the embodiment of the present application, the slot extraction step can be performed by the service summary module.
[0116] After obtaining the second service direct link, the second service direct link can be added to the second reply dialogue information, so that the user can directly access the corresponding second service application through the second service direct link in the second reply dialogue information. In the embodiment of the present application, there are many ways to add the second service direct link to the second reply dialogue information. One implementation method is to add the second service direct link to the location where the service content text is located in the second reply dialogue information, for example Figure 4b As shown in 4015. This can more intuitively and clearly reflect the relationship between the second service direct link and the service content text, making it easier to clarify the service provided by the second service direct link.
[0117] Another implementation method may be to directly add the second service direct link in the generated second reply dialogue information, which is a simpler adding method.
[0118] The above embodiment introduces the various steps of the search method provided by the present application in detail. Next, the overall process of the search method will be introduced in combination with actual application scenarios. In this application scenario, the dialogue information to be replied is a dialogue question input by the user. Figure 5 As shown, the method includes:
[0119] S501: Obtaining a dialogue question input by a user.
[0120] S502: Perform service intent recognition on the acquired dialogue question to obtain a first recognition result.
[0121] The first recognition result may indicate whether the type of the conversation question is service-related, and indicate a specific service category when the conversation question is service-related. When performing service intent recognition, service intent recognition may be performed in combination with all service categories (e.g., candidate service categories) supported by the conversational search product.
[0122] S503: Determine whether the type of the dialogue question is service type. If so, execute S504; if not, execute S509.
[0123] In the embodiment of the present application, it can be determined whether the type of the dialogue question is service-related based on the first recognition result.
[0124] S504: Extract the slot of the dialogue information to be replied to and obtain the slot content.
[0125] S505: Generate a first service direct link based on the slot content and the corresponding service interface.
[0126] The corresponding service interface may be a first application program interface of a first service application, the first service application may be a service application corresponding to a first category, and the first category may be a service category indicated by the first identification result.
[0127] S506: Obtain service result data.
[0128] In the embodiment of the present application, the first service application corresponding to the first category may be called to obtain service result data.
[0129] S507: Generate service summary information.
[0130] In the embodiment of the present application, service summary information may be generated according to the service result data through a language generation model in accordance with a third prompt description template.
[0131] S508: Generate and render first reply dialogue information based on the service summary information and the first service direct link.
[0132] S509: Call the search service to obtain search results.
[0133] S510: Extract the header of the search result to obtain result content segments, and splice multiple result content segments.
[0134] S511. Generate a second reply dialogue message through a language generation model, add a corresponding citation source and attach a reference source.
[0135] S512: Perform service intent recognition on the second reply dialogue information to obtain a second recognition result.
[0136] S513: The second recognition result indicates that there is service-related content text in the second reply dialogue information and the service category is the second category, and a slot is extracted for the second reply dialogue information.
[0137] S514: Generate a second service direct link based on the slot content extracted from the slot.
[0138] S515: Generate and render the second reply dialogue information with the second service direct link added.
[0139] The above process implements a method of directly using the language generation model to complete the business plug-in access without relying on the language generation model plug-in capability. For example, the language generation model is used to identify service intent to distinguish between service-related conversation questions and generated reply conversation information that includes service-related content text; the language generation model is used to generate service summary information; the language generation model is used to generate second reply conversation information; the language generation model is used to extract slots, etc.
[0140] The embodiment of the present application distinguishes between service-related conversation questions and situations in which the generated reply conversation information includes service-related content text through service intent recognition, and thus adds corresponding direct service links to the corresponding reply conversation information in different situations, thereby facilitating users to directly access corresponding service applications and improving the efficiency of direct service use.
[0141] It should be noted that, based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods.
[0142] based on Figure 2 Corresponding to the search method provided in the embodiment, the embodiment of the present application also provides a search device 600. Figure 6 , the search device 600 includes an acquisition unit 601 and a return unit 602:
[0143] The acquisition unit 601 is used to acquire the conversation information to be replied;
[0144] The return unit 602 is used to return first reply dialogue information including service result data and a first service direct link if it is determined that the type of the dialogue information to be replied is a service type and the service category is a first category. The first reply dialogue information is used to reply to the dialogue information to be replied, and the first service direct link is used to enter a first service application. The first service application is a service application corresponding to the first category.
[0145] In a possible implementation manner, the device further includes an identification unit:
[0146] The identification unit is used to identify the service intent of the dialogue information to be replied to and obtain a first identification result; and determine, according to the first identification result, that the type of the dialogue information to be replied to is a service type and the service category is the first category.
[0147] In a possible implementation, the identification unit is used to:
[0148] Based on the dialogue information to be replied and the candidate service categories, service intent is identified according to the first prompt description template through a language generation model to obtain the first identification result.
[0149] In a possible implementation manner, the device further includes a generating unit:
[0150] The generation unit is used to call the first service application corresponding to the first category to obtain the service result data before returning the first reply dialogue information including the service result data and the first service direct link, and generate the first service direct link based on the first application program interface of the first service application; and generate the first reply dialogue information according to the service result data and the first service direct link.
[0151] In a possible implementation manner, the generating unit is used to:
[0152] Extracting the slot of the conversation information to be replied to obtain the slot content according to the first application program interface;
[0153] Fill the slot content into the first application program interface to obtain the first service direct link.
[0154] In a possible implementation manner, the generating unit is used to:
[0155] According to the second prompt description template corresponding to the first application program interface, the slot content is obtained by performing slot extraction through a language generation model.
[0156] In a possible implementation manner, the generating unit is used to:
[0157] Based on the service result data, generating service summary information according to a third prompt description template through a language generation model;
[0158] The first reply dialogue information is composed based on the service summary information and the first service direct link.
[0159] In a possible implementation manner, the generating unit is used to:
[0160] generating result data in a chart form based on the service result data;
[0161] The chart-form result data, the service summary information and the first service direct link are combined into the first reply dialogue information.
[0162] In a possible implementation, the device further includes a searching unit and an extracting unit:
[0163] The search unit is configured to, if it is determined that the type of the dialogue information to be replied is a non-service type, call a search service to obtain search results, wherein the non-service type is a type other than a service type;
[0164] The extraction unit is used to extract the head of the search result to obtain a result content fragment;
[0165] The generating unit is further configured to generate second reply dialogue information based on the result content segment;
[0166] The returning unit 602 is further configured to return the second reply dialogue information.
[0167] In a possible implementation, the returning unit 602 is configured to:
[0168] Performing service intent recognition on the second reply dialogue information to obtain a second recognition result;
[0169] If the second recognition result indicates that the second reply dialogue message contains service content text and the service category is the second category, generating a second service direct link based on a second application program interface of a second service application, and the second service application is a service application corresponding to the second category;
[0170] Adding the second service direct link to the second reply dialogue information;
[0171] The second reply dialogue information to which the second service direct link is added is returned.
[0172] In a possible implementation, the returning unit 602 is configured to:
[0173] Add the second service direct link at the location where the service content text is located in the second reply dialogue information.
[0174] In a possible implementation, the returning unit 602 is configured to:
[0175] Based on the second reply dialogue information and the candidate service categories, service intent is identified according to the fourth prompt description template through a language generation model to obtain the second identification result.
[0176] It can be seen from the above technical solution that when a conversational search is required, the conversation information to be replied is obtained, and it is determined whether the type of the conversation information to be replied is a service type, so as to determine whether to provide a service direct link that meets the user's needs when providing the corresponding reply conversation information. If it is determined that the type of the conversation information to be replied is a service type and the service category is the first category, the first reply conversation information including the service result data and the first service direct link is returned, so that the first reply conversation information contains both the relevant answer content itself and a link that can be directly opened and enter the first service application. In this way, when the user's demand is to use a certain service, after understanding the relevant answer content, if the user needs to enter the corresponding first service application, he can directly click on the first service direct link to open the corresponding first service application and complete the required service, which simplifies the operation of entering the service application and improves the efficiency of using the service application.
[0177] The embodiment of the present application further provides a computer device, which can execute the aforementioned search method. The computer device can be, for example, a terminal, taking a smart phone as an example:
[0178] Figure 7 The block diagram shows a partial structure of a smart phone provided in an embodiment of the present application. Figure 7 The smartphone includes: a radio frequency (RF) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a wireless fidelity (WiFi) module 770, a processor 780, and a power supply 790. The input unit 730 may include a touch panel 731 and other input devices 732, the display unit 740 may include a display panel 741, and the audio circuit 760 may include a speaker 761 and a microphone 762. It is understood that Figure 7 The structure of the smartphone shown in the figure does not constitute a limitation of the smartphone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0179] The memory 720 can be used to store software programs and modules. The processor 780 executes various functional applications and data processing of the smartphone by running the software programs and modules stored in the memory 720. The memory 720 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the smartphone (such as audio data, a phone book, etc.), etc. In addition, the memory 720 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0180] The processor 780 is the control center of the smartphone, which uses various interfaces and lines to connect various parts of the entire smartphone, and executes various functions of the smartphone and processes data by running or executing software programs and / or modules stored in the memory 720, and calling data stored in the memory 720. Optionally, the processor 780 may include one or more processing units; preferably, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 780.
[0181] In this embodiment, the processor 780 in the smartphone may perform the following steps:
[0182] Get the conversation information to be replied;
[0183] If it is determined that the type of the conversation information to be replied is service type and the service category is the first category, first reply conversation information including service result data and a first service direct link is returned, the first reply conversation information is used to reply to the conversation information to be replied, the first service direct link is used to enter a first service application, and the first service application is a service application corresponding to the first category.
[0184] The computer device provided in the embodiment of the present application may also be a server. Figure 8 As shown, Figure 8The structural diagram of the server 800 provided in the embodiment of the present application, the server 800 may have relatively large differences due to different configurations or performances, and may include one or more processors, such as a central processing unit (CPU) 822, and a memory 832, one or more storage media 830 (such as one or more mass storage devices) storing application programs 842 or data 844. Among them, the memory 832 and the storage medium 830 can be temporary storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 822 can be configured to communicate with the storage medium 830 and execute a series of instruction operations in the storage medium 830 on the server 800.
[0185] The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input and output interfaces 858, and / or one or more operating systems 841, such as Windows Server 2000. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0186] In this embodiment, the steps performed by the CPU 822 in the server 800 may be based on Figure 8 The structure shown is implemented.
[0187] According to one aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the search method described in the above-mentioned embodiments.
[0188] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in various optional implementations of the above-mentioned embodiments.
[0189] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0190] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0191] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0192] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0193] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0194] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store computer programs.
[0195] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, ordinary technical members in the art should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A search method, characterized in that: The method comprises: Get the conversation information to be replied; If it is determined that the type of the conversation information to be replied is service type and the service category is the first category, first reply conversation information including service result data and a first service direct link is returned, the first reply conversation information is used to reply to the conversation information to be replied, the first service direct link is used to enter a first service application, and the first service application is a service application corresponding to the first category.
2. The method according to claim 1, characterized in that The determining that the type of the to-be-replied conversation information is a service type and the service category is a first category includes: Performing service intent recognition on the conversation information to be replied to, and obtaining a first recognition result; According to the first recognition result, it is determined that the type of the conversation information to be replied is service type and the service category is the first category.
3. The method according to claim 2, characterized in that The performing service intent recognition on the to-be-replied conversation information to obtain a first recognition result includes: Based on the dialogue information to be replied and the candidate service categories, service intent is identified according to the first prompt description template through a language generation model to obtain the first identification result.
4. The method according to claim 1, characterized in that Before returning the first reply dialogue information including the service result data and the first service direct link, the method further includes: Calling the first service application corresponding to the first category to obtain the service result data, and generating the first service direct link based on the first application program interface of the first service application; Generate first reply dialogue information according to the service result data and the first service direct link.
5. The method according to claim 4, characterized in that The generating the first service direct link based on the first application program interface of the first service application includes: Extracting the slot of the conversation information to be replied to obtain the slot content according to the first application program interface; Fill the slot content into the first application program interface to obtain the first service direct link.
6. The method according to claim 5, characterized in that The step of extracting the slot of the to-be-replied conversation information according to the first application program interface to obtain the slot content includes: According to the second prompt description template corresponding to the first application program interface, the slot content is obtained by performing slot extraction through a language generation model.
7. The method according to claim 4, characterized in that The generating first reply dialogue information according to the service result data and the first service direct link includes: Based on the service result data, generating service summary information according to a third prompt description template through a language generation model; The first reply dialogue information is composed based on the service summary information and the first service direct link.
8. The method according to claim 7, characterized in that The method further comprises: generating result data in a chart form based on the service result data; The forming of the first reply dialogue information based on the service summary information and the first service direct link includes: The chart-form result data, the service summary information and the first service direct link are combined into the first reply dialogue information.
9. The method according to claim 1, characterized in that: The method further comprises: If it is determined that the type of the dialogue information to be replied is non-service type, calling a search service to obtain search results, wherein the non-service type is a type other than the service type; Extracting the head of the search result to obtain a result content fragment; Generate second reply dialogue information based on the result content segment, and return the second reply dialogue information.
10. The method according to claim 9, characterized in that The returning the second reply dialogue information includes: Performing service intent recognition on the second reply dialogue information to obtain a second recognition result; If the second recognition result indicates that the second reply dialogue message contains service content text and the service category is the second category, generating a second service direct link based on a second application program interface of a second service application, and the second service application is a service application corresponding to the second category; Adding the second service direct link to the second reply dialogue information; The second reply dialogue information to which the second service direct link is added is returned.
11. The method according to claim 10, characterized in that The adding the second service direct link to the second reply dialogue information includes: Add the second service direct link at the location where the service content text is located in the second reply dialogue information.
12. The method according to claim 10, characterized in that The performing service intent recognition on the second reply dialogue information to obtain a second recognition result includes: Based on the second reply dialogue information and the candidate service categories, service intent is identified according to the fourth prompt description template through a language generation model to obtain the second identification result.
13. A search device, characterized in that: The device comprises an acquisition unit and a return unit: The acquisition unit is used to acquire the conversation information to be replied; The return unit is used to return first reply dialogue information including service result data and a first service direct link if it is determined that the type of the dialogue information to be replied is service type and the service category is the first category, wherein the first reply dialogue information is used to reply to the dialogue information to be replied, and the first service direct link is used to enter a first service application, and the first service application is a service application corresponding to the first category.
14. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the method according to any one of claims 1 to 12 according to the instructions in the computer program.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 12.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.
