An interaction method and system based on a large language model in a vertical field

By splitting the large language model into classifiers and sub-business models, the problem of increased interaction time in smart home scenarios is solved, enabling rapid response and automatic switching, thus improving the user experience.

CN118152995BActive Publication Date: 2026-11-20QINGDAO HAIER TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410293713.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-14
Publication Date
2026-11-20
Estimated Expiration
2044-03-14

AI Technical Summary

Technical Problem

Existing large language models suffer from poor user experience in vertical domain interactions due to the increased length of tokens for single inputs, leading to longer interaction times. This is especially true in smart home scenarios, where single interaction times often exceed 3 seconds.

Method used

The large language model is split into a classifier and multiple closed sub-business models. The classifier determines the sub-business model corresponding to the interaction command, and the interaction command is processed in the current sub-business model or switched to a new sub-business model for processing, so as to achieve a fast response to the interaction command.

Benefits of technology

It significantly reduced the duration of a single interaction, improved the user experience, ensured that each session only required one large model interaction, reduced interaction latency, and enabled rapid response and automatic switching between business processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118152995B_ABST
    Figure CN118152995B_ABST
Patent Text Reader

Abstract

The application discloses an interaction method and system based on a large language model in a vertical field, and relates to the technical field of smart homes.The method comprises the following steps: receiving an interaction instruction input by a user; in the case that the interaction instruction is not a first interaction, inputting the interaction instruction into a currently invoked sub-business model to determine whether the interaction instruction corresponds to a sub-business of the current sub-business model, and inputting the interaction instruction into a classifier to determine a sub-business classification result corresponding to the interaction instruction; if it is determined that the interaction instruction corresponds to the sub-business of the current sub-business model, processing the interaction instruction through the current sub-business model and outputting a processing result; if it is determined that the interaction instruction does not correspond to the sub-business of the current sub-business model, determining a new sub-business model corresponding to the interaction instruction according to the sub-business classification result, and processing the interaction instruction through the new sub-business model to output a corresponding processing result, thereby reducing the length of a single interaction, and automatically switching between sub-businesses, which is fast in response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart home technology, and in particular to an interaction method and system based on a large language model in a vertical field. Background Technology

[0002] As the performance of the GPT large model continues to improve, its applications in various vertical fields are becoming increasingly widespread. For example, ChatGPT is a fine-tuned version of the GPT large model for the chat application vertical. Based on the GPT-3.5 model, it's a chat-specific GPT application with enhanced content filters to prevent deviations and better suited for conversational dialogue. Furthermore, when the GPT large model is applied to vertical fields such as smart homes, it's necessary to enhance the knowledge and business rules of smart homes to meet the needs of device control and content services. Moreover, since the primary interaction method in smart homes is voice, the interaction latency needs to be within 2.5 seconds for a good user experience.

[0003] Existing large-scale models can meet the requirements of natural interaction in real-time conversation scenarios. However, when dealing with vertical domain problems, the interaction time increases exponentially due to the limitations on the length of tokens for a single input and the increase in the number of tokens, resulting in a poor user experience. For example, a simple business interaction often takes more than 1 second, and slightly more complex ones take more than 2 seconds. If all device-controlled business is processed using the same large-scale model, the time takes more than 6 seconds, often around 10 seconds. Adding network transmission and other business processing, a single interaction generally takes at least 3 seconds and often more than 10 seconds. This limits the application of large-scale models in production environments. Summary of the Invention

[0004] This application provides an interaction method and system based on a large language model in a vertical domain, which solves the defect in the prior art where the token of a single interaction input is too long, resulting in an increase in the interaction time.

[0005] This application provides an interaction method based on a large language model in a vertical domain. The large language model is used for the target vertical domain, and the large language model includes a classifier and multiple closed sub-business models. The multiple closed sub-business models are generated by splitting the business of the target vertical domain. The classifier is used to determine the corresponding sub-business model according to the interaction instructions.

[0006] The interaction method includes:

[0007] Receive interactive commands from the user;

[0008] In the case where the interaction command is not the first interaction, the interaction command is input to the currently invoked sub-business model to determine whether the interaction command corresponds to the sub-business of the current sub-business model, and the interaction command is input to the classifier to determine the sub-business classification result corresponding to the interaction command;

[0009] If it is determined that the interaction instruction corresponds to a sub-service of the current sub-service model, the interaction instruction is processed through the current sub-service model, and the processing result is output.

[0010] If it is determined that the interaction instruction does not correspond to the sub-service of the current sub-service model, a new sub-service model corresponding to the interaction instruction is determined based on the sub-service classification result, and the new sub-service model is called to process the interaction instruction and output the corresponding processing result.

[0011] According to an embodiment of this application, after receiving the interaction instruction, the method further includes:

[0012] In the case where the interaction command is the first interaction, the interaction command is input into the classifier to determine the sub-business classification result corresponding to the interaction command, and the sub-business model corresponding to the sub-business classification result is called.

[0013] The interactive command is input into the sub-business model to obtain the corresponding processing result.

[0014] According to an embodiment of this application, an interaction method is provided that, after determining that the interaction instruction does not correspond to a sub-service of the current sub-service model, the method further includes:

[0015] If the sub-business classification result is empty, multiple rounds of queries are initiated, and the interactive instructions obtained after multiple rounds of queries are input into the classifier to determine the final sub-business classification result.

[0016] According to an interaction method provided in this application, when the sub-business model is invoked, the method further includes:

[0017] Send an information request to the cloud platform to obtain the smart device information associated with the sub-service, and synchronize the smart device information associated with the sub-service to the sub-service model, wherein the smart device information is used to describe the current working status information of the smart device;

[0018] The interaction command is processed through the current sub-business model, and the processing result is output, including:

[0019] The current sub-business model processes the interaction command based on the smart device information to obtain and output the processing result; wherein the processing result includes control information for the smart device.

[0020] According to an interaction method provided in this application, the processing result includes control information of the smart device associated with the sub-service;

[0021] After obtaining the processing result, the method further includes:

[0022] The control information contained in the processing result is sent to the smart device associated with the sub-service to control the smart device to execute the control information.

[0023] According to an interaction method provided in this application, the classifier includes sub-business categories corresponding to each sub-business model;

[0024] The interaction command is input into the classifier to determine the sub-business classification result corresponding to the interaction command, including:

[0025] The interaction command is input into a classifier, and semantic analysis is performed on the interaction command to extract the business information contained in the interaction command.

[0026] The corresponding sub-business category is determined based on the business information;

[0027] Based on the sub-service category, determine the sub-service classification result corresponding to the interaction instruction.

[0028] This application also provides an interactive system based on a large language model in a vertical domain. The large language model is used for the target vertical domain, and the large language model includes a classifier and multiple closed sub-business models. The multiple closed sub-business models are generated by splitting the business of the target vertical domain. The classifier is used to determine the corresponding sub-business model according to the interaction instructions.

[0029] The interactive system includes:

[0030] The interactive instruction receiving module is used to receive interactive instructions input by the user.

[0031] An interaction instruction processing module is used to input the interaction instruction into the currently invoked sub-business model when the interaction instruction is not the first interaction, to determine whether the interaction instruction corresponds to the sub-business of the current sub-business model, and to input the interaction instruction into the classifier to determine the sub-business classification result corresponding to the interaction instruction;

[0032] The first business processing module is used to process the interaction instruction through the current sub-business model if it is determined that the interaction instruction corresponds to a sub-business of the current sub-business model, and output the processing result.

[0033] The second business processing module is used to determine a new sub-business corresponding to the interaction instruction based on the sub-business classification result if it is determined that the interaction instruction does not correspond to the sub-business of the current sub-business model, and to call the new sub-business model to process the interaction instruction and output the corresponding processing result.

[0034] According to an interactive system provided in this application, the system further includes:

[0035] The initial interaction processing module is used to, upon receiving the interaction instruction and in the case of the initial interaction, input the interaction instruction into a classifier, determine the sub-business classification result corresponding to the interaction instruction, and call the sub-business model corresponding to the sub-business classification result; input the interaction instruction into the sub-business model to obtain the corresponding processing result.

[0036] This application also provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the interaction method in a vertical domain based on any of the above-described large language models.

[0037] This application also provides a computer-readable storage medium comprising a stored program, wherein the program, when executed, implements an interaction method in a vertical domain based on any of the above-described large language models.

[0038] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the interaction method in a vertical domain based on a large language model as described above.

[0039] The interaction method and system based on a large language model in a vertical domain provided in this application decompose the large model into multiple closed sub-business models and a classifier, thereby splitting the entire vertical domain business into multiple sub-businesses. The classifier determines the sub-business classification result corresponding to the interaction command. If the interaction command corresponds to the sub-business of the current sub-business model, the current sub-business model processes the interaction command and outputs the processing result. If the interaction command does not correspond to the sub-business of the current sub-business model, a new sub-business corresponding to the interaction command is determined based on the sub-business classification result, and the new sub-business model is called to process the interaction command and output the corresponding processing result. By processing the corresponding interaction commands through each sub-business model, the time of a single interaction can be reduced, and the automatic switching between sub-businesses results in rapid response and improved user experience.

