Response copywriting generation method and device, storage medium and electronic device

By converting natural language requests into request text and determining the intent type, and combining local small models with cloud server processing, the problem of inaccurate recognition of implicit intent by voice assistants is solved, resulting in more accurate response generation and improved user experience.

CN120994780APending Publication Date: 2025-11-21QINGDAO YEELINK INFORMATION TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511086862.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Traditional voice assistants struggle to accurately identify the implicit query intent in users' expressions when processing natural language requests, leading to misunderstandings of user needs.

Method used

By converting natural language requests into request text, determining whether the intent type is explicit or implicit, and processing the request text using a local small model and a cloud server, a response copy is generated.

Benefits of technology

It improves the accuracy of voice assistants in recognizing users' implicit intentions, generates more natural and context-appropriate responses, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994780A_ABST
    Figure CN120994780A_ABST
Patent Text Reader

Abstract

The invention discloses a response copywriting generation method and device, a storage medium and an electronic device. The method comprises the steps that a natural language request of a target object is converted into a request text; the intention type of the target object is determined according to the request text, the intention type comprises an explicit intention and an implicit intention, the explicit intention is a clear intention directly expressed by the request text, and the implicit intention is that the request text at least comprises an implicit intention not directly expressed; when it is determined that the intention type is the implicit intention, processing is conducted through a cloud server according to the request text, a response copywriting fed back by the cloud server is received, and the response copywriting corresponds to the request text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more specifically, to a method and apparatus for generating response text, a storage medium, and an electronic device. Background Technology

[0002] Traditional voice assistants typically use keyword extraction or simple semantic models to parse users' natural language requests and identify their true intentions. For example, if the user directly asks, "What's the temperature in Beijing today?", the voice assistant can quickly identify the keywords "Beijing," "today," and "temperature," call the relevant modules to perform a weather query, and then accurately respond to the user.

[0003] However, when users express their needs in more natural and casual language, for example, the target might say, "Is it appropriate to wear short sleeves tomorrow?" This is actually asking about tomorrow's weather in order to make a clothing decision. However, since keywords such as "weather" and "temperature" are not directly mentioned, traditional voice assistants may misunderstand the target's intention and fail to recognize that this is a request for an implicit weather query, thus giving suggestions unrelated to the weather.

[0004] There is still no effective solution to the problem that voice assistants fail to accurately identify the implicit query intent in the expression of the target object when processing natural language requests. Summary of the Invention

[0005] This application provides a method and apparatus for generating response text, a storage medium, and an electronic device to at least solve the problem in the related art where voice assistants do not accurately identify the query intent implied in the expression of the target object when processing natural language requests.

[0006] According to one embodiment of this application, a method for generating response text is provided, comprising: converting a natural language request of a target object into request text; determining the intent type of the target object based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent being a clear intent directly expressed by the request text, and the implicit intent being an implicit intent that the request text at least includes an implicit intent not directly expressed; if the intent type is determined to be the implicit intent, processing the request text through a cloud server and receiving a response text fed back by the cloud server, wherein the response text corresponds to the request text.

[0007] In an exemplary embodiment, after converting the natural language request of the target object into request text, the method further includes: parsing the request text using a local small model in the terminal device to determine whether the request type of the natural language request is a target request, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; if the request type is determined to be the target request, parsing the request text using the local small model to obtain multiple first keywords; generating first structured data based on the multiple first keywords, wherein the first structured data is used to query the first request content corresponding to the target request; sending the first structured data to the cloud server, and obtaining the first request content through the cloud server based on the first structured data.

[0008] In an exemplary embodiment, obtaining the first request content through the cloud server based on the first structured data includes: determining whether the first request content is cached in the cloud server based on the first structured data, and determining whether the first request content has expired; if it is determined that the first request content is cached in the cloud server and the first request content has not expired, generating the response text based on the first request content.

[0009] In an exemplary embodiment, after determining whether the first requested content is cached in the cloud server based on the first structured data, and determining whether the first requested content has expired, the method further includes: if it is determined that the first requested content is not cached in the cloud server, or that the first requested content has expired, obtaining the first requested content through an application programming interface (API), and generating the response text based on the first requested content.

