Request processing method, device, equipment and storage medium

By pre-constructing the function library on the client and selecting objective functions and parameters using a large language model, the shortcomings of traditional request processing technology in complex language structures and unknown entity recognition are solved, and the efficiency and accuracy of request processing are improved.

CN119761374APending Publication Date: 2025-04-04深圳市星桐科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411778267.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

Traditional request processing technology has poor recognition results when facing complex language structures and unknown entities, resulting in reduced accuracy and delayed response, making it difficult to meet the flexible and changeable user needs.

Method used

By pre-constructing the function library on the client, matching the user's request information with the index in the function library, after obtaining the search results, input the request information and search results into the large language model, and selecting the objective function and the target parameters to generate the response result.

Benefits of technology

It improves the efficiency and accuracy of natural language comprehension, eliminates the ambiguity of natural language comprehension, enhances the efficiency and accuracy of intention comprehension, and thus improves the processing effect of user requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761374A_ABST
    Figure CN119761374A_ABST
Patent Text Reader

Abstract

The present specification provides a request processing method, device, equipment and storage medium. The method is applied to a client, including: receiving request information input by a user; searching in a pre-built function library according to the request information to obtain a search result, the function library is a set of functions used to implement various functions in the client, and the search result includes at least one function; inputting the request information and the search result into a large language model, so that the large language model outputs a target function determined from the search result according to the request information and a target parameter in the target function; obtaining a response result of the request information according to the target function and the target parameter. By mapping the user's request information to the form of the function that best matches the function in the function library, compared with directly processing the request information using a large model, it can eliminate the ambiguity of natural language understanding, improve the efficiency of intent understanding, and also improve the accuracy of intent understanding, thereby improving the processing effect of user requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a request processing method, device, equipment and storage medium. Background Art

[0002] With the rapid development of artificial intelligence technology, natural language processing has become one of the core technologies of human-computer interaction. In the field of request processing, it is particularly important to accurately understand and efficiently process user intentions.

[0003] Traditional request processing technologies usually rely on complex large language models to achieve natural language understanding of user input. These technologies generally use multi-level intent recognition and entity recognition methods to parse user requests. Each level of intent recognition requires a classification model to implement. As the level of intent increases, the complexity and training difficulty of the model also increase, resulting in problems such as decreased accuracy and delayed response in practical applications. In addition, existing entity recognition technologies often rely on preset rules or fixed templates, which makes the system have poor recognition effects when facing unknown entities or complex language structures, making it difficult to meet the flexible and changing needs of users. Summary of the invention

[0004] In view of this, one or more embodiments of the present specification provide a request processing solution to improve the processing effect of user requests by improving the efficiency and accuracy of natural language understanding.

[0005] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0006] According to a first aspect of one or more embodiments of this specification, a request processing method is proposed, which is applied to a client and includes:

[0007] Receive request information input by the user;

[0008] Searching in a pre-built function library according to the request information to obtain a search result, wherein the function library is a set of functions in the client for implementing various functions, and the search result includes at least one function;

[0009] Inputting the request information and the search results into a large language model so that the large language model outputs a target function and a target parameter in the target function determined from the search results according to the request information;

[0010] A response result of the request information is obtained according to the target function and the target parameter.

[0011] In some embodiments, each function in the function library corresponds to at least one index;

[0012] The searching in the pre-built function library according to the request information to obtain the search results includes:

[0013] Matching the request information with an index in the function library;

[0014] The search result is obtained according to the function corresponding to the matched index.

[0015] In some embodiments, matching the request information with an index in the function library includes:

[0016] Convert the request information and the index into vectors respectively;

[0017] Calculating the similarity between the vector of the request information and the vectors of each index;

[0018] The index whose similarity meets the set requirements is determined as the matched index.

[0019] In some embodiments, the setting requirement includes any of the following:

[0020] The similarity is greater than a first set threshold;

[0021] The similarity ranking is not greater than a second set threshold.

[0022] In some embodiments, the method further comprises:

[0023] The function library is established according to the client application functions and system functions related to user needs.

[0024] In some embodiments, the method further comprises:

[0025] Generate a query request sample, wherein the query request sample is labeled with a true value of the function and a true value of the parameter;

[0026] The query request sample and multiple functions are input into a large language model, and the parameters of the large language model are adjusted according to the difference between the functions and parameters predicted by the large language model and the true values ​​of the functions and the true values ​​of the parameters, until the difference is less than a set threshold or reaches the number of iterations.

[0027] According to a second aspect of one or more embodiments of this specification, a request processing device is provided, which is applied to a client and includes:

[0028] A receiving unit, used for receiving request information input by a user;

[0029] A retrieval unit, configured to search in a pre-built function library according to the request information to obtain a retrieval result, wherein the function library is a set of functions in the client for implementing various functions, and the retrieval result includes at least one function;

[0030] An input unit, used for inputting the request information and the search result into a large language model, so that the large language model outputs a target function determined from the search result according to the request information and a target parameter in the target function;

[0031] A processing unit is used to obtain a response result of the request information according to the target function and the target parameter.

[0032] In some embodiments, each function in the function library corresponds to at least one index;

[0033] The retrieval unit is specifically used for:

[0034] Matching the request information with an index in the function library;

[0035] The search result is obtained according to the function corresponding to the matched index.

[0036] In some embodiments, when the retrieval unit is used to match the request information with the index in the function library, it is specifically used to:

[0037] Convert the request information and the index into vectors respectively;

[0038] Calculating the similarity between the vector of the request information and the vectors of each index;

[0039] The index whose similarity meets the set requirements is determined as the matched index.

[0040] In some embodiments, the setting requirement includes any of the following:

[0041] The similarity is greater than a first set threshold;

[0042] The similarity ranking is not greater than a second set threshold.

[0043] In some embodiments, the device further comprises a construction unit for:

[0044] The function library is established according to the client application functions and system functions related to user needs.

[0045] In some embodiments, the apparatus further comprises a fine-tuning unit for:

[0046] Generate a query request sample, wherein the query request sample is labeled with a true value of the function and a true value of the parameter;

[0047] The query request sample and multiple functions are input into a large language model, and the parameters of the large language model are adjusted according to the difference between the functions and parameters predicted by the large language model and the true values ​​of the functions and the true values ​​of the parameters, until the difference is less than a set threshold or reaches the number of iterations.

[0048] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0049] processor;

[0050] a memory for storing processor-executable instructions;

[0051] The processor implements the steps of the method proposed in the above embodiment by running the executable instructions.

[0052] According to a fourth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method provided in the above embodiment are implemented.

[0053] According to a fifth aspect of one or more embodiments of the present specification, a computer program product is proposed, comprising a computer program / instruction, which implements the steps of the method proposed in the above embodiment when executed by a processor.

[0054] The request processing method proposed in the embodiment of this specification pre-builds a function library composed of functions used to implement various functions in the client, and inputs the functions retrieved according to the user's request information and the request information into the large language model, so that the large language model selects the function that matches the request information from the input function as the target function, and selects the matching parameter from multiple parameters of the target function as the target parameter, and then obtains the response result for the user's request according to the target function and the target parameter. Since the function library covers the operations that the user can perform using the client, by mapping the user's request information to the form of the most matching function in the function library, compared with directly processing the request information using the large model, it can eliminate the ambiguity of natural language understanding, improve the efficiency of intent understanding, and improve the accuracy of intent understanding, thereby improving the processing effect of user requests. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is an application scenario diagram of a request processing method provided by an exemplary embodiment.

[0056] Figure 2 It is a flowchart of a request processing method provided by an exemplary embodiment.

[0057] Figure 3 It is a schematic diagram of a function library provided by an exemplary embodiment.

[0058] Figure 4 It is a flowchart of another request processing method provided by an exemplary embodiment.

[0059] Figure 5 It is a block diagram of a request processing device provided by an exemplary embodiment.

[0060] Figure 6 It is a structural schematic diagram of a device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0062] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0063] like Figure 1 The figure shows an application scenario diagram of a request processing method in an embodiment of the present application. Figure 1 The system includes: a client 10, a function library 20, and a large language model (LLM) 30.

[0064] The client 10 is a device with network connection, data processing and user interaction capabilities, responsible for receiving user input requests, executing the request processing process, and presenting the processing results to the user. The client 10 can be a client of a smart phone, tablet computer, desktop computer, smart wearable device, car system, smart home device, learning machine, etc.

[0065] The function library 20 is pre-built and can be stored inside the client 10 or independently stored outside the client 10. The client 10 can interact with the function library 20.

[0066] The large language model 30 is a large-scale neural network model in the field of natural language processing (NLP). It is usually composed of hundreds of millions to billions of parameters. It can understand and generate complex language data by learning complex patterns and structures through pre-training on a large amount of text data. The large language model 30 is usually deployed on a server to provide back-end support for the application or service of the client 10. The client 10 can communicate with the large language model 30 on the server through the Internet, send requests and receive processed responses.

