Large language model sensitive information desensitization method and device, equipment and storage medium

Through multi-level processing of preset data desensitization, synthesis and verification strategies, the problem of poor desensitization of sensitive information in large language models in the prior art is solved, and more efficient and accurate protection of sensitive information is achieved.

CN119293843APending Publication Date: 2025-01-10XIAN SECLOVER INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411343082.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing large language model has poor comprehensive results in sensitive information desensitization methods, making it difficult to effectively protect sensitive information, resulting in high risk of information leakage.

Method used

Preset data desensitization strategies, synthesis strategies and verification strategies are adopted to carry out multi-level and multi-level data processing based on the user's sensitive information level, generate desensitization results, and calculate the semantic accuracy of the verification results through the information summary.

Benefits of technology

It improves the comprehensive effect of data desensitization, ensures the semantic accuracy of information after desensitization, and enhances the ability to protect sensitive information from large language models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293843A_ABST
    Figure CN119293843A_ABST
Patent Text Reader

Abstract

The invention discloses a large language model sensitive information desensitization method and device, equipment and a storage medium, and the method comprises the steps: carrying out the data desensitization of the original information of a current user through employing a preset data desensitization strategy under the condition that the sensitive information protection needs to be carried out according to the sensitive information level of the current user, generating a first processing result; performing data synthesis processing on the original information and the first processing result by adopting a preset data synthesis strategy to generate a second processing result; and performing data verification processing on the original information and the second processing result by adopting a preset data verification strategy to generate a third processing result, and generating a desensitization result based on the third processing result. According to the scheme, multi-level and multi-level data desensitization is performed by adopting the preset data desensitization strategy and the preset data synthesis strategy, so that the comprehensive effect of data desensitization is improved; and semantic-level calculation is performed on the information before and after data desensitization through the preset data verification strategy, so that the semantic accuracy after data desensitization is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a method, device, equipment and storage medium for desensitizing sensitive information of a large language model. Background Art

[0002] With the rapid development of Large Language Model (LLM) and related technologies, the leakage of sensitive information of LLM has attracted much attention. Malicious users may obtain and use sensitive information related to LLM for malicious purposes, for example, by obtaining personal identity information, business secrets or other valuable data to cause damage to individuals and organizations.

[0003] At present, with the increase in sensitive information leakage incidents of large language models, relevant AI regulatory agencies in various countries have clearly pointed out that sensitive information leakage of large language models will directly lead to property losses and reputation damage to users and enterprises, and have strengthened research on privacy data leakage caused by the use of large language models. Traditionally, when desensitizing sensitive information of large language models, the most studied and practical technologies include differential privacy, multi-party computing, and simulated data generation.

[0004] However, the above-mentioned large language model sensitive information desensitization method has the problem of poor overall effect. Summary of the invention

[0005] The present application aims to at least solve the technical problems existing in the prior art. To this end, the first aspect of the present application proposes a method for desensitizing sensitive information of a large language model, the method comprising:

[0006] In the case where sensitive information protection is required according to the current user's sensitive information level, a preset data desensitization strategy is used to perform data desensitization processing on the original information of the current user to generate a first processing result; wherein the first processing result includes the desensitized information, the information sensitivity category and the information sensitivity;

[0007] Performing data synthesis processing on the original information and the first processing result by using a preset data synthesis strategy to generate a second processing result; wherein the second processing result includes synthesized information, and the information sensitivity corresponding to the synthesized information is lower than the information sensitivity corresponding to the desensitized information;

[0008] A preset data verification strategy is used to perform data verification processing on the original information and the second processing result to generate a third processing result, and a large language model sensitive information desensitization result is generated based on the third processing result.

[0009] In a possible implementation, the process of constructing a preset data desensitization strategy includes:

[0010] Obtain multiple preset data desensitization levels; wherein each preset data desensitization level includes multiple preset data desensitization types;

[0011] Determine a first correspondence between each preset data desensitization level and each user's preset sensitive information level;

[0012] Obtain the preset system sensitivity level corresponding to each user;

[0013] A preset data desensitization strategy is constructed based on the user's relevant information, the preset data desensitization level, the preset sensitive information level, the first corresponding relationship and the preset system sensitivity level corresponding to the user.

[0014] In a possible implementation, the process of constructing the preset data synthesis strategy includes:

[0015] Acquire multiple preset information synthesis levels; wherein the preset information synthesis level is used to represent the importance of the large language model response information;

[0016] For each preset information synthesis level, obtaining a prompt word synthesis level corresponding to the preset information synthesis level;

[0017] Based on the user's preset sensitive information level, preset information synthesis level and prompt word synthesis level, a preset data synthesis strategy is constructed.

[0018] In a possible implementation manner, obtaining a prompt word synthesis level corresponding to a preset information synthesis level includes:

[0019] Get multiple prompt word templates;

[0020] A plurality of prompt word templates are mapped to a plurality of preset information synthesis levels to obtain a prompt word synthesis level corresponding to each preset information synthesis level.