[0040] In addition, the classifier's business classification of interaction commands and the current sub-business model's processing of interaction commands can be handled in parallel, ensuring that each session within a single task only requires the time of one large model interaction, significantly reducing the latency of each interaction and greatly improving the interaction experience. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a schematic diagram of the hardware environment for an interaction method based on a large language model in a vertical domain, according to an embodiment of this application.

[0044] Figure 2 This is one of the flowcharts illustrating the interaction method based on a large language model in a vertical domain provided in the embodiments of this application;

[0045] Figure 3 This is the second flowchart illustrating the interaction method based on a large language model in a vertical domain provided in the embodiments of this application;

[0046] Figure 4 This is the third flowchart illustrating the interaction method based on a large language model in a vertical domain provided in the embodiments of this application;

[0047] Figure 5 This is a schematic diagram of the structure of an interactive system based on a large language model in a vertical domain, provided in an embodiment of this application.

[0048] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0049] 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.

[0050] 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.

[0051] According to one aspect of the embodiments of this application, an interaction method based on a large language model in a vertical domain is provided. This interaction method based on a large language model in a vertical domain is widely used in whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the above-mentioned interaction method based on a large language model in a vertical domain can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.

[0052] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.

[0053] The method in this embodiment is mainly applied to smart home scenarios. In smart home scenarios, issues need to be addressed in areas such as appliance control, recipes, food management, device knowledge Q&A, encyclopedic knowledge Q&A, feedback and suggestions, music radio, weather, news, time clocks and schedules, encyclopedias, casual conversation, customer service calls, and after-sales service. If a large model is used to create a smart home assistant, the output of the large model needs to be defined through guided dialogue, incorporating the domain-specific knowledge, complex business logic, and system capabilities. This leads to excessively long guided dialogue (token limitations) and a significant increase in response latency. In this embodiment, the business is broken down by domain and scenario, turning a smart home assistant into individual business assistants. These business assistants are then managed through user sessions and scheduled as a whole to provide services to the user. This avoids the problem of excessively long tokens causing large latency in single inputs, ensuring that the latency of each interaction is within 2 seconds, meeting production requirements.

[0054] To achieve the above effects, in this embodiment, the large language model for the target vertical domain is segmented. The segmented large language model includes a classifier and multiple closed sub-business models. These multiple closed sub-businesses are generated by splitting the business of the target vertical domain. Each sub-business is independent of the others, and each sub-business has its own user session management, including its own historical chat records and context, session timeout control, etc. Additionally, the classifier, also a sub-model derived from the large model, is used to determine the corresponding sub-business model based on the interaction instructions.

[0055] For example, a vertical market might be "smart home," with sub-businesses including "air improvement," "recipe recommendation," "smart vacuuming," and "smart cooking." Correspondingly, these sub-business models include models for air improvement, recipe recommendation, smart vacuuming, and smart cooking.

[0056] In actual use, only one sub-business model can be invoked each time. If the input interaction command does not belong to the business scope of the current sub-business model, the classifier determines the sub-business model corresponding to the interaction command, and then switches to the new sub-business model to process the interaction command.

[0057] In this embodiment, the entity executing the interaction method can be an interaction system, which can be a system running on a cloud platform and loaded with a large language model. Furthermore, each smart home device is communicatively connected to the interaction system to transmit interaction instructions or control commands.

[0058] The cloud platform in this embodiment can be an IoT (Internet of Things) platform. An IoT platform refers to a network that connects other smart home devices through agreed-upon protocols. These smart home devices exchange and communicate information through information transmission media to achieve functions such as intelligent identification, positioning, tracking, and monitoring.

[0059] See Figure 2 The interaction method in this embodiment includes:

[0060] 201. Receive interactive commands input by the user.

[0061] In this embodiment, the interactive commands can be obtained through various smart home devices, such as smart speakers, smart TVs, smart refrigerators, and smart air conditioners. Taking a smart speaker as an example, the received voice commands from the user are converted into corresponding interactive commands, and then the smart speaker transmits the interactive commands to the interactive system running on the cloud platform.

[0062] Interactive commands can be explicit operational instructions, such as "Turn the air conditioner to 25 degrees Celsius for me"; or they can be descriptive instructions, such as "It's so hot today, the temperature inside is really high."

[0063] When the interactive system receives an interactive instruction, the specific sub-business model analyzes the instruction and provides a processing result.

[0064] 202. In the case where the interaction instruction is not the first interaction, the interaction instruction is input to the currently invoked sub-business model to determine whether the interaction instruction corresponds to the sub-business of the current sub-business model, and the interaction instruction is input to the classifier to determine the sub-business classification result corresponding to the interaction instruction.

