A method and device for accelerating the output function call of large AI models
By decomposing and processing multiple intention instructions of AI big models and adopting parallel or serial processing methods, the problem of output delay of AI big models is solved, improving response speed and user experience.
Patent Information
- Application Number
- CN202410603213.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-05-15
AI Technical Summary
When AI models process complex instructions containing multiple intentions, the output content becomes longer, resulting in increased user waiting time, especially in scenarios where rapid response is required.
By introducing multi-intention judgment and analysis, the multi-intention instructions input by the user are decomposed into multiple single-intention sentences, and the parallel or serial processing method is used to improve the response speed of the AI model according to the dependencies between the sentences.
It significantly shortens the output function call time when AI large-scale models process multi-intention instructions, improves response speed and user experience, especially enhances practicality in scenarios such as online customer service and smart assistants.
Smart Images

Figure CN118485147B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of artificial intelligence, AI large-model intelligent agents, and AI large-model function calls; specifically, to a method and device for accelerating the call of AI large-model output functions. Background Art
[0002] In the field of artificial intelligence, particularly natural language processing (NLP), large language models have become a significant milestone. These NLP models, leveraging vast amounts of training data and a massive number of neural network parameters, demonstrate powerful understanding of natural language, images, and even videos. A notable feature of large language models is that they incorporate pre-trained knowledge, enabling them to understand and respond to user input.
[0003] However, this pre-training method also brings some problems. First, due to the huge number of model parameters and the slow speed of updating knowledge, the model cannot obtain the latest knowledge, information consultation, etc. in real time, and it is easy to generate outdated or inaccurate information. In response to this situation, researchers have proposed the concept of AI large model intelligent agent. AI large model intelligent agent is an advanced concept that combines the powerful functions of large language models (LLM) and intelligent agent mechanisms. This intelligent agent not only has the natural language understanding and generation capabilities of large language models, but can also complete a variety of tasks, such as answering questions, writing articles, generating creative content, and assisting programming. More importantly, by introducing intelligent agent mechanisms, AI large model intelligent agents gain the ability to actively interact with the environment and make decisions, so that they can more flexibly respond to complex situations and achieve established goals.
[0004] Specifically, AI large-scale model agents usually include the following core components:
[0005] 1. Planning ability: The intelligent agent is able to break down complex large tasks into a series of small and easy-to-manage tasks, which helps improve the efficiency and controllability of task execution.
[0006] 2. Execution capability: During execution, the agent can use external APIs to obtain real-time information, execute code, or access resources such as professional knowledge bases to make up for the lack of internal knowledge of the model.
[0007] 3. Summarization ability: The results obtained in the second step are input into the AI big model, which summarizes and feeds back to the user.
[0008] AI big model function calls are an important technical means for intelligent agents to realize their functions. In the context of AI big models, function calls allow intelligent agents to use predefined functions to handle specific tasks or problems. These functions can be simple custom functions or functional functions that encapsulate external tool APIs, allowing intelligent agents to call external resources and services, such as accessing email and obtaining weather information. The function call format output by AI big models is generally structured data such as json and xml. The output function name and parameters can only be parsed after the AI big model has completed the output. In other words, when the AI big model outputs a function call, it is returned in a non-streaming manner. Therefore, the longer the content output by the AI big model, the longer the user's waiting time.
[0009] When user input (including conversation context and current command input) contains multiple intents, the AI model outputs multiple functions and parameters. For example, if a user inputs "What's the weather like in Beijing? What's fun to do there? Recommend me some good food," the input contains three intents: 1. What's the weather like in Beijing? 2. What's fun to do in Beijing? 3. What's good to eat in Beijing? The function call output by the AI model needs to include three functions and corresponding parameters, and the output is as follows:
[0010] “[{"Action":"get_weather","Action_Input":{"location":"Beijing","date":"20240326"}},{"Action":"search_poi","Action_Input":{"keyword":"Attractions","address":"Beijing"}},{"Action":"search_poi","Action_Input":{"keyword":"Food","address":"Beijing"}}]"
[0011] As can be seen, when large AI models process complex commands containing multiple intents, their output will include multiple functions and parameters, resulting in longer output and increased user wait time. This delay is particularly noticeable in scenarios requiring rapid responses, such as online customer service, smart assistants, and in-car voice assistants. These delays limit the efficiency and user experience of large AI models in real-world applications. Summary of the Invention
[0012] In view of this, the purpose of the present invention is to propose a method and device based on accelerating the output function call of the AI big model. By introducing multi-intent judgment and multi-intent parsing, the multi-intent instructions input by the user are decomposed into multiple single-intent sentences. According to the dependency relationship of the single-intent sentences, the AI big model processes the single-intent sentences in parallel or serially, so as to significantly improve the speed of the AI big model in processing complex instructions to output function calls, and reduce the time for the AI big model to output function call information when processing multi-intent instructions, thereby reducing the user's waiting time and improving the response speed of the AI big model.
[0013] The present invention provides a method for accelerating the call of an AI large model output function, comprising the following steps:
[0014] S1. By analyzing the user context information and the current input command, quickly identify and determine whether the user command contains multiple intents;
[0015] S2. Decompose the instruction containing multiple intents into multiple single-intent sentences, and determine whether there is a dependency relationship between the single-intent sentences;
[0016] For example, if a user inputs "How's the weather in Beijing? What's fun there? Recommend me some delicious food," the multi-intent parsing module will output three complete sentences: "[How's the weather in Beijing?, What's fun in Beijing?, What's delicious in Beijing?]." Furthermore, there are no dependencies between these three sentences.
[0017] In the fields of artificial intelligence and natural language processing, dependencies typically refer to the fact that the completion of one intent or task depends on the outcome of another. In the context of multi-intent processing, dependencies in single-intent sentences mean that the fulfillment of some intents requires the completion or satisfaction of other intents.
[0018] S3. Input the decomposed single-intent sentences into the AI big model for processing. If there is no dependency relationship between the single-intent sentences, the AI big model performs parallel processing and outputs the functions and parameters that need to be called for each single-intent instruction; if there is a dependency relationship between the decomposed single-intent sentences, the AI big model performs serial processing.
[0019] Example of parallel processing: Input three sentences "1. What's the weather like in Beijing? 2. What are the interesting places in Beijing? 3. What are the delicious foods in Beijing?", and the AI large model can output the functions and parameters corresponding to each sentence through parallel processing: 1. {"Action": "get_weather", "Action_Input": {"location": "Beijing", "date": "20240326"}}; 2. {"Action": "search_poi", "Action_Input": {"keyword": "scenic spots", "address": "Beijing"}}; 3. {"Action": "search_poi", "Action_Input": {"keyword": "delicious foods", "address": "Beijing"}}.
[0020] Example of sequential processing: Input two sentences "1. What's the weather like in Beijing? 2. If it's sunny, navigate to the Summer Palace. If the weather is bad, I won't go out.", and the AI large model will first process the first intention of querying the weather, and then, based on the returned weather conditions, process the second intention. Since the multi-intentions have been split into single-intentions, the output length of the AI large model is greatly reduced, so the response speed of the AI large model is also improved in the case of sequential processing.
[0021] Furthermore, the method for quickly identifying and determining whether the user instruction contains multiple intentions in the step S1 includes the following steps:
[0022] S11. Extract features from the user's input that may indicate the existence of multiple intentions; the features indicating the existence of multiple intentions include: sentence length, semantic complexity, the number and type of keywords; for example, a longer sentence may contain multiple questions or requests, and a complex sentence structure may indicate that the user has proposed multiple tasks at the same time;
[0023] S12. Analyze the context information of the user input, and the context information includes the previous conversation history and relevant situational information; understand the position and role of the current input in the whole conversation to more accurately judge whether there are multiple intentions;
[0024] S13. Use a deep learning model, such as the BERT (Bidirectional Encoder Representations from Transformers) model, to process the user input and context information; the deep learning model understands the complexity and diversity of language by learning a large amount of language data and outputs a prediction result on whether there are multiple intentions.
[0025] Furthermore, the method of processing the user input and context information using the deep learning model in step S13 includes the following steps:
[0026] S131. Collect and annotate a large amount of training data (for training an accurate deep learning model), wherein the training data includes various types of user inputs and corresponding intent annotations, so that the deep learning model can learn how to recognize multi-intent patterns;
[0027] S132. Evaluate the deep learning model using the test set and analyze its performance in multi-intent judgment, such as accuracy, recall, and other indicators. Adjust and optimize the deep learning model based on the evaluation results to improve its accuracy and reliability in practical applications.
[0028] Furthermore, the basis for determining whether there is a dependency relationship between the single-intent sentences in step S2 includes any one or more combinations of the following: logical order, causal relationship, data dependency, and data dependency;
[0029] The logical order mentioned above means that certain intentions may logically need to be executed in a specific order;
[0030] The causal relationship mentioned means that the realization of one intention may be the result or consequence of the realization of another intention;
[0031] The data dependency refers to the fact that one intention may require data or information provided by another intention;
[0032] The conditional dependency means that the execution of one intention may depend on the result of another intention meeting a specific condition.
[0033] Furthermore, the method of determining whether there is a dependency relationship between the single-intent sentences in step S2 includes any one or more combinations of the following: semantic analysis, pattern matching, context association, and deep learning;
[0034] Semantic analysis refers to analyzing the semantic content of sentences and identifying possible logical and causal relationships through natural language processing technology;
[0035] Pattern matching refers to identifying common dependency expressions using predefined patterns or rules, such as the "if...then..." structure.
[0036] Context association refers to combining the context information of the conversation, understanding the correlation between intentions, and identifying dependencies;
[0037] Deep learning refers to using a deep learning model, such as a sequence-to-sequence model, to train the model to recognize and understand the dependencies between intents.
[0038] Through these methods, we can more accurately determine whether there are dependencies between single-intent sentences, and accordingly decide whether to use parallel processing or serial processing to execute these intents, so as to improve the efficiency of large AI models and user experience.
[0039] For example, if a user says, "Check Beijing's weather tomorrow. If it's good, help me find a hotel near Gubei Water Town. If it's bad, I'll stay home," we can analyze that there is a dependency relationship between the two single-intent sentences. The following is a specific example of each dependency basis:
[0040] (1) Logical order:
[0041] The user's first intention is to check tomorrow's weather in Beijing. The second intention is determined based on the result of the first intention (i.e., whether the weather is good). If the weather is good, the user searches for hotels near Gubei Water Town; if the weather is bad, the user stays home. The execution of the second intention clearly depends on the result of the first, forming a logical sequence.
[0042] (2)Causal relationship:
[0043] In the user's instruction, checking the weather is the cause, and the decision made based on the weather result (finding a hotel or staying home) is the effect. Good or bad weather conditions directly lead to different subsequent actions, demonstrating a causal relationship.
[0044] (3) Data dependency:
[0045] The user wants to find hotels near Gubei Water Town. This intent depends on the Beijing weather data queried in the first intent. Only after knowing the weather conditions can the user decide whether to search for hotels, which constitutes a data dependency.
[0046] (4) Conditional dependence:
[0047] The user's condition is "if the weather is good." This is a clear conditional judgment. Only when this condition is met (i.e., the weather is good) will the user perform the intention of finding a hotel. The "if...then..." structure here reflects the conditional dependency relationship.
[0048] From the above examples, we can see that the dependencies between single-intent sentences are clear, and this dependency is crucial for deciding how to handle these intents.
[0049] The present invention also provides a device for accelerating the call of an AI large model output function, which executes the method for accelerating the call of an AI large model output function as described above, including:
[0050] Multi-intent determination module: used to quickly identify and determine whether a user instruction contains multiple intents by analyzing user context information and the current input instruction;
[0051] Multi-intent parsing module: used to decompose instructions containing multiple intents into multiple single-intent sentences and determine whether there is a dependency relationship between the single-intent sentences;
[0052] AI big model processing module: used to input the decomposed single-intent sentences into the AI big model for processing. If there is no dependency relationship between the single-intent sentences, the AI big model performs parallel processing and outputs the functions and parameters that need to be called for each single-intent instruction; if there is a dependency relationship between the decomposed single-intent sentences, the AI big model performs serial processing.
[0053] Furthermore, the multi-intention determination module includes:
[0054] Feature extraction unit: used to extract features from user input that may indicate the presence of multiple intents; the features indicating the presence of multiple intents include sentence length, semantic complexity, and the number and type of keywords;
[0055] Context Analysis Unit: This unit analyzes the contextual information of user input, including previous conversation history and relevant contextual information, to understand the position and role of the current input in the entire conversation and more accurately determine whether there are multiple intentions.
[0056] Deep learning model application unit: used to use a deep learning model to process user input and context information; the deep learning model understands the complexity and diversity of language by learning a large amount of language data, and outputs a prediction result on whether there are multiple intentions.
[0057] Furthermore, the deep learning model application unit includes:
[0058] Data Collection and Model Training Subunit: This subunit is used to collect and annotate a large amount of training data, which includes various types of user input and corresponding intent annotations, so that the deep learning model can learn how to recognize multi-intent patterns.
[0059] Model evaluation and optimization subunit: used to evaluate the deep learning model through the test set and analyze the performance of the deep learning model in multi-intent judgment; adjust and optimize the deep learning model based on the evaluation results to improve the accuracy and reliability of the deep learning model in practical applications.
[0060] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for accelerating the output function call of an AI large model as described above.
[0061] The present invention also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the program, the steps of the method for accelerating the output function call of the AI large model as described above are implemented.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] The method and device for accelerating the output function call of the AI big model provided by the present invention introduce multi-intent judgment and multi-intent parsing. First, based on the user's context information and whether the current instruction input contains multiple intents, if it contains multiple intents, the multiple intents are split into multiple single-intent sentences. According to the dependency of the single-intent sentences, they are respectively handed over to the AI big model for parallel processing or serial processing. Whether it is parallel processing or serial processing, the speed of output function call of the AI big model when processing instructions containing multiple intents is significantly improved, the user's waiting time is shortened, and the response speed is significantly improved; it can provide a smoother and more efficient interactive experience, optimize the user's overall experience, especially in scenarios requiring fast response and efficient interaction, and enhance the practicality of the AI big model in actual applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Various other advantages and benefits will become apparent to those skilled in the art by reading the following detailed description of the preferred embodiment.The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention.
[0065] In the attached figure:
[0066] Figure 1 This is a flowchart of the AI large model output function call according to an embodiment of the present invention;
[0067] Figure 2 This is a flowchart of the function call output of the AI big model based on "multi-intent decomposition" in an embodiment of the present invention;
[0068] Figure 3 This is a flow chart of a method for accelerating the output function call of a large AI model according to the present invention;
[0069] Figure 4 A flow chart of the method for quickly identifying and determining whether a user instruction contains multiple intentions according to the present invention;
[0070] Figure 5 A flowchart of the method for processing user input and context information using a deep learning model in the present invention;
[0071] Figure 6 Schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0072] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of devices and products consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0073] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0074] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."
[0075] The embodiments of the present invention are described in further detail below.
[0076] The embodiment of the present invention provides a method for accelerating the output function call of an AI large model, see Figure 3 As shown, the following steps are included:
[0077] S1, by analyzing the user context information and the current input instruction (see Figure 1 As shown), quickly identify and determine whether the user instruction contains multiple intentions;
[0078] For the method of quickly identifying and determining whether a user instruction contains multiple intentions, see Figure 4 As shown, the following steps are included:
[0079] S11. Extracting features from the user input that may indicate the presence of multiple intents; the features indicating the presence of multiple intents include: sentence length, semantic complexity, and the number and type of keywords;
[0080] S12. Analyze the contextual information of the user input, including previous conversation history and relevant context information; understand the position and role of the current input in the entire conversation, and more accurately determine whether there are multiple intentions;
[0081] S13. Use a deep learning model to process the user's input and context information; the deep learning model understands the complexity and diversity of language by learning a large amount of language data, and outputs a prediction result on whether there are multiple intentions.
[0082] The method of using deep learning models to process user input and context information is described in Figure 5 As shown, the following steps are included:
[0083] S131. Collect and annotate a large amount of training data, wherein the training data includes various types of user inputs and corresponding intent annotations, so that the deep learning model can learn how to recognize multi-intent patterns;
[0084] S132. Evaluate the deep learning model using the test set and analyze its performance in multi-intent judgment; adjust and optimize the deep learning model based on the evaluation results to improve the accuracy and reliability of the deep learning model in practical applications.
[0085] S2. Decompose the instruction containing multiple intents into multiple single-intent sentences, and determine whether there is a dependency relationship between the single-intent sentences;
[0086] In this embodiment, the user inputs "How is the weather in Beijing? What fun things are there? Please recommend some delicious food to me." The multi-intent analysis module will output three complete sentences: "[How is the weather in Beijing?, What fun things are there in Beijing?, What delicious food is there in Beijing?]". In addition, there is no dependency between the three sentences.
[0087] The basis for determining whether there is a dependency relationship between the single-intention sentences includes any one or more combinations of the following: logical order, causal relationship, data dependency, and data dependency;
[0088] The logical order mentioned above means that certain intentions may logically need to be executed in a specific order;
[0089] The causal relationship mentioned means that the realization of one intention may be the result or consequence of the realization of another intention;
[0090] The data dependency refers to the fact that one intention may require data or information provided by another intention;
[0091] The conditional dependency means that the execution of one intention may depend on the result of another intention meeting a specific condition.
[0092] The method for determining whether there is a dependency relationship between single-intent sentences includes any one or more combinations of the following: semantic analysis, pattern matching, context association, and deep learning;
[0093] Semantic analysis refers to analyzing the semantic content of sentences and identifying possible logical and causal relationships through natural language processing technology;
[0094] Pattern matching refers to identifying common dependency expressions using predefined patterns or rules; context association refers to understanding the relevance between intents and identifying dependencies by combining the contextual information of the conversation;
[0095] The deep learning refers to using a deep learning model to train the model to identify and understand the dependencies between intentions.
[0096] Through these methods, we can more accurately determine whether there are dependencies between single-intent sentences, and accordingly decide whether to use parallel processing or serial processing to execute these intents, so as to improve the efficiency of large AI models and user experience.
[0097] In this example, a user says, "Check the weather in Beijing tomorrow. If it's good, help me find a hotel near Gubei Water Town. If it's bad, I'll stay home." This analysis reveals a dependency relationship between the two single-intent sentences. The following is a specific example illustrating each element of the dependency relationship:
[0098] (1) Logical order:
[0099] The user's first intention is to check tomorrow's weather in Beijing. The second intention is determined based on the result of the first intention (i.e., whether the weather is good). If the weather is good, the user searches for hotels near Gubei Water Town; if the weather is bad, the user stays home. The execution of the second intention clearly depends on the result of the first, forming a logical sequence.
[0100] (2)Causal relationship:
[0101] In the user's instruction, checking the weather is the cause, and the decision made based on the weather result (finding a hotel or staying home) is the effect. Good or bad weather conditions directly lead to different subsequent actions, demonstrating a causal relationship.
[0102] (3) Data dependency:
[0103] The user wants to find hotels near Gubei Water Town. This intent depends on the Beijing weather data queried in the first intent. Only after knowing the weather conditions can the user decide whether to search for hotels, which constitutes a data dependency.
[0104] (4) Conditional dependence:
[0105] The user's condition is "if the weather is good." This is a clear conditional judgment. Only when this condition is met (i.e., the weather is good) will the user perform the intention of finding a hotel. The "if...then..." structure here reflects the conditional dependency relationship.
[0106] From the above examples, we can see that the dependencies between single-intent sentences are clear, and this dependency is crucial for deciding how to handle these intents.
[0107] S3. Input the decomposed single-intent sentences into the AI big model for processing. If the single-intent sentences do not have dependencies, the AI big model performs parallel processing and outputs the functions and parameters that need to be called for each single-intent instruction; if the decomposed single-intent sentences have dependencies, the AI big model performs serial processing (see Figure 2 shown).
[0108] In this embodiment, the parallel processing situation is as follows: input three sentences "1. What is the weather in Beijing? 2. What is fun in Beijing? 3. What is delicious in Beijing?", the AI big model can output the functions and parameters corresponding to each sentence through parallel processing: 1. {"Action":"get_weather","Action_Input":{"location":"Beijing","date":"20240326"}}; 2. {"Action":"search_poi","Action_Input":{"keyword":"Attractions","address":"Beijing"}}; 3. {"Action":"search_poi","Action_Input":{"keyword":"Food","address":"Beijing"}}.
[0109] For example, consider serial processing: Given two sentences: "1. What's the weather in Beijing? 2. If it's sunny, navigate to the Summer Palace. If it's bad, I won't go out." The AI model will first process the first intent, querying the weather, and then, based on the returned weather information, the second intent. Because multiple intents are broken down into single intents, the output length of the AI model is significantly reduced, thus improving its response speed.
[0110] An embodiment of the present invention further provides a device for accelerating the call of an AI large model output function, which executes the method for accelerating the call of an AI large model output function as described above, including:
[0111] Multi-intent determination module: used to quickly identify and determine whether a user instruction contains multiple intents by analyzing user context information and the current input instruction;
[0112] Multi-intent parsing module: used to decompose instructions containing multiple intents into multiple single-intent sentences and determine whether there is a dependency relationship between the single-intent sentences;
[0113] AI big model processing module: used to input the decomposed single-intent sentences into the AI big model for processing. If there is no dependency relationship between the single-intent sentences, the AI big model performs parallel processing and outputs the functions and parameters that need to be called for each single-intent instruction; if there is a dependency relationship between the decomposed single-intent sentences, the AI big model performs serial processing.
[0114] The multi-intention determination module includes:
[0115] Feature extraction unit: used to extract features from user input that may indicate the presence of multiple intents; the features indicating the presence of multiple intents include sentence length, semantic complexity, and the number and type of keywords;
[0116] Context Analysis Unit: This unit analyzes the contextual information of user input, including previous conversation history and relevant contextual information, to understand the position and role of the current input in the entire conversation and more accurately determine whether there are multiple intentions.
[0117] Deep learning model application unit: used to use a deep learning model to process user input and context information; the deep learning model understands the complexity and diversity of language by learning a large amount of language data, and outputs a prediction result on whether there are multiple intentions.
[0118] The deep learning model application unit includes:
[0119] Data Collection and Model Training Subunit: This subunit is used to collect and annotate a large amount of training data, which includes various types of user input and corresponding intent annotations, so that the deep learning model can learn how to recognize multi-intent patterns.
[0120] Model evaluation and optimization subunit: used to evaluate the deep learning model through the test set and analyze the performance of the deep learning model in multi-intent judgment; adjust and optimize the deep learning model based on the evaluation results to improve the accuracy and reliability of the deep learning model in practical applications.
[0121] An embodiment of the present invention further provides a computer device, Figure 6 This is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention; see the accompanying drawings Figure 6As shown, the computer device includes: an input device 23, an output device 24, a memory 22 and a processor 21; the memory 22 is used to store one or more programs; when the one or more programs are executed by the one or more processors 21, the one or more processors 21 implement the method for accelerating the output function call of the AI large model as provided in the above embodiment; wherein the input device 23, the output device 24, the memory 22 and the processor 21 can be connected by a bus or other means, Figure 6 The bus connection is taken as an example.
[0122] The memory 22 is a readable and writable storage medium for a computing device, which can be used to store software programs and computer executable programs, such as the program instructions corresponding to the method for accelerating the output function call of the AI large model described in the embodiment of the present invention; the memory 22 may mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the device, etc.; in addition, the memory 22 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device; in some instances, the memory 22 may further include a memory remotely located relative to the processor 21, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0123] The input device 23 may be used to receive input digital or character information, and generate key signal input related to user settings and function control of the device; the output device 24 may include a display device such as a display screen.
[0124] The processor 21 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 22, thereby realizing the above-mentioned method of accelerating the output function call of the AI large model.
[0125] The computer device provided above can be used to execute the method for accelerating the output function call of the AI large model provided in the above embodiment, and has corresponding functions and beneficial effects.
[0126] An embodiment of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the method for accelerating the output function call of the AI large model as provided in the above embodiment. The storage medium is any of various types of memory devices or storage devices, including: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements; the storage medium may also include other types of memory or a combination thereof; in addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet); the second computer system may provide program instructions to the first computer for execution. The storage medium includes two or more storage media that can reside in different locations (for example, in different computer systems connected by a network). The storage medium can store program instructions (for example, specifically implemented as a computer program) that can be executed by one or more processors.
[0127] Of course, the storage medium containing computer-executable instructions provided in an embodiment of the present invention is not limited to the method for accelerating the call of the AI large model output function as described in the above embodiment, and can also execute related operations in the method for accelerating the call of the AI large model output function provided in any embodiment of the present invention.
[0128] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
[0129] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A method for accelerating the output function call of a large AI model, characterized in that: The following steps are involved: S1. By analyzing the user context information and the current input command, quickly identify and determine whether the user command contains multiple intents; S2. Decompose the instruction containing multiple intents into multiple single-intent sentences, and determine whether there is a dependency relationship between the single-intent sentences; S3. Input the decomposed single-intent sentences into the AI big model for processing. If the single-intent sentences do not have dependencies, the AI big model performs parallel processing and outputs the functions and parameters that need to be called for each single-intent instruction; if the decomposed single-intent sentences do have dependencies, the AI big model performs serial processing. The method for quickly identifying and determining whether a user instruction contains multiple intentions in step S1 includes the following steps: S11. Extracting features from the user input that may indicate the presence of multiple intents; the features indicating the presence of multiple intents include: sentence length, semantic complexity, and the number and type of keywords; S12. Analyze the contextual information of the user input, including previous conversation history and relevant context information; understand the position and role of the current input in the entire conversation, and more accurately determine whether there are multiple intentions; S13. Processing the user input and context information using a deep learning model; the deep learning model understands the complexity and diversity of language by learning a large amount of language data, and outputs a prediction result of whether multiple intents exist; The basis for determining whether there is a dependency relationship between the single-intention sentences in step S2 includes any one or more combinations of the following: logical order, causal relationship, data dependency, and conditional dependency; The logical order mentioned above means that certain intentions may logically need to be executed in a specific order; The causal relationship mentioned means that the realization of one intention may be the result or consequence of the realization of another intention; The data dependency refers to the fact that one intention may require data or information provided by another intention; The conditional dependency means that the execution of one intention may depend on the result of another intention meeting a specific condition.
2. The method for accelerating the output function call of an AI large model according to claim 1, characterized in that: The method of using a deep learning model to process user input and context information in step S13 includes the following steps: S131. Collect and annotate a large amount of training data, wherein the training data includes various types of user inputs and corresponding intent annotations, so that the deep learning model can learn how to recognize multi-intent patterns; S132. Evaluate the deep learning model using the test set and analyze its performance in multi-intent judgment; adjust and optimize the deep learning model based on the evaluation results to improve the accuracy and reliability of the deep learning model in practical applications.
3. The method for accelerating the output function call of an AI large model according to claim 1, characterized in that: The method of determining whether there is a dependency relationship between the single-intent sentences in step S2 includes any one or more combinations of the following: semantic analysis, pattern matching, context association, and deep learning; Semantic analysis refers to analyzing the semantic content of sentences and identifying possible logical and causal relationships through natural language processing technology; The pattern matching refers to identifying common dependency expressions using predefined patterns or rules; Context association refers to combining the context information of the conversation, understanding the correlation between intentions, and identifying dependencies; The deep learning refers to using a deep learning model to train the model to identify and understand the dependencies between intentions.
4. A device for accelerating the call of an AI large model output function, executing the method for accelerating the call of an AI large model output function according to any one of claims 1 to 3, characterized in that: include: Multi-intent determination module: used to quickly identify and determine whether a user instruction contains multiple intents by analyzing user context information and the current input instruction; Multi-intent parsing module: used to decompose instructions containing multiple intents into multiple single-intent sentences and determine whether there is a dependency relationship between the single-intent sentences; AI big model processing module: used to input the decomposed single-intent sentences into the AI big model for processing. If there is no dependency relationship between the single-intent sentences, the AI big model performs parallel processing and outputs the functions and parameters that need to be called for each single-intent instruction; if there is a dependency relationship between the decomposed single-intent sentences, the AI big model performs serial processing.
5. The device for accelerating the call of an AI large model output function according to claim 4, characterized in that: The multi-intention determination module includes: Feature extraction unit: used to extract features from user input that may indicate the presence of multiple intents; the features indicating the presence of multiple intents include sentence length, semantic complexity, and the number and type of keywords; Context analysis unit: used to analyze the context information of the user input, which includes the previous conversation history and related situation information; understand the position and role of the current input in the entire conversation, and more accurately determine whether there is Multiple intents; a deep learning model application unit: used to use a deep learning model to process user input and context information; the deep learning model understands the complexity and diversity of language by learning a large amount of language data, and outputs a prediction result on whether multiple intents exist.
6. The device for accelerating the call of an AI large model output function according to claim 5, characterized in that: The deep learning model application unit includes: Data Collection and Model Training Subunit: This subunit is used to collect and annotate a large amount of training data, which includes various types of user input and corresponding intent annotations, so that the deep learning model can learn how to recognize multi-intent patterns. Model evaluation and optimization subunit: used to evaluate the deep learning model through the test set and analyze the performance of the deep learning model in multi-intent judgment; adjust and optimize the deep learning model based on the evaluation results to improve the accuracy and reliability of the deep learning model in practical applications.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the steps of the method for accelerating the output function call of the AI large model as described in any one of claims 1 to 3 are implemented.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method for accelerating the output function call of the AI large model as described in any one of claims 1-3 are implemented.
Citation Information
Patent Citations
Intention recognition and execution method and device, vehicle-mounted voice dialogue system and computer storage medium
CN110556102A
Multi-intention recognition model training method, multi-intention recognition method and related devices
CN111984780A
Multi-intention recognition method and device, electronic equipment and storage medium
CN112214588A
Text coherence analysis method and device
CN113743125A