[0067] The description in this application only details a single client 10, a function library 20, and a large language model 30, but those skilled in the art should understand that the client 10, the function library 20, and the large language model 30 shown are intended to represent the operations of the client 10, the function library 20, and the large language model 30 involved in the technical solution of this application, and do not imply that there is a limitation on the number, type, or location of the client 10, the function library 20, and the large language model 30. It should be noted that if additional modules are added to the illustrated environment or individual modules are removed therefrom, the underlying concepts of the exemplary embodiments of this application will not be changed.

[0068] It should be noted that the request processing method proposed in this application is not only applicable to Figure 1 The application scenario shown is also applicable to any device that has request processing requirements.

[0069] Figure 2 A flowchart of a request processing method provided by an embodiment of the present application is shown. The method comprises Figure 1 The client executes in Figure 2 As shown, the method includes:

[0070] Step 201: Receive request information input by a user. In the embodiment of the present disclosure, the request information is usually in the form of natural language and can be input by voice or text.

[0071] The specific form of the request information depends on the type, function and purpose of the client, and can be a request for processing the system software in the client, a request for processing the application software in the client, or an operation request for the client itself.

[0072] For example, when the client is a smart phone, the request information may be a retrieval request for a search engine in the smart phone; when the client is a learning machine, the request information may be a request to search for a course, or an operation request for controlling the volume, screen brightness, etc. of the learning machine.

[0073] Step 202: Search in a pre-built function library according to the request information to obtain a search result, wherein the search result includes at least one function.

[0074] The pre-built function library is a collection of functions used in the client to implement multiple different functions. Each function is designed to solve a specific problem or perform a specific task. Functions can be simply understood as a combination of intents and entities. One function corresponds to an intent and multiple entities under the intent. These functions may include information query functions, control functions, service functions, data processing functions, and other types.

[0075] In this step, a search is performed in the function library according to the request information, and a search result that meets the conditions is obtained based on a pre-set matching rule, and the search result includes at least one function. For example, the returned search result can be set to include N functions (N is a positive integer). That is, for each request initiated by the user, the N functions with the highest matching degree with the request can be obtained from the function library as the search result.

[0076] There are many ways to match request information with functions in the function library. For example, you can directly match the request information with the function name, parameter list, function annotation, etc., or you can first extract keywords from the request information and then use the keywords to match them with the function name, parameter list, function annotation, etc.

[0077] Step 203: Input the request information and the search results into a large language model, so that the large language model outputs a target function and a target parameter in the target function determined from the search results according to the request information.

[0078] In this step, the constructor can be used to construct the input of the large language model according to the user's request information and the function library search results. The large language model selects the most suitable function from the input functions as the target function according to the request information. Since the function usually has multiple parameters, the large language model also selects the parameters related to the user's request from the multiple parameters of the target function as the target parameters. The selected target parameters ensure that the output of the target function can accurately meet the user's request.

[0079] In some embodiments, prompt information can also be input at the same time, for example, input: Please select the most appropriate function from the multiple functions input according to the user's request information, and extract the parameters under the function. By inputting prompt information, the large language model can understand the task more clearly.

[0080] In this way, the large language model selects the target function from the input function and determines the target parameters in the target function. Compared with using the large language model to directly understand the intent of the request information, it avoids multi-level intent classification and entity recognition of the request information, which is equivalent to merging intent recognition and entity recognition, thereby improving the efficiency of intent recognition.

[0081] Step 204: Obtain a response result of the request information according to the target function and the target parameter.

[0082] Specifically, the client calls the target function and passes in the value of the target parameter configured according to the request information, so that the target function performs the operation according to the value of the target parameter, thereby obtaining a response result requested by the user.

[0083] In the disclosed embodiment, by pre-building a function library, the function retrieved according to the user's request information and the request information are input into the large language model together, so that the large language model selects a function that matches the request information from the input function as the target function, and selects a matching parameter from multiple parameters of the target function as the target parameter, and then obtains a response result for the user's request based on the target function and the target parameter. Since the function library covers the operations that the user can perform using the client, by mapping the user's request information to the form of the most matching function in the function library, compared to directly processing the request information using the large model, it can eliminate the ambiguity of natural language understanding, improve the efficiency of intent understanding, and improve the accuracy of intent understanding, thereby improving the processing effect of user requests.

[0084] In some embodiments, the function library can be established based on client application functions and system functions related to user needs.

