Privacy protection method, device and system for large language model

By performing intent identification and permission verification on the question data of the large language model, it is ensured that only function tools with matching permissions can be called, which solves the problem of privacy data leakage when the large language model answers questions, and improves the security and matching efficiency of private data. .

CN118568776AInactive Publication Date: 2024-08-30ANT GROUP CO LTD

Patent Information

Application Number
CN202411025637.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Large language models may leak user privacy data when answering questions. Existing technologies are difficult to effectively protect user privacy, especially when calling third-party function tools.

Method used

By obtaining the input question data, intent recognition is performed, the question intention is determined, permission verification is performed based on the user identification information, and callable function tools are determined to ensure that only tools with matching permissions can be called, and then answer feedback data is generated to avoid privacy data leakage.

Benefits of technology

It effectively improves the security of user data, reduces the cost of privacy protection, avoids the possibility of leaking personal privacy data through function tools, improves the matching efficiency of function tools, and ensures the security of personal privacy data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568776A
    Figure CN118568776A
Patent Text Reader

Abstract

The embodiment of the invention discloses a privacy protection method, device and system for a large language model, and the method comprises the steps: firstly, obtaining input current question data, inputting the current question data into a pre-deployed large language model, carrying out the intention recognition, determining a question intention corresponding to the current question data, and obtaining a question intention corresponding to the current question data; according to the method, a to-be-called function tool is determined according to a question intention, then permission verification is performed on the to-be-called function tool based on user identification information associated with current question data, a callable function tool is determined, and answer feedback data corresponding to the current question data is determined through the current question data, the callable function tool and a large language model. According to the technical scheme in the embodiment of the specification, control over the tool calling permission of the user can be achieved, the user data safety is improved, and the user privacy is protected; and meanwhile, the large language model does not need to be retrained, so that the privacy protection cost is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present specification relates to the field of computer technology, and in particular to a privacy protection method, device, and system for a large language model. Background Art

[0002] With the rapid development of science and technology, large language models (LLM) have attracted more and more attention. Large language models are deep learning models trained based on massive text data, which can generate natural language text or understand the meaning of language text. Such models can perform a variety of natural language processing (NLP) tasks, including but not limited to text classification, question answering, and dialogue.

[0003] At present, when answering question data, large language models need to call third-party function tools in some cases to obtain relevant data. Attackers may obtain private data by designing questions and calling third-party function tools, resulting in poor security of user privacy data. Summary of the invention

[0004] In a first aspect of the embodiments of the specification, a privacy protection method for a large language model is provided, which can improve user data security, protect user privacy, and effectively reduce privacy protection costs. The method includes: Obtain input current question data, and input the current question data into a pre-deployed large language model for intent recognition, to determine the question intent corresponding to the current question data; Determine the function tool to be called according to the question intention; Performing authority verification on the function tool to be called based on the user identification information associated with the current question data to determine the callable function tool; The answer feedback data corresponding to the current question data is determined through the current question data, the callable function tool and the large language model.

[0005] Further, in some implementations, the performing of authority verification on the to-be-called function tool based on the user identification information associated with the current question data to determine the callable function tool includes: Determine the user access rights corresponding to the user identification information and the tool calling rights corresponding to the function tool to be called through a pre-built rights management database; Determine a callable function tool from the function tools to be called according to the user access authority and the tool calling authority.

[0006] Further, in some implementations, if the number of the to-be-called function tools is one, determining a callable function tool from the to-be-called function tools according to the user access rights and the tool calling rights includes: If the result of the permission verification of the user access authority and the tool calling authority is determined to be passed, the function tool to be called is used as a callable function tool.

[0007] Further, in some implementations, if the number of the function tools to be called is at least two, determining a callable function tool from the function tools to be called according to the user access rights and the tool calling rights includes: The function tool to be called whose tool calling authority is less than or equal to the user access authority is used as a callable function tool.

[0008] Furthermore, in some embodiments, the method further comprises: If the tool calling permissions corresponding to each of the to-be-called function tools are greater than the user access permissions, a prompt indicating that the tool is not authorized to call is generated.

[0009] Further, in some implementations, determining the function tool to be called according to the question intention includes: Determine the intention type corresponding to the question intention; If it is determined that the intention type requires calling a function tool, the function tool to be called is matched from a pre-configured candidate function tool set according to the question intention.

[0010] Furthermore, in some implementations, matching the to-be-called function tool from a preconfigured candidate tool set according to the question intention includes: Determine the semantic similarity between the question intention and the tool identification information of each function tool in the candidate tool set; The function tool whose semantic similarity is greater than or equal to a preset similarity threshold is used as the function tool to be called.

[0011] Furthermore, in some embodiments, the method further comprises: If it is determined that the intention type does not need to call a function tool, the current question data is input into the large language model, and the answer feedback data corresponding to the current question data is output.

[0012] Further, in some implementations, inputting the current question data into a pre-deployed large language model for intent recognition to determine the question intent corresponding to the current question data includes: Acquire an intention recognition guidance template, and construct intention recognition guidance question data according to the intention recognition guidance template and the current question data; The intention recognition guided question data is input into the large language model to realize the intention recognition of the current question data and obtain the question intention corresponding to the current question data.

[0013] Further, in some implementations, determining the answer feedback data corresponding to the question data through the current question data, the callable function tool and the large language model includes: Determine the feedback result required to answer the current question data according to the callable function tool; Answer prompt data is constructed using the current question data and the feedback result, and the answer prompt data is input into the large language model, and answer feedback data corresponding to the question data is output.

