Data privacy processing methods, devices, electronic devices, media and program products

By desensitizing the target inference text on the user terminal and controlling the display strategy according to user attributes, the problem of sensitive information leakage in cross-domain large model services is solved. This reduces the risk of privacy leakage and ensures semantic preservation and access control without affecting the execution of inference tasks.

CN123069436APending Publication Date: 2026-11-10CHINA UNIONPAY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611358808.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing data security measures are insufficient to cover real-time generated natural language input, which may lead to sensitive information being directly obtained by model service providers or recovered through reverse inference via intermediate representations in cross-domain large model services, posing a risk of privacy leakage.

Method used

The target inference text is anonymized on the user terminal, and the anonymized text is transmitted to the server. The display strategy is determined based on the user attributes. The anonymized inference result is only allowed to be displayed when the user attributes meet the access control policy.

Benefits of technology

It effectively reduces the risk of sensitive information leakage in cross-domain large model services, and achieves a balance between semantic preservation and privacy protection without affecting the execution of inference tasks, ensuring that users with different permissions can only view the inference results that match their permissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123069436A_ABST
    Figure CN123069436A_ABST
Patent Text Reader

Abstract

This application provides a data privacy processing method, apparatus, electronic device, medium, and program product. It relates to privacy protection technology. The method includes: upon receiving a user's inference request for target inference text, obtaining the anonymized inference result of the target inference text returned by the target inference model deployed on the server; the anonymized inference result is obtained by the target inference model based on the anonymized text obtained by anonymizing the target inference text on the user's terminal; determining the display strategy of the anonymized inference result on the user's terminal according to the user's attribute set, and displaying it according to the display strategy; the display strategy includes displaying the anonymized inference result, or displaying the restored inference result obtained after restoring the anonymized inference result. This method achieves both the availability of inference services and the privacy protection and controllable display of sensitive information in cross-domain large model services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of privacy protection technology, and in particular to a data privacy processing method, apparatus, electronic device, medium, and program product. Background Technology

[0002] With the widespread application of cross-domain large-scale model services in the financial industry, users input a large amount of sensitive information, such as identity characteristics, asset size, and investment preferences, through natural language in scenarios such as robo-advisors, financial customer service, and risk assessment. When this natural language input enters the server-side large-scale model inference process, it is usually transmitted directly to the model server without special processing.

[0003] Existing data security measures are insufficient to cover real-time generated natural language input and lack fine-grained permission display mechanisms for large model inference results. This means that sensitive information may be directly obtained by model service providers or recovered through reverse inference using intermediate representations, leading to privacy leakage risks. Summary of the Invention

[0004] This application provides data privacy processing methods, apparatus, electronic devices, media, and program products. The target inference text is anonymized on the user terminal before being transmitted to the server for inference. A display strategy for the anonymized inference results is determined based on a set of user attributes, thereby reducing the risk of server-side privacy leakage. Furthermore, users with different permissions can only view inference results matching their permissions, thus meeting business needs while preventing unauthorized leakage of sensitive information.

[0005] In a first aspect, embodiments of this application provide a data privacy processing method, applied to a user terminal, comprising:

[0006] Upon receiving a user's reasoning request for target reasoning text, the system obtains the anonymized reasoning result of the target reasoning text from the target reasoning model deployed on the server. The anonymized reasoning result is obtained by the target reasoning model based on the anonymized text corresponding to the target reasoning text. The anonymized text is obtained by the user terminal after anonymizing the target reasoning text. The anonymization process applies differentiated anonymization methods to different sensitive categories of words in the target reasoning text.

[0007] Based on the user's attribute set, a display strategy for the anonymized inference result on the user's terminal is determined, and the result is displayed according to the display strategy. The display strategy includes displaying the anonymized inference result, or displaying the restored inference result obtained after restoring the anonymized inference result.

[0008] In one possible implementation, receiving a user's reasoning request for the target reasoning text includes:

[0009] Obtain the target reasoning text input by the user, and determine the sensitive word elements in the target reasoning text;

[0010] Based on the sensitive information type of the sensitive word element, the sensitive word element is desensitized using a desensitization processing method corresponding to the sensitive information type to obtain the desensitized word element;

[0011] Based on the desensitized words and the non-sensitive words in the target reasoning text, a desensitized text corresponding to the target reasoning text is generated.

[0012] In one possible implementation, before desensitizing the sensitive word element according to its sensitive information type and using a desensitization processing method corresponding to the sensitive information type to obtain the desensitized word element, the method further includes:

[0013] For each sensitive word in the target inference text, the sensitive information type of the sensitive word is identified based on its semantic features and / or format features; wherein the sensitive information type includes at least one of semantic type, numerical type and identifier type.

[0014] In one possible implementation, if the sensitive word element includes a sensitive numerical value, the sensitive word element is desensitized using a desensitization processing method corresponding to the sensitive information type to obtain desensitized word elements, including:

[0015] Identify the numerical unit of the sensitive value in the sensitive word character, and convert the sensitive value into a value expressed in the base unit according to the preset conversion relationship between the numerical unit and the base unit to obtain a normalized value.

[0016] Obtain the value protection interval, the mapping output interval, and the preset mapping expression corresponding to the normalized value. Based on the preset mapping expression, map the normalized value from the value protection interval to the mapping output interval to obtain the initial mapping value.

[0017] The initial mapping value is perturbed by a preset controlled random perturbation factor to obtain a desensitized value; wherein the controlled random perturbation factor randomly takes values ​​within a preset perturbation range, and the desensitized value is the value obtained by truncating the product of the initial mapping value and the controlled random perturbation factor, wherein the truncation process is used to limit the value to the mapping output range.

[0018] Based on the desensitized values, desensitized word elements corresponding to the sensitive word elements are generated.

[0019] In one possible implementation, if a sensitive word element includes sensitive semantics, the sensitive word element is desensitized using a desensitization processing method corresponding to the sensitive information type to obtain desensitized word elements, including:

[0020] Based on the sensitive semantics in the sensitive word elements, determine multiple initial candidate words that match the sensitive semantics from a preset semantic proximity lexicon;

[0021] Determine the sampling probability of each of the initial candidate words, and select at least one sampling candidate word from the plurality of initial candidate words according to the sampling probability;

[0022] For each of the sampled candidate words, a comprehensive score is calculated for the sampled candidate word relative to the sensitive word element; wherein, the comprehensive score is positively correlated with the semantic usability score and negatively correlated with the sensitive disclosure risk score; the semantic usability score characterizes the degree to which the sampled candidate word supports the target inference model in completing the inference task; the sensitive disclosure risk score characterizes the degree of risk that the sampled candidate word exposes user privacy;

[0023] Based on the comprehensive score of each of the sampled candidate words, a target candidate word is determined from the at least one sampled candidate word;

[0024] Based on the target candidate words, desensitized word elements corresponding to the sensitive word elements are generated.

[0025] In one possible implementation, if a sensitive word element includes a sensitive identifier, the sensitive word element is desensitized using a desensitization processing method corresponding to the sensitive information type to obtain a desensitized word element, including:

[0026] Determine the identifier type of the sensitive identifier in the sensitive word element, and determine the identifier desensitization method corresponding to the sensitive identifier based on the identifier type and the preset mapping relationship between the identifier type and the identifier desensitization method;

[0027] Determine the identifier type of the sensitive identifier in the sensitive word element;

[0028] Based on the mapping relationship between the identifier type and the preset identifier type and identifier desensitization method, the identifier desensitization method corresponding to the sensitive identifier is determined;

[0029] The sensitive identifier is desensitized using the aforementioned identifier desensitization method to obtain the desensitized identifier;

[0030] Based on the desensitized identifier, the desensitized word elements corresponding to the sensitive word elements are generated.

[0031] In one possible implementation, if a sensitive word element includes a sensitive identifier, the sensitive word element is desensitized using a desensitization processing method corresponding to the sensitive information type to obtain a desensitized word element, including:

[0032] Determine the identifier type and format constraint rules corresponding to the sensitive identifier; the format constraint rules are used to limit the character length, character set, prefix and / or verification rules that the identifier type should satisfy;

[0033] Based on the identifier type, the format constraint rules, the inference identifier of the inference request, and the associativity strategy of the inference request, a random pseudo-identifier corresponding to the sensitive identifier is generated; wherein, the inference identifier is a unique identifier used to identify the inference request, and the associativity strategy of the inference request is used to control whether the same sensitive identifier is mapped to the same random pseudo-identifier in the inference process corresponding to different inference identifiers; the random pseudo-identifier satisfies the format constraint rules, does not repeat other desensitized identifiers generated in the inference process corresponding to the inference identifier, and does not contain any partial characters of the sensitive identifier;

[0034] Obtain the business status record corresponding to the sensitive identifier, and generate non-sensitive business status description information corresponding to the sensitive identifier based on the business status record; the business status record includes at least one of the identity verification status, account status, and contract qualification of the sensitive identifier, but does not include the sensitive identifier itself;

[0035] Based on the random pseudo-identifier and the non-sensitive business status description information, generate the de-identified word elements corresponding to the sensitive word elements.

[0036] In one possible implementation, after obtaining the desensitized lexical units, the method further includes:

[0037] For each sensitive word, a desensitization mapping record is generated corresponding to the sensitive word; the mapping record includes the desensitized word of the sensitive word, the sensitive information type, the position index, the encryption result of the original value of the sensitive word, and the access permission; wherein, the encryption result is obtained by performing attribute-based encryption on the original value, and the access permission is used to control the restoration permission of the original value;

[0038] The desensitization mapping record is used to restore the desensitized words in the desensitization reasoning result after receiving the desensitization reasoning result from the target reasoning model.

[0039] In one possible implementation, determining the display strategy of the de-identified inference result on the user's terminal based on the user's attribute set includes:

[0040] Match the attribute set with the access permissions in the de-identified mapping record;

[0041] If the attribute set satisfies the access permissions, the display strategy is determined to be to display the restored inference result obtained after restoring the desensitized inference result;

[0042] If the attribute set does not satisfy the access permissions, the display strategy is determined to be to display the de-identified reasoning result.

[0043] In one possible implementation, displaying according to the display strategy includes:

[0044] When the display strategy is to display the restored inference result obtained after restoring the desensitized inference result, the encryption result in the desensitized mapping record corresponding to the desensitized word in the desensitized inference result is decrypted to restore the original value of the corresponding sensitive word.

[0045] Based on the restored original values, the desensitized words in the desensitized inference results are restored to obtain the restored inference results, and the restored inference results are displayed.

[0046] In one possible implementation, after displaying the desensitization inference results, the method further includes:

[0047] In response to a user's request to view sensitive information, the user is authenticated.

[0048] If the authentication is successful, obtain temporary decryption authorization;

[0049] Based on the temporary decryption authorization, the restored reasoning result obtained after restoring the desensitized reasoning result is displayed.

[0050] Secondly, embodiments of this application provide a data privacy processing apparatus, including: applied to a user terminal, comprising:

[0051] The inference processing module is used to obtain the anonymized inference result of the target inference text from the target inference model deployed on the server when receiving a user's inference request for the target inference text; the anonymized inference result is obtained by the target inference model based on the anonymized text corresponding to the target inference text; the anonymized text is obtained by the user terminal after anonymizing the target inference text; the anonymization processing applies differentiated anonymization processing methods to different sensitive categories of words in the target inference text;

[0052] The inference result display module is used to determine the display strategy of the de-identified inference result on the user terminal based on the user's attribute set, and to display it according to the display strategy; the display strategy includes displaying the de-identified inference result, or displaying the restored inference result obtained after restoring the de-identified inference result.