[0010] In an exemplary embodiment, after determining the intent type of the target object based on the request text, the method further includes: if the intent type is determined to be the explicit intent, determining a first template matching the target request from the template library of the terminal device, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; filling multiple first template slots of the first template with multiple first keywords and the first request content corresponding to the target request to generate the response text, wherein the multiple first keywords are obtained by parsing the request text by a local small model in the terminal device, and the multiple first keywords correspond one-to-one with the multiple first template slots; converting the response text into target speech and playing the target speech.

[0011] In an exemplary embodiment, after determining the intent type of the target object based on the request text, the method further includes: if the intent type is determined to be the explicit intent, determining a second template matching the target request from the template library of the cloud server, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; filling multiple second template slots of the second template with multiple second keywords and the first request content corresponding to the target request to generate the response text, wherein the multiple second keywords are obtained by parsing the request text through a cloud big data model, and the multiple second keywords correspond one-to-one with the multiple second template slots.

[0012] In one exemplary embodiment, processing the request text via a cloud server includes: processing the request text using a cloud-based big data model to generate a response text corresponding to the request text.

[0013] According to another embodiment of the present application, a response text generation system is also provided, comprising: a voice input module, configured to receive a natural language request from a target object and send the natural language request to a voice conversion module; the voice conversion module, connected to the voice input module, configured to convert the natural language request into request text and send the request text to an intent recognition module and a cloud service module; the intent recognition module, connected to the voice conversion module, configured to determine the intent type of the target object based on the request text, and, if the intent type is an implicit intent, invoke the cloud service module, wherein the intent type includes explicit intent and implicit intent, the explicit intent being the explicit intent directly expressed by the request text, and the implicit intent being the implicit intent included by the request text at least as an implied intent not directly expressed; the cloud service module, connected to the voice conversion module, configured to receive the request text, generate a response text corresponding to the request text through a cloud-based big data model, and send the response text to a terminal device.

[0014] According to another embodiment of the present application, a response text generation apparatus is also provided, comprising: a conversion module, configured to convert a natural language request of a target object into request text; a determination module, configured to determine the intent type of the target object based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent being a clear intent directly expressed by the request text, and the implicit intent being an implicit intent that the request text at least includes an implicit intent not directly expressed; and a receiving module, configured to, when the intent type is determined to be the implicit intent, process the request text through a cloud server and receive a response text fed back by the cloud server, wherein the response text corresponds to the request text.

[0015] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described method at runtime.

[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described method through the computer program.

[0017] In this embodiment, the natural language request of the target object is converted into request text; the intent type of the target object is determined based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent being the clear intent directly expressed in the request text, and the implicit intent being at least an implicit intent not directly expressed in the request text; if the intent type is determined to be the implicit intent, the request text is processed by a cloud server, and a response text is received from the cloud server, wherein the response text corresponds to the request text. This solution addresses the problem in related technologies where voice assistants inaccurately identify the implicit query intent expressed by the target object when processing natural language requests. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0019] Figure 1 This is a hardware structure block diagram of a terminal device for a method of generating response text according to an embodiment of this application;

[0020] Figure 2 This is a flowchart of a method for generating response text according to an embodiment of this application;

[0021] Figure 3 This is a first structural block diagram of a response text generation system according to an embodiment of this application;

[0022] Figure 4 This is a first schematic flowchart of a method for generating response text according to an embodiment of this application;

[0023] Figure 5 This is a second schematic flowchart of a method for generating response text according to an embodiment of this application;

[0024] Figure 6This is a second structural block diagram of a response text generation system according to an embodiment of this application;

[0025] Figure 7 This is a third structural block diagram of a response text generation apparatus according to an embodiment of this application. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] The methods and embodiments provided in this application can be executed in a terminal device or a similar computing device. Taking running on a terminal device as an example, Figure 1 This is a hardware structure block diagram of a terminal device for a method of generating response text according to an embodiment of this application. For example... Figure 1 As shown, the terminal device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor CPU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. In one exemplary embodiment, the terminal device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal device described above. For example, the terminal device may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.