[0021] In a possible implementation, based on the user's preset sensitive information level, preset information synthesis level, and prompt word synthesis level, a preset data synthesis strategy is constructed, including:

[0022] Determining a second correspondence between a preset sensitive information level of each user and a composite level of each preset information;

[0023] Obtain the preset system sensitivity level corresponding to each user;

[0024] A preset data synthesis strategy is constructed based on the user's relevant information, the preset sensitive information level, the preset information synthesis level, the second corresponding relationship and the preset system sensitivity level corresponding to the user.

[0025] In a possible implementation, a preset data verification strategy is used to perform data verification processing on the original information and the second processing result to generate a third processing result, including:

[0026] Perform information summary calculation on the original information and the desensitized information in the second processing result respectively, to obtain a first calculation result corresponding to the original information and a second calculation result corresponding to the desensitized information;

[0027] Calculating a similarity value between the first calculation result and the second calculation result;

[0028] Based on the similarity value and a preset similarity threshold, a third processing result is determined.

[0029] In a possible implementation, generating a large language model sensitive information desensitization result based on the third processing result includes:

[0030] If the third processing result is that the verification is passed, the synthesized information is used as the sensitive information desensitization result of the large language model;

[0031] If the third processing result fails the verification, then repeatedly perform the steps of performing data synthesis processing on the original information and the first processing result using the preset data synthesis strategy to generate a new second processing result, and performing data verification processing on the original information and the new second processing result using the preset data verification strategy to generate a new third processing result, and generating a large language model sensitive information desensitization result based on the new third processing result, until the new third processing result passes the verification.

[0032] The second aspect of the present application provides a large language model sensitive information desensitization device, the device comprising:

[0033] A first processing module is used to perform data desensitization processing on the original information of the current user using a preset data desensitization strategy when it is determined that sensitive information protection needs to be performed according to the current user's sensitive information level, and generate a first processing result; wherein the first processing result includes the desensitized information, the information sensitivity category and the information sensitivity;

[0034] A second processing module is used to perform data synthesis processing on the original information and the first processing result by using a preset data synthesis strategy to generate a second processing result; wherein the second processing result includes synthesized information, and the information sensitivity corresponding to the synthesized information is lower than the information sensitivity corresponding to the desensitized information;

[0035] The third processing module is used to perform data verification processing on the original information and the second processing result using a preset data verification strategy, generate a third processing result, and generate a large language model sensitive information desensitization result based on the third processing result.

[0036] In a possible implementation manner, the above-mentioned large language model sensitive information desensitization device is also used for:

[0037] Obtain multiple preset data desensitization levels; wherein each preset data desensitization level includes multiple preset data desensitization types;

[0038] Determine a first correspondence between each preset data desensitization level and each user's preset sensitive information level;

[0039] Obtain the preset system sensitivity level corresponding to each user;

[0040] A preset data desensitization strategy is constructed based on the user's relevant information, the preset data desensitization level, the preset sensitive information level, the first corresponding relationship and the preset system sensitivity level corresponding to the user.

[0041] In a possible implementation manner, the above-mentioned large language model sensitive information desensitization device is also used for:

[0042] Acquire multiple preset information synthesis levels; wherein the preset information synthesis level is used to represent the importance of the large language model response information;

[0043] For each preset information synthesis level, obtaining a prompt word synthesis level corresponding to the preset information synthesis level;

[0044] Based on the user's preset sensitive information level, preset information synthesis level and prompt word synthesis level, a preset data synthesis strategy is constructed.

[0045] In a possible implementation manner, the above-mentioned large language model sensitive information desensitization device is also used for:

[0046] Get multiple prompt word templates;

[0047] A plurality of prompt word templates are mapped to a plurality of preset information synthesis levels to obtain a prompt word synthesis level corresponding to each preset information synthesis level.

[0048] In a possible implementation manner, the above-mentioned large language model sensitive information desensitization device is also used for:

[0049] Determining a second correspondence between a preset sensitive information level of each user and a composite level of each preset information;

[0050] Obtain the preset system sensitivity level corresponding to each user;

[0051] A preset data synthesis strategy is constructed based on the user's relevant information, the preset sensitive information level, the preset information synthesis level, the second corresponding relationship and the preset system sensitivity level corresponding to the user.

[0052] In a possible implementation manner, the above-mentioned large language model sensitive information desensitization device is also used for:

[0053] Perform information summary calculation on the original information and the desensitized information in the second processing result respectively, to obtain a first calculation result corresponding to the original information and a second calculation result corresponding to the desensitized information;

[0054] Calculating a similarity value between the first calculation result and the second calculation result;

[0055] Based on the similarity value and a preset similarity threshold, a third processing result is determined.

[0056] In a possible implementation manner, the above-mentioned large language model sensitive information desensitization device is also used for:

[0057] If the third processing result is that the verification is passed, the synthesized information is used as the sensitive information desensitization result of the large language model;