[0053] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0054] The memory stores computer-executed instructions;

[0055] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0056] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0057] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0058] The data privacy processing method, apparatus, electronic device, medium, and program products provided in this application, before transmitting the target inference text to the server, first perform desensitization processing on the target inference text locally to obtain desensitized text. This ensures that the target inference model on the server can only access the desensitized text and cannot obtain the original sensitive information throughout the entire inference process. Therefore, it eliminates the risk of natural language input being directly exposed to the model service provider and the risk of recovering the original data through reverse inference using intermediate representations. In other words, it effectively reduces the risk of sensitive information leakage in cross-domain large model services without affecting the execution of the inference task. In addition, the above-mentioned desensitization processing adopts corresponding differentiated desensitization methods for different sensitive categories of words in the target inference text. This allows each category of words to obtain a targeted balance between privacy protection and semantic preservation based on its own data characteristics and business attributes. It avoids the impact on model inference accuracy due to the destruction of semantic structure caused by excessively coarse desensitization granularity, and also avoids the weakening of protection effectiveness due to the retention of sensitive information caused by excessively fine desensitization granularity. Thus, it finds the best balance between security and usability for various types of words. Meanwhile, after the server returns the de-identified inference results, the user terminal determines the display strategy based on the user's attribute set. The restored display is only allowed when the user attributes meet the access control policy; otherwise, only the de-identified results are displayed. This ensures that users with different permissions can only view the inference results that match their permissions, thus meeting business needs while preventing unauthorized leakage of sensitive information. Attached Figure Description

[0059] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0060] Figure 1 A schematic diagram illustrating a scenario for the data privacy protection method provided in this application;

[0061] Figure 2 A flowchart illustrating the data privacy processing method provided in this application;

[0062] Figure 3 This is a schematic diagram illustrating another data privacy processing procedure provided in an embodiment of this application.

[0063] Figure 4 A schematic diagram of the data privacy protection device provided in this application;

[0064] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.

[0065] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0066] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0067] The collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0068] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of the relevant data shall comply with relevant laws, regulations and standards, and corresponding operation entry points shall be provided for users to choose to authorize or refuse.

[0069] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, they do not mean that the applicant has used or necessarily used the solution.

[0070] With the widespread application of cross-domain large-scale model services in the financial industry, users input a large amount of sensitive information, such as identity characteristics, asset size, and investment preferences, through natural language in scenarios such as robo-advisors, financial customer service, and risk assessment. When this natural language input enters the server-side large-scale model inference process, it is usually transmitted directly to the model server without special processing.

[0071] Existing data security measures are insufficient to cover real-time generated natural language input and lack fine-grained permission display mechanisms for large model inference results. This means that sensitive information may be directly obtained by model service providers or recovered through reverse inference using intermediate representations, leading to privacy leakage risks.

[0072] To address the aforementioned technical issues, this application provides a data privacy processing method. This method de-identifies sensitive information in the target inference text locally on the user terminal, transmitting only the de-identified text to the server for the target inference model to perform inference. This ensures that the server cannot access the original sensitive data throughout the inference process, fundamentally avoiding the risk of natural language input being directly exposed to the model service provider and the risk of reconstructing the original data through reverse inference using intermediate representations. Furthermore, the de-identification process employs differentiated de-identification methods for different sensitive categories of words in the target inference text. This allows each category of words to achieve a targeted balance between privacy protection and semantic preservation based on its own data characteristics and business attributes. This avoids both excessively coarse de-identification granularity, which could damage the semantic structure and affect the model's inference accuracy, and excessively fine de-identification granularity, which could leave residual sensitive information and weaken the protective effect. Thus, it finds the optimal balance between security and usability for various types of words. Meanwhile, after the inference results are returned in an anonymized form, the user terminal determines the display strategy based on the user's attribute set. Only when the user attributes meet the corresponding access control policy is the anonymized inference result allowed to be decrypted and restored; otherwise, only the anonymized result is displayed. This ensures that the displayed content is strictly matched with the user's permissions, satisfying the viewing needs of users with different permissions in different services, while preventing sensitive information from being leaked due to unauthorized access during the display process. Thus, while ensuring the availability of inference services, it also achieves privacy protection and controllable display of sensitive information in cross-domain large model services.

[0073] The data privacy processing method provided in this application is applicable to business scenarios where users input sensitive information through natural language and call large models deployed on the server for inference.

[0074] For example, in scenarios such as robo-advisors, financial customer service, and risk assessment in the financial industry, the reasoning text input by users contains sensitive information such as identity characteristics, asset size, and investment preferences. It needs to be de-identified on the user's terminal before being transmitted to the server, and the de-identified or restored reasoning results are displayed differently according to the user's permissions.

[0075] In addition, the above methods can also be applied to cross-domain service scenarios that require large-scale server-side models to process natural language and involve sensitive personal information, such as medical and health consultations, legal consultations, government affairs processing, and insurance claims.

[0076] In summary, scenarios involving privacy protection of natural language input in cross-domain large model services, and requiring control over the display of inference results according to user permissions, all fall under the application scenarios of the data privacy protection technical solution of this application.

[0077] Figure 1 A schematic diagram illustrating a scenario for the data privacy protection method provided in this application. For example... Figure 1As shown, the execution of this method involves a user terminal and a server. The user terminal performs de-identification processing on the target inference text to obtain de-identified text, sends the de-identified text to the server, receives the de-identified inference result returned by the server, and determines the display strategy based on the user's attribute set for display. The server deploys a target inference model, which is used to perform inference based on the de-identified text, obtain the de-identified inference result, and return it to the user terminal.

[0078] Taking a financial robo-advisory scenario as an example, the technical solution proposed in this application includes the following steps: The user terminal receives target inference text input by the user, such as "My account balance is 500,000 yuan, my risk tolerance is moderate, and I hope to allocate a stable investment portfolio." Sensitive words in the text, such as "500,000 yuan," "moderate," and "stable," are identified, and desensitized using a desensitization processing method corresponding to the sensitive information type, resulting in desensitized text. The user terminal sends the desensitized text to the target inference model on the server. The server performs inference based on the desensitized text and returns the desensitized inference result. After receiving the desensitized inference result, the user terminal obtains the user's attribute set and matches the attribute set with the access control policy in the desensitization mapping record. If the attribute set satisfies the access control policy, the desensitized words in the desensitized inference result are restored, and the restored inference result is displayed. If the attribute set does not satisfy the access control policy, the desensitized inference result is displayed.

[0079] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0080] Figure 2 A flowchart illustrating the data privacy processing method provided in this application. Figure 2 As shown, the method includes:

[0081] S201. Upon receiving a user's reasoning request for the target reasoning text, obtain the de-identified reasoning result of the target reasoning text fed back by the target reasoning model deployed on the server.

[0082] In this embodiment, the user terminal can be a client application that provides business functions such as intelligent investment advisory, financial customer service, and risk assessment. The user can input the target reasoning text in the interactive interface of the client application, such as by inputting through a text input box, or by inputting through voice and converting it into text.

[0083] The target inference text is in natural language format and may contain sensitive information such as the user's identity characteristics, asset size, and investment preferences, for example, "My account balance is 500,000 yuan, my risk tolerance is moderate, and I hope to allocate a stable investment portfolio." After receiving the user's inference request for the target inference text, the user terminal performs anonymization processing on the target inference text locally on the user terminal.

[0084] Specifically, differentiated desensitization methods are adopted for different sensitive types of words (such as numerical, identifier, and semantic words) in the target inference text. For example, highly identifier words are masked or replaced to sever direct associations; numerical words are generalized or blurred to retain statistical features; and general descriptive words retain their original semantics to maintain the contextual coherence and inference usability of the text.

[0085] After the anonymized text is obtained, the user terminal sends the anonymized text to the target inference model deployed on the server. This sending process can be carried out through a secure communication channel established between the user terminal and the server to ensure the confidentiality and integrity of the anonymized text during transmission.

[0086] After receiving anonymized text, the target inference model deployed on the server side performs inference based on this anonymized text, such as generating investment advice, providing customer service explanations, and issuing risk warnings. Because the target inference model receives anonymized text rather than the original target inference text, it cannot obtain the user's original sensitive information, thus reducing the risk of privacy leakage at the source. The anonymized inference results obtained by the target inference model based on the anonymized text are also presented in an anonymized form. The target inference model then returns the anonymized inference results to the user's terminal.

[0087] S202. Based on the user's attribute set, determine the display strategy for the de-identified inference results on the user terminal, and display them according to the display strategy.

[0088] In this embodiment, the user terminal obtains the anonymized inference result fed back by the target inference model. This anonymized inference result may include business suggestions, explanations, or prompts corresponding to the user's request, but the sensitive information therein has been anonymized.

[0089] After obtaining the de-identified inference results, the user terminal can continue to perform subsequent permission judgment and display strategy determination steps. For example, it can determine whether to directly display the de-identified inference results or to restore the de-identified inference results and then display the restored inference results based on the user's attribute set.

[0090] In the method provided in this application, before transmitting the target inference text to the server, the user terminal first performs desensitization processing on the target inference text locally to obtain desensitized text. This ensures that the target inference model on the server can only access the desensitized text and cannot obtain the original sensitive information throughout the entire inference process. Therefore, it eliminates the risk of directly exposing natural language input to the model service provider and the risk of recovering the original data through reverse inference using intermediate representations. In other words, it effectively reduces the risk of sensitive information leakage in cross-domain large model services without affecting the execution of the inference task. In addition, the above desensitization processing adopts corresponding differentiated desensitization methods for different sensitive categories of words in the target inference text. This allows each category of words to obtain a targeted balance between privacy protection and semantic preservation based on its own data characteristics and business attributes. This avoids the impact on model inference accuracy caused by the destruction of semantic structure due to excessively coarse desensitization granularity, and also avoids the weakening of protection effectiveness due to the retention of sensitive information due to excessively fine desensitization granularity. Thus, it finds the best balance between security and usability for various types of words. Meanwhile, after the server returns the de-identified inference results, the user terminal determines the display strategy based on the user's attribute set. The restored display is only allowed when the user attributes meet the access control policy; otherwise, only the de-identified results are displayed. This ensures that users with different permissions can only view the inference results that match their permissions, thus meeting business needs while preventing unauthorized leakage of sensitive information.

[0091] Figure 3 This is a schematic diagram illustrating another data privacy processing procedure provided in an embodiment of this application. Next, we will combine... Figure 3 The technical principles of the data privacy processing solution provided in this application are further explained below. It should be noted that the following description is merely an exemplary implementation of the technical solution of this application and does not constitute any limitation on the technical solution of this application.

[0092] See Figure 3 In the user terminal, the process of receiving a user's reasoning request for the target reasoning text and obtaining the reasoning result may include: obtaining the target reasoning text input by the user and identifying sensitive words in the target reasoning text; according to the sensitive information type of the sensitive words, using a desensitization processing method corresponding to the sensitive information type to desensitize the sensitive words and obtain desensitized words; and generating the desensitized text corresponding to the target reasoning text based on the desensitized words and the non-sensitive words in the target reasoning text.

[0093] In this embodiment, after receiving a reasoning request from a user for the target reasoning text, the user terminal obtains the target reasoning text input by the user. The target reasoning text is usually an instruction or question in natural language form, which may contain both task instruction information and sensitive information.

[0094] For example, a user might enter "I currently have approximately 500,000 yuan in assets, a moderate risk tolerance, and would like to allocate a conservative investment portfolio. Please provide suggestions." This input includes both the task instruction to generate investment advice and sensitive information such as asset size and risk preference. After obtaining this target inference text, the user terminal performs local anonymization processing to generate anonymized text that can be used by the server-side target inference model.