[0014] Further, in some implementations, determining the feedback result required to answer the current question data according to the callable function tool includes: Determine a function parameter list corresponding to the callable function tool according to the current question data; Generate behavior request data through the callable function tool and each function parameter in the function parameter list; The feedback result corresponding to the current question data is retrieved based on the behavior request data.

[0015] Furthermore, in some implementations, constructing answer prompt data using the current question data and the feedback result includes: A preset answer prompt template is obtained, and the current question data and the feedback result are filled into the answer prompt template to obtain answer prompt data.

[0016] In a second aspect of the embodiments of the specification, a privacy protection device for a large language model is also proposed, including: A question intention determination module is used to obtain input current question data, and input the current question data into a pre-deployed large language model for intention recognition, to determine the question intention corresponding to the current question data; A function tool determination module, used to determine the function tool to be called according to the question intention; An authority verification module, used to verify the authority of the function tool to be called based on the user identification information associated with the current question data, and determine the callable function tool; The answer feedback data generating module is used to determine the answer feedback data corresponding to the current question data through the current question data, the callable function tool and the large language model.

[0017] In a third aspect of the embodiments of the specification, a privacy protection system for a large language model is also proposed, including: The client is used to obtain current question data and user identification information corresponding to the current question data; The server side is deployed with a large language model, including a rights management database, a candidate function tool set, and a privacy protection device for the large language model as in the second aspect; wherein: The rights management database is used to verify or manage user access rights and tool calling rights; The candidate function tool set is used to configure the function tool; The privacy protection device for a large language model is used to implement the steps of the privacy protection method for a large language model in the first aspect.

[0018] A fourth aspect of the embodiments of this specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is suitable for being loaded by a processor and executing the method steps in the first aspect.

[0019] According to a fifth aspect of the embodiments of this specification, a storage medium is provided, wherein the storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the steps of the method in the first aspect.

[0020] According to a sixth aspect of the embodiments of the present specification, there is also provided an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method in the first aspect.

[0021] In the embodiment of the present specification, by obtaining the input current question data, and inputting the current question data into the pre-deployed large language model for intent recognition, the question intent corresponding to the current question data is determined; the function tool to be called is determined according to the question intent, and the authority verification of the function tool to be called is performed based on the user identification information associated with the current question data, and the callable function tool is determined, and then the answer feedback data corresponding to the current question data can be determined through the current question data, the callable function tool and the large language model. On the one hand, the authority verification of the function tool to be called is performed through the user identification information associated with the current question data, and the callable function tool matching the authority of the current question data is matched to realize data query and guide the large language model to output the answer feedback data, which can effectively avoid the possibility of leaking personal privacy data through the function tool, improve the security of privacy data, and realize the protection of personal privacy data in the large language model scenario; on the other hand, the intention recognition of the current question data is performed through the large language model, and then the determination of the function tool to be called is realized in combination with the question intent, and no additional artificial intelligence model or retraining of the large language model is required, which can effectively improve the matching efficiency of the function tool and reduce the cost of privacy protection; at the same time, the current question data with malicious questions can also be effectively filtered through the question intent, further ensuring the security of personal privacy data. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic diagram of a system architecture of an exemplary application environment of a privacy protection method and apparatus for a large language model to which the embodiments of this specification can be applied is shown.

[0023] Figure 2 A flowchart of a privacy protection method for a large language model provided in an embodiment of this specification.

[0024] Figure 3 A flowchart of a tool for screening callable functions provided in an embodiment of this specification.

[0025] Figure 4 A flowchart of a tool for matching functions to be called provided in an embodiment of this specification.

[0026] Figure 5 A schematic diagram of a flow chart for performing intent recognition on current question data provided in an embodiment of this specification.

[0027] Figure 6 A flowchart of implementing privacy protection of a large language model by calling a function tool through permission verification is provided in an embodiment of this specification.

[0028] Figure 7A schematic diagram of the structure of a privacy protection system for a large language model provided in an embodiment of this specification.

[0029] Figure 8 A schematic diagram of the structure of a privacy protection device for a large language model provided in an embodiment of this specification.

[0030] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0032] Figure 1 A schematic diagram of a system architecture of an exemplary application environment in which a method and device for detecting spoofed documents according to an embodiment of the present specification can be applied is shown.

[0033] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with artificial intelligence (AI) computing capabilities, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.

[0034] The privacy protection method for a large language model provided in the embodiments of this specification is generally executed by the server 105, and accordingly, the privacy protection device for a large language model is generally set in the server 105. However, it is easy for a person skilled in the art to understand that the privacy protection method for a large language model provided in the embodiments of this specification can also be executed by the terminal devices 101, 102, and 103, and accordingly, the privacy protection device for a large language model can also be set in the terminal devices 101, 102, and 103, which is not particularly limited in this exemplary embodiment.

[0035] See also Figure 2 , which provides a flowchart of a privacy protection method for a large language model in the embodiments of this specification. In the embodiments of this specification, the privacy data protection method for a large language model can be applied to a terminal device or a server, and this exemplary embodiment does not make any special restrictions on this. Figure 2 The process shown is described in detail. The privacy data protection method for a large language model in the embodiment of this specification may specifically include the following steps: Step S210, obtaining input current question data, and inputting the current question data into a pre-deployed large language model for intent recognition, to determine the question intent corresponding to the current question data; Step S220, determining the function tool to be called according to the question intention; Step S230, performing authority verification on the function tool to be called based on the user identification information associated with the current question data, and determining the callable function tool; Step S240: determining answer feedback data corresponding to the current question data through the current question data, the callable function tool and the large language model.