[0065] It should be noted that each call can only invoke one sub-business model, and this sub-business model will continue to run unless the sub-business is switched. For example, if the sub-business corresponding to the first interaction command is the bathing sub-business, then the corresponding bathing sub-business model will run. If the sub-business corresponding to the second interaction command is the cooking sub-business, it does not directly switch to the corresponding cooking sub-business model. Instead, two steps are executed in parallel: first, the second interaction command is input into the currently running bathing sub-business model to determine whether the second interaction command corresponds to the sub-business of the current sub-business model; second, the second interaction command is input into the classifier to determine the corresponding sub-business classification result, and then the results of the two tasks are combined for a comprehensive judgment.

[0066] In this embodiment, the classifier's business classification of interaction instructions and the current sub-business model's processing of interaction instructions can be processed in parallel, ensuring that each session within a single task only requires the time of one large model interaction, significantly reducing the latency of each interaction and greatly improving the interaction experience.

[0067] Additionally, it should be noted that the classifier in this embodiment performs a preliminary classification of the interactive instructions based on semantic understanding. In this embodiment, the classifier does not prioritize the classification of interactive instructions. Subsequent steps are executed only after the classification result is determined. This is not only to reduce interaction latency, but also to avoid errors in the classification result of the classifier through parallel processing of the classifier and the current sub-business model.

[0068] In practical use, there may be instances where the classifier classifies a different sub-service, but the current sub-service model determines that the interaction command corresponds to the current sub-service and can output processing results based on the interaction command. In this case, the classifier's classification result should be ignored.

[0069] 203. If it is determined that the interaction instruction corresponds to a sub-service of the current sub-service model, the interaction instruction is processed through the current sub-service model, and the processing result is output.

[0070] The processing results include control information for the smart devices associated with the sub-services;

[0071] After obtaining the processing result, the method further includes: sending the control information contained in the processing result to a smart device associated with the sub-service, so as to control the smart device to execute the control information.

[0072] For example, if the user inputs the interaction command "It's dark in the living room", the sub-business model's processing result is "Okay, turn on the living room light". The interaction system will also turn on the living room light associated with the sub-business based on the control information in the processing result.

[0073] Furthermore, the processing results can be returned to the smart device that received the user's interaction instructions for playback, such as being played by a smart speaker via voice or displayed on a smart TV, to inform the user.

[0074] Furthermore, the processing results may also include: information from the user's inquiry to facilitate further interaction with the user. For example, in a cooking scenario, if the user's input is "I want to cook noodles, how long will it take?", the processing results, in addition to including "Put the noodles in the boiling water and cook for 3 minutes on high heat", may also include "Do you need me to time it for you? If so, please let me know after you put in the noodles, thank you."

[0075] 204. If it is determined that the interaction instruction does not correspond to the sub-service of the current sub-service model, a new sub-service model corresponding to the interaction instruction is determined according to the sub-service classification result, and the new sub-service model is called to process the interaction instruction and output the corresponding processing result.

[0076] If it is determined that the interaction command does not correspond to the sub-business of the current sub-business model, the system will return a prompt message "Not within my business scope" and automatically switch to the new sub-business model to process the interaction command, without requiring manual switching on the user side, thereby improving response speed.

[0077] For example, the currently invoked sub-business model is the "Air Quality Improvement Sub-business Model":

[0078] User: I'm going to take a shower later;

[0079] The system calls the "Air Quality Improvement Sub-Business Model," returns "Not within my business scope," categorizes it as "Bathhouse Sub-Business," calls the "Bathhouse Sub-Business Model" for processing, returns "Okay, Water Heater is on," and sends control activation information to the water heater to activate it.

[0080] Speaker: "Switching, please wait" (or other prompts, such as "Not the current business scope, switching..."), "Okay, water heater is on."

[0081] The interaction method based on a large language model in a vertical domain provided in this embodiment breaks down the large model into multiple closed sub-business models and a classifier, thereby splitting the entire vertical domain business into multiple sub-businesses. The classifier determines the sub-business classification result corresponding to the interaction command. If the interaction command corresponds to the sub-business of the current sub-business model, the current sub-business model processes the interaction command and outputs the processing result. If the interaction command does not correspond to the sub-business of the current sub-business model, a new sub-business corresponding to the interaction command is determined based on the sub-business classification result, and the new sub-business model is called to process the interaction command and output the corresponding processing result. By processing the corresponding interaction commands through each sub-business model, the time of a single interaction can be reduced, and the automatic switching between sub-businesses results in rapid response and improved user experience.

[0082] The above embodiment describes an interaction method based on a large language model during non-first-time interactions. In this embodiment, during the first interaction, since all sub-business models have not yet been invoked, a classifier is needed to classify the interaction commands and determine the sub-business model to be invoked based on the classification results.

[0083] The method includes: after receiving an interaction instruction, inputting the interaction instruction into a classifier, determining the sub-business classification result corresponding to the interaction instruction, and calling the sub-business model corresponding to the sub-business classification result; inputting the interaction instruction into the sub-business model to obtain the corresponding processing result.

