Data processing method and device and storage medium
By disguising user data and restoring the original data values, the contradiction between data privacy protection and data parsing capabilities in LLM services is resolved. This enables efficient and accurate data processing and analysis while protecting user data privacy, thus promoting the safe and reliable use of LLM services.
Patent Information
- Application Number
- CN202410627034.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-11-21
AI Technical Summary
Existing Large Language Model (LLM) services face a conflict between data privacy protection and data parsing capabilities during data processing. Users are unwilling to send sensitive data to third parties for processing, which limits the use of LLM services.
By masquerading user data, the masqueraded data is provided to LLM for processing, and the original data values are restored through reverse operations. This ensures that the masqueraded data values correspond one-to-one with the original data values and are consistent in terms of data meaning and distribution, and LLM is used for data analysis.
It enables efficient and accurate data processing and analysis using LLM while protecting user data privacy, thus promoting the safe and reliable use of LLM services.
Smart Images

Figure CN120995489A_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of information services, and more specifically to methods and apparatus for processing data using large language models, as well as storage media for storing related programs. Background Technology
[0002] With the development of artificial intelligence technology, especially the emergence of large-scale language models (LLMs) such as GPT and Claude, machines' comprehension abilities have reached or even surpassed those of ordinary humans in some aspects. The powerful capabilities of LLMs give them enormous potential in data analysis and insight generation. People may want to use LLMs to analyze data, such as analyzing patterns and trends, creating data visualization charts, and automatically generating program code to process data.
[0003] Currently, powerful LLM (Limited Least Metrics) models are primarily provided to users via cloud-based APIs, while open-source models that can be deployed locally often suffer from poor performance and fail to meet user needs. Therefore, users typically need to send data to commercial companies providing LLM services for processing. However, this data transfer raises data privacy concerns. In commercial environments, data often contains sensitive business or personal information, such as customer information, product information, and transaction records. Sending this data to third-party companies for processing may increase the risk of data leakage and misuse. This risk discourages users from sending important data to LLM systems, limiting their use of LLM services and hindering the further application of artificial intelligence technologies.
[0004] As mentioned above, existing LLM services face a conflict between data parsing capabilities and data privacy protection. How to fully utilize the capabilities of LLM for data analysis while protecting user data privacy is a pressing issue that needs to be addressed. Summary of the Invention
[0005] This invention aims to propose a method for processing data using LLM, which protects user data privacy while using LLM for efficient and accurate data processing and analysis, thereby providing users with safer and more reliable artificial intelligence services.
[0006] According to one aspect of this disclosure, a computer-implemented method for processing data using a large language model is provided. The method includes: inputting a plurality of data categories into the large language model, and instructing the large language model to determine one or more data categories among the plurality of data categories that need to be disguised to protect data privacy, wherein each data category includes a plurality of data values; for each of the one or more data categories that need to be disguised, inputting a criterion for disguising that data category into the large language model; instructing the large language model to provide a plurality of candidate methods for disguising that data category based on the criterion; instructing the large language model to select one of the plurality of candidate methods as the disguising method based on the criterion; wherein the criterion includes at least: a one-to-one correspondence between the disguised data values of the data category and the original data values, and consistency between the disguised data values of the data category and the original data values in terms of data meaning and data distribution.
[0007] According to another aspect of this disclosure, an apparatus for processing data is provided. The apparatus communicates with a large language model and includes a memory storing a program and one or more processors. The processors are configured to perform the following operations by executing the program: inputting a plurality of data categories into the large language model and instructing the large language model to determine one or more data categories among the plurality of data categories that need to be disguised to protect data privacy, wherein each data category includes a plurality of data values; inputting criteria for disguising the data category into the large language model for each of the one or more data categories that need to be disguised; instructing the large language model to provide a plurality of candidate methods for disguising the data category based on the criteria; instructing the large language model to select one of the plurality of candidate methods as the disguising method based on the criteria; wherein the criteria at least include: the disguised data values of the data category correspond one-to-one with the original data values, and the disguised data values of the data category are consistent with the original data values in terms of data meaning and data distribution.
[0008] According to another aspect of this disclosure, a non-transitory computer-readable medium storing a program that, when executed by a computer, causes the computer to perform the methods described above. Attached Figure Description
[0009] Figure 1 A schematic diagram of a device for determining a camouflage method according to the present disclosure is shown.
[0010] Figure 2 This is a flowchart of a process for determining a camouflage method based on the content of this disclosure.
[0011] Figure 3 A block diagram of an apparatus for processing data using an LLM according to the present disclosure is shown schematically.
[0012] Figure 4 This is a flowchart illustrating the processing of data using LLM based on the content of this disclosure.
[0013] Figure 5 This is a flowchart of a process for automatically verifying spoofing procedures based on the content of this disclosure.
[0014] Figure 6 An exemplary configuration block diagram of computer hardware implementing the present disclosure is shown. Detailed Implementation
[0015] To enable users to use LLM for data processing while protecting user data privacy, this disclosure proposes to first disguise the original data to be processed by the user, provide the disguised data to the LLM for processing, and then recover the original data from the processing results provided by the LLM by performing the inverse operation of the disguise method, thereby obtaining the processing results for the original data.
[0016] Figure 1 A block diagram schematically illustrates an apparatus for determining a spoofing method for data spoofing according to this disclosure. Figure 1 As shown, the apparatus 100 includes a data category determination module 110 based on a large language model (LLM), a masquerade method determination module 120, and an optional masquerade program generation module 130. It should be noted that these modules refer to logical functional modules, not physical entities, and these modules can be understood as containing an LLM. These modules will be described in detail below.
[0017] like Figure 1 As shown, a user inputs multiple data categories into device 100. For illustrative purposes, this disclosure uses the retail industry as an example and provides the following exemplary data categories: consumer identification information, gender and age, product name and price, products browsed or purchased by the consumer, etc. Each data category may include multiple data values; for example, the data category "gender" may include the data values "male" and "female". However, it should be noted that this disclosure is not limited to the retail industry, nor is it limited to these exemplary data categories and data values.
[0018] In addition, users can input criteria into device 100 for masquerading data categories, which will be described in detail below.
[0019] Optionally, the user can also input other specific requirements for device 100.
[0020] The data category determination module 110 provides multiple data categories input by the user to the LLM and instructs the LLM to determine the data categories that need to be disguised to protect data privacy. Optionally, the data category determination module 110 can then present the data categories that need to be disguised as determined by the LLM to the user.
[0021] This approach is particularly advantageous in situations where users are not very familiar with the domain of the data (e.g., retail) and therefore cannot determine which data categories are important or sensitive and thus require protection. In such cases, the domain knowledge possessed by the LLM can be leveraged to recommend data categories that need protection to the user. As an example, the data category determination module 110 can instruct the LLM, acting as a retail industry expert, to determine which data categories provided by the user need protection, and then present the LLM-determined data categories to the user.
[0022] Optionally, the data category determination module 110 can also provide other specific requirements input by the user to the LLM, and instruct the LLM to determine the data categories that need to be disguised based on these specific requirements. For example, if the user specifies that consumer information needs to be disguised, the LLM will determine that data categories containing at least consumer information need to be disguised.
[0023] In this disclosure, the spoofing of data categories must at least follow the following criteria: (1) the spoofed data values of the data categories correspond one-to-one with the original data values; and (2) the spoofed data values of the data categories are consistent with the original data values in terms of data meaning and data distribution. Criterion (1) ensures that the original data values can be uniquely recovered from the spoofed data values, and criterion (2) ensures that the spoofed data values do not deviate from the meaning and distribution of the original data values.
[0024] In addition, alternatively, other rules that the masquerade must follow can be set, such as setting one or more of the following rules:
[0025] - The disguised data value is consistent with the original data value in terms of data type. In this disclosure, data type may include, for example, numbers, letters, symbols, strings, dates and times, or combinations thereof;
[0026] - The disguised data value deviates from the original data value by a fixed value;
[0027] - The original data values are divided into multiple groups, and in each group, the disguised data values correspond one-to-one with the original data values.
[0028] It should be noted that, in terms of the rules to be followed in setting up the disguise, this disclosure is not limited to the guidelines (1) and (2) given above and other exemplary rules. Those skilled in the art can design appropriate rules according to the actual situation.
[0029] Furthermore, methods for masquerading data values as described in this disclosure may include, for example, pseudonym mapping, randomization, encryption, hashing, tokenization, substitution with substitutes, format-preserving encryption (FPE), character shuffling, and so on. However, this disclosure is not limited to these masquerading methods given as examples, and those skilled in the art may adopt appropriate masquerading methods according to the actual situation, as long as the guidelines or rules described above are met.
[0030] The following examples illustrate the spoofing guidelines / rules and methods based on this disclosure.
[0031] Example 1: The data category is "Consumer Identification Information (ID)," and the original data value is a combination of numbers and letters. In this case, it is possible to require that the disguised data value retain its data type. Therefore, the disguised data value should be a combination of numbers and letters. Disguise methods that can be used include, for example, pseudonym mapping.
[0032] Example 2: The data category is "Consumer Age," and the original data values are numbers. In this case, it's possible to require the disguised data values to maintain consistency in data type and meaning (age). Therefore, the disguised data values should be numbers within a reasonable range of human ages. For example, the following disguise methods can be used:
[0033] (1) Divide the numerical range from 0 to N (where N represents the scientifically verified maximum human age) into multiple intervals, each interval having a length of K (e.g., 10);
[0034] (2) Divide the original data values into the corresponding intervals. For example, divide the original age "35 years old" into the interval [30,39].
[0035] (3) Change the order of the original age values in each interval to obtain the sequence of disguised age values. As an example, the original age sequence corresponding to consumer 1, consumer 2, consumer 3, and consumer 4 is "32 years old, 35 years old, 33 years old, 38 years old". Through shuffling, the disguised sequence is "35 years old, 38 years old, 32 years old, 33 years old".
[0036] This method ensures that the spoofed data values remain within the range of natural human ages, i.e., it does not alter the meaning of the original data values. Furthermore, since the original data values are only modified within, for example, a 10-year interval, the spoofed data values do not produce significant differences from the original data values in terms of the overall distribution across all age groups.
[0037] Example 3: The data category is "Product Name," and the original data values are words. In this case, it's possible to require the disguised data values to maintain data type consistency. Therefore, the disguised data values should be words. For example, the following disguise method can be used:
[0038] (1) Generate a random word list, the length of which depends on the total number of products. For example, the length of the list... ╳ (List length – 1) / 2 > Total number of products;
[0039] (2) Take two words from the generated list to form the disguised product name.
[0040] Return to reference Figure 1 The camouflage method determination module 120 includes a candidate method determination module 1201 and a camouflage method selection module 1202.
[0041] For one of the data categories that need protection, as previously determined by the data category determination module 110, the candidate method determination module 1201 provides the LLM with spoofing criteria or rules for that data category provided by the user, and instructs the LLM to provide multiple candidate spoofing methods that satisfy the criteria or rules.
[0042] After the LLM provides multiple candidate spoofing methods, the spoofing method selection module 1202 instructs the LLM to select one from these candidates based on spoofing criteria or rules. During this process, the LLM re-evaluates the multiple candidate spoofing methods according to the spoofing criteria or rules for that data category and determines the best spoofing method for that data category.
[0043] In addition to camouflage criteria or rules, the camouflage method determination module 120 can also provide other specific requirements from the user to the LLM and instruct the LLM to provide a camouflage method taking into account those specific requirements. For example, if the user specifies the data format that the camouflaged data value needs to conform to, the LLM will provide a camouflage method that meets that requirement.
[0044] Furthermore, there are cases where the LLM may not have knowledge of the distribution of the original data values. In such cases, the masquerade method determination module 120 can also provide the LLM with the distribution information of the original data values provided by the user, so that the LLM can determine the masquerade method based on the data distribution consistency criterion (2).
[0045] Figure 1 The illustrated apparatus 100 also includes an optional camouflage program generation module 130, which instructs the LLM to generate a camouflage program for the corresponding data category based on the camouflage method determined by the camouflage method determination module 120. Furthermore, the camouflage program generation module 130 can also instruct the LLM to generate program code that meets other specific user requirements.
[0046] Specifically, in this disclosure, the spoofing program can also be manually written based on the spoofing method determined by the spoofing method determination module 120. For example, in cases where the spoofing method is complex, the success rate of automatically generating program code by LLM may decrease, thus necessitating manual code writing. In this case, the spoofing method determination module 120 can be omitted. Figure 1 The camouflage program generation module 130 in the middle.
[0047] After generating corresponding spoofing programs for the identified data categories that need to be spoofed, these spoofing programs can be stored for later use in conjunction with other methods described below. Figure 3 and Figure 4 Used in the described process.
[0048] Figure 2 This is a flowchart illustrating the process for determining the camouflage method based on the content of this disclosure. For example... Figure 2 As shown, in step S210, multiple data categories are input to the LLM, and the LLM is instructed to determine the data category that needs to be disguised among these multiple data categories. This step can be, for example, by... Figure 1 The data category determination module 110 in the middle is used to perform this.
[0049] For the identified data category that needs to be disguised, in step S220, the LLM is input with the disguise criteria or rules for that data category, and the LLM is instructed to provide multiple candidate methods for disguising that data category based on the criteria or rules. This step can be, for example, by... Figure 1 The candidate method determination module 1201 is executed.
[0050] Then, in step S230, the instruction LLM selects one from the multiple candidate methods as the camouflage method based on the camouflage criterion or rule. This step can be, for example, by... Figure 1 The masquerade method in the selection module 1202 is executed.
[0051] pass Figure 2 The method shown can utilize LLM to obtain the data category that needs to be disguised, and obtain a disguise method for disguising the data values of that data category.
[0052] Figure 3 A block diagram schematically illustrates an apparatus for processing data using an LLM according to this disclosure. (See diagram for example.) Figure 3 As shown, the device 300 includes a camouflage module 310, a processing module 320 based on LLM, and a recovery module 330. It should be noted that these modules refer to logical functional modules, not physical entities, and the processing module 320 can be understood as containing an LLM.
[0053] The user inputs the data they want the LLM to process and the processing requirements into device 300. The processing requirements indicate how the user wants the LLM to process the data or what kind of processing results they hope to obtain (e.g., analysis results of sales data).
[0054] When the data input by the user corresponds to the data category that needs to be disguised as described above, the disguise module 310 can use the disguise method or disguise program for that data category described above to disguise the data value provided by the user to obtain the disguised data value. As an example, when the data that the user wants to process involves a product name that needs to be kept confidential, the disguise module 310 can use the disguise method for product names to disguise the original product name (e.g., "XX") provided by the user to obtain the disguised product name (e.g., "YY").
[0055] The processing module 320 provides the LLM with the disguised data values generated by the disguise module 310 and the user's processing requirements, and instructs the LLM to process the data values based on the user's requirements. For example, if the user wants the LLM to calculate the sales revenue of various products, the LLM calculates the revenue based on the received disguised product names and outputs the sales revenue for each product; for example, the sales revenue for product "YY" is 100,000.
[0056] The recovery module 330 obtains the processing result output by the processing module 320, which contains the disguised data value. The recovery module 330 uses a recovery method to restore the disguised data value in the processing result to the original data value, thereby obtaining the processing result for the original data value. As an example, the recovery module 330 restores the product name "YY" in the statistical result output by the LLM to the original product name "XX", thereby obtaining the statistical result for the real product "XX" (sales amount is 100,000).
[0057] In this disclosure, the masquerading method establishes a one-to-one mapping from the original data value to the masqueraded data value, and the recovery method is based on the inverse mapping of this mapping. As an example, the mapping relationship from the original data value to the masqueraded data value can be stored in a table; during recovery, the original data value corresponding to the masqueraded data value can be obtained by looking up this table. Furthermore, in this disclosure, the recovery method may also include the inverse operation of the operations in the masquerading method.
[0058] Figure 4 This is a flowchart illustrating the data processing using LLM based on the content of this disclosure. For example... Figure 4 As shown, in step S410, the user inputs a data value to be processed by the LLM. When this data value corresponds to a data category that needs to be disguised, the data value is disguised based on a disguise method for that data category to obtain a disguised data value, as shown in step S420. This step can be, for example, by... Figure 3 The masquerade module 310 in the middle is used to execute.
[0059] Then, in step S430, the disguised data value is input to the LLM, and the LLM is instructed to process the provided disguised data value according to the user's processing requirements. This step can be, for example, by... Figure 3 The processing module 320 in the middle is used to execute it.
[0060] In step S440, the LLM processing result is obtained, and the disguised data values contained in the processing result are restored to their original values using a recovery method, thereby obtaining the processing result for the original data values. This step can be, for example, by... Figure 3 The recovery module 330 in the middle is used to execute it.
[0061] In particular, in this disclosure, the masqueraded data values generated in step S420 can be further used for data augmentation. Specifically, the masqueraded data values differ from the original data values but have a consistent data distribution, and therefore can be used to expand the user's set of original data values. For example, the expanded dataset can be used as training or testing samples to train or test the apparatus or other apparatus or model according to this disclosure.
[0062] Furthermore, the generated spoofing program described above can also be verified within this disclosure. Verification can include automated verification and manual verification.
[0063] Figure 5 A flowchart illustrating the process of automatically verifying a spoofing program is shown. Figure 5As shown, in step S510, a sample data value (e.g., "38 years old") is generated for the data category (e.g., consumer age) corresponding to the fake program to be verified. Since the generated sample data value is only used to verify the reliability of the fake program, it does not need to be the user's real data.
[0064] In step S520, the spoofing module 310 spoofs the generated sample data value by running the spoofing program to be verified, and obtains the spoofed data value (e.g., "33 years old").
[0065] In step S530, the recovery module 330 recovers the original data value from the disguised data value according to the recovery method.
[0066] In step S540, it is determined whether the data value recovered by the recovery module 330 is the same as the sample data value generated in step S510. If the determination result is "yes", then the spoofing program is determined to be usable.
[0067] If the judgment result is "no", it indicates that the spoofing program has a problem and is unusable. In this case, an alert can be presented to indicate that an error exists and the spoofing program needs to be regenerated. Optionally, specific information related to the error can also be provided, such as the cause of the error and the location where the error occurred. More specifically, in step S550, it can be done by... Figure 1 The spoofing program generation module 130 instruction LLM in the middle regenerates the spoofing program based on the spoofing method for the data category (e.g., consumer age) and optional error-related information, or the spoofing program is modified or rewritten manually.
[0068] Then, the method can return to step S510 to execute the new spoofing program. Figure 5 The verification process is illustrated. Furthermore, preferably, the number of times the spoofing program is regenerated can be limited. For example, if N (e.g., 10) regenerated spoofing programs fail... Figure 5 If the verification shown is complete, the process will terminate.
[0069] The above describes the process of automatically verifying spoofing programs. In the case of manual verification, the operation is the same as... Figure 5 The similarity shown is that the operation of generating sample data values in step S510 can be omitted, and the user's real data values are input into the spoofing module 310 in step S520.
[0070] The technology of this disclosure has been described above with reference to specific embodiments. This disclosure enables users to perform efficient data processing or analysis using LLM while protecting data privacy, thus promoting user adoption of LLM services.
[0071] The methods described in the above embodiments can be implemented by software, hardware, or a combination of software and hardware. Programs included in the software can be stored beforehand in a storage medium located internally or externally to the device. As an example, during execution, these programs are written to random access memory (RAM) and executed by a processor (e.g., a CPU) to implement the various methods and processes described herein.
[0072] This disclosure provides computer program code and computer program products for implementing the methods described above, as well as a computer-readable storage medium on which the computer program code is recorded.
[0073] Figure 6 An example configuration block diagram of computer hardware is shown, which is an example of a device for processing data according to the present disclosure, performing the method of the present disclosure according to a program.
[0074] like Figure 6 As shown, in computer 600, central processing unit (CPU) 601, read-only memory (ROM) 602 and random access memory (RAM) 603 are connected to each other via bus 604.
[0075] The input / output interface 605 is further connected to the bus 604. The input / output interface 605 is connected to the following components: an input device 606 formed by a keyboard, mouse, microphone, etc.; an output device 607 formed by a display, speaker, etc.; a storage device 608 formed by a hard disk, non-volatile memory, etc.; a communication device 609 formed by a network interface card (such as a local area network (LAN) card, modem, etc.); and a driver 610 for driving a removable medium 611, such as a magnetic disk, optical disk, magneto-optical disk, or semiconductor memory.
[0076] In a computer with the above structure, the CPU 601 loads a program stored in the storage device 608 into the RAM 603 via the input / output interface 605 and the bus 604, and executes the program to perform the method described above.
[0077] The program to be executed by the computer (CPU 601) can be recorded on a removable medium 611, which serves as a packaging medium, and is formed of, for example, a magnetic disk (including a floppy disk), an optical disk (including a compact optical disk-read-only memory (CD-ROM)), a digital multifunction optical disk (DVD), etc.), a magneto-optical disk, or a semiconductor memory. Furthermore, the program to be executed by the computer (CPU 601) can also be provided via wired or wireless transmission media such as a local area network, the Internet, or digital satellite broadcasting.
[0078] When the removable medium 611 is installed in the drive 610, the program can be installed in the storage device 608 via the input / output interface 605. Alternatively, the program can be received by the communication device 609 via a wired or wireless transmission medium and installed in the storage device 608. Alternatively, the program can be pre-installed in the ROM 602 or the storage device 608.
[0079] A program executed by a computer may be a program that performs processing in the order described in this disclosure, or it may be a program that performs processing in parallel or when needed (such as when invoked).
[0080] The modules or devices described in this disclosure are for logical purposes only and do not strictly correspond to physical devices or entities. For example, the function of each module described in this disclosure may be implemented by multiple physical entities, or the function of multiple modules described in this disclosure may be implemented by a single physical entity. Furthermore, features, components, elements, steps, etc., described in one embodiment are not limited to that embodiment, but can also be applied to other embodiments, such as replacing specific features, components, elements, steps, etc., in other embodiments, or in combination with them.
[0081] The scope of this disclosure is not limited to the specific embodiments described herein. Those skilled in the art will understand that various modifications or variations can be made to the embodiments described herein, depending on design requirements and other factors, without departing from the principles of this disclosure. The scope of this disclosure is defined by the appended claims and their equivalents.
[0082] In addition, this disclosure also includes the following implementation methods.
[0083] (1). A computer-implemented method for processing data using a large language model, comprising:
[0084] The large language model is input with multiple data categories, and is instructed to determine one or more data categories among the multiple data categories that need to be disguised to protect data privacy, wherein each data category includes multiple data values;
[0085] For each of the one or more data categories that need to be disguised,
[0086] Input the criteria used to disguise the data category into the large language model;
[0087] The instruction specifies that the large language model provides multiple candidate methods for masquerading the data category based on the criteria.
[0088] The instruction states that the large language model selects one of the multiple candidate methods as the masquerading method based on the criteria.
[0089] The criteria include at least the following:
[0090] The disguised data values of the data categories correspond one-to-one with the original data values, and
[0091] The disguised data values of the data category are consistent with the original data values in terms of data meaning and data distribution.
[0092] (2). The method according to (1) further includes:
[0093] When a data value of one of the data categories that needs to be disguised is received from a user, the data value of the data category is disguised based on the disguise method for the data category.
[0094] The disguised data values are input into the large language model, and the large language model is instructed to process the data values based on the disguised data values.
[0095] The processing results of the large language model are obtained, and the disguised data values contained in the processing results are restored to the original data values based on the recovery method.
[0096] (3). According to the method described in (2), wherein the camouflage method establishes a mapping from the original data value to the camouflaged data value, and the recovery method is based on the inverse mapping of the mapping.
[0097] (4). The method according to (1), wherein the plurality of data categories are domain-specific data categories, and the method further includes: instructing the large language model to determine, in the capacity of an expert in the domain, one or more data categories among the plurality of data categories that need to be disguised.
[0098] (5). The method according to (1) further includes: instructing the large language model to generate a spoofing program based on the spoofing method; or having a spoofing program written manually based on the spoofing method.
[0099] (6). The method according to (1) further includes: instructing the large language model to further provide the plurality of candidate methods and select the masquerading method based on one or more of the following rules:
[0100] The disguised data value of the data category is consistent with the original data value in terms of data type, wherein the data type includes numbers, letters, symbols, strings, dates and times, or combinations of two or more of them;
[0101] The disguised data value of the data category deviates from the original data value by a fixed value;
[0102] The original data values of the data category are divided into multiple groups, and in each group, the disguised data value corresponds one-to-one with the original data value.
[0103] (7). The method according to (5) further includes:
[0104] a. Generate disguised sample data values by running the spoofing program on the sample data values;
[0105] b. Recover the original sample data values based on the disguised sample data values;
[0106] c. Determine whether the recovered sample data values are the same as the original sample data values;
[0107] d. If the recovered sample data values differ from the original sample data values, determine that the spoofing program is unusable, and regenerate the spoofing program based on the spoofing method.
[0108] Steps a through d are performed repeatedly.
[0109] (8). According to the method of (7), wherein if it is determined in step c that the recovered sample data value is the same as the original sample data value, the spoofing procedure is determined to be available and the method is terminated, wherein the method is terminated when steps a to d are repeatedly executed a predetermined number of times.
[0110] (9) An apparatus for processing data, the apparatus communicating with a large language model, and comprising:
[0111] Memory containing programs; and
[0112] One or more processors, the processors being configured to perform the following operations by executing the program:
[0113] The large language model is input with multiple data categories, and is instructed to determine one or more data categories among the multiple data categories that need to be disguised to protect data privacy, wherein each data category includes multiple data values;
[0114] For each of the one or more data categories that need to be disguised,
[0115] Input the criteria used to disguise the data category into the large language model;
[0116] The instruction specifies that the large language model provides multiple candidate methods for masquerading the data category based on the criteria.
[0117] The instruction states that the large language model selects one of the multiple candidate methods as the masquerading method based on the criteria.
[0118] The criteria include at least the following:
[0119] The disguised data values of the data categories correspond one-to-one with the original data values, and
[0120] The disguised data values of the data category are consistent with the original data values in terms of data meaning and data distribution.
[0121] (10). The apparatus according to (9), wherein the operation further includes:
[0122] When a data value of one of the data categories that needs to be disguised is received from a user, the data value of the data category is disguised based on the disguise method for the data category.
[0123] The disguised data values are input into the large language model, and the large language model is instructed to process the data values based on the disguised data values.
[0124] The processing results of the large language model are obtained, and the disguised data values contained in the processing results are restored to the original data values based on the recovery method.
[0125] (11). The apparatus according to (10), wherein the spoofing method establishes a mapping from the original data value to the spoofed data value, and the recovery method is based on the inverse mapping of the mapping.
[0126] (12). The apparatus according to (9), wherein the plurality of data categories are domain-specific data categories, and the method further comprises: instructing the large language model to determine, in the capacity of an expert in the domain, one or more data categories among the plurality of data categories that need to be disguised.
[0127] (13). The apparatus according to (9) further includes: instructing the large language model to generate a spoofing program based on the spoofing method; or having a spoofing program written manually based on the spoofing method.
[0128] (14). The apparatus according to (9) further includes: instructing the large language model to further provide the plurality of candidate methods and select the masquerading method based on one or more of the following rules:
[0129] The disguised data value of the data category is consistent with the original data value in terms of data type, wherein the data type includes numbers, letters, symbols, strings, dates and times, or combinations of two or more of them;
[0130] The disguised data value of the data category deviates from the original data value by a fixed value;
[0131] The original data values of the data category are divided into multiple groups, and in each group, the disguised data value corresponds one-to-one with the original data value.
[0132] (15). The apparatus according to (13) further includes:
[0133] a. Generate disguised sample data values by running the spoofing program on the sample data values;
[0134] b. Recover the original sample data values based on the disguised sample data values;
[0135] c. Determine whether the recovered sample data values are the same as the original sample data values;
[0136] d. If the recovered sample data values differ from the original sample data values, determine that the spoofing program is unusable, and regenerate the spoofing program based on the spoofing method.
[0137] Steps a through d are performed repeatedly.
[0138] (16). According to the apparatus of (15), if it is determined in step c that the recovered sample data value is the same as the original sample data value, the spoofing procedure is determined to be available and the method is terminated, wherein the method is terminated when steps a to d are repeatedly executed a predetermined number of times.
[0139] (17). A non-transitory computer-readable medium storing a program, which, when executed by a computer, causes the computer to perform a method of processing data according to any one of (1)-(8).
Claims
1. A computer-implemented method for processing data using a large language model, comprising: The large language model is input with multiple data categories, and is instructed to determine one or more data categories among the multiple data categories that need to be disguised to protect data privacy, wherein each data category includes multiple data values; For each of the one or more data categories that need to be disguised, Input the criteria used to disguise the data category into the large language model; The instruction specifies that the large language model provides multiple candidate methods for masquerading the data category based on the criteria. The instruction states that the large language model selects one of the multiple candidate methods as the masquerading method based on the criteria. The criteria include at least the following: The disguised data values of the data categories correspond one-to-one with the original data values, and The disguised data values of the data category are consistent with the original data values in terms of data meaning and data distribution.
2. The method according to claim 1, further comprising: When a data value of one of the data categories that needs to be disguised is received from a user, the data value of the data category is disguised based on the disguise method for the data category. The disguised data values are input into the large language model, and the large language model is instructed to process the data values based on the disguised data values. The processing results of the large language model are obtained, and the disguised data values contained in the processing results are restored to the original data values based on the recovery method.
3. The method according to claim 2, wherein, The camouflage method establishes a mapping from the original data value to the camouflaged data value, and the recovery method is based on the inverse mapping of the mapping.
4. The method according to claim 1, wherein, The multiple data categories are domain-specific data categories, and The method further includes instructing the large language model, in the capacity of an expert in the specific domain, to determine one or more data categories among the multiple data categories that need to be disguised.
5. The method according to claim 1, further comprising: The instruction describes a large language model that generates a spoofing program based on the spoofing method; or The camouflage program is written manually based on the camouflage method.
6. The method according to claim 1, further comprising: The large language model described in the instruction further provides the plurality of candidate methods and selects the masquerade method based on one or more of the following rules: The disguised data value of the data category is consistent with the original data value in terms of data type, wherein the data type includes numbers, letters, symbols, strings, dates and times, or combinations of two or more of them; The disguised data value of the data category deviates from the original data value by a fixed value; The original data values of the data category are divided into multiple groups, and in each group, the disguised data value corresponds one-to-one with the original data value.
7. The method according to claim 5, further comprising: a. Generate disguised sample data values by running the spoofing program on the sample data values; b. Recover the original sample data values based on the disguised sample data values; c. Determine whether the recovered sample data values are the same as the original sample data values; d. If the recovered sample data values differ from the original sample data values, determine that the spoofing program is unusable, and regenerate the spoofing program based on the spoofing method. Steps a through d are performed repeatedly.
8. The method according to claim 7, wherein, If, in step c, the recovered sample data value is determined to be the same as the original sample data value, the spoofing procedure is deemed usable, and the method is terminated. The method terminates when steps a through d are repeated a predetermined number of times.
9. An apparatus for processing data, the apparatus communicating with a large language model, and comprising: A memory that stores programs; as well as One or more processors, the processors being configured to perform the following operations by executing the program: The large language model is input with multiple data categories, and is instructed to determine one or more data categories among the multiple data categories that need to be disguised to protect data privacy, wherein each data category includes multiple data values; For each of the one or more data categories that need to be disguised, Input the criteria used to disguise the data category into the large language model; The instruction specifies that the large language model provides multiple candidate methods for masquerading the data category based on the criteria. The instruction states that the large language model selects one of the multiple candidate methods as the masquerading method based on the criteria. The criteria include at least the following: The disguised data values of the data categories correspond one-to-one with the original data values, and The disguised data values of the data category are consistent with the original data values in terms of data meaning and data distribution.
10. A non-transitory computer-readable medium storing a program, which, when executed by a computer, causes the computer to perform a method for processing data according to any one of claims 1-8.