[0058] If the third processing result fails the verification, then repeatedly perform the steps of performing data synthesis processing on the original information and the first processing result using the preset data synthesis strategy to generate a new second processing result, and performing data verification processing on the original information and the new second processing result using the preset data verification strategy to generate a new third processing result, and generating a large language model sensitive information desensitization result based on the new third processing result, until the new third processing result passes the verification.

[0059] The third aspect of the present application proposes an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the large language model sensitive information desensitization method as described in the first aspect.

[0060] In a fourth aspect, the present application proposes a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the large language model sensitive information desensitization method as described in the first aspect.

[0061] The embodiments of the present application have the following beneficial effects:

[0062] The method for desensitizing sensitive information of a large language model provided in an embodiment of the present application includes: when it is determined that sensitive information protection needs to be performed according to the current user's sensitive information level, a preset data desensitization strategy is used to perform data desensitization processing on the original information of the current user to generate a first processing result; a preset data synthesis strategy is used to perform data synthesis processing on the original information and the first processing result to generate a second processing result; a preset data verification strategy is used to perform data verification processing on the original information and the second processing result to generate a third processing result, and a large language model sensitive information desensitization result is generated based on the third processing result. This solution improves the comprehensive effect of data desensitization by performing multi-level and multi-layered data desensitization using a preset data desensitization strategy and a preset data synthesis strategy; in addition, a preset data verification strategy is used to perform semantic-level calculations on the information before and after data desensitization, thereby ensuring the accuracy of the semantics after data desensitization. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A block diagram of a computer device provided in an embodiment of the present application;

[0064] Figure 2 A flowchart of a method for desensitizing sensitive information of a large language model provided in an embodiment of the present application;

[0065] Figure 3 A flowchart of the steps for constructing a preset data desensitization strategy provided in an embodiment of the present application;

[0066] Figure 4 A flowchart of the steps for constructing a preset data synthesis strategy provided in an embodiment of the present application;

[0067] Figure 5 A flowchart of the steps for obtaining the synthesis level of prompt words provided in an embodiment of the present application;

[0068] Figure 6 A flowchart of the steps for generating a preset data synthesis strategy provided in an embodiment of the present application;

[0069] Figure 7 A flowchart of steps for generating a third processing result provided in an embodiment of the present application;

[0070] Figure 8 A structural block diagram of a large language model sensitive information desensitization device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0072] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "multiple" means two or more. In addition, the use of "based on" or "according to" means openness and inclusiveness, because the process, steps, calculations or other actions "based on" or "according to" one or more of the conditions or values ​​may be based on additional conditions or values ​​beyond the described values ​​in practice.

[0073] The large language model sensitive information desensitization method provided in the present application can be applied to computer devices (electronic devices). The computer device can be a server or a terminal. The server can be a single server or a server cluster composed of multiple servers. The embodiments of the present application do not specifically limit this. The terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices.

[0074] Take the computer device as a server as an example. Figure 1 A block diagram of a server is shown, such as Figure 1 As shown, the server may include a processor and a memory connected via a system bus. The processor of the server is used to provide computing and control capabilities. The memory of the server includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, a method for desensitizing sensitive information of a large language model is implemented.

[0075] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied. Optionally, the server may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0076] It should be noted that the execution subject of the embodiments of the present application can be a computer device or a large language model sensitive information desensitization device. The following method embodiments will be described using a computer device as the execution subject.

[0077] Figure 2 A flowchart of a method for desensitizing sensitive information in a large language model provided in an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0078] Step 202: When it is determined that sensitive information protection needs to be performed based on the current user's sensitive information level, a preset data desensitization strategy is used to perform data desensitization processing on the current user's original information to generate a first processing result.

[0079] Among them, Large Language Model (LLM) refers to a deep learning model trained with a large amount of text data, which can generate natural language text or understand the meaning of language text. Large language model can handle a variety of natural language tasks, such as text classification, question answering, dialogue, etc., and is an important path to artificial intelligence.

[0080] In response to the problem of sensitive information leakage in large language models, when desensitizing sensitive information in large language models, it is possible to first determine whether sensitive information protection is required based on the current user's sensitive information level. Optionally, the user's preset sensitive information level is determined by user level, user authority, user position, responsibilities and other information before construction. The user's preset sensitive information level can be recorded as y0. The user's preset sensitive information level can include multiple levels, of which the first level is the highest level, that is, the sensitive information can be viewed. After obtaining the current user's sensitive information level, it can be determined based on the current user's sensitive information level whether the current user can directly access sensitive information without desensitizing sensitive information. If sensitive information can be accessed, the result of the large language model is directly returned, otherwise sensitive information desensitization is required. Among them, the judgment criteria can be different according to different large language models. For example, the large language model within the enterprise may have permissions for internal employees, while other users do not have permissions.

[0081] When it is determined that sensitive information protection is required according to the current user's sensitive information level, a preset data desensitization strategy can be used to perform data desensitization processing on the current user's original information, thereby generating a first processing result. The first processing result may include desensitized information, information sensitivity category, and information sensitivity.

