Business control method based on large language model
Through the large language model, the user's intentions are identified and the control instructions are output, which solves the problem of single application scenarios of large language models and difficult user usage in the prior art, and realizes the flexibility and efficiency of the natural language control system.
Patent Information
- Application Number
- CN202411740116.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The existing large language model applications are mainly concentrated in question-and-answer forms, and most natural language control systems can only be controlled through fixed statements or fixed statement structures, resulting in a single application scenario and increasing user difficulty.
The input text is recognized by a large language model by user intention, and classification instructions are output based on the intent recognition results, and corresponding control instructions are output to the service execution module according to the classification instructions to realize the natural language control system.
It realizes the effect that the instructions of the natural language control system are not rigid and the system is controllable, reducing the difficulty of users learning and memorizing instructions, and expanding application scenarios.
Smart Images

Figure CN119719368A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent technology, and in particular to a method for performing business control based on a large language model. Background Art
[0002] Large Language Model (LLM), also known as large language model or large model, is an artificial intelligence model designed to understand and generate human language. They are trained on large amounts of text data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, and more. LLMs are characterized by their large scale, which helps them learn complex patterns in language data. These models are usually based on deep learning architectures and have achieved good performance on various NLP (Natural Language Processing, NLP) tasks.
[0003] The current market application of large models is mainly concentrated in the form of question and answer, while most systems that can be controlled by natural language can only be controlled by fixed sentences or fixed sentence structures. The former makes the application scenarios of large models too single, and the latter requires users to learn and remember various instructions, which increases the difficulty of use.
[0004] Therefore, in view of the shortcomings of the existing technology, it is necessary to provide a method for business control based on a large language model to overcome the shortcomings of the existing technology. Summary of the invention
[0005] The purpose of the present invention is to avoid the shortcomings of the prior art and provide a method for business control based on a large language model. The large model is used to identify the intention and further output system control instruction parameters according to the intention, so as to achieve a system controlled by natural language, so that the instructions are not stiff and the system is controllable.
[0006] The purpose of the present invention is achieved through the following technical measures.
[0007] A method for business control based on a large language model is provided. The large language model is used to identify user intent of input text, and classification instructions are output according to the user intent recognition result. Then, corresponding control instructions are output to a business execution module according to the classification instructions. The business execution module performs corresponding actions according to the received control instructions.
[0008] Preferably, in the above-mentioned method for business control based on a large language model, multiple intentions are preset in the prompt words input to the large model.
[0009] Preferably, the above-mentioned method for service control based on a large language model outputs a classification instruction according to the user intention recognition result, specifically including:
[0010] First, the user intention is classified to determine whether the user intention belongs to a fixed intention or a variable intention. When the user intention belongs to a fixed intention, a fixed instruction is output;
[0011] When the user's intention is a variable intention, a variable instruction is output;
[0012] Fixed intention refers to the intention that can directly determine the instruction based on the intention.
[0013] Variable intent means that after confirming the user's intent, other changes are needed to determine the intent of the instruction;
[0014] Fixed instructions refer to instructions that are certain, while variable instructions refer to instructions that can only be determined based on other factors.
[0015] Preferably, in the above-mentioned method for performing service control based on a large language model, the variable instruction is specifically obtained as follows:
[0016] The large language model extracts the specific content of the user input;
[0017] Then, variable intent is determined based on the specific content of the user input extracted by the large language model;
[0018] Then, variable instructions are output based on the specific content of the user input extracted by the large language model and the identified variable intentions.
[0019] Another preferred method for performing service control based on a large language model is as follows:
[0020] The large language model extracts the specific content of the user input;
[0021] Determine variable intent based on the specific content of user input extracted by the large language model;
[0022] Call other interfaces to obtain parameters of business system modules;
[0023] Output variable instructions based on the specific content of the user input extracted by the large language model and the recognized variable intent.
[0024] Preferably, the above-mentioned method for business control based on a large language model is also provided with a speech processing step, and for the user's speech input, the speech-to-text module converts the user's speech input content into text content, and the converted text content is input into the large language model as text content.
[0025] The present invention is a method for business control based on a large language model. The large language model is used to identify the user intent of the input text, and a classification instruction is output according to the user intent recognition result. Then, the corresponding control instruction is output to the business execution module according to the classification instruction. The business execution module performs the corresponding action according to the received control instruction. The present invention uses a large model to identify the intent and further outputs the system control instruction parameters according to the intent, thereby achieving the purpose of controlling the system with natural language, and achieving the effect that the instructions are not stiff and the system is controllable. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The present invention is further described with reference to the accompanying drawings, but the contents in the accompanying drawings do not constitute any limitation to the present invention.
[0027] Figure 1 It is a flow chart of a method for performing service control based on a large language model in the present invention. DETAILED DESCRIPTION
[0028] The present invention will be further described with reference to the following examples.
[0029] Example 1.
[0030] A method for business control based on a large language model, such as Figure 1 As shown, the user intent of the input text is recognized through a large language model, and a classification instruction is output according to the user intent recognition result. Then, the corresponding control instruction is output to the business execution module according to the classification instruction, and the business execution module performs corresponding actions according to the received control instruction.
[0031] The application scenario of this solution is to process the user's voice output to control the business system to perform related business actions. Figure 1 As shown, the speech processing module receives the user's speech input, and the speech-to-text module converts the user's speech input content into text content, and the converted text content is input into the large language model as text content.
[0032] The large model processing module uses the large speech model's excellent ability to understand natural language to obtain user intent, and outputs corresponding instructions based on user intent classification.
[0033] The large model processing module is the core module of the technology of this embodiment, and performs the following operations by receiving input text:
[0034] (1) Intent recognition of input text. Multiple specified intents are preset in the prompt words of the big model, so that the big model can match the intent according to the user's input and output the intent, thereby achieving the effect of intent recognition.
[0035] The intent input to the large language model can be flexibly set according to actual needs. For example, when you want to use it to identify provinces, the intent can be "Guangdong Province", "Hunan Province", etc.; when you want to use it to identify actions, the intent content can be "turn on the lights", "increase the volume", etc.; when you want to use it to query specific content, the intent can be "rainfall", "water flow", etc.
[0036] (2) Classify intents. Because different intents correspond to different operations, a branching structure is needed to determine the direction of the subsequent process based on the intent output by the large model.
[0037] The user intention is classified to determine whether the user intention belongs to a fixed intention or a variable intention. When the user intention belongs to a fixed intention, a fixed instruction is output; when the user intention belongs to a variable intention, a variable instruction is output.
[0038] Fixed intent refers to the intention that can directly determine the intention of the instruction based on the intention, and variable intent refers to the intention that requires other changes after confirming the user's intention to determine the intention of the instruction. Fixed instructions refer to instructions that are certain, and variable instructions refer to instructions that need to be determined based on other factors.
[0039] Figure 1 In the example, category 1 represents fixed instructions, that is, the instructions are directly determined according to the intention. The instructions here are fixed, such as "mute" and "unmute". The business system module only needs to execute the "mute" and "unmute" operations to complete. Fixed intentions and fixed instructions do not contain changes, so no further operations are required.
[0040] Figure 1 In the example, category 2 represents another path of variable instructions, that is, after confirming the intention, it is necessary to extract the specific content of the user input and even call other interfaces to obtain parameters. For example, "adjust the volume to 20" (it is necessary to extract the user input content) and "louder" (in addition to extracting the user input content, it is also necessary to call other interfaces to obtain the current volume parameters).
[0041] In the method for business control based on a large language model, the acquisition of variable instructions needs to be determined in combination with specific circumstances. A specific acquisition method is listed below:
[0042] The large language model extracts the specific content of the user input;
[0043] Then, the specific content of the user input extracted by the large language model is determined to be a variable intent;
[0044] Then, variable instructions are output based on the specific content of the user input extracted by the large language model and the identified variable intentions.
[0045] For example: the user inputs the text "What is the average rainfall in Guangzhou this month", and then the large language model determines that it is a variable intent based on the specific content of the extracted user input.
[0046] Large model parameter extraction: Extraction is performed based on the text entered by the user and the parameters that the developer pre-sets to be extracted.
[0047] For example, if a user inputs the text "What is the average rainfall in Guangzhou this month?", the developer asks the big model to extract "startDate", "endDate", and "area" in advance. Then the big model extracts the parameters based on the user input.
[0048]
[0049] Then according to "startDate":"2024-11-01","endDate":"2024-11-30","area":"guangzhou", output variable instructions.
[0050] Another way to obtain variable instructions is listed below. In this case, the variable instructions are obtained as follows:
[0051] The large language model extracts the specific content of the user input;
[0052] Determine variable intent based on the specific content of user input extracted by the large language model;
[0053] Call other interfaces to obtain parameters of business system modules;
[0054] Output variable instructions based on the specific content of the user input extracted by the large language model and the recognized variable intent.
[0055] For example: the user enters the text "volume increase 5".
[0056] The large model performs intent analysis on the text "Increase volume by 5" and matches the intent to "Increase volume".
[0057] This is a variable intent. The developer has already let the big model extract the parameter {"amount":5} based on the user input text.
[0058] However, the business system module does not add a volume interface, only a specific volume setting interface. Therefore, when integrating variable instructions, it is necessary to call the Get Current Volume interface as data supplement. Add the current volume value obtained by calling the Get Current Volume interface to the large model extraction parameter "amount": 5 to get the specific volume that needs to be set.
[0059] The specific volume, identity authentication and other system parameters are encapsulated and returned in a unified structure according to the instructions.
[0060] Figure 1 The right side is the business system module, which executes the business system's established operations by receiving established instructions, such as JSON input parameters and machine codes.
[0061] The present invention is a method for business control based on a large language model. The large language model is used to identify the user intent of the input text, and a classification instruction is output according to the user intent recognition result. Then, the corresponding control instruction is output to the business execution module according to the classification instruction. The business execution module performs corresponding actions according to the received control instruction. The present invention uses a large model to identify intent and further outputs system control instruction parameters through intent to achieve the purpose of controlling the system with natural language. The system can perform operations based on intent recognition, such as "it's dark" corresponding to the operation "turn on the lights". The system can be controlled by voice, text or other input forms. Function changes and adjustments can be quickly modified by adjusting the prompt words of the large model. The effect of the control system can be achieved through natural language in a non-fixed format, and the effect of not stiff instructions and controllable system is achieved.
[0062] Example 2.
[0063] A method for business control based on a large language model, the other features of which are the same as those of Example 1, except that in this embodiment, the user's voice input is not obtained through a voice processing module and converted into text content, but the user directly inputs the text content to the large model processing module for intent recognition and outputs control instructions.
[0064] The user can directly input text content through the keyboard, or input text content through the interactive interface by inputting text or transmitting pictures, or input corresponding text content through other control interfaces by operating keys.
[0065] Example 3.
[0066] The effect of the method for performing service control based on a large language model of the present invention is further explained with reference to a specific example.
[0067] Preset scenes:
[0068] Set intention scenes: turn on lights, turn off lights, mute, unmute, adjust volume, and announce time.
[0069] Set the current volume: 20.
[0070] In this embodiment, the volume is fixed at 20, and the output instructions are replaced by natural language to facilitate viewing of the effect.
[0071] The user inputs a series of voices, and the user intentions recognized by the method of the present invention and the related instructions formed are shown in Table 1.
[0072] Table 1
[0073] Serial number User voice input Identifying user intent Output instructions 1 Turn on the lights Turn on the lights Turn on the lights 2 Very dark Turn on the lights Turn on the lights 3 Very noisy Mute Mute 4 Why is there no sound? Unmute Unmute
[0074] It can be seen that the method of the present invention can avoid fixed input to obtain the return instruction, and the user can interact with the system like ordinary communication.
[0075] The method of the present invention can also recognize dynamic instructions for the spoken voice input of the user, and the results are shown in Table 2.
[0076] Table 2
[0077] Serial number User voice input Identifying user intent Output instructions 1 The sound is so small Adjust the volume Adjust the volume to 25 2 Louder Adjust the volume Adjust the volume to 25 3 The sound is too small. Adjust the volume Adjust the volume to 30 4 What's the date today? Broadcast time It is October 29, 2024 5 What time is it? Broadcast time It is now 17:30 on Tuesday, October 29, 2024
[0078] As can be seen from Table 2, for fully spoken input, the large language model is also able to identify intent based on preset prompt words and infer information based on the description entered by the user, and then output dynamic instructions.
[0079] The method of the present invention can realize system control by implementing non-fixed sentence patterns and colloquial natural language input through simple configuration of the intention list and instructions.
[0080] Example 4.
[0081] The method for performing service control based on a large language model of the present invention is further described with reference to a specific example.
[0082] Preset scenes:
[0083] Set scene intentions: weather query, temperature query, and outdoor suggestions.
[0084] Set the current region to: Guangzhou.
[0085] Set the current temperature to: 9℃ to 21℃.
[0086] Set the current time to: November 29, 2024 10:00:00.
[0087] Set the current weather to: Sunny to cloudy.
[0088] The user inputs a series of text, and the user intentions identified by the method of the present invention and the related instructions formed are shown in Table 3.
[0089] Table 3
[0090]
[0091]
[0092] As can be seen from Table 3, even with purely spoken input, the large model is able to identify intent based on preset prompt words and infer information based on the description entered by the user. It can also call other business interfaces to obtain supplementary information when integrating instructions according to specific needs, and then output dynamic instructions.
[0093] Table 3 Implementation steps for scenario No. 1:
[0094] The large language model performs intent recognition on the text "Will it rain today?" and identifies the intent as "weather query."
[0095] The intent "Weather Query" is a variable intent and needs to assemble dynamic instructions. The large model extracts the parameter date and location according to the developer's preset. If the date is not mentioned, it defaults to the current day. If the location is not mentioned, it defaults to Guangzhou.
[0096]
[0097] The date and location already meet the instruction requirements for assembling the weather query interface. Combined with system parameters such as identity authentication, it is packaged and returned according to the instruction unified interface.
[0098] Table 3: Implementation steps for scenario 3:
[0099] The large language model performs intent recognition on the text "Do you want to pass on a coat?" and identifies the intent as "suggestions for going out."
[0100] The intent "Go Out Suggestion" is a variable intent and needs to assemble dynamic instructions. The large model extracts the parameters date, time, and location according to the developer's preset. If the date is not mentioned, it defaults to the current day, if the time is not mentioned, it defaults to the current time, and if the location is not mentioned, it defaults to Guangzhou.
[0101]
[0102] The outing suggestion interface requires weather and temperature, so it is necessary to call the weather query interface and the temperature query interface to obtain them. The parameters extracted using the large model can satisfy the instructions for assembling the weather query interface and the temperature query interface respectively, so at this time, the instructions for assembling the weather query interface and the temperature query interface are respectively assembled and the above two interfaces are called to obtain weather and temperature data.
[0103] According to the weather and temperature data returned by calling the business interface, the instructions of the going out suggestion interface are encapsulated and returned according to the instruction unified interface.
[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the essence and scope of the technical solution of the present invention.
Claims
1. A method for service control based on a large language model, characterized in that: The user intent of the input text is recognized through a large language model, and classification instructions are output according to the user intent recognition results. Then, the corresponding control instructions are output to the business execution module according to the classification instructions. The business execution module performs corresponding actions according to the received control instructions.
2. The method for service control based on a large language model according to claim 1, characterized in that: The prompt words input to the large model have multiple intentions preset.
3. The method for service control based on a large language model according to claim 1 or 2, characterized in that: Output classification instructions based on the user intent recognition results, including: First, the user intention is classified to determine whether the user intention belongs to a fixed intention or a variable intention. When the user intention belongs to a fixed intention, a fixed instruction is output; When the user's intention is a variable intention, a variable instruction is output; Fixed intention refers to the intention that can directly determine the instruction based on the intention. Variable intent means that after confirming the user's intent, other changes are needed to determine the intent of the instruction; Fixed instructions refer to instructions that are certain, while variable instructions refer to instructions that can only be determined based on other factors.
4. The method for service control based on a large language model according to claim 3, characterized in that: The variable instructions are obtained as follows: The large language model extracts the specific content of the user input; Then, variable intent is determined based on the specific content of the user input extracted by the large language model; Then, variable instructions are output based on the specific content of the user input extracted by the large language model and the identified variable intentions.
5. The method for service control based on a large language model according to claim 3, characterized in that: The variable instructions are obtained as follows: The large language model extracts the specific content of the user input; Determine variable intent based on the specific content of user input extracted by the large language model; Call other interfaces to obtain parameters of business system modules; Output variable instructions based on the specific content of the user input extracted by the large language model and the recognized variable intent.
6. The method for service control based on a large language model according to claim 5, characterized in that: A speech processing step is also provided. For the user's speech input, the speech-to-text module converts the user's speech input content into text content, and the converted text content is input into the large language model as text content.
7. The method for service control based on a large language model according to any one of claims 1 to 5, characterized in that: Input text content into the large language model through text input or image input.
Citation Information
Patent Citations
Vehicle control method and system and vehicle
CN112435660A
Intention recognition method and device, electronic equipment and storage medium
CN116863495A
Dialogue system intention recognition method and tool based on large language model
CN116955618A
Voice instruction processing method, device and system and storage medium
CN117373445A
User intention response method, device and equipment of intelligent robot and storage medium
CN118171658A