[0084] Furthermore, the classifier in this embodiment may also fail to hit any service. After determining that the interaction instruction does not correspond to the sub-service of the current sub-service model, the method further includes: if the sub-service classification result is empty, initiating multiple rounds of queries, inputting the interaction instructions obtained after multiple rounds of queries into the classifier, and determining the final sub-service classification result.

[0085] For example, the current sub-services include "cooking sub-service," "bathing sub-service," "air quality improvement sub-service," "cleaning sub-service," and "room lighting sub-service." The user's car is not connected to the IoT cloud platform, and the smart home services in the corresponding interaction system do not include any sub-services related to controlling the car. In this scenario, if the user inputs an interaction command like "preheat my car," it neither falls within the scope of the current sub-model's sub-services nor can the classifier determine the corresponding sub-service classification result. Therefore, multiple rounds of queries are required. Furthermore, the smart device receiving the interaction command will also display a "Sorry, this service is not available" message to prompt the user to change the interaction command.

[0086] Specifically, the classifier includes the sub-business categories corresponding to each sub-business model;

[0087] See Figure 3 Step 202, which involves inputting the interaction command into a classifier to determine the sub-service classification result corresponding to the interaction command, includes:

[0088] 301. Input the interaction instructions into the classifier, perform semantic analysis on the interaction instructions, and extract the business information contained in the interaction instructions.

[0089] 302. Determine the corresponding sub-business category based on the business information.

[0090] 303. Based on the sub-business category, determine the sub-business classification result corresponding to the interaction instruction.

[0091] Steps 301 to 303 can be used to determine the sub-business classification results.

[0092] In one scenario, the larger model can also include sub-business models for dialogue-based operations. These sub-business models, similar to the ChatGPT model, facilitate communication and interaction with the user, much like casual conversation, but do not belong to any sub-business within the vertical domain. If the current interaction command does not fall within the scope of the current sub-business model, and the classifier does not match any sub-business category, then the dialogue sub-business model can be invoked to interact with the user.

[0093] Furthermore, in order for the sub-business model to accurately respond to user interaction commands, the sub-business model needs to obtain the current working status information of various smart devices, such as whether the smart TV is turned on, the remaining battery power of the smart speaker, whether the robot vacuum cleaner has water, and what kind of food is stored in the smart refrigerator. Correspondingly, when the sub-business model is invoked, the method further includes: sending an information request to the cloud platform to obtain the smart device information associated with the sub-business, and synchronizing the smart device information associated with the sub-business to the sub-business model, wherein the smart device information is used to describe the current working status information of the smart devices.

[0094] The interaction commands are processed through the current sub-business model, and the processing results are output, including: processing the interaction commands based on the smart device information through the current sub-business model, obtaining and outputting the processing results; wherein, the processing results include control information of the smart device.

[0095] In this embodiment, the acquisition of smart device information associated with the sub-service of the sub-service model is performed only when the sub-service model is invoked through the interactive system of this embodiment. This avoids the need to acquire all smart device information at once, saving network resources and reducing data interaction in the network.

[0096] To facilitate understanding of the technical solution in this embodiment, a specific interaction process is also provided as an example. See [link to example]. Figure 4 The business model in a vertical industry is broken down into multiple sub-business models, each with its own user session management, including historical chat records, context, session timeout control, etc.

[0097] In the case of the first interaction, the interaction command is input into the classifier to determine the sub-business classification result corresponding to the interaction command, and the sub-business model corresponding to the sub-business classification result is called; the interaction command is input into the sub-business model to obtain the corresponding processing result.

[0098] If the interaction command is not the first interaction, the interaction command is input into the currently invoked sub-business model to determine whether the interaction command corresponds to the sub-business of the current sub-business model, and the interaction command is input into the classifier to determine the sub-business classification result corresponding to the interaction command.

[0099] The interactive system in this embodiment combines the classification results of the classifier with the processing results of the current sub-business model to control the switching between businesses, and there are three cases:

[0100] A. Maintain current business: The processing result of the current sub-business model is considered to be within the scope of the current sub-business. The classifier result is ignored, and no sub-business switching is performed.

[0101] B. Switch to a new business: If the processing result of the current sub-business model is deemed not to be within the scope of the current sub-business, and the classifier result indicates a new sub-business, then switch to the new sub-business model to process the user's interaction command.

[0102] C. Multi-round inquiry or general business processing: If the current sub-business model determines that the result is not within the scope of the current sub-business and the classifier does not hit any business, then initiate multi-round interaction to allow the user to supplement more information, or hand it over to the general sub-business model (similar to a casual chat sub-business) for processing.