[0029] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to terminal devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0030] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the terminal device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0031] This embodiment provides a method for generating response text. Figure 2 This is a flowchart of a method for generating response text according to an embodiment of this application. The process includes the following steps:

[0032] Step S202: Convert the natural language request of the target object into request text;

[0033] Step S204: Determine the intent type of the target object based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent is the clear intent directly expressed by the request text, and the implicit intent is the implicit intent that the request text includes at least some implied intent that is not directly expressed.

[0034] Step S206: If the intent type is determined to be the implicit intent, the cloud server processes the request text and receives the response text from the cloud server, wherein the response text corresponds to the request text.

[0035] Through the above steps, the natural language request of the target object is converted into request text; the intent type of the target object is determined based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent being the clear intent directly expressed in the request text, and the implicit intent being the implicit intent included in the request text at least as a part of the unexpressed intent; if the intent type is determined to be the implicit intent, the request text is processed by a cloud server, and a response text is received from the cloud server, wherein the response text corresponds to the request text. This method solves the problem in related technologies where voice assistants inaccurately identify the implicit query intent expressed by the target object when processing natural language requests.

[0036] It should be clarified that natural language requests include, but are not limited to, voice, text, and images. Explicit intent is a clearly stated intention that is directly expressed, such as, "What's the weather like in Beijing today?", while implicit intent includes at least implied intentions that are not directly expressed. That is, implicit intent can contain both explicit and implicit intents, such as, "Is it suitable to wear short sleeves tomorrow?" or "What's the temperature today? It's too hot in the room."

[0037] For step S202 above, after converting the natural language request of the target object into request text, the method further includes: parsing the request text through a local small model in the terminal device to determine whether the request type of the natural language request is a target request, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; if the request type is determined to be the target request, parsing the request text through the local small model to obtain multiple first keywords; generating first structured data based on the multiple first keywords, wherein the first structured data is used to query the first request content corresponding to the target request; sending the first structured data to the cloud server, and obtaining the first request content through the cloud server based on the first structured data.

[0038] Optionally, suppose a user asks a terminal device (such as a smart speaker or mobile phone) with the voice question, "Can I wear short sleeves tomorrow?" The automatic speech recognition (ASR) module built into the terminal device converts the speech signal into text format. A local small model then parses the request text to determine if it belongs to the target request category of weather requests. This local small model is typically a lightweight machine learning model deployed on the terminal device, responsible for the initial text parsing and determining whether the user's request falls within the target request category.

[0039] The local small model further parses the request text, extracting key information as the basis for subsequent processing. For the request "Can I wear short sleeves tomorrow?", the key information might include "tomorrow" (time) and "wear short sleeves" (activity type). Based on these keywords, the local small model generates the first structured data, a data format that is easy for computers to understand and process, containing the core elements of the request. The first structured data might look like this: {"request_type":"weather","time":"tomorrow","activity":"wear_short_sleeve"}. The generated first structured data is sent to the cloud server. After receiving the first structured data, the cloud server, based on the information contained in the first structured data (such as request type, time, and activity), calls the corresponding cache or Application Programming Interface (API) to retrieve the first request content. In this example, the cloud server will call the weather forecast API to query tomorrow's weather to determine whether it is suitable to wear short sleeves.

[0040] After the cloud server obtains tomorrow's weather information, it generates a suitable response message based on the weather conditions, such as "Tomorrow will be sunny with a high of 28°C, perfect for wearing short sleeves." Finally, this response message is sent back to the terminal device and converted into speech feedback to the user through the terminal device's text-to-speech (TTS) module, completing the entire processing flow.

[0041] It should be clarified that the first type of structured data includes, but is not limited to: city, time range, time dimension (day, hour), and intent type (explicit intent, implicit intent).

[0042] For step S202 above, obtaining the first request content through the cloud server based on the first structured data includes: determining whether the first request content is cached in the cloud server based on the first structured data, and determining whether the first request content has expired; if it is determined that the first request content is cached in the cloud server and the first request content has not expired, generating the response text based on the first request content.