[0036] According to the privacy protection method for a large language model in the embodiments of this specification, on the one hand, the authority of the function tool to be called is verified through the user identification information associated with the current question data, and the callable function tool that matches the authority of the current question data is matched to realize data query and guide the large language model to output answer feedback data, which can effectively avoid the possibility of leaking personal privacy data through the function tool, improve the security of privacy data, and realize personal privacy data protection in the large language model scenario; on the other hand, the intent of the current question data is recognized through the large language model, and then the function tool to be called is determined in combination with the question intent, and no additional artificial intelligence model or retraining of the large language model is required, which can effectively improve the matching efficiency of the function tool and reduce the cost of privacy protection; at the same time, the question intent can also effectively filter the current question data with malicious questions, further ensuring the security of personal privacy data.

[0037] The following is a detailed description of the privacy protection method for a large language model in the embodiments of this specification.

[0038] In step S210, the input current question data is obtained, and the current question data is input into a pre-deployed large language model for intent recognition to determine the question intent corresponding to the current question data.

[0039] In an example embodiment of the present specification, the current question data refers to an instruction input by the user through an input interface pre-provided on the client. For example, the current question data may be an instruction to query weather conditions, such as "What's the weather like today"; the current question data may also be an instruction to open path navigation, such as "Navigate to the company". Of course, the current question data may also be an input instruction for other content, and this example embodiment does not specifically limit this.

[0040] A user interaction interface can be provided on the client, and an input box can be provided on the user interaction interface, so that the user can manually input the current question data through the input box; a voice recognition module can also be provided on the client to obtain the current question data input by the user in the form of voice by recognizing the user's voice command; of course, an instruction control can also be provided, and the user can choose to trigger the instruction control to input the current question data. This example embodiment does not specifically limit the input method of the current question data.

[0041] The pre-deployed large language model refers to a deep learning model deployed on the server side for performing different types of natural language processing (NLP) tasks. For example, the large language model can be a trained BERT (Bidirectional Encoder Representations from Transformers) model; of course, the large language model can also be a trained GPT (Generative Pre-trained Transformer) model. This example embodiment does not specifically limit the type of the large language model.

[0042] The question intention refers to the purpose or motivation identified from the current question data. For example, assuming that the current question data may be "How is the weather today?", the question intention corresponding to the question data may be to obtain today's weather information; assuming that the current question data may be "How to change the computer wallpaper?", the question intention corresponding to the question data may be to obtain the wallpaper operation guide; of course, this is only an illustrative explanation of the question intention, and this embodiment is not limited to this.

[0043] It can be understood that the intention recognition guidance data can be constructed through the current question data, and then the intention recognition guidance data can be input into the large language model to realize the intention recognition of the current question data; of course, it is also possible to add a question intention recognition task in the training phase of the large language model so that the large language model can output the question intention according to the current question data. This example embodiment does not make any special limitations on this.

[0044] In step S220, the function tool to be called is determined according to the question intention.

[0045] In an example embodiment of the present specification, the function tool to be called refers to a third-party function tool used to provide additional knowledge information to the large language model, thereby assisting the large language model in realizing the intention of asking questions. For example, the function tool to be called can be an application programming interface (Application Programming Interface, API) or a software development kit (Software Development Kit, SDK). This example embodiment does not specifically limit the type of the target function tool.

[0046] The question intent can be matched with the tool identification information in the candidate function tool set, and the function tools with semantic similarity greater than or equal to the similarity threshold can be used as the function tools to be called; of course, the function tools in the candidate function tool set can be pre-constructed with index information according to the task types they can complete, and the index information of the candidate function tool set can be searched and matched according to the question intent to obtain the function tools to be called corresponding to the question intent. This example embodiment does not impose any special limitation on the method of determining the function tools to be called corresponding to the question intent.

[0047] In step S230, the authority of the function tool to be called is verified based on the user identification information associated with the current question data to determine the callable function tool.

[0048] In an example embodiment of the present specification, user identification information refers to information identifying user authority obtained from the client that inputs the current question data. For example, the user identification information can be the user's unique coding information, or it can be the device identification number corresponding to the client. Of course, if the current question data is input in voice form, the user identification information can also be the user's voiceprint information. This example embodiment does not specifically limit the type of user identification information.

[0049] The callable function tool refers to the function tool that the user identification information corresponding to the current question data in the function tool to be called has the authority to call. Specifically, the authority of the function tool to be called can be verified by the user identification information, and the function tool that has passed the verification in the function tool to be called is used as the callable function tool.

[0050] It can be understood that if the number of the function tools to be called is one, the function tool to be called can be used as a callable function tool when the verification passes, or it can be considered that there is no callable function tool when the verification fails.

[0051] After obtaining the user identification information, the user identification information and the tool identification information corresponding to the function tool to be called can be input into a preset permission management database to determine the access rights corresponding to the user identification information and the calling rights corresponding to the tool identification information, and then the permission verification is implemented by matching the access rights and the calling rights to obtain the callable function tools; of course, the function tools with permission to call can also be determined according to the access rights corresponding to the user identification information, and the function tools with permission to call and the function tools to be called can be intersection-operated to obtain the callable function tools. This example embodiment does not impose any special limitation on the method of filtering the callable function tools from the function tools to be called.

[0052] In step S240, answer feedback data corresponding to the current question data is determined through the current question data, the callable function tool and the large language model.