[0082] In some optional embodiments, Figure 3 As shown, Figure 3A flowchart of the steps for constructing a preset data desensitization strategy provided in an embodiment of the present application includes:

[0083] Step 302: Obtain multiple preset data desensitization levels.

[0084] Step 304: Determine a first correspondence between each preset data desensitization level and each user's preset sensitive information level.

[0085] Step 306: Obtain the preset system sensitivity level corresponding to each user.

[0086] Step 308: construct a preset data desensitization strategy based on the user's relevant information, the preset data desensitization level, the preset sensitive information level, the first corresponding relationship and the preset system sensitivity level corresponding to the user.

[0087] Among them, you can first build a variety of preset data desensitization types. The preset data desensitization type is the preset data desensitization method, which may include encryption, hiding, deletion of certain sensitive words, differential privacy calculation, etc.

[0088] Next, multiple preset data desensitization levels can be constructed based on multiple preset data desensitization types, and each preset data desensitization level includes multiple preset data desensitization types. Multiple preset data desensitization levels can be expressed as: r_levels = [lvs1, lvs2, ..., lvsk], where lvs(i) represents the i-th preset data desensitization level, and the value range of i is 1-k. In addition, lvs(i) = [lvs_types(m1), lvs_types(m2), ..., lvs_types(mt)], where lvs_types(j) represents the j-th preset data desensitization method, and the value range of j is m1-mt, that is, the i-th preset data desensitization level includes mt preset data desensitization types, that is, the preset data desensitization type can exist in the preset data desensitization level.

[0089] Thus, the preset sensitive information level y0 of the user and the preset data desensitization level r_levels can be configured to finally form a preset data desensitization strategy set, recorded as y_lvs. That is, for each level in the user sensitive information level y0, one or more preset data desensitization levels are matched thereto.

[0090] Specifically, a first correspondence between each preset data desensitization level and each user's preset sensitive information level can be determined first, wherein the user's preset sensitive information level y0 and the number of levels in the preset data desensitization level r_levels do not necessarily need to be the same. Optionally, each preset sensitive information level can correspond to more than two preset data desensitization levels.

[0091] Next, the preset system sensitivity level corresponding to each user can be obtained. The preset system sensitivity level is determined according to the sensitivity of the data in the current network system used by the user. Optionally, a corresponding preset system sensitivity level can be pre-set for each user, denoted as sys_level, and its value can include high and low. If the value of sys_level is set to high, then when a certain preset sensitive information level corresponds to multiple preset data desensitization levels, a high level among the multiple preset data desensitization levels is selected, otherwise a low level among the multiple preset data desensitization levels is selected. If there are multiple preset sensitive information levels, the highest and lowest preset data desensitization levels are selected respectively.

[0092] Finally, a preset data desensitization strategy can be constructed based on the user's relevant information, the preset data desensitization level, the preset sensitive information level, the first corresponding relationship, and the preset system sensitivity level corresponding to the user, which is recorded as y_lvs. Among them, the user's relevant information can be the user's identity information or other types of information. The preset data desensitization strategy can be expressed as: y_lvs = f(sys_level, x, y0(x), r_levels(x)), where x represents the user's relevant information; sys_level represents the preset system sensitivity level corresponding to the user; y0(x) represents the user's preset sensitive information level, and r_levels(x) represents the user's preset data desensitization level.

[0093] Step 204: Use a preset data synthesis strategy to perform data synthesis processing on the original information and the first processing result to generate a second processing result.

[0094] Among them, in some cases, after data desensitization, it is still necessary to perform information desensitization again. For example, in scenarios where desensitization is not thorough enough or the information sensitivity is extremely high, it is necessary to use a preset data synthesis strategy to perform information desensitization again. By using a preset data synthesis strategy to perform data synthesis processing on the original information and the first processing result, a second processing result can be generated. The second processing result may include synthesized information, and the information sensitivity corresponding to the synthesized information is lower than the information sensitivity corresponding to the desensitized information.

[0095] The above-mentioned preset data synthesis strategy also needs to be pre-built. In some optional embodiments, such as Figure 4 As shown, Figure 4 A flowchart of the steps of constructing a preset data synthesis strategy provided in an embodiment of the present application includes:

[0096] Step 402: Obtain multiple preset information synthesis levels.

[0097] Step 404: For each preset information synthesis level, obtain a prompt word synthesis level corresponding to the preset information synthesis level.

[0098] Step 406: construct a preset data synthesis strategy based on the user's preset sensitive information level, preset information synthesis level, and prompt word synthesis level.

[0099] The preset information synthesis level is used to characterize the importance of the large language model response information. The preset information synthesis level is recorded as y10, which includes [y10_L1, y10_L2, …, y10_Ln], a total of n levels, each level corresponds to the importance of the large language model response information. The user's preset sensitive information level y0 is not necessarily the same as the number of levels in the preset information synthesis level y10. Each preset sensitive information level can correspond to at least two preset information synthesis levels.