[0043] Optionally, assuming the natural language request is determined to be a weather request, the cloud-based big data model extracts key information from the user's request text "Can I wear short sleeves tomorrow?". This key information might include "tomorrow" (time) and "wear short sleeves" (activity type). The extracted keywords are converted into first-order structured data, a format that facilitates computer processing and querying of specific information. For example, possible first-order structured data would look like this: {"request_type":"weather","time":"tomorrow","activity":"wear_short_sleeve"}. After receiving the structured data from the cloud-based big data model, the cloud server first checks its database for cached information about "tomorrow's weather." This check avoids duplicate requests and improves response speed, as weather data may not change significantly in a short period, and caching reduces the number of calls to external APIs. If the "tomorrow's weather" information is in the cloud server's cache, it also needs to be verified that this information is still valid (i.e., not expired). Once it is confirmed that the cloud has cached the "tomorrow's weather" information and that this information has not expired, the server immediately uses this cached data to generate the response text.

[0044] It should be clarified that the first type of structured data includes, but is not limited to: city, time range, time dimension (day, hour), and intent type (explicit intent, implicit intent).

[0045] Regarding step S202 above, after determining whether the first request content is cached in the cloud server based on the first structured data, and determining whether the first request content has expired, the method further includes: if it is determined that the first request content is not cached in the cloud server, or that the first request content has expired, obtaining the first request content through an application programming interface, and generating the response text based on the first request content.

[0046] The cloud server checks its cache for information such as "tomorrow's weather in Beijing." If it finds that the information is missing from the cache or has expired, the cloud server calls a specific API, passing the first structured data (including the location, time, etc.) as parameters to request the latest weather forecast or other data of the requested type. Based on the latest weather information (such as weather conditions, temperature, wind speed, etc.), the cloud server generates a response message that matches the user's request.

[0047] For step S204 above, after determining the intent type of the target object based on the request text, the method further includes: if the intent type is determined to be the explicit intent, determining a first template matching the target request from the template library of the terminal device, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; filling multiple first template slots of the first template with multiple first keywords and the first request content corresponding to the target request to generate the response text, wherein the multiple first keywords are obtained by parsing the request text by a local small model in the terminal device, and the multiple first keywords correspond one-to-one with the multiple first template slots; converting the response text into target speech and playing the target speech.

[0048] Optionally, when a user asks "What will the weather be like in Beijing tomorrow?", a local small model parses the user's natural language request, determines that the intent type is explicit, and selects the first template that best matches the weather request from a locally preset template library. This template library may contain various templates for different weather query types, such as: "The weather in [time] [city] will be [weather conditions], highest temperature [highest temperature] degrees, lowest temperature [lowest temperature] degrees." These templates are designed to quickly generate context-appropriate responses, and each template has multiple slots for inserting specific information. Based on the request text "What will the weather be like in Beijing tomorrow?", the local small model extracts the keywords "tomorrow" and "Beijing". These keywords are then matched with slots in the selected template; for example, the "[city]" slot in the template corresponds to "Beijing," and the "[time]" slot corresponds to "tomorrow." Specific weather information (such as weather conditions and temperature) is obtained from a cloud server and filled into the corresponding slots in the template. For example, if the cloud server returns data indicating that Beijing will have sunny weather tomorrow with a high of 28°C and a low of 16°C, the template will be filled with: "Tomorrow's weather in Beijing will be sunny, with a high of 28°C and a low of 16°C." This filled-in template text constitutes the response text. Next, the TTS module is used to convert the response text into the target speech, which is then played to the user through a speaker, completing the entire interaction process.

[0049] It is important to clarify that, in existing technologies, large-scale cloud-based language models, due to their powerful semantic understanding and generation capabilities, have become one of the key technologies for intelligent voice assistants to achieve complex scene understanding and high-quality semantic responses. However, while large cloud-based models have strong semantic understanding capabilities, their inference time is relatively long, especially when processing complex or long texts, requiring additional time to parse semantics and generate responses. During peak periods, a large number of users simultaneously send requests to the cloud, and the cloud server needs to handle a large number of concurrent requests. This may increase the processing time of a single request due to uneven resource allocation, resulting in slower responses. Therefore, addressing the issue of high latency in semantic responses from cloud-based models, which is detrimental to improving user experience, this embodiment addresses the problem of generating response text using a first template on the terminal device, which can effectively improve response speed.