[0103] Taking a smart speaker as an example, which is used to receive user input commands, the interaction process is as follows:

[0104] User: It's so hot today, the temperature inside is too high.

[0105] System: Classify the "Air Quality Improvement" sub-business, call the air quality improvement sub-model, turn on the air conditioner, and set the temperature to 26 degrees.

[0106] Speaker: The air conditioner has been turned on for you, in smart mode, at 26 degrees Celsius.

[0107] User: Okay, could you help me decide what to eat for lunch?

[0108] The system invokes the air quality improvement sub-model and returns "Not within my business scope". It then categorizes the "Recipe FAQ" sub-business, invokes the recipe recommendation sub-model, and returns the recommendation "Tomato and Egg Noodles".

[0109] Speaker: You have tomatoes, eggs, garlic, and noodles in your refrigerator. You can make your favorite tomato and egg noodles.

[0110] User: Are we running out of tomatoes?

[0111] System: Calls the recipe recommendation sub-model and returns "There are 4 tomatoes left, and only 2 recipes are needed, which meets the recipe requirements", ignoring the classifier's classification result.

[0112] Speaker: There are 4 tomatoes left, and the recipe only needs 2, which meets the recipe requirements.

[0113] User: I've started boiling the water. How long should I cook the noodles?

[0114] System: Calls the recipe recommendation sub-model and returns "After the water boils, put in the noodles and cook for 3 minutes", ignoring the classifier's classification result.

[0115] Speaker: After the water boils, put in the noodles and cook for 3 minutes.

[0116] User: Okay, I'm starting to cook. Playing my favorite music.

[0117] System: Call the recipe recommendation sub-model, return "not within my business scope", classify it as "smart cooking" sub-business, and call the smart cooking sub-model.

[0118] Speaker: Okay, the music is already playing on the kitchen refrigerator. I've turned on the kitchen light for you.

[0119] The following effects can be achieved through the interaction method of this embodiment:

[0120] 1) Reduce the latency of a single request by splitting the business into sub-businesses.

[0121] 2) Design closed-ended responses for each sub-business model to assist the classifier in achieving accurate topic switching.

[0122] 3) The classifier and the current sub-business model are processed in parallel, ensuring that each session only requires the time of one large model interaction within a single interaction task, significantly reducing the latency of each interaction and greatly improving the interaction experience.

[0123] 4) The closed-loop answer and classification results of sub-businesses provide dual protection to ensure accurate invocation of tasks corresponding to user intent.

[0124] 5) Ensure free and convenient intelligent switching between sub-business models without requiring explicit switching by the user.

[0125] 6) Each sub-business model has its own session management, which can maintain session continuity during sub-business switching.

[0126] The following describes the interaction system based on a large language model in a vertical domain provided in this application. The interaction system based on a large language model in a vertical domain described below can be referred to in correspondence with the interaction method based on a large language model in a vertical domain described above.

[0127] This application discloses an interactive system based on a large language model in a vertical domain. The large language model is used for the target vertical domain and includes a classifier and multiple closed sub-business models. The multiple closed sub-business models are generated by splitting the business of the target vertical domain. The classifier is used to determine the corresponding sub-business model according to the interaction instructions; see also Figure 5 The interactive system includes:

[0128] The interactive instruction receiving module 510 is used to receive interactive instructions input by the user.

[0129] The interaction instruction processing module 520 is used to input the interaction instruction into the currently invoked sub-business model when the interaction instruction is not the first interaction, to determine whether the interaction instruction corresponds to the sub-business of the current sub-business model, and to input the interaction instruction into the classifier to determine the sub-business classification result corresponding to the interaction instruction;

[0130] The first business processing module 530 is used to process the interaction instruction through the current sub-business model if it is determined that the interaction instruction corresponds to a sub-business of the current sub-business model, and output the processing result.

[0131] The second business processing module 540 is used to determine a new sub-business corresponding to the interaction instruction based on the sub-business classification result if it is determined that the interaction instruction does not correspond to the sub-business of the current sub-business model, and to call the new sub-business model to process the interaction instruction and output the corresponding processing result.

[0132] Optionally, the system further includes:

[0133] The initial interaction processing module is used to, upon receiving the interaction instruction and in the case of the initial interaction, input the interaction instruction into a classifier, determine the sub-business classification result corresponding to the interaction instruction, and call the sub-business model corresponding to the sub-business classification result; input the interaction instruction into the sub-business model to obtain the corresponding processing result.

[0134] Optionally, the system further includes: a third business processing module, used to, after determining that the interaction instruction does not correspond to the sub-business of the current sub-business model, if the sub-business classification result is empty, initiate multiple rounds of queries, input the interaction instructions obtained after multiple rounds of queries into the classifier, and determine the final sub-business classification result.