[0053] In an example embodiment of this specification, answer feedback data refers to the answer data output by the large language model based on the current question data and the called callable function tool for answering the current question data. For example, if the current question data is "How is the weather today?", and the feedback result of the large language model calling the callable function tool is "The weather is sunny," then the answer feedback data output by the large language model may be "Today's weather is sunny, suitable for going out for fun." It can be understood that this is only an illustrative example, and this embodiment is not limited to this.

[0054] The permission of the function tool to be called is verified through the user identification information associated with the current question data, and the callable function tool that matches the permission of the current question data is matched to implement data query and guide the large language model to output answer feedback data. This can effectively avoid the possibility of personal privacy data being leaked through function tools, improve the security of privacy data, and realize personal privacy data protection in the large language model scenario.

[0055] The intent of the current question data is recognized through a large language model, and then the function tool that needs to be called is determined based on the question intent. No additional artificial intelligence model or retraining of the large language model is required, which can effectively improve the matching efficiency of function tools and reduce the cost of privacy protection. At the same time, the question intent can also effectively filter out current question data that contains malicious questions, further ensuring the security of personal privacy data.

[0056] Next, step S210 to step S240 are described in detail.

[0057] In an exemplary embodiment of the present specification, Figure 3 The steps in the implementation of the current question data based on the user identification information associated with the authority to call the function tool to determine the callable function tool, reference Figure 3 As shown, it may specifically include: Step S310, determining the user access rights corresponding to the user identification information and the tool calling rights corresponding to the function tool to be called through a pre-built rights management database; Step S320: determining a callable function tool from the to-be-called function tools according to the user access rights and the tool calling rights.

[0058] Among them, user access rights refer to the level of access rights that the object that inputs the current question data has to access the function tool. For example, user access rights can be a level of rights defined by numbers, or a level of rights defined by different role types. This example embodiment does not specifically limit the definition of the level of rights for user access rights. For ease of explanation, the user access rights are described below using the level of rights defined by numbers from 1 to 5 as an example. For example, when the user access right is "1", the level of access right is the highest, and when the user access right is "5", the level of access right is the lowest.

[0059] Tool call permission refers to the minimum user access permission required to call each function tool to obtain data. The permission level definition of tool call permission can be consistent with the user access permission. For example, the user access permission can be a permission level defined by numbers from 1 to 5, so the tool call permission can also be a permission level defined by numbers from 1 to 5; similarly, the user access permission can be a permission level defined by different role types, so the tool call permission can also be a permission level defined by different role types; of course, the permission level definition of tool call permission can be different from the user access permission, but it is necessary to additionally define the relationship between tool call permission and user access permission. This embodiment does not specifically limit the permission level definition method of tool call permission. For the sake of convenience, the tool call permission will be described using the permission level defined by numbers from 1 to 5 as an example.

[0060] It can be understood that a pre-built permission management database can be configured with user access rights corresponding to all users and tool calling rights corresponding to each function tool. The user identification information can be input into the permission management database to retrieve and match the corresponding user access rights. Similarly, the tool identification information corresponding to the function tool to be called can be input into the permission management database to retrieve and match the corresponding tool calling rights. Then, permission verification can be performed based on the user access rights and tool calling rights to determine the callable function tools that the user identification information has the authority to call.

[0061] Optionally, if it is detected that the number of function tools to be called is one, the user access rights corresponding to the user identification information can be verified with the tool calling rights of the function tool to be called. If the user access rights match the tool calling rights, the result of the permission verification is determined to be passed, and the function tool to be called can be used as a callable function tool. Of course, if the user access rights do not match the tool calling rights, it can be considered that the permission verification has failed, and a permission verification failure prompt will be fed back.

[0062] It can be understood that the permission verification matching method in this embodiment can be an absolute matching method for permission verification. For example, assuming that the user access permission can be "3", then the corresponding user identification information can only access the function tool with the tool calling permission of "3"; of course, the permission verification matching method in this embodiment can also be a backward compatible matching method for permission verification. For example, assuming that the user access permission can be "3", then the corresponding user identification information can access the function tool with the tool calling permission of "3", "4", and "5". This embodiment does not make any special limitation on the matching method of permission verification.

[0063] By using a pre-built permission management database to implement permission verification for user access rights corresponding to user identification information and tool call permissions corresponding to the function tool to be called, the security of personal privacy data can be effectively improved and the possibility of personal privacy data leakage can be reduced.

[0064] In an optional embodiment, if it is detected that the number of function tools to be called is at least two, the function tools to be called whose tool calling permissions are less than or equal to the user access permissions can be used as callable function tools. For example, the tool calling permissions of function tools A, B, C, D, and E to be called can be "2", "4", "5", "1", and "3", respectively. The user access permission of the user identification information corresponding to the current question data is "2", then the function tools A, B, C, and E to be called whose tool calling permissions are "2", "4", "5", and "3" can be used as callable function tools. Of course, this is only a schematic illustration and should not impose any special limitations on this example embodiment.

[0065] Optionally, when it is detected that the tool calling permissions corresponding to each function tool to be called are greater than the user access permissions, it can be considered that the user identification information has no access permissions for each function tool to be called, and the permission verification fails. At this time, a prompt for unauthorized calling can be generated.

[0066] By performing permission verification through backward-compatible matching, that is, treating the to-be-called function tools whose tool calling permissions are less than or equal to the user's access permissions as callable function tools, it is possible to improve the effectiveness and comprehensiveness of the determined callable function tools while ensuring the security of personal privacy data, thereby improving the accuracy of the output results of the large language model.