[0050] For step S204 above, after determining the intent type of the target object based on the request text, the method further includes: if the intent type is determined to be the explicit intent, determining a second template matching the target request from the template library of the cloud server, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; filling multiple second template slots of the second template with multiple second keywords and the first request content corresponding to the target request to generate the response text, wherein the multiple second keywords are obtained by parsing the request text through a cloud big data model, and the multiple second keywords correspond one-to-one with the multiple second template slots.

[0051] Taking the weather request "What will the weather be like in Beijing tomorrow?" as an example, a deep analysis of the user's request text using a cloud-based big data model identifies "What will the weather be like in Beijing tomorrow?" as an explicit intent weather request. A richer template library exists on the cloud server to handle various explicit intent requests. The server selects the most suitable second template from the template library to populate the request based on the request category (in this case, a weather request) and intent type (i.e., explicit intent). The template might be designed as: "The weather forecast for [time] [city] is [weather conditions], with a high of [maximum temperature] degrees and a low of [minimum temperature] degrees." The cloud server will match the keywords "tomorrow" and "Beijing" extracted from the user's request with the second template slots in the template, i.e., "[city]" matches "Beijing," and "[time]" matches "tomorrow." Specific weather data is then retrieved to populate the other slots in the template (such as weather conditions, temperature, etc.). If no valid data is found in the cache, an external weather API will be called to obtain the latest information. Using weather data retrieved from the API, such as "sunny," "28℃," and "16℃," fill in the "[Weather Condition]," "[High Temperature]," and "[Low Temperature]" slots in the template, respectively, to generate a complete response message. After completion, the cloud server sends the response message back to the terminal device. The message might be: "Tomorrow's weather in Beijing is expected to be sunny, with a high of 28 degrees and a low of 16 degrees."

[0052] For step S206 above, the cloud server processes the request text, including: processing the request text through a cloud-based big data model to generate a response text corresponding to the request text.

[0053] When the local terminal device determines that the user's request is for a weather query and falls under the implicit intent (e.g., the user doesn't directly say "check the weather"), the request will be sent to the cloud server. A large language model running on the cloud server receives the request text from the terminal and performs deep analysis. This cloud-based model can understand more complex and natural sentence structures, accurately identifying the user's true intent even without using direct keywords. Based on this precise understanding of the user's intent, the cloud-based model will generate a response that matches the request text. This response will not only include weather forecast information but will also be presented in a more natural and context-appropriate way, improving the user experience. For example, for the request "Is tomorrow a good day to go out?", the cloud-based model might generate the response: "Tomorrow the weather in Beijing will be sunny and perfect for outdoor activities. Remember to apply sunscreen!"

[0054] To better understand the process of generating the response text described above, the following description will further illustrate the method of generating the response text with reference to optional embodiments, but this is not intended to limit the technical solutions of the embodiments of this application.

[0055] Figure 3 This is a first structural block diagram of a response text generation system according to an embodiment of this application, such as... Figure 3 As shown, it includes:

[0056] The user voice input module 302 is used to receive natural language requests from the target object. For example, when the user says "Easy, how's the weather today?", the user voice input module will capture this voice.

[0057] Automatic speech recognition module 304 is used to convert captured natural language requests into text data. For example, after a user says "Easy, how's the weather today?", the ASR module will convert it into the text "Easy, how's the weather today?" for subsequent modules to analyze.

[0058] The edge small model module 306 is used to perform preliminary intent recognition on the text generated by the ASR module, determine whether the user request is related to a specific function, such as weather query or music playback, and generate structured data based on multiple keywords in the request text. The structured data includes, but is not limited to: city, time range, time dimension (day, hour), and intent type (explicit intent, implicit intent).

[0059] The cloud service module 308 is used to query the request content corresponding to the target request based on structured data. For example, after receiving the request "What is the weather like in Beijing today?", the cloud service module will call the weather API to obtain the weather data of Beijing.