[0135] Optionally, the system further includes: an information synchronization module, used to send an information request to the cloud platform when the sub-business model is invoked, to obtain smart device information associated with the sub-business, and to synchronize the smart device information associated with the sub-business to the sub-business model, wherein the smart device information is used to describe the current working status information of the smart device;

[0136] The first business processing module 530 is specifically used to: process the interaction instruction based on the smart device information through the current sub-business model, obtain and output the processing result; wherein, the processing result includes control information for the smart device.

[0137] Optionally, the processing result includes control information for the smart device associated with the sub-service; the system further includes: a control information sending module, used to send the control information contained in the processing result to the smart device associated with the sub-service after obtaining the processing result, so as to control the smart device to execute the control information.

[0138] Optionally, the classifier includes sub-business categories corresponding to each sub-business model;

[0139] The interaction instruction processing module 520 is specifically used for: inputting the interaction instruction into a classifier, performing semantic analysis on the interaction instruction, and extracting the business information contained in the interaction instruction; determining the corresponding sub-business category based on the business information; and determining the sub-business classification result corresponding to the interaction instruction based on the sub-business category.

[0140] The interaction method based on a large language model in a vertical domain provided in this application breaks down the large model into multiple closed sub-business models and a classifier, thereby splitting the entire vertical domain business into multiple sub-businesses. The classifier determines the sub-business classification result corresponding to the interaction command. If the interaction command corresponds to the sub-business of the current sub-business model, the current sub-business model processes the interaction command and outputs the processing result. If the interaction command does not correspond to the sub-business of the current sub-business model, a new sub-business corresponding to the interaction command is determined based on the sub-business classification result, and the new sub-business model is called to process the interaction command and output the corresponding processing result. By processing the corresponding interaction command through each sub-business model, the time of a single interaction can be reduced, and the automatic switching between sub-businesses results in rapid response and improved user experience.

[0141] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other through the communications bus 640. The processor 610 can call logical instructions in the memory 630 to execute an interaction method based on a large language model in a vertical domain. This method includes: receiving an interaction instruction input by a user; if the interaction instruction is not the first interaction, inputting the interaction instruction to a currently invoked sub-service model to determine whether the interaction instruction corresponds to a sub-service of the current sub-service model, and inputting the interaction instruction into a classifier to determine the sub-service classification result corresponding to the interaction instruction; if it is determined that the interaction instruction corresponds to a sub-service of the current sub-service model, processing the interaction instruction through the current sub-service model and outputting a processing result; if it is determined that the interaction instruction does not correspond to a sub-service of the current sub-service model, determining a new sub-service model corresponding to the interaction instruction based on the sub-service classification result, invoking the new sub-service model to process the interaction instruction, and outputting the corresponding processing result.

[0142] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0143] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the interaction method based on a large language model in a vertical domain provided by the above methods. The method includes: receiving an interaction command input by a user; if the interaction command is not the first interaction, inputting the interaction command into a currently invoked sub-business model to determine whether the interaction command corresponds to a sub-business of the current sub-business model, and inputting the interaction command into a classifier to determine the sub-business classification result corresponding to the interaction command; if it is determined that the interaction command corresponds to a sub-business of the current sub-business model, processing the interaction command through the current sub-business model and outputting a processing result; if it is determined that the interaction command does not correspond to a sub-business of the current sub-business model, determining a new sub-business model corresponding to the interaction command based on the sub-business classification result, invoking the new sub-business model to process the interaction command, and outputting the corresponding processing result.

[0144] Furthermore, this application also provides a computer-readable storage medium, which includes a stored program. When the program runs, it executes the interaction method based on a large language model in a vertical domain provided by the methods described above. This method includes: receiving an interaction command input by a user; if the interaction command is not the first interaction, inputting the interaction command to a currently invoked sub-business model to determine whether the interaction command corresponds to a sub-business of the current sub-business model, and inputting the interaction command to a classifier to determine the sub-business classification result corresponding to the interaction command; if it is determined that the interaction command corresponds to a sub-business of the current sub-business model, processing the interaction command through the current sub-business model and outputting a processing result; if it is determined that the interaction command does not correspond to a sub-business of the current sub-business model, determining a new sub-business model corresponding to the interaction command based on the sub-business classification result, invoking the new sub-business model to process the interaction command, and outputting the corresponding processing result.