[0095] After acquiring the target inference text, the user terminal can perform word segmentation or lexicalization on the target inference text to obtain multiple lexical units. Then, through rule matching, joint modeling of semantic models, or a pre-trained sensitive information recognition model, sensitive lexical units containing sensitive information are identified from the multiple lexical units, and the sensitive information type of each sensitive lexical unit is determined.

[0096] In one optional implementation, identifying the sensitive information type of a sensitive word may include: for each sensitive word in the target inference text, identifying the sensitive information type of the sensitive word based on its semantic features and / or format features; wherein the sensitive information type includes at least one of semantic type, numerical type, and identifier type.

[0097] Because sensitive words in numerical types usually have relatively obvious format characteristics, such as containing Arabic numerals, Chinese numerals, currency units, percentage signs, quantity units, etc.

[0098] User terminals can use regular expressions or format rules to match sensitive words and characters to identify whether they contain numerical expressions; or, they can extract format features of sensitive words and characters, such as character type, character length, whether they contain numbers, and whether they contain preset units, and identify sensitive words and characters that meet the numerical format conditions as numerical types.

[0099] For example, “500,000 yuan” contains the number “50” and the currency unit “ten thousand yuan”, and can be identified as a numerical type based on its format features; “30%” contains the number “30” and the percentage sign, and can also be identified as a numerical type; “three years” contains Chinese numerals and a unit of time, and can also be identified as a numerical type.

[0100] Because of the sensitive elements of the identifier type, they also have strong format characteristics. For example, ID card number, bank card number, mobile phone number, account number, etc. all have specific lengths, character sets and / or prefix rules.

[0101] User terminals can pre-configure format constraint rules for various identifiers, such as regular expressions for ID card numbers, prefix and length rules for bank card numbers, and number segment rules for mobile phone numbers. When the format characteristics of a sensitive word match the format constraint rules of a certain identifier type, the sensitive word is identified as the identifier type.

[0102] For example, an 18-character string that conforms to the ID card number verification rules can be identified as an ID card number; a string of numbers starting with "6222" and with a length of 16 to 19 characters can be identified as a bank card number; and a string of numbers starting with "1" and with a length of 11 characters can be identified as a mobile phone number. Through format feature matching, sensitive words and characters of the identifier type can be identified efficiently and accurately.

[0103] Considering the semantic types of sensitive words, their format features are usually not obvious, but they possess specific semantic features. User terminals can utilize pre-trained semantic recognition models or rules to perform semantic analysis on sensitive words and extract their semantic features. Semantic features can include the part of speech, semantic role, contextual conjunctions, and the semantic function of the word in the target reasoning text.

[0104] For example, in the target inference text "moderate risk tolerance, hoping to allocate a conservative investment portfolio," the word "moderate" is semantically associated with a description of risk tolerance and can be identified as a semantically sensitive word; "conservative" is associated with investment preferences and can also be identified as a semantic type. As another example, in "I live in XX community," "XX community" is associated with residential location and can be identified as a semantic type. User terminals can determine whether a sensitive word belongs to semantically sensitive information that reveals user profiles, preferences, or business privacy based on its semantic role in the context.

[0105] In identifying sensitive information types, user terminals can also combine semantic and format features for joint identification. For example, when a sensitive word element contains both numerical expression and is associated with descriptions such as assets, age, and income in the semantic context, it can be identified as a numerical type and its specific category can be further determined. When a sensitive word element has both an identifier format and is associated with descriptions such as documents and accounts in the semantic context, it can be identified as an identifier type. User terminals can use rule matching and semantic modeling to comprehensively judge the format and semantic features of sensitive words element, obtain the sensitive information type of the sensitive word element, and provide a basis for subsequent use of corresponding de-identification processing methods.

[0106] For example, in the above example, "500,000 yuan" is a sensitive word of numerical type; "medium" or the entire phrase in "medium risk tolerance" can be identified as a sensitive word of semantic type; and "stable" in "stable investment portfolio" can also be a sensitive word of semantic type. If the input includes bank card numbers, ID card numbers, etc., then it belongs to the sensitive word of identifier type. At the same time, the user terminal can record the position index of each sensitive word in the target inference text for subsequent reconstruction processing.

[0107] For example, the expression for the clustered sensitive terminology can include: .

[0108] in, This represents the j-th sensitive word segment. and These represent the start and end positions of the segment in the original word sequence. C represents the sensitive information category, which includes numerical categories, identifier categories, semantic categories, time categories, location categories, etc.

[0109] Through the above implementation methods, user terminals can accurately identify the types of sensitive information, thereby supporting the subsequent differentiated desensitization processing for different types of sensitive words and improving the targeting and effectiveness of the desensitization processing.

[0110] After identifying sensitive words, the user terminal uses a desensitization processing method corresponding to the sensitive information type to desensitize the sensitive words, thus obtaining desensitized words.

[0111] For example, sensitive words with numerical values ​​can be processed by methods such as numerical normalization, interval mapping, and controlled random perturbation. For instance, "500,000 yuan" can be normalized to 500,000, mapped to a preset interval, and random perturbation can be added to obtain desensitized expressions such as "480,000-520,000 interval" or "about 500,000", which retain the magnitude feature but do not expose the precise value.

[0112] For semantically sensitive words, candidate words can be selected from the semantic proximity lexicon and scored and filtered based on business semantic availability and sensitive leakage risk. For example, "conservative" can be replaced with "low to medium risk type", and "medium risk tolerance" can be replaced with "medium risk tolerance with a preference for conservatism" or the more general "possesses a certain risk tolerance".

[0113] For sensitive keywords of the identifier type, random pseudo-identifiers that meet the format constraints can be generated to replace the original identifiers. For example, a bank card number can be replaced with a random card number or mask that conforms to the format. The desensitization process is strictly limited to the scope of sensitive keywords and does not change the expression of non-sensitive keywords.

[0114] After obtaining the desensitized words, the user terminal replaces the desensitized words in the corresponding positions according to the order of words in the original target inference text, while keeping the non-sensitive words unchanged, thereby reconstructing the desensitized text.

[0115] For example, after the above example is anonymized, the anonymized text can be generated as: "I currently have approximately 500,000 in assets, a moderate risk tolerance with a preference for conservative investment, and would like to allocate a conservative investment portfolio. Please provide suggestions." This anonymized text still semantically supports the server-side target inference model in generating investment advice, but it does not contain the actual precise asset amount or sensitive preference information. Subsequently, the user terminal can send this anonymized text to the server-side target inference model for inference to obtain the anonymized inference result.

[0116] Through the above implementation method, the user terminal completes the desensitization processing of the target inference text locally, generating desensitized text without the original sensitive information, thereby meeting the requirements of the inference task while reducing the risk of leakage of sensitive information during cross-domain transmission and server-side inference.

[0117] In the above implementation, the user terminal is pre-configured with desensitization processing methods for various sensitive information types. After identifying the sensitive information type of each sensitive word, the user terminal selectively calls the processing method corresponding to the sensitive information type for desensitization processing. The following uses the desensitization processing of sensitive numerical values ​​as an example for specific explanation.

[0118] In one embodiment, when a sensitive word element includes a sensitive numerical value, the desensitization process may include: identifying the numerical unit in the sensitive numerical value of the sensitive word element; converting the sensitive numerical value into a value expressed in the reference unit according to a preset conversion relationship between the numerical unit and the reference unit to obtain a normalized numerical value; obtaining the numerical protection interval, the mapping output interval, and the preset mapping expression corresponding to the normalized numerical value; mapping the normalized numerical value from the numerical protection interval to the mapping output interval according to the preset mapping expression to obtain an initial mapped numerical value; perturbing the initial mapped numerical value with a preset controlled random perturbation factor to obtain a desensitized numerical value; wherein, the controlled random perturbation factor randomly takes values ​​within a preset perturbation amplitude range, and the desensitized numerical value is the product of the initial mapped numerical value and the controlled random perturbation factor after truncation processing, the truncation processing is used to restrict the numerical value within the mapping output interval; and generating a desensitized word element corresponding to the sensitive word element based on the desensitized numerical value.

[0119] Specifically, the user terminal identifies the numerical unit of sensitive values ​​in sensitive words and converts the sensitive values ​​into values ​​expressed in the base unit according to the preset conversion relationship between the numerical units and the base unit, thus obtaining normalized values.

[0120] For example, for the sensitive word "500,000 yuan", the user terminal extracts the numerical part "50" and the numerical unit "ten thousand yuan" through regular expression matching or rule recognition; based on the preset conversion relationship between the numerical unit and the base unit "yuan", i.e., 10,000 yuan = 10,000 yuan, "500,000 yuan" is converted into the value 500,000 in yuan as the base unit, resulting in the normalized value. .

[0121] The user terminal obtains the value protection range, mapping output range, and preset mapping expression corresponding to the normalized value. The value protection range can be a reasonable value range within the business scenario to which the sensitive value belongs; for example, the value protection range for asset amount can be preset as follows. ,like The mapping output range can be preset to... ,like The default mapping expression can be a linear mapping expression or a logarithmic mapping expression.

[0122] by For example, through the corresponding logarithmic mapping calculation, assuming the initial mapping value is obtained... It should be noted that the initial mapping value is only an example. The actual mapping result is determined by the preset mapping expression and the interval parameter, and the mapping results corresponding to different original values ​​under the same mapping rule maintain a relative size relationship.

[0123] Furthermore, the user terminal can also perturb the initial mapped value using a preset controlled random perturbation factor to obtain the desensitized value. The controlled random perturbation factor randomly selects values ​​within a preset perturbation amplitude range. For example, the perturbation amplitude parameter... The disturbance factor can be set to 0.05. exist ,Right now Random values ​​are selected within the interval.

[0124] Based on this, the initial mapping value y and the perturbation factor are... Multiply the products and truncate the results to limit the values ​​to the mapped output range. Inside, the desensitized values ​​were obtained. .

[0125] For example, when the initial mapping value Disturbance factor When the product result is 6860, and it is still 6860 after truncation, the desensitized value is 6860.

[0126] The user terminal generates desensitized tokens corresponding to sensitive tokens based on the desensitized value. For example, it replaces the original "500,000 yuan" with "asset mapping value 6860" or directly uses "6860" as the desensitized token. It should be understood that the desensitized value does not have a direct readable correspondence with the original amount, but it still retains a certain magnitude trend and relative size relationship under the same mapping rule.

[0127] By desensitizing sensitive values ​​as described above, the model deployed on the server can only obtain perturbed mapping values ​​that have no direct readable correspondence with the real values. It cannot use these values ​​to infer the original amount, but the mapping values ​​still retain the magnitude characteristics and relative size relationships, which can support inference tasks such as investment advice and risk assessment. Thus, while hiding the real values, it also takes into account the usability of inference.

[0128] In another implementation, when the sensitive word element includes sensitive semantics, the desensitization process may include: determining multiple initial candidate words that match the sensitive semantics from a preset semantic proximity lexicon based on the sensitive semantics in the sensitive word element;

[0129] The sampling probability of each initial candidate word is determined, and at least one sampled candidate word is selected from multiple initial candidate words based on the sampling probability. For each sampled candidate word, the comprehensive score of the sampled candidate word relative to the sensitive word element is calculated. The comprehensive score is positively correlated with the semantic usability score and negatively correlated with the sensitive leakage risk score. The semantic usability score represents the degree to which the sampled candidate word supports the target inference model in completing the inference task. The sensitive leakage risk score represents the degree of risk of the sampled candidate word exposing user privacy. Based on the comprehensive score of each sampled candidate word, the target candidate word is determined from at least one sampled candidate word. Based on the target candidate word, the de-identified word elements corresponding to the sensitive word elements are generated.