[0060] The cloud-based big language model module 310 is used to provide more natural and accurate text generation based on the request text when the intent type is implicit. For example, for an implicit weather query such as "Is it suitable to go on a picnic in the park tomorrow?", the cloud-based big language model module will understand the intent and generate a response such as "The weather in Beijing will be sunny tomorrow, suitable for a picnic. Remember to bring sunscreen."

[0061] The text-to-speech (TTS) module 312 is used to convert processed text information into speech signals so that they can be played to users through speakers or headphones. For example, after generating the text "Today's weather forecast for Beijing is sunny, with a high of 25 degrees Celsius and a low of 16 degrees Celsius," the TTS module will convert it into speech output, and the user will hear the weather forecast information clearly read aloud by the smart device.

[0062] Figure 4 This is a first schematic flowchart of a method for generating response text according to an embodiment of this application. Figure 4 The process of generating response text on the cloud server has been clarified, such as... Figure 4 As shown, it specifically includes the following:

[0063] When a user issues a natural language request, the terminal device performs ASR (Automatic Speech Responsive) text conversion on the natural language request, transforming it into request text. The terminal device's local small model determines the request type as a weather request. Further, the terminal device sends the corresponding weather request text to the cloud server. Upon receiving the weather request text, the cloud server extracts multiple secondary keywords from the text using a cloud-based large model, generating second structured data based on these keywords. These secondary keywords include, but are not limited to, time, location, and city. The second structured data is used to query the corresponding request content, and the user's intent type is further determined based on the weather request text. If the intent type is explicit, a second template matching the weather request is selected from the cloud server's template library. A response text (equivalent to template text) is generated based on the request content and the second template. If the intent type is implicit, a response text is generated based on the cloud-based large model. Finally, the response text is converted into speech and returned to the user.

[0064] Figure 5 This is a second schematic flowchart of a method for generating response text according to an embodiment of this application. Figure 5 The process of generating response text on the terminal device has been clarified, such as... Figure 5 As shown, it specifically includes the following:

[0065] When a user issues a natural language request, the terminal device performs ASR (Automatic Speech Responsive) text conversion on the request, transforming it into request text. The terminal device's local small model determines the request type as a weather request and identifies several primary keywords within the weather request text. These primary keywords, including but not limited to time, location, and city, are then used to generate first structured data. The terminal device transmits this first structured data to a cloud server, which uses this data to query the corresponding request content. Further, the terminal device determines the user's intent type based on the weather request text. If the intent type is explicit, a first template matching the weather request is selected from the terminal device's template library, and a response text is generated based on the request content and the first template. If the intent type is implicit, the cloud server is invoked, and it generates the response text based on a cloud-based large model. Finally, the response text is converted into speech and returned to the user.

[0066] Figure 6 This is a second structural block diagram of a response text generation system according to an embodiment of this application, such as... Figure 6 As shown, it includes:

[0067] The voice input module 62 is used to receive a natural language request from the target object and send the natural language request to the voice conversion module;

[0068] The speech conversion module 64 is connected to the speech input module and is used to convert the natural language request into request text and send the request text to the intent recognition module and the cloud service module.

[0069] The intent recognition module 66 is connected to the speech conversion module and is used to determine the intent type of the target object based on the request text. If the intent type is an implicit intent, the cloud service module is invoked. The intent type includes explicit intent and implicit intent. The explicit intent is the explicit intent directly expressed by the request text, and the implicit intent is the implicit intent that the request text includes at least some implicit intent that is not directly expressed.

[0070] The cloud service module 68 is connected to the speech conversion module and is used to receive the request text, generate a response text corresponding to the request text through a cloud-based big data model, and send the response text to the terminal device.

[0071] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0072] Figure 7 This is a third structural block diagram of a response text generation apparatus according to an embodiment of this application; as shown... Figure 7 As shown, it includes:

[0073] Conversion module 72 is used to convert the natural language request of the target object into request text;