[0067] In an example embodiment of the present specification, the following steps may be used to determine the function tool to be called according to the question intention, which may specifically include: The intent type corresponding to the question intent may be determined. If the intent type is determined to require calling a function tool, the function tool to be called is matched from a pre-configured candidate function tool set according to the question intent.

[0068] Among them, the intent type refers to the classification of the need for calling function tools for question intent. For example, the intent type may include types that require calling function tools and types that do not require calling function tools. When it is determined that the intent type of the current question intent requires calling function tools, the function tools to be called can be matched from a pre-configured candidate function tool set according to the question intent; it is easy for those skilled in the art to understand that when it is determined that the intent type of the current question intent does not require calling function tools, the current question data can be directly input into the large language model, and the answer feedback data corresponding to the current question data can be output. The candidate function tool set refers to a pre-configured set of third-party function tools used to enrich the functions of the large language model.

[0069] Optionally, you can Figure 4 The steps in the implementation are to match the function tool to be called from the pre-configured candidate tool set according to the question intention, refer to Figure 4 As shown, it may specifically include: Step S410, determining the semantic similarity between the question intention and the tool identification information of each function tool in the candidate tool set; Step S420: taking the function tool whose semantic similarity is greater than or equal to a preset similarity threshold as the function tool to be called.

[0070] Among them, semantic similarity refers to data that measures the similarity of semantic expressions of two sentences. For example, the question intention and the tool identification information of each function tool can be vectorized through word embedding, bag-of-words model, etc., and the cosine similarity between the question intention and the tool identification information after vectorization is determined, and the cosine similarity is used as the semantic similarity between the question intention and the tool identification information; of course, the semantic similarity can also be determined by calculating the Euclidean distance between the question intention and the tool identification information after vectorization. This example embodiment does not specifically limit the method for calculating the semantic similarity.

[0071] Tool identification information refers to data used to identify the role or function of a function tool. For example, the tool identification information can be the tool name of the function tool, or it can be a tool usage introduction of the function tool. Of course, it can also be other types of data used to identify the role or function of the function tool. This example embodiment is not limited to this.

[0072] The similarity threshold refers to a pre-set parameter for screening available function tools to be called. For example, the similarity threshold can be 95% or 80%. It can be customized according to actual usage. This example embodiment does not impose any special restrictions on the value of the similarity threshold.

[0073] By determining the semantic similarity between the question intention and the tool identification information of each function tool in the candidate tool set, and screening the function tools through the similarity threshold, the function tools to be called can be obtained, which can effectively improve the screening and matching efficiency of the function tools to be called, and also ensure the effectiveness of the screened function tools to be called.

[0074] Optionally, if it is determined that the intent type does not require calling a function tool, the current question data can be input into a large language model to output answer feedback data corresponding to the current question data.

[0075] The intention type of the question intention can be used to quickly determine whether it is necessary to further screen the function tool to be called from the candidate tool set. If it is determined that the intention type of the question intention does not require calling the function tool, the current question data is directly input into the large language model, and the answer feedback data corresponding to the current question data is output, which can effectively improve the output efficiency of the large language model.

[0076] In an exemplary embodiment of the present specification, Figure 5 The steps in the above code implement the input of current question data into the pre-deployed large language model for intent recognition and determine the question intent corresponding to the current question data. Figure 5 As shown, it may specifically include: Step S510, obtaining an intention recognition guidance template, and constructing intention recognition guidance question data according to the intention recognition guidance template and the current question data; Step S520: input the intention recognition guiding question data into the large language model to realize the intention recognition of the current question data and obtain the question intention corresponding to the current question data.

[0077] Among them, the intent recognition guidance template refers to a prompt template used to guide the large language model to realize the intent recognition of the current question data. For example, the intent recognition guidance template can be "Please determine the possible question intentions in the following data [current question data]", or it can be "Please determine the purpose or task to be achieved by [current question data]". Of course, the intent recognition guidance template can also be other types of templates used to guide the large language model to recognize the intent of the current question data, and this example embodiment does not make any special limitations on this.

[0078] A pre-configured intent recognition guidance template can be obtained, and the current question data can be filled into the preset area in the intent recognition guidance template to construct intent recognition guidance question data, and the intent recognition guidance question data can be input into the large language model to realize intent recognition of the current question data and obtain the question intent corresponding to the current question data.

[0079] By constructing an intent recognition guided template, the intent recognition guided question data is input into the large language model to realize the intent recognition of the current question data. It is not necessary to retrain the large language model, nor to make any structural or functional changes to the large language model to realize the intent recognition of the current question data. This can effectively reduce the cost of realizing the intent recognition function of the large language model and reduce the cost of privacy protection.

[0080] In an example embodiment of the present specification, the following steps may be used to determine the answer feedback data corresponding to the question data using the current question data, the callable function tool, and the large language model, which may specifically include: The feedback result required to answer the current question data can be determined based on the callable function tool; the answer prompt data is constructed through the current question data and the feedback result, and the answer prompt data is input into the large language model to output the answer feedback data corresponding to the current question data.

[0081] Among them, the feedback result refers to the data obtained by calling the callable function tool. For example, taking the current question data as "How is the weather today?", and the determined callable function tool is the weather query API, then the feedback result can be that the weather is sunny. This example embodiment does not specifically limit the type of feedback result returned by calling the function tool.

[0082] Answer prompt data refers to data that guides the large language model to output an answer to the current question data based on the current question data and feedback results. For example, the answer prompt data can be "You are a question-answering robot assistant. Please use the following retrieved context data to answer the question. If you don’t know the answer, just say you don’t know. The question is {current question data}, and the context data is {feedback result}"; of course, the answer prompt data only needs to include the current question data and the feedback result. This embodiment does not specifically limit the data structure of the answer prompt data.