[0130] Specifically, the user terminal has a pre-built semantic proximity lexicon, which stores multiple candidate expressions, which can be in the form of words, phrases, or short sentences. After obtaining sensitive word elements, the user terminal can select multiple initial candidate words from the semantic proximity lexicon that match the sensitive semantics in the sensitive word elements.

[0131] For example, for the sensitive word "high risk tolerance", the semantic similarity between this sensitive word and each candidate expression in the lexicon can be calculated based on word vectors or phrase vectors. The top k candidate expressions with high semantic similarity are selected as initial candidate words, such as "acceptable to some volatility", "risk preference is relatively positive", "investment style is relatively active", etc. It should be noted that the selection of initial candidate words can be based on word vector space, domain dictionary or small parameter semantic model, and this application does not limit this.

[0132] To further reduce the probability of recovering the original sensitive expression, a perturbation intensity control parameter can be introduced into the sampling probability to make the selection of candidate words random, rather than always selecting the expression with the closest semantics.

[0133] Specifically, after determining the initial candidate words, the user terminal determines the sampling probability of each initial candidate word based on the semantic similarity between each initial candidate word and the sensitive word; among them, the initial candidate word with higher semantic similarity corresponds to a higher sampling probability; then, random sampling is performed according to the sampling probability to select at least one sampling candidate word from multiple initial candidate words.

[0134] For example, the similarity scores of candidate words A, B, and C are 0.8, 0.6, and 0.4, respectively. After normalization, their sampling probabilities are approximately 0.44, 0.33, and 0.22. Candidate word A has the highest probability of being selected, but B and C still have a chance to be selected. This avoids always selecting the candidate word with the most similar semantics, which would increase the uncertainty of the expression after desensitization and reduce the risk of attackers inferring the original sensitive expression by observing the desensitization results multiple times.

[0135] After selecting at least one sampled candidate word, the user terminal calculates a comprehensive score for each sampled candidate word relative to sensitive words. This comprehensive score is positively correlated with the semantic usability score and negatively correlated with the sensitive leakage risk score.

[0136] The semantic availability score is used to characterize the extent to which the sampled candidate words support the target inference model in completing inference tasks, that is, whether the sampled candidate words can still support the server-side model in completing business tasks such as investment advice, customer service explanations, and risk warnings. The sensitive disclosure risk score is used to characterize the degree of risk of the sampled candidate words exposing user privacy, that is, whether the sampled candidate words will still directly or indirectly expose the user's precise profile, specific preferences, or business privacy.

[0137] For example, although "risk preference is relatively positive" is semantically similar to the original sensitive word, this expression still directly exposes the user's risk preference level, and its sensitive disclosure risk score is high; "acceptable to some fluctuations" weakens the precise level, but still retains the meaning of a relatively positive risk preference, and its semantic usability score is high and its sensitive disclosure risk score is low; "local risk adaptation assessment has been completed" does not expose risk preference at all, and its semantic usability score may be low, but its sensitive disclosure risk score is the lowest.

[0138] User terminals can quantify the semantic usability score and sensitive disclosure risk score of each sampled candidate word according to preset scoring rules, domain dictionaries or lightweight semantic classification models, and obtain the comprehensive score according to the relationship that the comprehensive score is positively correlated with the semantic usability score and negatively correlated with the sensitive disclosure risk score.

[0139] In one implementation, the overall score can be represented as the weighted difference between the semantic availability score and the sensitive disclosure risk score, for example, the overall score. Where U represents the semantic availability score and R represents the sensitive disclosure risk score. This is a parameter that represents the trade-off between privacy protection and business availability.

[0140] After obtaining the comprehensive score of each sampled candidate word, the user terminal determines the target candidate word from at least one sampled candidate word based on the comprehensive score. For example, the user terminal can choose the sampled candidate word with the highest comprehensive score as the target candidate word, or it can choose the sampled candidate word with the best comprehensive score that meets a preset threshold as the target candidate word.

[0141] Taking "high risk tolerance" as an example, assuming that the sampled candidate words include "acceptable to some volatility" and "relatively aggressive investment style", if the user terminal calculates that the comprehensive score of "acceptable to some volatility" is higher than that of "relatively aggressive investment style", then "acceptable to some volatility" will be determined as the target candidate word.

[0142] After identifying the target candidate words, the user terminal generates de-sensitized word units corresponding to the sensitive word units based on the target candidate words. That is, the original sensitive word units are replaced with the target candidate words to obtain the de-sensitized word units. Subsequently, the user terminal can generate de-sensitized text based on the de-sensitized word units and the non-sensitive word units in the target inference text, which is then transmitted to the server-side target inference model for inference.

[0143] Through the above implementation methods, the user terminal introduces randomness through sampling probability during the desensitization process of semantically sensitive words and uses comprehensive scoring to balance semantic usability and the risk of sensitive leakage. This ensures that the desensitized text can still support the server-side model in completing inference tasks, while effectively reducing the risk that sensitive information such as the user's precise profile and specific preferences will be obtained by the server-side model service provider.

[0144] In another approach, when a sensitive word element includes a sensitive identifier, the desensitization process may include: determining the identifier type of the sensitive identifier in the sensitive word element; determining the identifier desensitization method corresponding to the sensitive identifier based on the identifier type and the preset mapping relationship between identifier type and identifier desensitization method; determining the identifier type of the sensitive identifier in the sensitive word element; determining the identifier desensitization method corresponding to the sensitive identifier based on the identifier type and the preset mapping relationship between identifier type and identifier desensitization method; desensitizing the sensitive identifier using the identifier desensitization method to obtain the desensitized identifier; and generating the desensitized word element corresponding to the sensitive word element based on the desensitized identifier.

[0145] In this embodiment, the sensitive identifier may further include various identifier types, such as identification information categories that have unique or accurate identification of user identity and account attributes, such as ID card number, bank card number, mobile phone number, account number, and device identifier.

[0146] After identifying that sensitive keywords contain sensitive identifiers, matching is performed according to preset format constraint rules to identify the identifier type of the sensitive identifier. For example, regular expressions can be used to match ID card numbers, bank card numbers, and mobile phone numbers; alternatively, the identification can be combined with the contextual semantics of the sensitive identifier. For instance, in the expression "My bank card number is 6222...", the identifier type can be determined by combining the keyword "bank card number" with the numeric string format.

[0147] After determining the type of a sensitive identifier, the user terminal determines the corresponding identifier desensitization method based on a preset mapping relationship between identifier types and desensitization methods. These desensitization methods can include format-preserving masks, password hash digests, and reversible encrypted replacements. Accordingly, for identifiers such as ID card numbers, bank card numbers, and mobile phone numbers, format-preserving mask functions can be used, such as a mask that preserves the first n and last m characters and replaces the middle with mask characters; for account numbers, password hash digests can be used, used only for consistency verification without restoring the original value; for identifiers that need to be restored to their original value after authorization, reversible encrypted replacement methods are used, such as encryption functions based on category or context key Kc.

[0148] For example, in a robo-advisor scenario, if a user inputs a bank card number, "6222020012345678", and the anonymization method is a format-preserving mask, it can be processed as " This method retains the first and last characters while hiding the middle part, reducing the risk of exposing the true identifier, while preserving minimal formatting features or business readability. If the identifier desensitization method is a cryptographic hash digest, it can be processed into a fixed-length hash value, such as " The hash value cannot recover the original identifier, but it can be used for consistency verification. If the identifier de-identification method is reversible encryption replacement, it can be processed into ciphertext form, such as " ".

[0149] After obtaining the desensitized identifier, the user terminal can replace the sensitive identifier in the original sensitive word element with the desensitized identifier, and retain the other non-sensitive parts to generate desensitized word elements for subsequent generation of desensitized text.

[0150] Through the above implementation methods, the user terminal can select an appropriate desensitization method to desensitize sensitive identifiers according to the identifier type, thereby protecting the user's real identifier from being obtained by the server's inference model while taking into account the needs of subsequent inference tasks for some format features or business readability.

[0151] In another embodiment, when a sensitive word element contains a sensitive identifier, another desensitization process may include: determining the identifier type and format constraint rules corresponding to the sensitive identifier; the format constraint rules are used to limit the character length, character set, prefix, and / or verification rules that the identifier type should satisfy; generating a random pseudo-identifier corresponding to the sensitive identifier based on the identifier type, format constraint rules, the inference identifier of the inference request, and the associativity strategy of the inference request; wherein, the inference identifier is a unique identifier used to identify the inference request, and the associativity strategy of the inference request is used to control whether the same sensitive identifier is mapped to the same random pseudo-identifier in the inference process corresponding to different inference identifiers; the random pseudo-identifier satisfies the format constraint rules, does not repeat other desensitized identifiers generated in the inference process corresponding to the inference identifier, and does not contain partial characters of the sensitive identifier; obtaining the business status record corresponding to the sensitive identifier, and generating non-sensitive business status description information corresponding to the sensitive identifier based on the business status record; the business status record includes at least one of the identity verification status, account status, and contract qualification of the sensitive identifier, and does not contain the sensitive identifier itself; generating desensitized words corresponding to the sensitive word element based on the random pseudo-identifier and the non-sensitive business status description information.

[0152] In this embodiment, format constraint rules are used to limit the character length, character set, prefix, and / or verification rules that the identifier type should meet. For example, the format constraint rules for bank card numbers include: starting with a specific prefix, a total length of 16 to 19 digits, and meeting Luhn verification rules, etc.; the format constraint rules for mobile phone numbers include: starting with "1", a length of 11 digits, and conforming to operator number segment rules, etc.; the format constraint rules for ID card numbers include: a length of 18 digits, the first 6 digits being the area code, the middle 8 digits being the date of birth, and the last digit being either a number or a check character, etc. These format constraint rules can be pre-stored in the user terminal for use during the de-identification process.

[0153] Based on the obtained format constraint rules, the user terminal generates a random pseudo-identifier (i.e., a random pseudo-identifier) ​​corresponding to the sensitive identifier according to the identifier type, format constraint rules, the inference identifier of the current inference request, and a preset associativity policy. The inference identifier is a unique identifier used to identify the current inference request, and can be a session ID, business serial number, or context ID, etc. The associativity policy controls whether the same sensitive identifier is mapped to the same random pseudo-identifier in the inference process corresponding to different inference identifiers.

[0154] It should also be understood that the associativity strategy can include at least one of the following: a session-level consistency strategy, a single-use strategy, and a specified-scope consistency strategy. Specifically, a session-level consistency strategy means that during the reasoning process corresponding to the same reasoning identifier, the same sensitive identifier is always mapped to the same random pseudo-identifier; different random pseudo-identifiers are generated across reasoning processes, which is suitable for scenarios where multi-turn dialogues require contextual coherence.

[0155] The single-use strategy means that a different random pseudo-identifier is generated for each inference call, and the same random pseudo-identifier is not maintained even in the same inference process. It is suitable for single-use, context-independent inference scenarios.

[0156] The specified range consistency strategy means that the same random pseudo-identifier is maintained only within the specified inference identifier or specified business step range, and regenerated if it is outside the range. It is suitable for scenarios where auditing, risk control or cross-step business processes require minimum necessary correlation.

[0157] In this embodiment, the original identifier is z, the identifier type is c, the current inference window is W, and the format constraint rule is Regc. .in This represents the generated random pseudo-identifier. Indicates the associativity strategy, This represents a random factor or random seed.