[0100] Next, for each preset information synthesis level, the prompt word synthesis level corresponding to the preset information synthesis level can be obtained. In some optional embodiments, for example Figure 5 As shown, Figure 5 A flowchart of steps for obtaining a synthesis level of a prompt word provided in an embodiment of the present application includes:

[0101] Step 502: Acquire multiple prompt word templates.

[0102] Step 504: Map multiple prompt word templates to multiple preset information synthesis levels to obtain prompt word synthesis levels corresponding to each preset information synthesis level.

[0103] Among them, the prompt word templates for each preset information synthesis level can be pre-constructed. For example, a prompt word template corresponding to the initial level can be constructed for the preset information synthesis level y10_L1. The prompt word template only uses the response information returned by the LLM interaction before the data desensitization processing as part of the question information. The prompt word templates constructed for other preset information synthesis levels must clearly indicate that the response information of the last LLM needs to be given priority consideration.

[0104] Then, multiple prompt word templates are mapped to multiple preset information synthesis levels, that is, prompt word synthesis levels corresponding to each preset information synthesis level are obtained after corresponding. Thus, a preset data synthesis strategy can be constructed based on the user's preset sensitive information level, preset information synthesis level and prompt word synthesis level.

[0105] In some optional embodiments, Figure 6 As shown, Figure 6 A flowchart of the steps of generating a preset data synthesis strategy provided in an embodiment of the present application includes:

[0106] Step 602: Determine a second correspondence between the preset sensitive information level of each user and the preset information synthesis level.

[0107] Step 604: Obtain the preset system sensitivity level corresponding to each user.

[0108] Step 606: construct a preset data synthesis strategy based on the user's relevant information, the preset sensitive information level, the preset information synthesis level, the second corresponding relationship and the preset system sensitivity level corresponding to the user.

[0109] Among them, the second corresponding relationship between each user's preset sensitive information level and each preset information synthesis level can be determined first. The number of each user's preset sensitive information level y0 and each preset information synthesis level y10 does not necessarily need to be the same. Optionally, each preset sensitive information level can correspond to more than two preset information synthesis levels.

[0110] In addition, it is also necessary to obtain the preset system sensitivity level corresponding to each user. Optionally, a corresponding preset system sensitivity level can be pre-set for each user, recorded as sys_level, and its value can include high and low. If the value of sys_level is set to high, then when a preset sensitive information level corresponds to multiple preset information synthesis levels, the high level among the multiple preset information synthesis levels is selected, otherwise the low level among the multiple preset information synthesis levels is selected. If there are multiple preset sensitive information levels, the highest and lowest preset information synthesis levels are selected respectively.

[0111] Finally, a preset data synthesis strategy can be constructed based on the user's relevant information, the preset sensitive information level, the preset information synthesis level, the second corresponding relationship, and the preset system sensitivity level corresponding to the user, which is recorded as y_lcs. Among them, the user's relevant information can be the user's identity information or other types of information. The preset data synthesis strategy can be expressed as: y_lcs = g(sys_level, x, y0(x), y10(x)), where x represents the user's relevant information; sys_level represents the preset system sensitivity level corresponding to the user; y0(x) represents the user's preset sensitive information level, and y10(x) represents the user's preset information synthesis level.

[0112] By dynamically setting different preset data synthesis strategies for different preset sensitive information levels, we can further ensure that sensitive information is not leaked while reducing unnecessary data synthesis costs.

[0113] Step 206: Use a preset data verification strategy to perform data verification processing on the original information and the second processing result to generate a third processing result, and generate a large language model sensitive information desensitization result based on the third processing result.

[0114] Among them, the preset data verification strategy is mainly used to verify whether the desensitized information is substantially different from the original information after the data desensitization and data synthesis processing steps. If the difference is too large, corresponding prompt information will be given for users to identify.

[0115] In some optional embodiments, Figure 7 As shown, Figure 7 A flowchart of steps for generating a third processing result provided in an embodiment of the present application includes:

[0116] Step 702: perform information summary calculation on the original information and the desensitized information in the second processing result, respectively, to obtain a first calculation result corresponding to the original information and a second calculation result corresponding to the desensitized information.

[0117] Step 704: Calculate a similarity value between the first calculation result and the second calculation result.

[0118] Step 706: Determine a third processing result based on the similarity value and a preset similarity threshold.

[0119] The original information is the information before data desensitization, which is recorded as answer_old. After calculating the information summary, the first calculation result corresponding to the original information is obtained, which is recorded as answer_old_s. The desensitized information in the second processing result is recorded as answer_new. After calculating the information summary, the second calculation result corresponding to the desensitized information is obtained, which is recorded as answer_new_s. Optionally, the embodiment of the present application does not limit the specific algorithm for calculating the information summary.

[0120] Next, a similarity value between the first calculation result and the second calculation result may be calculated. Optionally, a cosine similarity algorithm may be used to calculate the similarity value between the first calculation result and the second calculation result, which is recorded as similary_c.