[0083] After obtaining the answer prompt data, the answer prompt data can be input into the large language model, and then the large language model can output the answer feedback data corresponding to the current question data according to the answer prompt data, effectively improving the accuracy and effectiveness of the output results of the large language model.

[0084] Optionally, the following steps may be performed to determine the feedback result required to answer the current question data according to the callable function tool, which may specifically include: The function parameter list corresponding to the callable function tool can be determined according to the current question data, the behavior request data is generated by the callable function tool and each function parameter in the function parameter list, and the feedback result corresponding to the current question data is retrieved based on the behavior request data.

[0085] Among them, behavior request data refers to input data used to define the specific behavior and content of the function tool request. For example, the current question data may be "How is the weather today?", and the callable function tool that needs to be called may be the weather query API. The behavior request data may be a request instruction consisting of a path parameter including a user account ID and a query parameter including query data for the current region and time period. Of course, this is only an illustrative example and should not impose any special limitations on this example embodiment.

[0086] For example, the current question data input by the user is "How is the weather today?", and the question intention obtained by inputting the current question data into the large language model is to obtain today's weather information. Then, the function tool to be called determined according to the question intention can be a weather query API, specifically, it can be the tool identification information corresponding to the weather query API and the function parameter list corresponding to the weather query API. Then, the weather query API can be matched according to the tool identification information, and a weather query request can be generated in combination with the function parameter list of the weather query API. The weather query API can return the feedback result of the weather query with the date of today based on the weather query request.

[0087] Optionally, in the step of constructing answer prompt data using current question data and feedback results, a preset answer prompt template may be obtained, and the current question data and the feedback results may be filled into the answer prompt template to obtain the answer prompt data.

[0088] For example, an answer prompt template can be "You are a question-and-answer robot assistant, please use the following retrieved context data to answer the question. If you don't know the answer, just say you don't know. The question is {current question data}, and the context data is {feedback result}". The answer prompt data can be obtained by filling the current question data and feedback result into the answer prompt template.

[0089] Through the pre-set answer prompt template, the answer prompt data can be quickly constructed based on the current question data and feedback results, thereby improving the efficiency of constructing the answer prompt data. At the same time, by guiding the output of the large language model with the answer prompt data, the answer accuracy of the large language model can be effectively improved.

[0090] Figure 6 A flowchart of implementing privacy protection of a large language model by calling a function tool through permission verification is provided in an embodiment of this specification.

[0091] refer to Figure 6 As shown, in step S601, the user inputs the current question data on the client; in step S602, the current question data is identified by the large language model to obtain the question intent; in step S603, it is determined whether the intention type of the question intent is to call a function tool. If it is determined that the intention type of the question intent is to call a function tool, then step S604 can be executed, otherwise step S605 is executed; in step S604, the function tool to be called and the function list are determined in the candidate function tool set according to the question intent; in step S605, the current question data is input into the large language model to obtain the answer feedback data, and the answer feedback data is returned. Display to the client; step S606, send the user identification information and tool identification information to the permission management database for permission verification; step S607, determine whether the permission verification is passed, if it is determined that the permission verification is passed, execute step S608, otherwise execute step S609; step S608, call the callable function tool that has passed the permission verification and the corresponding function list to obtain feedback results; step S609, generate a prompt for calling the function tool without permission and return; step S610, construct answer prompt data according to the current question data and feedback results, input it into the large language model to obtain answer feedback data, and return it to the client for display.

[0092] To summarize, the privacy protection method for a large language model provided in the embodiments of this specification obtains the input current question data, and inputs the current question data into a pre-deployed large language model for intent recognition, thereby determining the question intent corresponding to the current question data; determining the function tool to be called according to the question intent, and performing authority verification on the function tool to be called based on the user identification information associated with the current question data, determining the callable function tool, and then determining the answer feedback data corresponding to the current question data through the current question data, the callable function tool and the large language model. On the one hand, the permission of the function tool to be called is verified through the user identification information associated with the current question data, and the callable function tool that matches the permission of the current question data is matched to realize data query and guide the large language model to output answer feedback data. This can effectively avoid the possibility of leakage of personal privacy data through function tools, improve the security of privacy data, and realize personal privacy data protection in the large language model scenario; on the other hand, the current question data is recognized by the large language model, and then the function tool to be called is determined in combination with the question intent. It does not require additional artificial intelligence models or retraining of the large language model, which can effectively improve the matching efficiency of function tools and reduce the cost of privacy protection; at the same time, the question intent can also effectively filter the current question data with malicious questions, further ensuring the security of personal privacy data.

[0093] In addition, this specification also provides a privacy protection system for a large language model. Figure 7 As shown, the privacy protection system 700 for a large language model may include a client 710 and a server 720, wherein the server 720 is deployed with a large language model 721, and includes a rights management database 722, a candidate function tool set 723, and a privacy protection device 724 for a large language model. Specifically: The client 710 can be used to obtain the current question data and the user identification information corresponding to the current question data; the authority management database 722 can be used to verify or manage user access rights and tool calling rights; the candidate function tool set 723 can be used to configure function tools; the privacy protection device 724 for a large language model can be used to implement the steps of the privacy protection method for a large language model in the present description embodiment.