[0085] First, determine the tasks that the user can complete using the client, as well as the operations and data processing that these tasks may involve, so as to determine all the functions required by the client, which may include but are not limited to retrieval, calculation, control, user interaction, etc.; the identified functions can be divided into two categories: system functions and client application functions. System functions are functions of the underlying operating system, such as file reading and writing, network communication, hardware interface access, etc., and application functions are operations directly facing the user, such as user interface interaction, business logic processing, data display, etc. A function library is established in the above manner, and steps 201 to 204 are used to obtain the target function and target parameters that best meet the user's request intention from the function library, and the target function is executed to respond to the user's request.

[0086] Since the function library of this solution covers the application functions and system functions in the client, and selects the target function that best matches the intent of the user request from these functions, it further improves the accuracy of natural language understanding of user requests and enhances the effect of request processing.

[0087] In some embodiments, each function in the function library corresponds to at least one index. In this case, the search result can be obtained by: matching the request information with the index in the function library to obtain an index whose similarity meets the set requirements; and obtaining the search result according to the function corresponding to the obtained index.

[0088] See also Figure 3 As shown, the function library stores various functions and their corresponding indexes. The function and index are both unique, and one function corresponds to at least one index.

[0089] The following table shows several functions stored in the function library and the indexes corresponding to these functions.

[0090]

[0091]

[0092]

[0093]

[0094] If the function library contains an index, the request information can be matched with the index in the function library, and the search result can be obtained according to the function corresponding to the matched index.

[0095] Since the index can be built based on multiple dimensions, such as function, parameter type, return type, etc., this allows the matching process to be performed from multiple angles, improving accuracy and speeding up matching.

[0096] In some embodiments, the following formula may be used for matching:

[0097] First, the request information and the index are converted into vectors respectively, and the similarity between the vector of the request information and the vector of each index is calculated, and the index whose similarity meets the set requirements is determined as the matched index. For example, the cosine similarity, Euclidean distance, dot product, etc. between the vector of the request information and the vector of the index can be calculated to calculate the similarity, quantify the similarity between the two, and thus achieve matching of the request information and the index.

[0098] In some embodiments, an index whose similarity with the request information is greater than a first set threshold value may be determined as an index that meets the requirements, and a function corresponding to the index may be used as an input item of the large language model. For example, the first set threshold value may be set to 0.8, and an index whose similarity is greater than 0.8 is an index that meets the requirements.

[0099] In some implementations, the indexes may be ranked according to the similarity between the indexes and the request information, and the indexes with a similarity ranking not greater than a second set threshold may be determined as indexes that meet the requirements. For example, the second set threshold may be set to 5, and the top 5 indexes in the similarity ranking are indexes that meet the requirements.

[0100] Taking the functions included in Table 1 as an example, when the request information entered by the user is "What is the temperature today?", assuming that the matched index includes: 1. Today's temperature; 2. What day is today, then the functions "Query Weather" and "Query Date Information" corresponding to these two indexes are the search results.

[0101] By inputting the two functions contained in the search results and the request information "What is the temperature today?" into the large language model, and inputting the prompt information, the large language model is prompted to select the target function and target parameter that best matches the request information from the two input functions. In this example, the output of the large language model is, for example:

[0102]

[0103]

[0104] That is, the target function output by the large language model is "query weather", and the target parameter is "relative day". Since the date of querying weather in the request information is today, the value of the target parameter passed to the target function is 0.

[0105] Figure 4 A schematic diagram showing another request processing method provided in an embodiment of the present application.

[0106] First, a search is performed in the pre-built function library 401 according to the user's request information to obtain a search result. Each function in the function library contains at least one index. Specifically, the request information is matched with the index in the function library, and the search result is obtained according to the function corresponding to the matched index.

[0107] The constructor 402 constructs the input of the large language model 403 according to the search results and the request information output by the function library. The large language model 403 determines the target function and the target parameters in the target function from the search results according to the request information and outputs them.

[0108] In some embodiments, supervised fine-tuning can be performed on a pre-trained large language model to improve the capabilities of the large language model in function selection and parameter extraction tasks.

[0109] Specifically, a query request sample is first generated, wherein the query request sample is labeled with the true value of the function and the true value of the parameter; then, the query request sample and multiple functions are input into a large language model, and the parameters of the large language model are adjusted according to the difference between the function and parameters predicted by the large language model and the true value of the function and the true value of the parameter, until the difference is less than a set threshold or reaches the number of iterations.

[0110] In the embodiments of the present disclosure, only a small amount of labeled data is needed to fine-tune the large language model. Compared with the training of multi-level intent recognition models and entity recognition models, a large amount of training data is not required, thereby reducing the labeling cost.

[0111] Moreover, when a new intent or entity needs to be added, there is no need to retrain the model. Instead, the function corresponding to the intent can be added to the function library with the corresponding index. When a user request related to the new intent is input, the large language model can correctly select the function and extract the parameters.