[0121] Thus, the third processing result can be determined based on the similarity value and the preset similarity threshold. Optionally, the magnitude relationship between the similarity value similar_c and the preset similarity threshold similar0 can be determined, wherein the preset similarity threshold similar0 can be customized according to the actual scene. The third processing result obtained is the magnitude relationship between the similarity value and the preset similarity threshold.

[0122] When generating a sensitive information desensitization result of a large language model based on the third processing result, if the third processing result passes the verification, the synthesized information is used as the sensitive information desensitization result of the large language model; if the third processing result fails the verification, the steps of performing data synthesis processing on the original information and the first processing result using a preset data synthesis strategy to generate a new second processing result, and performing data verification processing on the original information and the new second processing result using a preset data verification strategy to generate a new third processing result, and generating a sensitive information desensitization result of a large language model based on the new third processing result are repeated until the new third processing result passes the verification.

[0123] Among them, if the similarity value similar_c is not less than the preset similarity threshold similar0, the verification is passed, and the synthesized information can be used as the sensitive information desensitization result of the large language model.

[0124] If the similarity value similary_c is less than the preset similarity threshold value similary0, the verification fails, and a prompt similar to "largely different from the original information, please carefully identify" can be added to the desensitized information answer_new. In addition, the steps of using the preset data synthesis strategy to perform data synthesis processing on the original information and the first processing result to generate a new second processing result, and using the preset data verification strategy to perform data verification processing on the original information and the new second processing result to generate a new third processing result, and generating a large language model sensitive information desensitization result based on the new third processing result can be repeatedly executed until the new third processing result passes the verification.

[0125] Optionally, a maximum number of repeated executions may be pre-set. In the process of repeatedly executing the process of performing data synthesis processing on the original information and the first processing result using a preset data synthesis strategy to generate a new second processing result, and performing data verification processing on the original information and the new second processing result using a preset data verification strategy to generate a new third processing result, and generating a large language model sensitive information desensitization result based on the new third processing result, if the maximum number of repeated executions is reached, the loop is stopped.

[0126] The present application provides a method for desensitizing sensitive information of a large language model, the method comprising: when it is determined that sensitive information protection is required according to the current user's sensitive information level, using a preset data desensitization strategy to perform data desensitization processing on the original information of the current user to generate a first processing result; using a preset data synthesis strategy to perform data synthesis processing on the original information and the first processing result to generate a second processing result; using a preset data verification strategy to perform data verification processing on the original information and the second processing result to generate a third processing result, and generating a large language model sensitive information desensitization result based on the third processing result. This solution improves the comprehensive effect of data desensitization by performing multi-level and multi-layered data desensitization using a preset data desensitization strategy and a preset data synthesis strategy; in addition, the semantic-level calculation of the information before and after data desensitization is performed through a preset data verification strategy, thereby ensuring the accuracy of the semantics after data desensitization.

[0127] Figure 8 A structural block diagram of a large language model sensitive information desensitization device provided in an embodiment of the present application.

[0128] like Figure 8 As shown, the large language model sensitive information desensitization device 800 includes:

[0129] The first processing module 802 is used to perform data desensitization processing on the original information of the current user by using a preset data desensitization strategy when it is determined that sensitive information protection is required according to the current user's sensitive information level, and generate a first processing result; wherein the first processing result includes the desensitized information, information sensitivity category and information sensitivity.

[0130] The second processing module 804 is used to perform data synthesis processing on the original information and the first processing result using a preset data synthesis strategy to generate a second processing result; wherein the second processing result includes synthesized information, and the information sensitivity corresponding to the synthesized information is lower than the information sensitivity corresponding to the desensitized information.

[0131] The third processing module 806 is used to perform data verification processing on the original information and the second processing result using a preset data verification strategy to generate a third processing result, and generate a large language model sensitive information desensitization result based on the third processing result.

[0132] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here. Each module in the above-mentioned large language model sensitive information desensitization device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations of the above modules.

[0133] In one embodiment of the present application, a computer device is provided, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0134] In the case where sensitive information protection is required according to the current user's sensitive information level, a preset data desensitization strategy is used to perform data desensitization processing on the original information of the current user to generate a first processing result; wherein the first processing result includes the desensitized information, the information sensitivity category and the information sensitivity;

[0135] Performing data synthesis processing on the original information and the first processing result by using a preset data synthesis strategy to generate a second processing result; wherein the second processing result includes synthesized information, and the information sensitivity corresponding to the synthesized information is lower than the information sensitivity corresponding to the desensitized information;

[0136] A preset data verification strategy is used to perform data verification processing on the original information and the second processing result to generate a third processing result, and a large language model sensitive information desensitization result is generated based on the third processing result.

[0137] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0138] Obtain multiple preset data desensitization levels; wherein each preset data desensitization level includes multiple preset data desensitization types;

[0139] Determine a first correspondence between each preset data desensitization level and each user's preset sensitive information level;

[0140] Obtain the preset system sensitivity level corresponding to each user;