[0158] The generated random pseudo-identifiers must simultaneously meet the following conditions: , ,and It is not directly constructed from the reserved bits, truncated bits, or visible substrings of z. Here, L(Regc) represents the set of strings that satisfy the format constraints of the identifier type, and PW represents the set of random pseudo-identifiers already used within the current window. In other words, the generated random pseudo-identifiers should satisfy the format constraint rules corresponding to the identifier type, i.e., belong to the set of strings allowed by that identifier type; not duplicate other desensitized identifiers already generated during the inference process corresponding to the current inference identifier; and not contain local characters of sensitive identifiers, i.e., not directly constructed from the reserved bits, truncated bits, or visible substrings of sensitive identifiers.

[0159] For example, for the bank card number "6222020012345678", the generated random pseudo-identifier could be "6222888899990001", which satisfies the format constraints of the bank card number, but has no publicly derived relationship with the real card number; for the mobile phone number "13812345678", a pseudo mobile phone number "13900001111" can be generated, which also satisfies the format of the mobile phone number, but cannot be used to deduce the real number.

[0160] In addition, while generating random pseudo-identifiers, the user terminal obtains the business status record corresponding to the sensitive identifier and generates non-sensitive business status description information corresponding to the sensitive identifier based on the business status record. The business status record includes at least one of the following: identity verification status, account status, and contract eligibility of the sensitive identifier, but does not include the sensitive identifier itself. The business status record can be pre-stored locally on the user terminal and generated or synchronized by the local business system during user identity authentication, account query, and other processes.

[0161] For example, for a bank card number, the business status record may include "identity verification completed," "account status normal," and "qualified to sign up for wealth management." The user terminal then generates non-sensitive business status description information based on this, such as "identity verification completed, account status normal, qualified to sign up for wealth management." This description information does not contain the actual card number, but it provides the server-side inference model with the business context needed to complete its inference tasks.

[0162] Based on this, the user terminal replaces the sensitive identifiers in the original sensitive word units with random pseudo-identifiers, and appends the business status description information after the random pseudo-identifiers or as an independent word unit to generate desensitized word units. In the processed desensitized text, the server-side inference model can only see the random pseudo-identifiers and business status description information, and cannot know the real identifiers, but can still complete inference tasks such as investment advice, customer service explanations, and risk warnings based on the business status description information.

[0163] Through the above implementation method, the user terminal uses the method of generating random pseudo-identifiers to desensitize sensitive identifiers. While meeting the requirements of format constraints and business status transmission, it severs the inferable relationship between pseudo-identifiers and real identifiers, and controls the association risk across inference processes through the associativity strategy, thereby further enhancing the privacy protection capability of identifier-type sensitive information.

[0164] It should be noted that the processing of identifier-related information is applicable to scenarios where the real identifier is not a necessary input for the server-side inference model, such as intelligent investment advisory suggestions, general customer service Q&A, risk warning explanations, product descriptions, and compliance Q&A. In these scenarios, the identifier information only constitutes a privacy risk and does not constitute semantic information necessary for inference; therefore, it can be desensitized through methods such as masking, hashing, or encrypted replacement. For business operations that must rely on the real identifier, such as account inquiries and identity verification, the user terminal's local business system can first complete identity verification and data query, and then provide non-sensitive business status description information to the target inference model, without directly transmitting the real identifier.

[0165] Based on the above implementation method, that is, after desensitizing sensitive words to obtain desensitized words, the technical solution provided in this implementation further includes: for each sensitive word, generating a desensitized mapping record corresponding to the sensitive word; the mapping record includes the desensitized word of the sensitive word, the sensitive information type, the position index, the encryption result of the original value of the sensitive word, and the access permission; wherein, the encryption result is obtained by performing attribute-based encryption on the original value, and the access permission is used to control the restoration permission of the original value; the desensitized mapping record is used to restore the desensitized words in the desensitized inference result after receiving the desensitized inference result fed back by the target inference model.

[0166] After desensitizing each sensitive word in the target inference text and obtaining the desensitized word, the user terminal generates a corresponding desensitization mapping record for each sensitive word in the local trusted execution environment. This desensitization mapping record is used to restore the desensitized word in the desensitization inference result when the desensitization inference result is subsequently received from the target inference model on the server.

[0167] Specifically, for each sensitive word element, the desensitized mapping record generated by the user terminal includes the following information: the desensitized word element, the sensitive information type, the position index, the encryption result of the original value of the sensitive word element, and access permissions. The sensitive information type identifies whether the sensitive word element belongs to a semantic, numerical, or identifier type; the position index indicates the start and end positions of the sensitive word element in the target reasoning text, for example, it can be represented by the word element sequence interval (l, r), so that the desensitized word element at the corresponding position in the desensitized reasoning result can be accurately replaced back with the original sensitive word element during restoration; the desensitized word element is the replacement result obtained after the sensitive word element has undergone desensitization processing.

[0168] It should be noted that the user terminal does not directly save the original plaintext values ​​of sensitive words in the mapping records stored locally, but only saves the encrypted results of the original values, in order to reduce the risk of sensitive information leakage when local data is illegally accessed.

[0169] In one approach, the encryption result can be obtained by performing attribute-based encryption on the original value. Attribute-based encryption is an encryption mechanism that binds ciphertext to an access policy. During encryption, the original value of the sensitive term is used as plaintext, a preset access permission is used as the access policy, and encryption is performed using the system's public key to obtain the encryption result.

[0170] For example, let the original value of the j-th sensitive word be... The corresponding access permissions are If the system public key is PK, then the encryption process can be represented as: ;in, The encrypted result of the original value. This represents the attribute-based encryption function.

[0171] Furthermore, access permissions in the mapping record control the restoration rights of the original value, specifying which user attributes or access subjects can decrypt the encrypted result to recover the original value. Access permissions can be defined based on a user's attribute set, such as requiring the user to have a specific business role, a security level no lower than a preset level, or the device to be in a trusted state. The user terminal stores these access permissions as part of the de-identified mapping record.

[0172] For example, let the position index of the j-th sensitive word be . The sensitive information type is After desensitization, the word units are The encryption result is Access permissions are Then the desensitization mapping record corresponding to the sensitive word element can be represented as: ;in, This refers to the number or sequence number of sensitive words / elements.

[0173] In this way, the user terminal generates a de-identified mapping record for each sensitive word locally. Without saving the original plaintext value, it provides a secure and traceable mapping basis for the subsequent restoration of the de-identified reasoning results according to permissions, realizing the local encrypted storage of sensitive information on the user terminal side and selective restoration according to permissions.

[0174] When storing sensitive words in a local trusted execution environment, the user terminal also simultaneously generates desensitized text corresponding to the target inference text based on the desensitized words and non-sensitive words in the target inference text, and transmits the desensitized text to the target inference model deployed on the server to obtain the desensitized inference result fed back by the target inference model.

[0175] It should be noted that although the target inference text is actively input by the user, and the user is aware of the original sensitive information, the user viewing the de-identified inference result after it is generated on the server may not be the original input user, but rather other business personnel, reviewers, or system operators. Furthermore, the de-identified inference result may still contain de-identified terms. Even after de-identification, these terms may still carry sensitive business information such as the user's asset level, risk appetite, and account status. Direct display could still lead to unauthorized disclosure of sensitive information. Therefore, when a user receives the de-identified inference result and prepares to display it, it is not displayed directly. Instead, the attribute set of the user currently requesting to view the result needs to be obtained to determine whether the user has the right to view the de-identified result or the restored result. This user can be the user who initiated the inference request, or another user requesting to view the de-identified inference result or the corresponding restored inference result.

[0176] Based on this, one implementation of determining the display strategy for the de-identified inference result on the user terminal according to the user's attribute set may include: matching the attribute set with the access permissions in the de-identification mapping record; if the attribute set meets the access permissions, determining the display strategy to display the restored inference result obtained after restoring the de-identified inference result; if the attribute set does not meet the access permissions, determining the display strategy to display the de-identified inference result.

[0177] In this embodiment, the user terminal first obtains the attribute set of the user currently requesting to view the anonymized inference result. This attribute set may include user role, department, security level, authentication method, device trust status, and other attribute information, which can be determined by the user terminal during user login, identity authentication, or permission configuration and stored in the local trusted execution environment. The current user can be the user who initiated the inference request, or another user requesting to view the anonymized inference result or the corresponding restored inference result.

[0178] After obtaining the current user's attribute set, the user terminal matches the current user's attribute set with the access permissions in the target de-identified mapping record. Access permissions can be defined based on attribute conditions, such as requiring the user role to be "risk control personnel" and the security level to be no lower than level two, or requiring the device to be in a trusted state, etc.

[0179] During this process, the user terminal can also match the desensitized words appearing in the desensitization inference results with the desensitized words recorded in each locally stored desensitization mapping record to determine the target desensitization mapping record corresponding to the desensitized word. This facilitates the determination of the display strategy based on the matching results and, when the attribute set meets the access permissions, the encryption result in the target desensitization mapping record is used for decryption and restoration. The desensitization mapping record is generated and stored locally by the user terminal for each sensitive word during the aforementioned desensitization process. The record contains the desensitized word, its position index, the encryption result of the original value, and the access permissions.

[0180] If the attribute set satisfies access permissions, the user terminal determines the display strategy to display the restored inference result obtained after restoring the anonymized inference result. At this point, the user terminal uses the attribute private key corresponding to the current user's attribute set to perform attribute-based decryption of the encrypted result in the target anonymized mapping record, restoring the original value of the corresponding sensitive word. Based on the position index in the target anonymized mapping record, the position of the sensitive word in the original target inference text is determined, and the corresponding anonymized word in the anonymized inference result is replaced with the original sensitive word, generating the restored inference result, which is then displayed on the user terminal.

[0181] If the attribute set does not meet the access permissions, the user terminal determines the display strategy to display the de-identified reasoning result, that is, without performing decryption and restoration operations, directly displaying the de-identified words in the de-identified reasoning result.

[0182] In this way, the user terminal determines and executes the corresponding display strategy based on the matching results of the current user's attribute set and the access permissions in the de-identification mapping record. This ensures that users with different permissions can only view the de-identified inference results or the restored inference results that match their permissions, thus meeting business viewing needs while preventing unauthorized leakage of sensitive information.

[0183] When the display strategy is to display the restored inference result obtained after restoring the desensitized inference result, the technical solution provided in this embodiment further includes: decrypting the encryption result in the desensitized mapping record corresponding to the desensitized word in the desensitized inference result to restore the original value of the corresponding sensitive word; according to the restored original value, restoring the desensitized word in the desensitized inference result to obtain the restored inference result, and displaying the restored inference result.

[0184] Specifically, when the display strategy is to display the restored inference result obtained after restoring the desensitized inference result, the user terminal matches the desensitized words appearing in the desensitized inference result with each locally stored desensitized mapping record to determine the target desensitized mapping record corresponding to the desensitized word. The target desensitized mapping record contains the desensitized word of the sensitive word, its position index, the encryption result of the original value, and access permissions.

[0185] After obtaining the target de-identification mapping record, the attribute private key corresponding to the current user's attribute set is used to perform attribute-based decryption of the encrypted result in the target de-identification mapping record, restoring the original value of the corresponding sensitive word. For example, the encrypted result stored in the target de-identification mapping record is... The user terminal uses the attribute base decryption algorithm and the attribute private key corresponding to the current user attribute set. right Decrypt to obtain the original value. The decryption operation described above is performed in a trusted execution environment on the user terminal's local machine, and the original value will not leave the user terminal after being restored.