[0145] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, 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 can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. An interaction method based on a large language model in a vertical domain, characterized in that, The large language model is used for the target vertical domain, and the large language model includes a classifier and multiple closed sub-business models. The multiple closed sub-business models are generated by splitting the business of the target vertical domain. The classifier is used to determine the corresponding sub-business model according to the interaction instructions. The interaction method includes: Receive interactive commands from the user; In the case where the interaction command is not the first interaction, the interaction command is input to the currently invoked sub-business model to determine whether the interaction command corresponds to the sub-business of the current sub-business model, and the interaction command is input to the classifier to determine the sub-business classification result corresponding to the interaction command; If it is determined that the interaction instruction corresponds to a sub-service of the current sub-service model, the interaction instruction is processed through the current sub-service model, and the processing result is output. If it is determined that the interaction instruction does not correspond to the sub-service of the current sub-service model, a new sub-service model corresponding to the interaction instruction is determined according to the sub-service classification result, and the new sub-service model is called to process the interaction instruction and output the corresponding processing result. When the sub-business model is invoked, the method further includes: Send an information request to the cloud platform to obtain the smart device information associated with the sub-service, and synchronize the smart device information associated with the sub-service to the sub-service model, wherein the smart device information is used to describe the current working status information of the smart device; The interaction command is processed by the current sub-service model, and the processing result is output. This includes: processing the interaction command based on the smart device information by the current sub-service model, obtaining and outputting the processing result; wherein the processing result includes control information for the smart device.

2. The interaction method according to claim 1, characterized in that, After receiving the interaction instruction, the method further includes: In the case where the interaction command is the first interaction, the interaction command is input into the classifier to determine the sub-business classification result corresponding to the interaction command, and the sub-business model corresponding to the sub-business classification result is called. The interactive command is input into the sub-business model to obtain the corresponding processing result.

3. The interaction method according to claim 1, characterized in that, After determining that the interaction instruction does not correspond to a sub-service of the current sub-service model, the method further includes: If the sub-business classification result is empty, multiple rounds of queries are initiated, and the interactive instructions obtained after multiple rounds of queries are input into the classifier to determine the final sub-business classification result.

4. The interaction method according to claim 1, characterized in that, The processing result includes control information for the smart devices associated with the sub-service; After obtaining the processing result, the method further includes: The control information contained in the processing result is sent to the smart device associated with the sub-service to control the smart device to execute the control information.

5. The interaction method according to claim 1, characterized in that, The classifier includes the sub-business categories corresponding to each sub-business model; The interaction command is input into the classifier to determine the sub-business classification result corresponding to the interaction command, including: The interaction command is input into a classifier, and semantic analysis is performed on the interaction command to extract the business information contained in the interaction command. The corresponding sub-business category is determined based on the business information; Based on the sub-service category, determine the sub-service classification result corresponding to the interaction instruction.

6. An interactive system based on a large language model in a vertical domain, characterized in that, The large language model is used for the target vertical domain, and the large language model includes a classifier and multiple closed sub-business models. The multiple closed sub-business models are generated by splitting the business of the target vertical domain. The classifier is used to determine the corresponding sub-business model according to the interaction instructions. The interactive system includes: The interactive instruction receiving module is used to receive interactive instructions input by the user. An interaction instruction processing module is used to input the interaction instruction into the currently invoked sub-business model when the interaction instruction is not the first interaction, to determine whether the interaction instruction corresponds to the sub-business of the current sub-business model, and to input the interaction instruction into the classifier to determine the sub-business classification result corresponding to the interaction instruction; The first business processing module is used to process the interaction instruction through the current sub-business model if it is determined that the interaction instruction corresponds to a sub-business of the current sub-business model, and output the processing result. The second business processing module is used to determine a new sub-business corresponding to the interaction instruction based on the sub-business classification result if it is determined that the interaction instruction does not correspond to the sub-business of the current sub-business model, and to call the new sub-business model to process the interaction instruction and output the corresponding processing result. The system further includes: an information synchronization module, used to send an information request to the cloud platform when the sub-business model is invoked, to obtain the smart device information associated with the sub-business, and to synchronize the smart device information associated with the sub-business to the sub-business model, wherein the smart device information is used to describe the current working status information of the smart device; The first business processing module is specifically used to: process the interaction instruction based on the smart device information through the current sub-business model, obtain and output the processing result; wherein, the processing result includes control information for the smart device.

7. The interactive system according to claim 6, characterized in that, The system also includes: The initial interaction processing module is used to, upon receiving the interaction instruction and in the case of the initial interaction, input the interaction instruction into a classifier, determine the sub-business classification result corresponding to the interaction instruction, and call the sub-business model corresponding to the sub-business classification result; input the interaction instruction into the sub-business model to obtain the corresponding processing result.

8. 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 of any one of claims 1 to 5.

9. 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 of any one of claims 1 to 5 through the computer program.

Citation Information

Patent Citations

  • Real-time interaction method and device based on virtual reality, equipment and storage medium

    CN112379771A

  • Voice control method and device applied to intelligent household electrical appliance and equipment

    CN112786040A