[0141] A preset data desensitization strategy is constructed based on the user's relevant information, the preset data desensitization level, the preset sensitive information level, the first corresponding relationship and the preset system sensitivity level corresponding to the user.

[0142] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0143] Acquire multiple preset information synthesis levels; wherein the preset information synthesis level is used to represent the importance of the large language model response information;

[0144] For each preset information synthesis level, obtaining a prompt word synthesis level corresponding to the preset information synthesis level;

[0145] Based on the user's preset sensitive information level, preset information synthesis level and prompt word synthesis level, a preset data synthesis strategy is constructed.

[0146] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0147] Get multiple prompt word templates;

[0148] A plurality of prompt word templates are mapped to a plurality of preset information synthesis levels to obtain a prompt word synthesis level corresponding to each preset information synthesis level.

[0149] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0150] Determining a second correspondence between a preset sensitive information level of each user and a composite level of each preset information;

[0151] Obtain the preset system sensitivity level corresponding to each user;

[0152] A preset data synthesis strategy is constructed based on the user's relevant information, the preset sensitive information level, the preset information synthesis level, the second corresponding relationship and the preset system sensitivity level corresponding to the user.

[0153] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0154] Perform information summary calculation on the original information and the desensitized information in the second processing result respectively, to obtain a first calculation result corresponding to the original information and a second calculation result corresponding to the desensitized information;

[0155] Calculating a similarity value between the first calculation result and the second calculation result;

[0156] Based on the similarity value and a preset similarity threshold, a third processing result is determined.

[0157] In one embodiment of the present application, when the processor executes the computer program, the processor further implements the following steps:

[0158] If the third processing result is that the verification is passed, the synthesized information is used as the sensitive information desensitization result of the large language model;

[0159] If the third processing result fails the verification, then repeatedly perform the steps of performing data synthesis processing on the original information and the first processing result using the preset data synthesis strategy to generate a new second processing result, and performing data verification processing on the original information and the new second processing result using the preset data verification strategy to generate a new third processing result, and generating a large language model sensitive information desensitization result based on the new third processing result, until the new third processing result passes the verification.

[0160] The computer device provided in the embodiment of the present application has similar implementation principles and technical effects to those of the above-mentioned method embodiment, and will not be described in detail here.

[0161] In one embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0162] In the case where sensitive information protection is required according to the current user's sensitive information level, a preset data desensitization strategy is used to perform data desensitization processing on the original information of the current user to generate a first processing result; wherein the first processing result includes the desensitized information, the information sensitivity category and the information sensitivity;

[0163] Performing data synthesis processing on the original information and the first processing result by using a preset data synthesis strategy to generate a second processing result; wherein the second processing result includes synthesized information, and the information sensitivity corresponding to the synthesized information is lower than the information sensitivity corresponding to the desensitized information;

[0164] A preset data verification strategy is used to perform data verification processing on the original information and the second processing result to generate a third processing result, and a large language model sensitive information desensitization result is generated based on the third processing result.

[0165] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0166] Obtain multiple preset data desensitization levels; wherein each preset data desensitization level includes multiple preset data desensitization types;

[0167] Determine a first correspondence between each preset data desensitization level and each user's preset sensitive information level;

[0168] Obtain the preset system sensitivity level corresponding to each user;

[0169] A preset data desensitization strategy is constructed based on the user's relevant information, the preset data desensitization level, the preset sensitive information level, the first corresponding relationship and the preset system sensitivity level corresponding to the user.

[0170] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0171] Acquire multiple preset information synthesis levels; wherein the preset information synthesis level is used to represent the importance of the large language model response information;

[0172] For each preset information synthesis level, obtaining a prompt word synthesis level corresponding to the preset information synthesis level;

[0173] Based on the user's preset sensitive information level, preset information synthesis level and prompt word synthesis level, a preset data synthesis strategy is constructed.

[0174] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0175] Get multiple prompt word templates;

[0176] A plurality of prompt word templates are mapped to a plurality of preset information synthesis levels to obtain a prompt word synthesis level corresponding to each preset information synthesis level.

[0177] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0178] Determining a second correspondence between a preset sensitive information level of each user and a composite level of each preset information;

[0179] Obtain the preset system sensitivity level corresponding to each user;

[0180] A preset data synthesis strategy is constructed based on the user's relevant information, the preset sensitive information level, the preset information synthesis level, the second corresponding relationship and the preset system sensitivity level corresponding to the user.

[0181] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0182] Perform information summary calculation on the original information and the desensitized information in the second processing result respectively, to obtain a first calculation result corresponding to the original information and a second calculation result corresponding to the desensitized information;

[0183] Calculating a similarity value between the first calculation result and the second calculation result;

[0184] Based on the similarity value and a preset similarity threshold, a third processing result is determined.

[0185] In one embodiment of the present application, when the computer program is executed by a processor, the following steps are further implemented:

[0186] If the third processing result is that the verification is passed, the synthesized information is used as the sensitive information desensitization result of the large language model;