[0186] Furthermore, the user terminal determines the position of the sensitive word in the original target inference text based on the position index in the target desensitization mapping record, and replaces the corresponding desensitized word in the desensitization inference result with the recovered original sensitive word, generating the restored inference result. For example, if the desensitization inference result displays "asset mapping value 6860", and the corresponding position index in the target desensitization mapping record is word 3 to word 4, with an original value of "500,000 yuan", then the user terminal replaces "asset mapping value 6860" with "500,000 yuan" to obtain the restored inference result.

[0187] Based on this, the user terminal displays the restored inference result on the display interface. For example, the restored complete inference result, "Based on your asset situation, it is recommended to configure a conservative investment portfolio," is displayed to the current user.

[0188] In this way, when the user terminal has the necessary permissions, it restores and displays the de-identified inference results, enabling authorized users to obtain the complete inference results. At the same time, it ensures that the original sensitive information is restored only in the local trusted execution environment and is not exposed to the server or other unauthorized users.

[0189] When the display strategy is to display the desensitized inference result, and the user terminal displays the desensitized inference result, the technical solution provided in this embodiment further includes: in response to the user's request to view sensitive information, verifying the user's identity; if the identity verification is successful, obtaining temporary decryption authorization; and displaying the restored inference result obtained after restoring the desensitized inference result according to the temporary decryption authorization.

[0190] In this embodiment, when the display strategy is to display the anonymized inference result, and the user terminal has already displayed the anonymized inference result, if the current user needs to view the restored sensitive information, such as the precise asset amount, complete identifier, or original risk preference statement after anonymization, the user can initiate a sensitive information viewing request through the "View Sensitive Information" or similar operation entry on the user terminal interface. The user terminal responds to this request by authenticating the current user.

[0191] The authentication methods can include strong authentication methods such as biometric identification, SMS verification codes, digital certificates, PIN codes, and dynamic tokens, or multi-factor authentication combining multiple authentication methods. The purpose of authentication is to confirm that the current operation was initiated by the user themselves, and not by someone else impersonating them, thus providing a secure foundation for subsequent temporary decryption authorization.

[0192] Upon successful authentication, the user terminal requests temporary decryption authorization from the permission management module in the local trusted execution environment. Temporary decryption authorization refers to a temporary permission valid only within the current viewing operation or a preset time window, used to decrypt the encrypted results in the de-identified mapping record.

[0193] Specifically, the local access control module can temporarily generate or issue a short-term valid attribute private key corresponding to the current user; or temporarily adjust the current user's attribute set to satisfy the access permissions in the target de-identified mapping record during this viewing period; or the local access control module can issue a temporary authorization certificate to the user terminal based on the verification result. The temporary decryption authorization automatically expires after the validity period and will not permanently change the user's original permissions.

[0194] After obtaining temporary decryption authorization, the user terminal matches the de-identified words in the de-identification inference result with the locally stored target de-identification mapping record, and uses the temporary decryption authorization to decrypt the encrypted result in the target de-identification mapping record, restoring the original value of the corresponding sensitive word. Then, based on the position index in the target de-identification mapping record, the user terminal replaces the corresponding de-identified word in the de-identification inference result with the restored original sensitive word, generating a restored inference result, which is then displayed on the user terminal.

[0195] Through the above implementation method, even if the current user's attribute set does not meet the access permission requirements and can only view the de-identified inference results initially, decryption authorization can be temporarily obtained through strong identity verification. Under strict identity confirmation and time limit, the restored inference results can be viewed, thus taking into account both the security control of sensitive information and the temporary viewing needs in business scenarios.

[0196] Based on the above implementation, this embodiment also provides a corresponding processing procedure for the entire reasoning process when the user inputs target reasoning text containing different types of sensitive information.

[0197] For example, when the target inference text contains sensitive numerical values, the entire inference process includes: In a smart investment advisor scenario, the user inputs an original prompt including "I currently have approximately 500,000 yuan in assets." The system first performs local parsing of this prompt on the financial institution's side, identifying "500,000 yuan" as a sensitive numerical segment based on monetary rules, and recording its segment number, category, original value, and location index. For example, the system generates a local mapping record R1=(ID1, numerical category, original segment "500,000 yuan", location index, ... ).

[0198] Subsequently, the system normalizes "500,000 yuan" to the real number x = 500,000, and performs logarithmic mapping and controlled perturbation according to the numerical processing function. Assume the mapping interval is... Disturbance factor Randomly selected within the range [0.95, 1.05], the system can replace "500,000 yuan" with a perturbed value within a fixed range, such as "asset mapping value 7000" or "numerical parameter 7000". This mapping value is not the actual amount, nor does it represent a directly readable asset level. Instead, it is a substitute value token generated by the financial institution according to a unified mapping rule. The processed substitute prompt can be represented as: "My current asset mapping value is 7000". After this substitute prompt is sent to the server's inference model, the server's inference model can understand that the user has a certain asset base, but cannot directly know that the user's actual assets are "500,000 yuan". At the same time, the financial institution will encrypt and store the original value "500,000 yuan" and update the mapping record R1=( Numerical categories include "500,000 yuan" and "7,000 asset size". , ), where C1 is the encrypted result of "500,000 yuan", This refers to the access control policy.

[0199] When the server-side inference model returns a result, if the result contains "asset mapping value 7000" or its corresponding numerical token, the financial institution first determines whether restoration is allowed based on the access permissions of the current user. If the user is a regular external user or someone without permission to view the original value, the system retains an alternative expression, such as displaying "Based on your medium-to-high-level asset size, a conservative allocation is recommended." If the user is a client manager, risk control personnel, or auditor with the appropriate permissions, and their attributes meet the access policy... The system reads the ciphertext C1 from local secure storage, decrypts it to obtain the original value "500,000 yuan", and restores the original amount using alternative expressions in the result, for example, displaying it as "Based on your asset size of approximately 500,000 yuan, a conservative asset allocation is recommended". Numerical recovery, if not requiring precise recovery, relies on mathematical deduction from "asset mapping value 7000". However, due to random perturbations introduced during scrambling, this deduction may contain errors. Precise recovery relies on the encrypted original value and mapping records stored locally by the financial institution, thus ensuring a controllable and auditable recovery process. If subsequent business operations require the generation of asset level descriptions, this should be completed by the financial institution's local policy module under access control and can be processed separately as semantic information.

[0200] For example, when the target inference text contains sensitive identifiers, the entire inference process includes: In a financial customer service scenario, the user inputs the original prompt as: "Please check if the account corresponding to bank card number 6222020123456789 is suitable for signing up for wealth management." The system identifies "6222020123456789" as a sensitive segment of the identifier class based on the bank card number format rules, and records the segment number, category, and location index. Unlike the traditional approach of only masking the card number, this solution allows the financial institution's local core business system to first complete the account query and eligibility assessment based on the real card number, obtaining a business summary without the real identifier, such as "Identity verification completed," "Account status normal," and "Eligible for wealth management signing up." Subsequently, the system generates a session-level business token ACC_TOKEN_001 for the real card number and establishes a mapping relationship between the real card number, business token, business summary, session identifier, encrypted original value, and access policy.

[0201] Therefore, an alternative prompt sent to the server-side inference model could be: "Please generate a risk assessment prompt before signing a wealth management contract based on account ACC_TOKEN_001, which has completed identity verification and is qualified to sign a wealth management contract." In this process, the server-side inference model understands that the task involves a business object that has passed local verification, but it cannot obtain the actual bank card number. The financial institution simultaneously saves the mapping record R2=(ID2, identifier class, "6222020123456789", "...". "Business Summary, C2", ), where C2 is the encrypted result of the real bank card number, Access control policy. Within the same session, It can maintain consistency, enabling the server-side inference model to identify the same business object in multiple rounds of dialogue; in different sessions, the system can regenerate tokens to reduce the risk of cross-session association.

[0202] After the server-side inference model returns the result, the financial institution decides whether to restore access based on the current access subject's permissions. For subjects without permissions, the system retains ACC_TOKEN_001 or displays a partial mask identifier, such as "verified account"; for authorized customer service personnel, risk control personnel, or auditors, and whose attributes meet the policy requirements... At that time, the system decrypts C2 locally and extracts the result. The system restores the real bank card number "6222020123456789". For example, authorized customer service personnel will see: "The account corresponding to bank card number 6222020123456789 meets the conditions for signing up for wealth management. Please continue to complete the risk assessment." Unauthorized entities will see: "The account has been verified to meet the conditions for signing up for wealth management. Please continue to complete the risk assessment." The innovation of this processing method lies in generating a random, unique session token identifier to achieve the binding of "real identifier—session token—business summary—access policy," enabling server-side reasoning, local recovery on the user terminal, cross-domain invisibility, and process auditability. Furthermore, based on security requirements, it can be set whether the same replacement is used in different sessions. For tasks that must maintain linkability, the replacement is kept equal across a minimum range of sessions. However, the ultimately replaced identifier information will be replaced back, and entities with different permissions will see different restoration results.

[0203] In the example above, This can be understood as a pseudo-identifier variable name. In implementations that more closely resemble real business input, the system can also generate random pseudo-bank card numbers that conform to the format constraints of bank card numbers. For example, if the real bank card number is "6222020123456789", the system will randomly generate a unique pseudo-bank card number "6222023562578397" within the current session window. This pseudo-bank card number satisfies the bank card number format constraints, but it is not a truncated, masked, or partially preserved result of the original bank card number, nor is it used as a real transaction credential. Furthermore, for tasks requiring multi-round context consistency, the pseudo-identifier can be kept consistent within the minimum necessary window; for tasks that do not require association, pseudo-identifiers are regenerated in different sessions to reduce the risk of cross-session association.

[0204] After processing, the alternative prompt sent to the server-side inference model can be represented as: "Please generate a risk assessment prompt before signing a wealth management contract based on the bank card number 6222023562578397, which has completed identity verification and is qualified to sign a wealth management contract." In this process, the server-side inference model sees a bank card number that is similar in form to the real input, so the prompt still maintains strong naturalness and consistency with the business context; however, there is no publicly deducible relationship between this pseudo bank card number and the real bank card number, so the server-side inference model cannot obtain the real card number and it is difficult to identify whether the identifier was obtained by the system.