[0112] Figure 5 FIG. 1 is a block diagram of a request processing device provided by an exemplary embodiment. Figure 5 As shown, the device comprises:

[0113] The receiving unit 501 is used to receive request information input by a user;

[0114] A retrieval unit 502 is used to search in a pre-built function library according to the request information to obtain a retrieval result, wherein the function library is a set of functions in the client for implementing various functions, and the retrieval result includes at least one function;

[0115] An input unit 503, configured to input the request information and the search result into a large language model, so that the large language model outputs a target function and a target parameter in the target function determined from the search result according to the request information;

[0116] The processing unit 504 is used to obtain a response result of the request information according to the target function and the target parameter.

[0117] In some embodiments, each function in the function library corresponds to at least one index;

[0118] The retrieval unit is specifically used for:

[0119] Matching the request information with an index in the function library;

[0120] The search result is obtained according to the function corresponding to the matched index.

[0121] In some embodiments, when the retrieval unit is used to match the request information with the index in the function library, it is specifically used to:

[0122] Convert the request information and the index into vectors respectively;

[0123] Calculating the similarity between the vector of the request information and the vectors of each index;

[0124] The index whose similarity meets the set requirements is determined as the matched index.

[0125] In some embodiments, the setting requirement includes any of the following:

[0126] The similarity is greater than a first set threshold;

[0127] The similarity ranking is not greater than a second set threshold.

[0128] In some embodiments, the device further comprises a construction unit for:

[0129] The function library is established according to the client application functions and system functions related to user needs.

[0130] In some embodiments, the apparatus further comprises a fine-tuning unit for:

[0131] Generate a query request sample, wherein the query request sample is labeled with a true value of the function and a true value of the parameter;

[0132] The query request sample and multiple functions are input into a large language model, and the parameters of the large language model are adjusted according to the difference between the functions and parameters predicted by the large language model and the true values ​​of the functions and the true values ​​of the parameters, until the difference is less than a set threshold or reaches the number of iterations.

[0133] Figure 6 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 6At the hardware level, the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610, and may also include hardware required for other services. One or more embodiments of this specification may be implemented based on software, such as the processor 602 reading the corresponding computer program from the non-volatile memory 610 into the memory 608 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0134] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0135] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0136] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0137] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0138] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0139] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0140] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0141] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the 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".

[0142] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A request processing method, characterized in that: Applied to the client, including: Receive request information input by the user; Searching in a pre-built function library according to the request information to obtain a search result, wherein the function library is a set of functions in the client for implementing various functions, and the search result includes at least one function; Inputting the request information and the search results into a large language model so that the large language model outputs a target function and a target parameter in the target function determined from the search results according to the request information; A response result of the request information is obtained according to the target function and the target parameter.

2. The method according to claim 1, characterized in that: Each function in the function library corresponds to at least one index; The searching in the pre-built function library according to the request information to obtain the search results includes: Matching the request information with an index in the function library; The search result is obtained according to the function corresponding to the matched index.

3. The method according to claim 2, characterized in that The matching of the request information with the index in the function library includes: Convert the request information and the index into vectors respectively; Calculating the similarity between the vector of the request information and the vectors of each index; The index whose similarity meets the set requirements is determined as the matched index.

4. The method according to claim 3, characterized in that The setting requirements include any of the following: The similarity is greater than a first set threshold; The similarity ranking is not greater than a second set threshold.

5. The method according to claim 1, characterized in that The method further comprises: The function library is established according to the client application functions and system functions related to user needs.

6. The method according to claim 1, characterized in that The method further comprises: Generate a query request sample, wherein the query request sample is labeled with a true value of the function and a true value of the parameter; The query request sample and multiple functions are input into a large language model, and the parameters of the large language model are adjusted according to the difference between the functions and parameters predicted by the large language model and the true values ​​of the functions and the true values ​​of the parameters, until the difference is less than a set threshold or reaches the number of iterations.

7. A request processing device, characterized in that: Applied to the client, including: A receiving unit, used for receiving request information input by a user; A retrieval unit, configured to search in a pre-built function library according to the request information to obtain a retrieval result, wherein the function library is a set of functions in the client for implementing various functions, and the retrieval result includes at least one function; An input unit, used for inputting the request information and the search result into a large language model, so that the large language model outputs a target function determined from the search result according to the request information and a target parameter in the target function; A processing unit is used to obtain a response result of the request information according to the target function and the target parameter.

8. An electronic device comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 6 by running the executable instructions.

9. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Data processing method and electronic equipment

    CN120011412A