[0074] The determination module 74 is used to determine the intent type of the target object based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent is the explicit intent directly expressed by the request text, and the implicit intent is the implicit intent that the request text includes at least some implicit intent that is not directly expressed.

[0075] The receiving module 76 is configured to, when determining that the intent type is the implicit intent, process the request text through the cloud server and receive the response text fed back by the cloud server, wherein the response text corresponds to the request text.

[0076] The aforementioned device converts the natural language request of the target object into request text. Based on the request text, the intent type of the target object is determined. The intent type includes explicit intent and implicit intent. Explicit intent is the clear intent directly expressed in the request text, while implicit intent is at least an implied intent not directly expressed in the request text. If the intent type is determined to be the implicit intent, the request text is processed by a cloud server, and a response text is received from the cloud server, where the response text corresponds to the request text. This method solves the problem in related technologies where voice assistants inaccurately identify the implicit query intent expressed by the target object when processing natural language requests.

[0077] In an exemplary embodiment, the conversion module 72 is further configured to parse the request text using a local small model in the terminal device to determine whether the request type of the natural language request is a target request, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; if the request type is determined to be the target request, the request text is parsed using the local small model to obtain multiple first keywords; first structured data is generated based on the multiple first keywords, wherein the first structured data is used to query the first request content corresponding to the target request; the first structured data is sent to the cloud server, and the cloud server obtains the first request content based on the first structured data.

[0078] In an exemplary embodiment, the conversion module 72 is further configured to determine, based on the first structured data, whether the first request content is cached in the cloud server and whether the first request content has expired; if it is determined that the first request content is cached in the cloud server and the first request content has not expired, generate the response text based on the first request content.

[0079] In an exemplary embodiment, the conversion module 72 is further configured to, if it is determined that the first request content is not cached in the cloud server or that the first request content has expired, obtain the first request content through an application programming interface and generate the response text based on the first request content.

[0080] In an exemplary embodiment, the determining module 74 is further configured to, when determining that the intent type is the explicit intent, determine a first template matching the target request from the template library of the terminal device, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; fill multiple first template slots of the first template according to multiple first keywords and the first request content corresponding to the target request to generate the response text, wherein the multiple first keywords are obtained by parsing the request text by a local small model in the terminal device, and the multiple first keywords correspond one-to-one with the multiple first template slots; convert the response text into target speech and play the target speech.

[0081] In an exemplary embodiment, the determining module 74 is further configured to, when determining that the intent type is the explicit intent, determine a second template matching the target request from the template library of the cloud server, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; and fill multiple second template slots of the second template with multiple second keywords and the first request content corresponding to the target request to generate the response text, wherein the multiple second keywords are obtained by parsing the request text through a cloud big data model, and the multiple second keywords correspond one-to-one with the multiple second template slots.

[0082] In an exemplary embodiment, the receiving module 76 is further configured to process the request text through a cloud-based big data model to generate a response text corresponding to the request text.

[0083] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.

[0084] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0085] S11, convert the natural language request of the target object into request text;

[0086] S12, determine the intent type of the target object based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent is the explicit intent directly expressed by the request text, and the implicit intent is the implicit intent that the request text includes at least some implicit intent that is not directly expressed.

[0087] S13, if the intent type is determined to be the implicit intent, the cloud server processes the request text and receives the response text from the cloud server, wherein the response text corresponds to the request text.

[0088] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0089] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0090] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0091] S11, convert the natural language request of the target object into request text;

[0092] S12, determine the intent type of the target object based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent is the explicit intent directly expressed by the request text, and the implicit intent is the implicit intent that the request text includes at least some implicit intent that is not directly expressed.

[0093] S13, if the intent type is determined to be the implicit intent, the cloud server processes the request text and receives the response text from the cloud server, wherein the response text corresponds to the request text.

[0094] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0095] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0096] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0097] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for generating responsive copy, characterized in that, include: Convert the natural language request of the target object into request text; The intent type of the target object is determined based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent is the clear intent directly expressed by the request text, and the implicit intent is the implicit intent that the request text includes at least some implied intent that is not directly expressed. If the intent type is determined to be the implicit intent, the cloud server processes the request text and receives a response text from the cloud server, wherein the response text corresponds to the request text.