[0205] Financial institutions simultaneously store the mapping record: R2=(ID2, Identifier Class, "6222020123456789", B2 represents the business summary, and W2 represents the current session window. This represents the associativity strategy, where C2 represents the encrypted result of the real bank card number. This indicates the access control policy. Within the same session window, if the business requires consistency across multiple rounds of dialogue, the system can ensure that the real bank card number is always mapped to the same pseudo bank card number; in different sessions or different business windows, the system can regenerate a new pseudo bank card number to reduce the risk of cross-session association.

[0206] After the server-side inference model returns the results, the financial institution detects the fake bank card number "6222023562578397" in the results and performs permission checks based on local mapping records. For unauthorized entities, the system retains the fake bank card number or further converts it into a secure display such as "verified account". For authorized customer service personnel, risk control personnel, or auditors, and whose attributes satisfy policy π2, the system decrypts C2 locally and restores the fake bank card number to the real bank card number "6222020123456789". This mechanism achieves pseudo-identification protection in cross-domain inference and controlled recovery after result return through the binding of "real identifier - format constraint pseudo identifier - business summary - session window - associativity policy - access policy".

[0207] For example, when the target inference text contains sensitive semantics, the entire inference process includes: In a robo-advisor scenario, the user inputs the original prompt as: "I have a high risk tolerance and prefer high-yield products. I would like to increase my allocation to technology-themed funds recently. Please provide investment advice." Although this prompt does not contain fixed format identifiers such as ID card numbers or bank card numbers, nor does it necessarily contain specific amounts, fragments such as "high risk tolerance," "prefer high-yield products," and "technology-themed fund allocation" can reflect the user's risk tolerance level, return preferences, and specific investment direction. These fragments may be used by the server-side inference model to build a user financial profile, and therefore belong to semantically sensitive information.

[0208] The system first performs local parsing of the original prompt on the financial institution's side, and then identifies semantically sensitive segments by combining financial keyword rules, domain dictionaries, named entity recognition results, and a lightweight semantic classification model. During identification, the system does not simply replace individual words, but prioritizes phrases or clauses with complete business meaning as processing units. For example, the system can identify "high risk tolerance" as a semantic segment related to risk preference, "preference for high-yield products" as a semantic segment related to return preference, and "allocation to technology-themed funds" as a semantic segment related to asset allocation direction. For each semantic segment, the system records its segment number, category dimension, original text, character position, recovery attributes, and access strategy.

[0209] For example, the system can generate the following set of semantic fragments: .in, Corresponding to "high risk tolerance", the category dimension is risk preference, and the recovery attribute is strong recovery; Corresponding to "preference for high-yield products", the category dimension is yield preference, and the recovery attribute can be set to strong recovery or weak recovery according to business needs; Corresponding to "Technology Theme Fund Allocation", the category dimension is asset allocation direction, and the recovery attribute can be set to strong recovery. Strong recovery means that the fragment needs to support the restoration of the original text in subsequent audits, customer feedback, or internal business processing; weak recovery means that the fragment is only used to reduce the server-side inference model's ability to infer user profiles, and is not required to restore the original wording.

[0210] During the confusion phase, the system generates candidate alternative expressions for each semantic fragment. For the fragment "high risk tolerance", the system first searches for semantically adjacent candidate options in the word vector or phrase vector space, such as "acceptable to some volatility", "risk preference is more positive", "investment style is more positive", etc.; then, it filters the candidate options in combination with financial field constraints to ensure that the candidate options still belong to the same business dimension and that there is no semantic reversal or business meaning error. For example, "low risk tolerance" is similar in form, but has the opposite meaning to the original fragment and should be filtered; "acceptable to some volatility" can retain the business meaning of a more positive risk preference, but weakens the original precision level, so it can be used as a candidate alternative expression. If the result may still leak sensitive information, refer to "(3) Classification confusion processing and minimum substitution reconstruction based on token fragments" to further select a higher level of generalized expression or non-sensitive placeholder. One type is the higher-level generalized expression, such as "there are certain investment constraints", which further reduces the exposure of user profile, but still prompts the model to consider constraints when generating suggestions; the third type is the strategy result alternative expression, such as "local risk adaptation assessment has been completed" or "investment constraint label". This approach does not directly expose user risk preferences, but only provides the task constraints calculated by the local front-end module to the server-side inference model. The system selects candidate expressions based on the privacy requirements of the business scenario: if the degree of personalization is high, a near-synonymous weakened expression can be selected; if the privacy requirements are high, a higher-level generalized expression or a strategy result substitution expression is selected. For candidates such as "risk preference is more positive," which still directly expose the user profile, the system can determine that their sensitive risk score is high and remove them from the candidate set or reduce the sampling probability.

[0211] In one implementation, the system selects the "investment constraint label". "As an alternative expression in strong privacy scenarios, and generating a semantic class mapping record R3=(ID3, semantic class, risk preference dimension, "high risk tolerance", "investment constraint label") "C3, (Strong recovery). C3 is the encrypted result of the original semantic fragment "high risk tolerance". For access control policies, "strong recovery" means that the segment needs to support deterministic recovery in authorized scenarios. For the segment "preferring high-yield products," the system can weaken it to "products focused on return performance"; for the segment "technology-themed fund allocation," the system can generalize it to "growth asset allocation" or replace it with an "asset allocation tag." The processed alternative prompt can be expressed as: "I can accept some volatility and focus on products with strong returns. I'd like to increase my allocation to growth assets in the near future. Please provide investment advice." This alternative prompt retains the business semantics of "the user wants to receive more positive investment advice," allowing the server-side inference model to still generate effective investment recommendations. However, compared to the original input, the server-side inference model cannot directly obtain the user's precise risk level description, specific return preferences, and specific industry theme preferences.

[0212] To improve the stability of semantic result recovery, in one implementation, the system can add non-sensitive segment numbers or placeholders to semantic segments requiring strong recovery, for example, organizing alternative expressions as "[ "Local risk adaptation assessment completed." This number does not contain any original sensitive meaning; it is only used by the financial institution to locate the corresponding mapping record after the result is returned. The server-side inference model may return the following result: "For client [SEM_001], it is advisable to moderately allocate growth assets on the basis of stable assets, while controlling the proportion of a single theme asset." After receiving the result, the financial institution searches for the local mapping record R3 based on "[SEM_001]" or the alternative expression "acceptable volatility." If the current access subject meets access policy π3, the system decrypts the original fragment "high risk tolerance" from the local encrypted text C3 and restores the corresponding alternative expression in the result to the original semantic expression. For example, the result seen by the authorized account manager or auditor could be: "For clients with high risk tolerance, it is advisable to moderately allocate growth assets on the basis of stable assets, while controlling the proportion of a single theme asset."

[0213] If "preference for high-yield products" and "allocation of technology-themed funds" are also marked as strongly recoverable semantic items, the system can similarly restore "products focused on return performance" to "preference for high-yield products" and "allocation of growth assets" to "allocation of technology-themed funds" based on their respective mapping records. The authorized entity would then see the following result: "For clients with higher risk tolerance and a preference for high-yield products, it is advisable to moderately increase the allocation of technology-themed funds on the basis of stable assets, while controlling the proportion of any single theme asset." If the above semantic fragments are marked as weakly recoverable semantic items, the system will not perform word-for-word restoration but will retain weakened expressions such as "acceptable volatility," "focus on return performance," and "allocation of growth assets." This is because the goal of processing some semantic fragments is to reduce the server-side inference model's ability to accurately infer user profiles, rather than restoring the original text word-for-word in all scenarios. For weakly recoverable semantic items, the system only requires the replacement result to maintain business semantic usability, not to restore the original wording.

[0214] To ensure the rigor of semantic result recovery, this scheme adopts the following constraints: For semantic segments that require precise recovery, they must be marked as strong recovery semantic items during scrambling, and the original segment, substitute segment, category label, position index, encrypted original value, and access strategy must be saved; for precise recovery, the local mapping record and decryption result shall prevail, and fuzzy recovery can be performed using the local model; if the server-side inference model has rewritten the substitute expression, the system can prioritize matching based on the substitute expression, segment number, or context position. If a reliable match cannot be made, recovery will not be forced, but the weakened expression will be retained and recovery failure or partial recovery logs will be recorded; for semantic segments that must be stably recovered in the results, the server-side inference model can be required to retain the substitute expression or segment label as much as possible in the institution-side prompt template, thereby improving the matching stability between the returned results and the local mapping record. Therefore, semantic obfuscation is not an uncontrollable free rewriting, but rather the generation of alternative expressions for identified semantic fragments that can be recorded, tracked, and authorized for recovery on the side of financial institutions. Semantic result recovery does not rely entirely on the inference model to "guess back the original text", but rather on deterministic recovery based on local mapping and encrypted original values ​​in strong recovery scenarios, while in weak recovery scenarios, the goal is to reduce privacy and make the semantics usable, without requiring word-for-word restoration.

[0215] Figure 4 A schematic diagram of the data privacy processing device provided in this application is shown below. Figure 4 As shown, the data privacy processing device 40 provided in this embodiment includes:

[0216] The inference processing module 401 is used to obtain the de-identified inference result of the target inference text fed back by the target inference model deployed on the server when it receives a user's inference request for the target inference text; the de-identified inference result is obtained by the target inference model based on the de-identified text corresponding to the target inference text; the de-identified text is obtained by the user terminal after de-identifying the target inference text.

[0217] The reasoning result display module 402 is used to determine the display strategy of the de-identified reasoning result on the user terminal based on the user's attribute set, and to display it according to the display strategy; the display strategy includes displaying the de-identified reasoning result, or displaying the restored reasoning result obtained after restoring the de-identified reasoning result.

[0218] In one possible implementation, the inference processing module 401 is specifically used for:

[0219] Obtain the target reasoning text input by the user and identify sensitive words and characters in the target reasoning text;

[0220] Based on the sensitive information type of the sensitive word element, the sensitive word element is desensitized using the desensitization processing method corresponding to the sensitive information type, and the desensitized word element is obtained.

[0221] Based on the desensitized words and the non-sensitive words in the target reasoning text, generate the desensitized text corresponding to the target reasoning text.

[0222] In one possible implementation, the device is also used for:

[0223] Before desensitizing sensitive words according to their sensitive information type and using a desensitization processing method corresponding to the sensitive information type to obtain desensitized words, for each sensitive word in the target reasoning text, the sensitive information type of the sensitive word is identified based on its semantic features and / or format features; wherein, the sensitive information type includes at least one of semantic type, numerical type and identifier type.

[0224] In one possible implementation, if the sensitive term includes a sensitive numerical value, the inference processing module 401 is specifically used for:

[0225] Identify the numerical units in sensitive values ​​within sensitive words, and convert the sensitive values ​​into values ​​expressed in the base unit based on the preset conversion relationship between the numerical units and the base unit to obtain normalized values.

[0226] Obtain the protected range, the mapped output range, and the preset mapping expression corresponding to the normalized value. Based on the preset mapping expression, map the normalized value from the protected range to the mapped output range to obtain the initial mapped value.

[0227] The initial mapping value is disturbed by a preset controlled random disturbance factor to obtain the desensitized value; wherein, the controlled random disturbance factor randomly takes values ​​within a preset disturbance range, and the desensitized value is the product of the initial mapping value and the controlled random disturbance factor after truncation processing. The truncation processing is used to limit the value to within the mapping output range.

[0228] Based on the desensitized values, generate desensitized word elements corresponding to sensitive word elements.

[0229] In one possible implementation, if the sensitive word element includes sensitive semantics, the reasoning processing module 401 is specifically used for:

[0230] Based on the sensitive semantics in the sensitive word elements, multiple initial candidate words that match the sensitive semantics are determined from a pre-defined semantic proximity lexicon;

[0231] Determine the sampling probability of each initial candidate word, and select at least one sampled candidate word from multiple initial candidate words based on the sampling probability;

[0232] For each sampled candidate word, a comprehensive score is calculated relative to the sensitive word element. The comprehensive score is positively correlated with the semantic usability score and negatively correlated with the sensitive disclosure risk score. The semantic usability score represents the degree to which the sampled candidate word supports the target inference model in completing the inference task. The sensitive disclosure risk score represents the degree of risk that the sampled candidate word exposes user privacy.

[0233] Based on the combined score of each sampled candidate word, the target candidate word is determined from at least one sampled candidate word;

[0234] Based on the target candidate words, generate desensitized word elements corresponding to the sensitive word elements.

[0235] In one possible implementation, if the sensitive word element includes a sensitive identifier, the reasoning processing module 401 is specifically used for:

[0236] Determine the identifier type of the sensitive identifier in the sensitive word element, and determine the corresponding identifier desensitization method based on the identifier type and the preset mapping relationship between the identifier type and the identifier desensitization method;

[0237] Determine the identifier type of sensitive identifiers in sensitive word elements;

[0238] Based on the mapping relationship between the identifier type and the preset identifier type and identifier desensitization method, determine the identifier desensitization method corresponding to the sensitive identifier;

[0239] Sensitive labels are desensitized using a label desensitization method to obtain desensitized labels;

[0240] Based on the desensitized identifier, generate desensitized word elements corresponding to sensitive word elements.

[0241] In one possible implementation, if the sensitive word element includes a sensitive identifier, the reasoning processing module 401 is specifically used for:

[0242] Determine the identifier type and format constraint rules corresponding to the sensitive identifier; the format constraint rules are used to limit the character length, character set, prefix and / or verification rules that the identifier type should meet;

[0243] Based on the identifier type, format constraint rules, inference identifier of the inference request, and associativity strategy of the inference request, a random pseudo-identifier corresponding to the sensitive identifier is generated. Among them, the inference identifier is a unique identifier used to identify the inference request, and the associativity strategy of the inference request is used to control whether the same sensitive identifier is mapped to the same random pseudo-identifier in the inference process corresponding to different inference identifiers. The random pseudo-identifier satisfies the format constraint rules, does not repeat other desensitized identifiers generated in the inference process corresponding to the inference identifier, and does not contain local characters of the sensitive identifier.

[0244] Obtain the business status record corresponding to the sensitive identifier, and generate non-sensitive business status description information corresponding to the sensitive identifier based on the business status record; the business status record includes at least one of the identity verification status, account status, and contract qualification of the sensitive identifier, but does not include the sensitive identifier itself;

[0245] Based on random pseudo-identifiers and non-sensitive business status descriptions, generate de-identified semantic elements corresponding to sensitive semantic elements.

[0246] In one possible implementation, the device is also used for:

[0247] After obtaining the desensitized word elements, for each sensitive word element, a desensitized mapping record corresponding to the sensitive word element is generated. The mapping record includes the desensitized word element of the sensitive word element, the sensitive information type, the position index, the encryption result of the original value of the sensitive word element, and the access permission. The encryption result is obtained by performing attribute-based encryption on the original value, and the access permission is used to control the restoration permission of the original value.

[0248] The desensitization mapping record is used to restore the desensitized words in the desensitized reasoning result after receiving the desensitized reasoning result from the target reasoning model.

[0249] In one possible implementation, the inference result display module 402 is specifically used for:

[0250] Match the attribute set with the access permissions in the de-identification mapping record;

[0251] If the attribute set satisfies the access permissions, the display strategy is determined to be to display the restored inference result obtained after restoring the desensitized inference result;

[0252] If the attribute set does not meet the access permissions, the display strategy is determined to be to display the desensitized inference results.

[0253] In one possible implementation, the inference result display module 402 is specifically used for:

[0254] When the display strategy is to display the restored inference result obtained after restoring the desensitized inference result, the encrypted result in the desensitized mapping record corresponding to the desensitized word in the desensitized inference result is decrypted to restore the original value of the corresponding sensitive word.

[0255] Based on the restored original values, the desensitized words in the desensitized inference results are restored to obtain the restored inference results, which are then displayed.

[0256] In one possible implementation, the device is also used for:

[0257] After displaying the de-identified inference results, the system verifies the user's identity in response to the user's request to view sensitive information.

[0258] If identity verification is successful, obtain temporary decryption authorization;

[0259] Based on the temporary decryption authorization, the restored inference result is displayed after the anonymized inference result is restored.

[0260] The data privacy processing provided in this embodiment can execute the methods provided in the above method embodiments, and its implementation principle and technical effect are similar, so it will not be described in detail here.

[0261] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.

[0262] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0263] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0264] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0265] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0266] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0267] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0268] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0269] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0270] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0271] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0272] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0273] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0274] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0275] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0276] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A data privacy processing method, characterized in that, Applied to user terminals, including: Upon receiving a user's reasoning request for target reasoning text, the system obtains the anonymized reasoning result of the target reasoning text from the target reasoning model deployed on the server. The anonymized reasoning result is obtained by the target reasoning model based on the anonymized text corresponding to the target reasoning text. The anonymized text is obtained by the user terminal after anonymizing the target reasoning text. The anonymization process applies differentiated anonymization methods to different sensitive categories of words in the target reasoning text. Based on the user's attribute set, a display strategy for the anonymized inference result on the user's terminal is determined, and the result is displayed according to the display strategy. The display strategy includes displaying the anonymized inference result, or displaying the restored inference result obtained after restoring the anonymized inference result.