[0094] Optionally, the privacy protection device 724 for the large language model can be used to obtain the current question data input from the client 710, and input the current question data into the pre-deployed large language model 721 for intent recognition to determine the question intent corresponding to the current question data; then the function tool to be called can be determined in the candidate function tool set 723 according to the question intent output by the large language model 721; the user identification information associated with the current question data can be obtained from the client 710, and the permission of the function tool to be called can be verified based on the user identification information and the permission management database 722 to determine the callable function tool; finally, the answer feedback data corresponding to the current question data can be determined through the current question data, the callable function tool and the large language model 721.

[0095] It is easy for those skilled in the art to understand that the above system embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The system embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.

[0096] See also Figure 8 , is a schematic diagram of a privacy protection device for a large language model provided in an embodiment of this specification. Figure 8 As shown, the privacy protection device 800 for a large language model can be implemented as all or part of an electronic device through software, hardware, or a combination of both. According to some embodiments, the privacy protection device 800 for a large language model includes a record acquisition module 810, a policy generation module 820, an image acquisition module 830, and a system optimization module 840, specifically including: The question intention determination module 810 is used to obtain the input current question data, and input the current question data into a pre-deployed large language model for intention recognition, and determine the question intention corresponding to the current question data; A function tool determination module 820 is used to determine a function tool to be called according to the question intention; The authority verification module 830 is used to verify the authority of the function tool to be called based on the user identification information associated with the current question data, and determine the callable function tool; The answer feedback data generating module 840 is used to determine the answer feedback data corresponding to the current question data through the current question data, the callable function tool and the large language model.

[0097] In an optional embodiment of the specification, based on the above solution, the authority verification module 830 is configured as follows: Determine the user access rights corresponding to the user identification information and the tool calling rights corresponding to the function tool to be called through a pre-built rights management database; Determine a callable function tool from the function tools to be called according to the user access authority and the tool calling authority.

[0098] In an optional embodiment of the specification, based on the above solution, if the number of the function tool to be called is one, the permission verification module 830 is configured as follows: If the result of the permission verification of the user access authority and the tool calling authority is determined to be passed, the function tool to be called is used as a callable function tool.

[0099] In an optional embodiment of the specification, based on the above solution, if the number of the function tools to be called is at least two, the permission verification module 830 is configured as follows: The function tool to be called whose tool calling authority is less than or equal to the user access authority is used as a callable function tool.

[0100] In an optional embodiment of the specification, based on the above solution, the privacy protection device 800 for a large language model further includes a prompt unit, which is configured to: If the tool calling permissions corresponding to each of the to-be-called function tools are greater than the user access permissions, a prompt indicating that the tool is not authorized to call is generated.

[0101] In an optional embodiment of the specification, based on the above solution, the function tool determination module 820 is configured as follows: Determine the intention type corresponding to the question intention; If it is determined that the intention type requires calling a function tool, the function tool to be called is matched from a pre-configured candidate function tool set according to the question intention.

[0102] In an optional embodiment of the specification, based on the above solution, the function tool determination module 820 is configured as follows: Determine the semantic similarity between the question intention and the tool identification information of each function tool in the candidate tool set; The function tool whose semantic similarity is greater than or equal to a preset similarity threshold is used as the function tool to be called.

[0103] In an optional embodiment of the specification, based on the above solution, the privacy protection device 800 for a large language model further includes a direct answer feedback unit, which is configured as follows: If it is determined that the intention type does not need to call a function tool, the current question data is input into the large language model, and the answer feedback data corresponding to the current question data is output.

[0104] In an optional embodiment of the specification, based on the above solution, the question intention determination module 810 is configured as follows: Acquire an intention recognition guidance template, and construct intention recognition guidance question data according to the intention recognition guidance template and the current question data; The intention recognition guided question data is input into the large language model to realize the intention recognition of the current question data and obtain the question intention corresponding to the current question data.

[0105] In an optional embodiment of the specification, based on the above solution, the answer feedback data generating module 840 is configured as follows: Determine the feedback result required to answer the current question data according to the callable function tool; Answer prompt data is constructed using the current question data and the feedback result, and the answer prompt data is input into the large language model, and answer feedback data corresponding to the question data is output.

[0106] In an optional embodiment of the specification, based on the above solution, the answer feedback data generating module 840 is configured as follows: Determine a function parameter list corresponding to the callable function tool according to the current question data; Generate behavior request data through the callable function tool and each function parameter in the function parameter list; The feedback result corresponding to the current question data is retrieved based on the behavior request data.

[0107] In an optional embodiment of the specification, based on the above solution, the answer feedback data generating module 840 is configured as follows: A preset answer prompt template is obtained, and the current question data and the feedback result are filled into the answer prompt template to obtain answer prompt data.

[0108] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.

[0109] The embodiments of this specification also provide a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the method as described in the embodiments of this specification. The specific execution process can be found in the specific description of the embodiments of this specification, and will not be repeated here.

[0110] This specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded by the processor and executes the method as described in the embodiments of this specification. The specific execution process can be found in the specific description of the embodiments of this specification, and will not be repeated here.

[0111] The embodiments of this specification also provide Fig. 9 The structural diagram of the electronic device shown in FIG. Fig. 9 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above-mentioned voice activity detection method.

[0112] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0113] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0114] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.

[0115] 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. Specifically, the computer may be, for example, 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 device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0116] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0117] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0118] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0119] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

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

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

[0123] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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, magnetic tape magnetic disk storage 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.

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