2. The method for generating response text according to claim 1, characterized in that, After converting the natural language request of the target object into request text, the method further includes: The request text is parsed using a local small model in the terminal device to determine whether the natural language request is a target request. The target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request. If the request type is determined to be the target request, the request text is parsed using the local small model to obtain multiple first keywords; First structured data is generated based on the plurality of first keywords, wherein the first structured data is used to query the first request content corresponding to the target request; The first structured data is sent to the cloud server, and the cloud server obtains the first requested content based on the first structured data.

3. The method for generating response text according to claim 2, characterized in that, Obtaining the first requested content from the cloud server based on the first structured data includes: The cloud server determines whether the first requested content is cached in the cloud server based on the first structured data, and determines whether the first requested content has expired. If it is determined that the first request content has been cached in the cloud server and the first request content has not expired, the response text is generated based on the first request content.

4. The method for generating response text according to claim 3, characterized in that, After determining whether the first requested content is cached in the cloud server based on the first structured data, and determining whether the first requested content has expired, the method further includes: If it is determined that the first request content is not cached in the cloud server, or that the first request content has expired, the first request content is obtained through the application programming interface, and the response text is generated based on the first request content.

5. The method for generating response text according to claim 1, characterized in that, After determining the intent type of the target object based on the request text, the method further includes: If the intent type is determined to be the explicit intent, a first template matching the target request is determined from the template library of the terminal device, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; The response text is generated by filling multiple first template slots of the first template with multiple first keywords and the first request content corresponding to the target request. The multiple first keywords are obtained by parsing the request text by a local small model in the terminal device, and the multiple first keywords correspond one-to-one with the multiple first template slots. The response text is converted into the target speech, and the target speech is played.

6. The method for generating response text according to claim 1, characterized in that, After determining the intent type of the target object based on the request text, the method further includes: If the intent type is determined to be the explicit intent, a second template matching the target request is determined from the template library of the cloud server, wherein the target request includes at least one of the following: weather request, schedule request, navigation request, price request, and food request; The response text is generated by filling multiple second template slots of the second template with multiple second keywords and the first request content corresponding to the target request. The multiple second keywords are obtained by parsing the request text through a cloud-based big data model, and the multiple second keywords correspond one-to-one with the multiple second template slots.

7. The method for generating response text according to claim 1, characterized in that, The request text is processed by a cloud server, including: The request text is processed by a large cloud-based model to generate a response text corresponding to the request text.

8. A system for generating responsive copy, characterized in that, include: The voice input module is used to receive natural language requests from the target object and send the natural language requests to the voice conversion module; The speech conversion module is connected to the speech input module and is used to convert the natural language request into request text and send the request text to the intent recognition module and the cloud service module. The intent recognition module is connected to the speech conversion module and is used to determine the intent type of the target object based on the request text. If the intent type is an implicit intent, the cloud service module is invoked. The intent type includes explicit intent and implicit intent. The explicit intent is the explicit intent directly expressed by the request text, and the implicit intent is the implicit intent that the request text includes at least some implied intent that is not directly expressed. The cloud service module is connected to the speech conversion module and is used to receive the request text, generate a response text corresponding to the request text through a cloud-based big data model, and send the response text to the terminal device.

9. A device for generating responsive text, characterized in that, include: The conversion module is used to convert the natural language request of the target object into request text; The determination module is used to determine the intent type of the target object based on the request text, wherein the intent type includes explicit intent and implicit intent, the explicit intent is the explicit intent directly expressed by the request text, and the implicit intent is the implicit intent that the request text includes at least some implicit intent that is not directly expressed. The receiving module is configured to, when determining that the intent type is the implicit intent, process the request text through a cloud server and receive a response text from the cloud server, wherein the response text corresponds to the request text.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 7.

11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Question processing method and device, electronic equipment and storage medium

    CN118468333A

  • Guiding statement determination method and device, storage medium and electronic device

    CN120104747A

  • Method and system for app page recommendation via inference of implicit intent in a user query

    US20170329820A1