2. The method according to claim 1, characterized in that, Receive a reasoning request from the user for the target reasoning text, including: Obtain the target reasoning text input by the user, and determine the sensitive word elements in the target reasoning text; Based on the sensitive information type of the sensitive word element, the sensitive word element is desensitized using a desensitization processing method corresponding to the sensitive information type to obtain the desensitized word element; Based on the desensitized words and the non-sensitive words in the target reasoning text, a desensitized text corresponding to the target reasoning text is generated.

3. The method according to claim 2, characterized in that, Before desensitizing the sensitive word element according to its sensitive information type and using a desensitization processing method corresponding to the sensitive information type to obtain the desensitized word element, the method further includes: For each sensitive word in the target inference text, the sensitive information type of the sensitive word is identified based on its semantic features and / or format features; wherein the sensitive information type includes at least one of semantic type, numerical type and identifier type.

4. The method according to claim 3, characterized in that, If the sensitive word element includes a sensitive numerical value, the sensitive word element is desensitized using a desensitization processing method corresponding to the sensitive information type, resulting in desensitized word elements, including: Identify the numerical unit of the sensitive value in the sensitive word character, and convert the sensitive value into a value expressed in the base unit according to the preset conversion relationship between the numerical unit and the base unit to obtain a normalized value. Obtain the value protection interval, the mapping output interval, and the preset mapping expression corresponding to the normalized value. Based on the preset mapping expression, map the normalized value from the value protection interval to the mapping output interval to obtain the initial mapping value. The initial mapping value is perturbed by a preset controlled random perturbation factor to obtain a desensitized value; wherein, the controlled random perturbation factor randomly takes values ​​within a preset perturbation range, and the desensitized value is the value obtained by truncating the product of the initial mapping value and the controlled random perturbation factor, wherein the truncation process is used to limit the value to the mapping output range. Based on the desensitized values, desensitized word elements corresponding to the sensitive word elements are generated.

5. The method according to claim 3, characterized in that, If a sensitive word element contains sensitive semantics, the sensitive word element is desensitized using a desensitization processing method corresponding to the type of sensitive information, resulting in desensitized word elements, including: Based on the sensitive semantics in the sensitive word elements, determine multiple initial candidate words that match the sensitive semantics from a preset semantic proximity lexicon; Determine the sampling probability of each of the initial candidate words, and select at least one sampling candidate word from the plurality of initial candidate words according to the sampling probability; For each of the sampled candidate words, a comprehensive score is calculated for the sampled candidate word relative to the sensitive word element; wherein, the comprehensive score is positively correlated with the semantic usability score and negatively correlated with the sensitive disclosure risk score; the semantic usability score characterizes the degree to which the sampled candidate word supports the target inference model in completing the inference task; the sensitive disclosure risk score characterizes the degree of risk that the sampled candidate word exposes user privacy; Based on the comprehensive score of each of the sampled candidate words, a target candidate word is determined from the at least one sampled candidate word; Based on the target candidate words, desensitized word elements corresponding to the sensitive word elements are generated.

6. The method according to claim 3, characterized in that, If a sensitive word element includes a sensitive identifier, the sensitive word element is desensitized using a desensitization processing method corresponding to the sensitive information type, resulting in desensitized word elements, including: Determine the identifier type of the sensitive identifier in the sensitive word element, and determine the identifier desensitization method corresponding to the sensitive identifier based on the identifier type and the preset mapping relationship between the identifier type and the identifier desensitization method; Determine the identifier type of the sensitive identifier in the sensitive word element; Based on the mapping relationship between the identifier type and the preset identifier type and identifier desensitization method, the identifier desensitization method corresponding to the sensitive identifier is determined; The sensitive identifier is desensitized using the aforementioned identifier desensitization method to obtain the desensitized identifier; Based on the desensitized identifier, the desensitized word elements corresponding to the sensitive word elements are generated.

7. The method according to claim 3, characterized in that, If a sensitive word element includes a sensitive identifier, the sensitive word element is desensitized using a desensitization processing method corresponding to the sensitive information type, resulting in desensitized word elements, including: Determine the identifier type and format constraint rules corresponding to the sensitive identifier; the format constraint rules are used to limit the character length, character set, prefix and / or verification rules that the identifier type should satisfy; Based on the identifier type, the format constraint rules, the inference identifier of the inference request, and the associativity strategy of the inference request, a random pseudo-identifier corresponding to the sensitive identifier is generated; wherein, the inference identifier is a unique identifier used to identify the inference request, and the associativity strategy of the inference request is used to control whether the same sensitive identifier is mapped to the same random pseudo-identifier in the inference process corresponding to different inference identifiers; the random pseudo-identifier satisfies the format constraint rules, does not repeat other desensitized identifiers generated in the inference process corresponding to the inference identifier, and does not contain any partial characters of the sensitive identifier; Obtain the business status record corresponding to the sensitive identifier, and generate non-sensitive business status description information corresponding to the sensitive identifier based on the business status record; the business status record includes at least one of the identity verification status, account status, and contract qualification of the sensitive identifier, but does not include the sensitive identifier itself; Based on the random pseudo-identifier and the non-sensitive business status description information, generate the de-identified word elements corresponding to the sensitive word elements.

8. The method according to claim 2, characterized in that, After obtaining the desensitized lexical units, the method further includes: For each sensitive word, a desensitization mapping record is generated corresponding to the sensitive word; the mapping record includes the desensitized word of the sensitive word, the sensitive information type, the position index, the encryption result of the original value of the sensitive word, and the access permission; wherein, the encryption result is obtained by performing attribute-based encryption on the original value, and the access permission is used to control the restoration permission of the original value; The desensitization mapping record is used to restore the desensitized words in the desensitization reasoning result after receiving the desensitization reasoning result from the target reasoning model.

9. The method according to claim 8, characterized in that, Based on the user's attribute set, determine the display strategy for the anonymized inference results on the user's terminal, including: Match the attribute set with the access permissions in the de-identified mapping record; If the attribute set satisfies the access permissions, the display strategy is determined to be to display the restored inference result obtained after restoring the desensitized inference result; If the attribute set does not satisfy the access permissions, the display strategy is determined to be to display the de-identified reasoning result.

10. The method according to claim 9, characterized in that, Displaying according to the aforementioned display strategy includes: When the display strategy is to display the restored inference result obtained after restoring the desensitized inference result, the encryption result in the desensitized mapping record corresponding to the desensitized word in the desensitized inference result is decrypted to restore the original value of the corresponding sensitive word. Based on the restored original values, the desensitized words in the desensitized inference results are restored to obtain the restored inference results, and the restored inference results are displayed.

11. The method according to claim 9, characterized in that, After displaying the desensitization inference results, the method further includes: In response to a user's request to view sensitive information, the user is authenticated. If the authentication is successful, obtain temporary decryption authorization; Based on the temporary decryption authorization, the restored reasoning result obtained after restoring the desensitized reasoning result is displayed.

12. A data privacy processing device, characterized in that, Applied to user terminals, including: The inference processing module is used to obtain the anonymized inference result of the target inference text from the target inference model deployed on the server when receiving a user's inference request for the target inference text; the anonymized inference result is obtained by the target inference model based on the anonymized text corresponding to the target inference text; the anonymized text is obtained by the user terminal after anonymizing the target inference text; the anonymization processing applies differentiated anonymization processing methods to different sensitive categories of words in the target inference text; The inference result display module is used to determine the display strategy of the de-identified inference result on the user terminal based on the user's attribute set, and to display it according to the display strategy; the display strategy includes displaying the de-identified inference result, or displaying the restored inference result obtained after restoring the de-identified inference result.

13. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-11.

15. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-11.