[0125] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0126] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0127] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0128] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A privacy protection method for a large language model, the method comprising: Obtain input current question data, and input the current question data into a pre-deployed large language model for intent recognition, to determine the question intent corresponding to the current question data; Determine the function tool to be called according to the question intention; Performing authority verification on the function tool to be called based on the user identification information associated with the current question data to determine the callable function tool; The answer feedback data corresponding to the current question data is determined through the current question data, the callable function tool and the large language model.

2. According to the privacy protection method for a large language model in claim 1, the step of performing permission verification on the to-be-called function tool based on the user identification information associated with the current question data to determine the callable function tool comprises: Determine the user access rights corresponding to the user identification information and the tool calling rights corresponding to the function tool to be called through a pre-built rights management database; Determine a callable function tool from the function tools to be called according to the user access authority and the tool calling authority.

3. According to the privacy protection method for a large language model of claim 2, if the number of the function tools to be called is one, determining a callable function tool from the function tools to be called according to the user access rights and the tool calling rights comprises: If the result of the permission verification of the user access authority and the tool calling authority is determined to be passed, the function tool to be called is used as a callable function tool.

4. According to the privacy protection method for a large language model of claim 2, if the number of the function tools to be called is at least two, determining a callable function tool from the function tools to be called according to the user access rights and the tool calling rights comprises: The function tool to be called whose tool calling authority is less than or equal to the user access authority is used as a callable function tool.

5. The privacy protection method for a large language model according to claim 3, further comprising: If the tool calling permissions corresponding to each of the to-be-called function tools are greater than the user access permissions, a prompt indicating that the tool is not authorized to call is generated.

6. According to the privacy protection method for a large language model according to claim 1, the step of determining a function tool to be called according to the question intention comprises: Determine the intention type corresponding to the question intention; If it is determined that the intention type requires calling a function tool, the function tool to be called is matched from a pre-configured candidate function tool set according to the question intention.

7. The privacy protection method for a large language model according to claim 6, wherein matching the to-be-called function tool from a preconfigured candidate tool set according to the question intention comprises: Determine the semantic similarity between the question intention and the tool identification information of each function tool in the candidate tool set; The function tool whose semantic similarity is greater than or equal to a preset similarity threshold is used as the function tool to be called.

8. The privacy protection method for a large language model according to claim 6, further comprising: If it is determined that the intention type does not need to call a function tool, the current question data is input into the large language model, and the answer feedback data corresponding to the current question data is output.

9. According to the privacy protection method for a large language model of claim 1, the step of inputting the current question data into a pre-deployed large language model for intent recognition to determine the question intent corresponding to the current question data comprises: Acquire an intention recognition guidance template, and construct intention recognition guidance question data according to the intention recognition guidance template and the current question data; The intention recognition guided question data is input into the large language model to realize the intention recognition of the current question data and obtain the question intention corresponding to the current question data.

10. The privacy protection method for a large language model according to claim 1, wherein the step of determining the answer feedback data corresponding to the question data through the current question data, the callable function tool and the large language model comprises: Determine the feedback result required to answer the current question data according to the callable function tool; Answer prompt data is constructed using the current question data and the feedback result, and the answer prompt data is input into the large language model, and answer feedback data corresponding to the question data is output.

11. The privacy protection method for a large language model according to claim 10, wherein the step of determining the feedback result required to answer the current question data according to the callable function tool comprises: Determine a function parameter list corresponding to the callable function tool according to the current question data; Generate behavior request data through the callable function tool and each function parameter in the function parameter list; The feedback result corresponding to the current question data is retrieved based on the behavior request data.

12. The privacy protection method for a large language model according to claim 10, wherein the step of constructing answer prompt data using the current question data and the feedback result comprises: A preset answer prompt template is obtained, and the current question data and the feedback result are filled into the answer prompt template to obtain answer prompt data.

13. A privacy protection device for a large language model, comprising: A question intention determination module is used to obtain input current question data, and input the current question data into a pre-deployed large language model for intention recognition, to determine the question intention corresponding to the current question data; A function tool determination module, used to determine the function tool to be called according to the question intention; An authority verification module, used to verify the authority of the function tool to be called based on the user identification information associated with the current question data, and determine the callable function tool; The answer feedback data generating module is used to determine the answer feedback data corresponding to the current question data through the current question data, the callable function tool and the large language model.

14. A privacy protection system for a large language model, comprising: The client is used to obtain current question data and user identification information corresponding to the current question data; A server is deployed with a large language model, including a rights management database, a candidate function tool set, and a privacy protection device for a large language model as claimed in claim 13; wherein: The rights management database is used to verify or manage user access rights and tool calling rights; The candidate function tool set is used to configure the function tool; The privacy protection device for a large language model is used to implement the steps of the method as claimed in any one of claims 1 to 12.

15. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

16. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method as claimed in any one of claims 1 to 12.

17. A computer program product having at least one instruction stored thereon, characterized in that: When the at least one instruction is executed by the processor, the steps of the method described in any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • User privacy protection method and system

    CN109033846A

  • Government affair service remote collaboration method and device

    CN112597511A

  • Data processing method and device

    CN113177199A

  • Intention recognition method and system based on large language model and function call, medium and equipment

    CN117786064A

  • Information processing method and device based on large language model, storage medium and equipment

    CN118093813A

Cited By

  • User intention recognition system and method based on LLM large model

    CN119577125A

  • User intent recognition system and method based on LLM large model

    CN119577125B

  • Large model function calling method and device based on permission awareness and equipment set medium

    CN121116439A

  • Three-element linkage execution method and system for vehicle-mounted intelligent agent tool call

    CN122885894A

  • Data processing method and apparatus, and electronic device

    WO2026170710A1