[0187] If the third processing result fails the verification, then repeatedly perform the steps of performing data synthesis processing on the original information and the first processing result using the preset data synthesis strategy to generate a new second processing result, and performing data verification processing on the original information and the new second processing result using the preset data verification strategy to generate a new third processing result, and generating a large language model sensitive information desensitization result based on the new third processing result, until the new third processing result passes the verification.

[0188] The computer-readable storage medium provided in this embodiment has similar implementation principles and technical effects to those of the above method embodiments, and will not be described in detail here.

[0189] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0190] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0191] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for desensitizing sensitive information of a large language model, characterized in that: The method comprises: In the case where it is determined that sensitive information protection needs to be performed according to the current user's sensitive information level, a preset data desensitization strategy is used to perform data desensitization processing on the original information of the current user to generate a first processing result; wherein the first processing result includes the desensitized information, the information sensitivity category and the information sensitivity; Performing data synthesis processing on the original information and the first processing result by adopting a preset data synthesis strategy to generate a second processing result; wherein the second processing result includes synthesized information, and the information sensitivity corresponding to the synthesized information is lower than the information sensitivity corresponding to the desensitized information; A preset data verification strategy is used to perform data verification processing on the original information and the second processing result to generate a third processing result, and a large language model sensitive information desensitization result is generated based on the third processing result.

2. The method according to claim 1, characterized in that The process of constructing the preset data desensitization strategy includes: Obtain multiple preset data desensitization levels; wherein each of the preset data desensitization levels includes multiple preset data desensitization types; Determining a first corresponding relationship between each of the preset data desensitization levels and each user's preset sensitive information level; Obtain the preset system sensitivity level corresponding to each user; The preset data desensitization strategy is constructed based on the relevant information of the user, the preset data desensitization level, the preset sensitive information level, the first corresponding relationship and the preset system sensitivity level corresponding to the user.

3. The method according to claim 1 or 2, characterized in that: The construction process of the preset data synthesis strategy includes: Acquire multiple preset information synthesis levels; wherein the preset information synthesis level is used to represent the importance of the large language model response information; For each of the preset information synthesis levels, obtaining a prompt word synthesis level corresponding to the preset information synthesis level; The preset data synthesis strategy is constructed based on the preset sensitive information level of the user, the preset information synthesis level and the prompt word synthesis level.

4. The method according to claim 3, characterized in that The obtaining of the prompt word synthesis level corresponding to the preset information synthesis level includes: Get multiple prompt word templates; The plurality of prompt word templates are mapped to the plurality of preset information synthesis levels to obtain prompt word synthesis levels corresponding to the preset information synthesis levels.

5. The method according to claim 3 or 4, characterized in that: The step of constructing the preset data synthesis strategy based on the preset sensitive information level of the user, the preset information synthesis level and the prompt word synthesis level includes: Determining a second correspondence between the preset sensitive information level of each of the users and the composite level of each of the preset information; Obtain the preset system sensitivity level corresponding to each user; The preset data synthesis strategy is constructed based on the relevant information of the user, the preset sensitive information level, the preset information synthesis level, the second corresponding relationship and the preset system sensitivity level corresponding to the user.

6. The method according to claim 1 or 2, characterized in that: The adopting a preset data verification strategy to perform data verification processing on the original information and the second processing result to generate a third processing result includes: Performing information summary calculation on the original information and the desensitized information in the second processing result respectively, to obtain a first calculation result corresponding to the original information and a second calculation result corresponding to the desensitized information; Calculating a similarity value between the first calculation result and the second calculation result; Based on the similarity value and a preset similarity threshold, the third processing result is determined.

7. The method according to claim 1 or 2, characterized in that: The generating a large language model sensitive information desensitization result based on the third processing result includes: If the third processing result is that the verification is passed, the synthesized information is used as the sensitive information desensitization result of the large language model; If the third processing result fails the verification, then the steps of performing data synthesis processing on the original information and the first processing result using the preset data synthesis strategy to generate a new second processing result, performing data verification processing on the original information and the new second processing result using the preset data verification strategy to generate a new third processing result, and generating a large language model sensitive information desensitization result based on the new third processing result are repeated until the new third processing result passes the verification.

8. A large language model sensitive information desensitization device, characterized in that: The device comprises: A first processing module, configured to perform data desensitization processing on the original information of the current user using a preset data desensitization strategy when it is determined that sensitive information protection is required according to the current user's sensitive information level, and generate a first processing result; wherein the first processing result includes desensitized information, information sensitivity category, and information sensitivity; A second processing module, configured to perform data synthesis processing on the original information and the first processing result by adopting a preset data synthesis strategy to generate a second processing result; wherein the second processing result includes synthesized information, and the information sensitivity corresponding to the synthesized information is lower than the information sensitivity corresponding to the desensitized information; The third processing module is used to perform data verification processing on the original information and the second processing result by adopting a preset data verification strategy to generate a third processing result, and generate a large language model sensitive information desensitization result based on the third processing result.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the large language model sensitive information desensitization method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the large language model sensitive information desensitization method as described in any one of claims 1-7.