Numerical data generalization desensitization method and related device

By constructing an equivalence class tree structure and performing inhibition rate sorting and merging pruning, the problem of insufficient accuracy and realism in numerical data generalization is solved, achieving efficient and accurate data anonymization, applicable to various datasets.

CN121859375APending Publication Date: 2026-04-14NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-07
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In the process of generalizing numerical data, existing technologies cannot guarantee the accuracy and authenticity of the generalization results, especially when satisfying the k-anonymity constraint, which may lead to a decrease in the accuracy and authenticity of the data generalization results.

Method used

By initializing the anonymity factor, suppression budget, and dataset size, the dataset is partitioned according to the least significant digits, an equivalence class tree structure is constructed, and sorting and merging pruning are performed based on the suppression rate to ensure that the generalization results meet the constraints of the anonymity factor and suppression budget.

Benefits of technology

It achieves efficient and accurate generalization of numerical data while satisfying the anonymization factor and suppression budget conditions, ensuring that the anonymized data does not leak sensitive information while retaining certain numerical characteristics and usability, and is applicable to datasets of different sizes and types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121859375A_ABST
    Figure CN121859375A_ABST
Patent Text Reader

Abstract

The invention discloses a numerical data generalization desensitization method and a related device, and relates to the technical field of privacy data protection, the method comprises the following steps: initializing an anonymous factor, and inhibiting budget and a data set size; dividing the data set according to the minimum effective digits, and generalizing and filtering each data subset to obtain a plurality of equivalence classes; dividing the equivalence classes, constructing equivalence class tree structures, calculating the inhibition rate of each equivalence class, sorting the equivalence classes according to the inhibition rates from small to large, updating the current maximum inhibition rate for each equivalence class tree structure based on a sorting result, and performing recursive merging pruning until the maximum inhibition rate constraint is met; and traversing leaf nodes of all equivalence tree structures, when the size of the corresponding leaf node is greater than or equal to the anonymous factor, replacing data in the equivalence class with a generalization value corresponding to the equivalence class, and adding the generalization value into a result data set to obtain a result set. According to the invention, the accuracy and authenticity of a generalization result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of privacy data protection technology, and in particular to a method and apparatus for generalizing and de-identifying numerical data. Background Technology

[0002] With the development and application of technologies such as computers and mobile internet, the issue of privacy leaks involved in the collection and publication of personal information has increasingly attracted people's attention. To achieve a balance between the usability and privacy of published data, data anonymization is necessary to protect personal privacy information. For ease of research, personal attribute information is divided into identifying attributes, quasi-identifying attributes, sensitive attributes, and non-sensitive attributes. Identifying attributes are those that can uniquely identify the object corresponding to a record; quasi-identifying attributes are those that can re-identify the object corresponding to a record by connecting to an external data source; sensitive attributes contain sensitive information about the object; and non-sensitive attributes are those that do not re-identify the object or only contain non-sensitive information.

[0003] A typical metric for measuring data anonymization is the k-anonymity constraint, which states that for any given record in a dataset, there exist at least k-1 other records that have identical values ​​on all quasi-identification attributes. k-anonymity augmentation involves generalizing and suppressing a dataset to satisfy the k-anonymity constraint, ensuring that each equivalence class is at least k in size. An equivalence class is a subset of records with the same quasi-identification attribute values. Generalization involves replacing existing values ​​with more general values, thus expanding the equivalence classes to satisfy the k-anonymity constraint. Suppression involves removing isolated data that cannot be generalized to a equivalence class satisfying the k-anonymity constraint. k-anonymity augmentation typically performs generalization and suppression operations under k-anonymity constraints (anonymity factor) and maximum suppression number (suppression budget) constraints.

[0004] For numerical quasi-identifier attributes, common k-anonymity augmentation methods often employ either manually specifying the generalization level or using a digit-by-digit trial-and-error strategy. This involves discarding the last digit from right to left and verifying whether the k-anonymity constraint is satisfied, gradually reducing precision until the constraint is met. Manually specifying the generalization level requires sufficient prior knowledge of the data distribution. When using a digit-by-digit trial-and-error strategy for numerical data generalization, in order to satisfy the k-anonymity constraint, data differing by one or even multiple orders of magnitude may be generalized to the same equivalence class, leading to reduced accuracy. Furthermore, values ​​with fewer than 10 significant digits may be generalized to 0, further reducing the accuracy and realism of the generalization results.

[0005] Therefore, improving the accuracy and realism of generalization results has become a pressing technical problem that needs to be solved in this field. Summary of the Invention

[0006] The purpose of this application is to provide a numerical data generalization desensitization method and related apparatus, which can improve the accuracy and authenticity of the generalization results.

[0007] To achieve the above objectives, this application provides the following solution.

[0008] In a first aspect, this application provides a numerical data generalization desensitization method, which includes the following steps.

[0009] Initialize the anonymity factor, suppression budget, and dataset size.

[0010] The dataset is divided into several subsets based on the least significant digit. Each subset is then generalized and filtered to obtain several equivalence classes. Each subset corresponds to a least significant digit.

[0011] Based on each equivalence class, the data is generalized from smallest to largest number of significant digits, and the equivalence classes are divided according to the generalization results until the size of the equivalence class is less than or equal to the anonymity factor, thereby constructing an equivalence class tree structure.

[0012] The inhibition rate of each equivalence class is calculated based on the equivalence class tree structure. The equivalence classes are then sorted in ascending order of inhibition rate to obtain the sorting result. The inhibition rate is the inhibition number of the equivalence class divided by the size of the equivalence class.

[0013] Based on the sorting results, for each equivalence class tree structure, the current maximum inhibition rate is updated, and recursive merging and pruning are performed until the maximum inhibition rate constraint is satisfied.

[0014] Traverse all leaf nodes of the equivalence class tree structure. When the size of the corresponding leaf node is greater than or equal to the anonymity factor, replace the data in the equivalence class with the generalized value corresponding to the equivalence class and add it to the result dataset to obtain the result set.

[0015] Optionally, the dataset can be divided into several subsets based on the least significant digits. Each subset can then be generalized and filtered to obtain several equivalence classes. This process includes the following steps.

[0016] Based on the dataset, the positional notation is used to represent numbers, and the significant digits are numbered. The numbering rule is as follows: with the decimal point as the origin, the significant digits in the decimal part to the right of the decimal point are numbered from left to right starting from 1, and the significant digits in the integer part to the left of the decimal point are numbered from right to left starting from -1. Each significant digit corresponds to a significant place value.

[0017] Calculate the least significant digits of the data in the dataset, and divide the dataset into several subsets according to the least significant digits; the data in each subset has the same least significant digits.

[0018] The data in each subset is generalized to the least significant digit, i.e., the generalization digit, and the subset is divided into several equivalence classes based on the generalization value; each equivalence class corresponds to a generalization digit and a generalization value.

[0019] Determine whether the size of each equivalence class is less than the anonymity factor to obtain the first judgment result.

[0020] If the first judgment result is negative, then the corresponding equivalence class is retained.

[0021] If the first judgment result is yes, then the corresponding equivalence class size is subtracted from the suppression budget and the dataset size respectively, and the corresponding equivalence class is deleted.

[0022] Optionally, based on each equivalence class, the data is generalized from smallest to largest in terms of the number of significant digits, and the equivalence classes are divided according to the generalization results until the size of the equivalence class is less than or equal to the anonymity factor, thereby constructing an equivalence class tree structure, specifically including the following steps.

[0023] Increment the generalization number of the current generalization number position to the equivalence class by 1, and determine whether it exceeds the maximum significant number of digits to obtain the second judgment result.

[0024] If the second judgment result is yes, then the division stops.

[0025] If the second judgment result is negative, then the data in the equivalence class is generalized to the current generalization digit, and the equivalence class is divided into several sub-equivalence classes according to the generalization value; each sub-equivalence class corresponds to a generalization value, and the generalization digit position of the sub-equivalence class is used as the current generalization digit.

[0026] Sort the sub-equivalence classes according to their generalization values ​​to obtain a list of sub-equivalence classes of the current equivalence class.

[0027] Determine whether the size of the sub-equivalence classes in the sub-equivalence class list is greater than the anonymity factor to obtain a third determination result.

[0028] If the third judgment result is yes, then return "increase the generalization number of the current generalization number position which is the equivalence class by 1".

[0029] If the third judgment result is negative, then an equivalence class tree structure is constructed.

[0030] Optionally, the inhibition rate of each equivalence class is calculated based on the equivalence class tree structure, and the equivalence classes are sorted in ascending order of inhibition rate to obtain the sorting result, specifically including the following steps.

[0031] The fourth judgment result is obtained by checking whether the list of sub-equivalence classes of an equivalence class is empty.

[0032] If the fourth judgment result is negative, then the suppression number of each sub-equivalence class is calculated, and the suppression number of the equivalence class is the sum of the suppression numbers of each sub-equivalence class.

[0033] If the fourth judgment result is yes, and the size of the equivalence class is less than the anonymity factor, then the inhibition number of the equivalence class is the size of the equivalence class; otherwise, the inhibition number of the equivalence class is 0.

[0034] The inhibition rate of each equivalence class is calculated based on the inhibition number, and the equivalence classes are sorted in ascending order of inhibition rate to obtain the sorting result.

[0035] Optionally, based on the sorting result, for each equivalence class tree structure, the current maximum inhibition rate is updated, and recursive merging and pruning are performed until the maximum inhibition rate constraint is met, specifically including the following steps.

[0036] Divide the current suppression budget by the current dataset size to obtain the current maximum suppression rate.

[0037] Based on the current maximum suppression rate, the equivalence class tree structure corresponding to the current equivalence class is recursively merged and pruned until its suppression rate is less than or equal to the current maximum suppression rate, thus obtaining the merged and pruned result.

[0038] Based on the merging and pruning results, the suppression number of the equivalence class is calculated according to the equivalence class tree structure. The suppression number of the current equivalence class is deducted from the suppression budget, and the size of the current equivalence class is deducted from the dataset size.

[0039] Optionally, based on the current maximum suppression rate, the equivalence class tree structure corresponding to the current equivalence class is recursively merged and pruned until its suppression rate is less than or equal to the current maximum suppression rate, to obtain the merged and pruned result, specifically including the following steps.

[0040] Initialize the maximum suppression rate and equivalence class size, and calculate the suppression budget based on the maximum suppression rate and equivalence class size.

[0041] Calculate the inhibition number of the equivalence class, divide the inhibition number by the size of the equivalence class to obtain the inhibition rate of the equivalence class, and determine whether the inhibition rate is less than the maximum inhibition rate to obtain the fifth judgment result.

[0042] If the result of the fifth judgment is yes, then execution stops.

[0043] If the fifth judgment result is negative, then the inhibition rate of each sub-equivalence class is calculated, sorted in ascending order, and the maximum inhibition rate of the sub-equivalence class is initialized with the maximum inhibition rate.

[0044] Select sub-equivalence classes from the sub-equivalence class list one by one as the current sub-equivalence class. First, use the maximum suppression rate of the sub-equivalence class and the size of the current sub-equivalence class as parameters to recursively merge and prune the current sub-equivalence class. Then, calculate the suppression number of the current sub-equivalence class, subtract the suppression number of the current sub-equivalence class from the suppression budget, subtract the size of the current sub-equivalence class from the equivalence class size, and update the maximum suppression rate of the sub-equivalence class to the suppression budget divided by the equivalence class size.

[0045] Determine whether the inhibition rate of the equivalence class is greater than the maximum inhibition rate to obtain the sixth judgment result.

[0046] If the result of the sixth judgment is negative, then the merged pruning result is obtained.

[0047] If the sixth judgment result is yes, then determine whether the size of the sub-equivalence class list is less than or equal to 2, and obtain the seventh judgment result.

[0048] If the seventh judgment result is yes, then clear the sub-equivalence class list and stop execution; merge the first two sub-equivalence classes, and set the generalization value and generalization number of the merged sub-equivalence class to the generalization value and generalization number of the current equivalence class, until the maximum suppression rate constraint is satisfied.

[0049] If the result of the seventh judgment is negative, then the merged pruning result is obtained.

[0050] Secondly, this application provides a numerical data generalization desensitization device, which is used to implement the numerical data generalization desensitization method according to any one of the first aspects, and the numerical data generalization desensitization device includes the following units.

[0051] The parameter initialization unit is used to initialize the anonymity factor, suppression budget, and dataset size.

[0052] The dataset partitioning unit is used to divide the dataset according to the least significant digit, resulting in several data subsets. Each data subset is then generalized and filtered to obtain several equivalence classes; each data subset corresponds to a least significant digit.

[0053] The equivalence class partitioning unit is used to generalize the data based on each equivalence class, from smallest to largest number of significant digits, and to partition the equivalence classes according to the generalization results, until the size of the equivalence class is less than or equal to the anonymity factor, thereby constructing an equivalence class tree structure.

[0054] The equivalence class sorting unit is used to calculate the inhibition rate of each equivalence class according to the equivalence class tree structure, sort the equivalence classes in ascending order of inhibition rate, and obtain the sorting result; the inhibition rate is the inhibition number of the equivalence class divided by the size of the equivalence class.

[0055] The merge pruning unit is used to update the current maximum inhibition rate for each equivalence class tree structure based on the sorting result, and to perform recursive merge pruning until the maximum inhibition rate constraint is met.

[0056] The result set construction unit is used to traverse the leaf nodes of all equivalence class tree structures. When the size of the corresponding leaf node is greater than or equal to the anonymity factor, the data in the equivalence class is replaced with the generalized value corresponding to the equivalence class and added to the result dataset to obtain the result set.

[0057] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the numerical data generalization desensitization method described in any one of the first aspects.

[0058] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the numerical data generalization desensitization method described in any one of the first aspects.

[0059] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the numerical data generalization desensitization method described in any one of the first aspects.

[0060] Based on the specific embodiments provided in this application, the following technical effects are disclosed.

[0061] This application provides a numerical data generalization de-identification method and related apparatus. The method includes: initializing anonymity factors, suppression budgets, and dataset size; defining clear execution boundaries and constraints for all subsequent data processing operations to ensure the entire de-identification process proceeds orderly within a pre-set security and efficiency framework, avoiding deviations in processing direction or loss of control due to missing or ambiguous parameters; dividing the dataset according to the least significant digit to obtain several data subsets; performing generalization and filtering on each data subset to obtain several equivalence classes; each data subset corresponds to a least significant digit; achieving preliminary regularization and classification of the original data based on the least significant digit feature dimension. This approach groups data with similar numerical characteristics together, laying the foundation for more refined generalization operations through hierarchical processing. Simultaneously, filtering operations can preemptively remove invalid or abnormal data, reducing computational redundancy in subsequent processing. Based on each equivalence class, data is generalized from smallest to largest effective digit, and the equivalence classes are divided according to the generalization results until the size of each equivalence class is less than or equal to the anonymity factor, thus constructing an equivalence class tree structure. This allows for gradient generalization of data in a hierarchical and progressive manner. The tree structure clearly records the process and results of each level of generalization, ensuring the traceability of data generalization and guaranteeing that each equivalence class meets basic anonymization and security requirements through the constraint of the anonymity factor. The suppression rate of each equivalence class is calculated based on the equivalence class tree structure. The equivalence classes are then sorted from smallest to largest suppression rate to obtain a sorting result. The suppression rate is the number of suppressions in each equivalence class divided by the size of the equivalence class. This provides a clear priority basis for subsequent equivalence class processing. The suppression rate, as a core indicator for measuring the cost of equivalence class suppression, helps subsequent steps accurately identify equivalence classes with lower processing costs, thereby minimizing data loss while meeting the desensitization requirements. Based on the sorting result, the current maximum suppression rate is updated for each equivalence class tree structure, and recursive merging and pruning are performed until the maximum suppression rate constraint is met. This optimizes the equivalence class tree structure within the suppression budget, eliminating redundant equivalence class branches through merging and pruning operations, while strictly controlling the maximum suppression rate to not exceed a preset threshold, achieving a dynamic balance between data desensitization effectiveness and data usability. Traverse all leaf nodes of the equivalence class tree structure. When the size of the corresponding leaf node is greater than or equal to the anonymity factor, replace the data in the equivalence class with the generalized value corresponding to the equivalence class and add it to the result dataset to obtain the result set. This ensures that the anonymized data will not leak the sensitive information of the original data, while retaining certain numerical features and usability, making it suitable for subsequent data analysis and other application scenarios.This application establishes a complete and closed-loop numerical data anonymization process through step-by-step parameter initialization, data partitioning, structure construction, priority sorting, tree optimization, and result generation. This method can achieve efficient and accurate generalized anonymization of numerical data while strictly meeting constraints such as anonymity factor and suppression budget. It effectively balances the security and usability of data anonymization, avoiding data value loss due to over-anonymization. At the same time, the construction and optimization of the equivalence class tree structure improves the operability and traceability of the entire anonymization process, making it applicable to the anonymization needs of numerical datasets of different sizes and types. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0063] Figure 1 This is a schematic diagram of a bit-by-bit generalization process provided in an embodiment of this application.

[0064] Figure 2 This is a schematic diagram of effective digital representation provided for an embodiment of this application.

[0065] Figure 3 This is a schematic diagram illustrating the execution process of a numerical data generalization desensitization method provided in an embodiment of this application.

[0066] Figure 4 This is a diagram illustrating the application environment of a numerical data generalization desensitization method according to an embodiment of this application.

[0067] Figure 5 This is a flowchart illustrating a numerical data generalization desensitization method provided in an embodiment of this application.

[0068] Figure 6 This is a schematic diagram of the equivalence class tree structure corresponding to equivalence class A1 provided in an embodiment of this application.

[0069] Figure 7 This is a schematic diagram of the equivalence class tree structure corresponding to equivalence class A3 provided in an embodiment of this application.

[0070] Figure 8 This is a schematic diagram of the first merging and pruning of equivalence class A3 provided in an embodiment of this application.

[0071] Figure 9 This is a schematic diagram of the first merging and pruning of equivalence class A1 provided in an embodiment of this application.

[0072] Figure 10 This is a schematic diagram of the second merging and pruning of equivalence class A1 provided in an embodiment of this application.

[0073] Figure 11 This is a schematic diagram of the third merging and pruning of equivalence class A1 provided in an embodiment of this application.

[0074] Figure 12 This is a schematic diagram of the functional modules of a numerical data generalization desensitization device provided in an embodiment of this application.

[0075] Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0076] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0077] The process of generalizing numerical data using a bit-by-bit trial strategy is as follows: Figure 1 As shown.

[0078] This application partitions the dataset according to the least significant digit, ensuring that the generalized data retains at least one significant digit, thus guaranteeing the realism of the generalization results. During the partitioning of equivalence classes based on significant digits, the equivalence classes are sorted in ascending order of their generalization values ​​and merged sequentially during merging and pruning, maintaining the ordered nature of the data in the generalization results. During merging and pruning, the suppression budget is converted into a suppression rate, and the suppression rate is used as a constraint to ensure that the overall suppression budget does not exceed its limit. Simultaneously, the suppression budget saved in previous steps can be used in subsequent steps, maximizing the accuracy of the generalization results. An example of significant digits is shown below. Figure 2 As shown, the execution process is as follows: Figure 3 As shown.

[0079] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0080] The numerical data generalization desensitization method provided in this application can be applied to, for example... Figure 4In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on other servers. Terminal 102 can send the anonymity factor, suppression budget, and dataset size to server 104. After receiving the anonymity factor, suppression budget, and dataset size, server 104 initializes the anonymity factor, suppression budget, and dataset size; divides the dataset according to the least significant digit, obtaining several data subsets; generalizes and filters each data subset, obtaining several equivalence classes; each data subset corresponds to a least significant digit; based on each equivalence class, generalizes the data according to the least significant digit from smallest to largest, and divides the equivalence classes according to the generalization results, until the equivalence class size is less than or equal to the anonymity factor. An equivalence class tree structure is constructed. The inhibition rate of each equivalence class is calculated based on the tree structure, and the equivalence classes are sorted from smallest to largest inhibition rate to obtain a sorting result. The inhibition rate is the inhibition count of the equivalence class divided by the size of the equivalence class. Based on the sorting result, for each equivalence class tree structure, the current maximum inhibition rate is updated, and recursive merging and pruning are performed until the maximum inhibition rate constraint is satisfied. All leaf nodes of the equivalence class tree structure are traversed. When the size of the corresponding leaf node is greater than or equal to the anonymity factor, the data in the equivalence class is replaced with the generalized value corresponding to the equivalence class, and added to the result dataset to obtain a result set. The server 104 can then feed back the obtained result set to the terminal 102. In addition, in some embodiments, the numerical data generalization desensitization method can also be implemented by the server 104 or the terminal 102 alone. For example, the terminal 102 can directly perform numerical data generalization desensitization based on the anonymity factor, suppression budget, and dataset size, or the server 104 can obtain the anonymity factor, suppression budget, and dataset size from the data storage system and perform numerical data generalization desensitization based on the anonymity factor, suppression budget, and dataset size.

[0081] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, and tablets. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers, or it can be a cloud server.

[0082] In one exemplary embodiment, such as Figure 5 As shown, a numerical data generalization de-identification method is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 4 Taking server 104 as an example, the following steps are included.

[0083] S1: Initialize the anonymity factor, suppression budget, and dataset size.

[0084] S2: Divide the dataset into several subsets based on the least significant digit. Perform generalization and filtering on each subset to obtain several equivalence classes; each subset corresponds to a least significant digit.

[0085] S3: Based on each equivalence class, generalize the data according to the number of significant digits from smallest to largest, and divide the equivalence classes according to the generalization results until the size of the equivalence class is less than or equal to the anonymity factor, thereby constructing an equivalence class tree structure.

[0086] S4: Calculate the inhibition rate of each equivalence class according to the equivalence class tree structure, sort the equivalence classes in ascending order of inhibition rate, and obtain the sorting result; the inhibition rate is the inhibition number of the equivalence class divided by the size of the equivalence class.

[0087] S5: Based on the sorting results, update the current maximum inhibition rate for each equivalence class tree structure, and perform recursive merging and pruning until the maximum inhibition rate constraint is met.

[0088] S6: Traverse all leaf nodes of the equivalence class tree structure. When the size of the corresponding leaf node is greater than or equal to the anonymity factor, replace the data in the equivalence class with the generalized value corresponding to the equivalence class and add it to the result dataset to obtain the result set.

[0089] To implement steps S1 to S6, firstly, the dataset is divided according to the least significant digit, resulting in multiple data subsets. Then, the subsets are generalized from lowest to highest significant digit, and the subsets are divided into multiple equivalence classes based on their generalization values. These equivalence classes are then sorted from smallest to largest generalization value, resulting in an equivalence class tree structure. Finally, the equivalence class tree structure is merged and pruned from smallest to largest suppression rate until the maximum suppression rate constraint is met. Dividing the dataset according to the least significant digit ensures that the generalized data retains at least one significant digit, guaranteeing the authenticity of the generalization result. Sorting the equivalence classes by generalization value from smallest to largest during the equivalence class division process and merging them sequentially during merging and pruning maintains the orderliness of the data in the generalization result. During merging and pruning, the suppression budget is converted to a suppression rate, and the suppression rate is used as a constraint to ensure that the overall suppression budget does not exceed its limit. Simultaneously, the suppression budget saved in previous steps can be used in subsequent steps, maximizing the accuracy of the generalization result.

[0090] As an optional implementation, in step S2, the dataset is divided according to the least significant digits to obtain several data subsets. Each data subset is then generalized and filtered to obtain several equivalence classes. Specifically, this includes the following steps.

[0091] S21: Based on the dataset, use positional notation to represent numbers and number the significant digits. The numbering rule is as follows: with the decimal point as the origin, the significant digits in the decimal part to the right of the decimal point are numbered from left to right starting from 1, and the significant digits in the integer part to the left of the decimal point are numbered from right to left starting from -1. Each significant digit corresponds to a significant place value.

[0092] S22: Calculate the least significant digits of the data in the dataset, and divide the dataset into several data subsets according to the least significant digits; the data in each data subset has the same least significant digits.

[0093] S23: Generalize the data in each subset to the least significant digit, i.e., the generalized digit, and divide the subset into several equivalence classes based on the generalization value; each equivalence class corresponds to a generalized digit and a generalization value.

[0094] S24: Determine whether the size of each equivalence class is less than the anonymity factor to obtain the first judgment result.

[0095] S25: If the first judgment result is negative, then the corresponding equivalence class is retained.

[0096] S26: If the first judgment result is yes, then subtract the corresponding equivalence class size from the suppression budget and the dataset size respectively, and delete the corresponding equivalence class.

[0097] Specifically, step S2 includes the following steps.

[0098] 1) Use positional notation to represent numbers (i.e., eliminate scientific notation) and number the significant digits. That is, with the decimal point as the origin, the significant digits in the decimal part to the right of the decimal point are numbered from left to right starting from 1, and the significant digits in the integer part to the left of the decimal point are numbered from right to left starting from -1. The number corresponding to each significant digit is the significant digit position.

[0099] 2) Calculate the least significant digits of the data in the dataset, and divide the dataset into multiple subsets based on the least significant digits. The data in each subset has the same least significant digits.

[0100] 3) Generalize the data in each subset to the least significant digit, i.e., the generalized digit. Divide the subset into multiple equivalence classes based on the generalization value. Each equivalence class corresponds to a generalized digit and a generalization value.

[0101] 4) For each equivalence class, if the size of the equivalence class is smaller than the anonymity factor, subtract the size of the equivalence class from the suppression budget and the dataset size respectively, and delete the equivalence class.

[0102] As an optional implementation, in step S3, based on each equivalence class, the data is generalized from smallest to largest in terms of the number of significant digits, and the equivalence classes are divided according to the generalization results until the size of the equivalence class is less than or equal to the anonymity factor, thereby constructing an equivalence class tree structure, specifically including the following steps.

[0103] S31: Increment the generalization number of the current generalization number position that is the equivalence class by 1, determine whether it exceeds the maximum significant number, and obtain the second judgment result.

[0104] S32: If the second judgment result is yes, then stop the division.

[0105] S33: If the second judgment result is negative, then the data in the equivalence class is generalized to the current generalization digit, and the equivalence class is divided into several sub-equivalence classes according to the generalization value; each sub-equivalence class corresponds to a generalization value, and the generalization digit position of the sub-equivalence class is used as the current generalization digit.

[0106] S34: Sort the sub-equivalence classes according to their generalization values ​​to obtain a list of sub-equivalence classes of the current equivalence class.

[0107] S35: Determine whether the size of the sub-equivalence class in the sub-equivalence class list is greater than the anonymity factor, and obtain the third determination result.

[0108] S36: If the third judgment result is yes, then return "increase the generalization number of the current generalization number position which is the equivalence class by 1".

[0109] S37: If the third judgment result is negative, then construct an equivalence class tree structure.

[0110] Specifically, step S3 includes the following steps.

[0111] 1) Increment the generalization number of the current generalization number position to the equivalence class by 1. If it exceeds the maximum significant number of digits, stop the partitioning.

[0112] 2) Generalize the data in the equivalence class to the current generalization digit, divide the equivalence class into multiple sub-equivalence classes based on the generalization value, each sub-equivalence class corresponds to a generalization value, and set the generalization digit of the sub-equivalence class to the current generalization digit.

[0113] 3) Sort the sub-equivalence classes according to their generalization values ​​to obtain a list of sub-equivalence classes of the current equivalence class.

[0114] 4) If the size of the sub-equivalence class is greater than the anonymity factor, repeat the above process for that sub-equivalence class.

[0115] As an optional implementation, in step S4, the inhibition rate of each equivalence class is calculated according to the equivalence class tree structure, and the equivalence classes are sorted in ascending order of inhibition rate to obtain the sorting result. Specifically, this includes the following steps.

[0116] S41: Determine if the list of sub-equivalence classes of an equivalence class is empty, and obtain the fourth result.

[0117] S42: If the fourth judgment result is negative, then calculate the suppression number of each sub-equivalence class. The suppression number of the equivalence class is the sum of the suppression numbers of each sub-equivalence class.

[0118] S43: If the fourth judgment result is yes, and the size of the equivalence class is less than the anonymity factor, then the inhibition number of the equivalence class is the size of the equivalence class; otherwise, the inhibition number of the equivalence class is 0.

[0119] S44: Calculate the inhibition rate of each equivalence class based on the inhibition number, and sort the equivalence classes in ascending order of inhibition rate to obtain the sorting result.

[0120] Specifically, step S4 includes the following steps.

[0121] 1) If the list of sub-equivalence classes of an equivalence class is not empty, then calculate the suppression number of each sub-equivalence class. The suppression number of an equivalence class is the sum of the suppression numbers of each sub-equivalence class.

[0122] 2) If the sub-equivalence class list is empty and the size of the equivalence class is less than the anonymity factor, then the suppression number of the equivalence class is the size of the equivalence class; otherwise, the suppression number of the equivalence class is 0.

[0123] 3) The inhibition rate of an equivalence class is the inhibition number of the equivalence class divided by the size of the equivalence class.

[0124] As an optional implementation, in step S5, based on the sorting result, the current maximum inhibition rate is updated for each equivalence class tree structure, and recursive merging and pruning are performed until the maximum inhibition rate constraint is met, specifically including the following steps.

[0125] S51: Divide the current suppression budget by the current dataset size to obtain the current maximum suppression rate.

[0126] S52: Based on the current maximum inhibition rate, recursively merge and prune the equivalence class tree structure corresponding to the current equivalence class until its inhibition rate is less than or equal to the current maximum inhibition rate, and obtain the merge and pruning result.

[0127] S53: Based on the merging and pruning results, calculate the inhibition number of the equivalence class according to the equivalence class tree structure, deduct the inhibition number of the current equivalence class from the inhibition budget, and deduct the size of the current equivalence class from the dataset size.

[0128] As an optional implementation, in step S52, based on the current maximum suppression rate, the equivalence class tree structure corresponding to the current equivalence class is recursively merged and pruned until its suppression rate is less than or equal to the current maximum suppression rate, and the merged and pruned result is obtained. Specifically, this includes the following steps.

[0129] S521: Initialize the maximum suppression rate and equivalence class size, and calculate the suppression budget based on the maximum suppression rate and equivalence class size.

[0130] S522: Calculate the inhibition number of the equivalence class, divide the inhibition number by the size of the equivalence class to obtain the inhibition rate of the equivalence class, determine whether the inhibition rate is less than the maximum inhibition rate, and obtain the fifth judgment result.

[0131] S523: If the result of the fifth judgment is yes, then stop execution.

[0132] S524: If the fifth judgment result is negative, calculate the inhibition rate of each sub-equivalence class, sort them in ascending order, and initialize the maximum inhibition rate of the sub-equivalence class with the maximum inhibition rate.

[0133] S525: Select sub-equivalence classes from the sub-equivalence class list as the current sub-equivalence class in turn. First, use the maximum suppression rate of the sub-equivalence class and the size of the current sub-equivalence class as parameters to recursively merge and prune the current sub-equivalence class. Then, calculate the suppression number of the current sub-equivalence class, subtract the suppression number of the current sub-equivalence class from the suppression budget, subtract the size of the current sub-equivalence class from the equivalence class size, and update the maximum suppression rate of the sub-equivalence class to the suppression budget divided by the equivalence class size.

[0134] S526: Determine whether the inhibition rate of the equivalence class is greater than the maximum inhibition rate to obtain the sixth judgment result.

[0135] S527: If the result of the sixth judgment is negative, then the merged pruning result is obtained.

[0136] S528: If the sixth judgment result is yes, then determine whether the size of the sub-equivalence class list is less than or equal to 2, and obtain the seventh judgment result.

[0137] S529: If the result of the seventh judgment is yes, then clear the sub-equivalence class list and stop execution; merge the first two sub-equivalence classes, and set the generalization value and generalization number of the merged sub-equivalence class to the generalization value and generalization number of the current equivalence class, until the maximum suppression rate constraint is satisfied.

[0138] S5210: If the result of the seventh judgment is negative, then the merged pruning result is obtained.

[0139] Specifically, step S5 includes the following steps.

[0140] 1) Divide the current suppression budget by the dataset size to obtain the current maximum suppression rate.

[0141] 2) Recursively merge and prune the equivalence class tree structure corresponding to the current equivalence class until its inhibition rate is less than or equal to the current maximum inhibition rate.

[0142] a) Initialize the maximum suppression rate and equivalence class size, and calculate the suppression budget based on the maximum suppression rate and equivalence class size.

[0143] b) Calculate the inhibition number of the equivalence class, divide the inhibition number by the size of the equivalence class to obtain the inhibition rate of the equivalence class. If the inhibition rate is less than the maximum inhibition rate, stop execution.

[0144] c) Calculate the inhibition rate of each sub-equivalence class, sort them in ascending order of inhibition rate, and initialize the maximum inhibition rate of the sub-equivalence class with the maximum inhibition rate.

[0145] d) Select sub-equivalence classes from the sub-equivalence class list as the current sub-equivalence class in sequence. First, use the maximum suppression rate of the sub-equivalence class and the size of the current sub-equivalence class as parameters to recursively execute this process on the current sub-equivalence class. Then, calculate the suppression number of the current sub-equivalence class, subtract the suppression number of the current sub-equivalence class from the suppression budget, subtract the size of the current sub-equivalence class from the equivalence class size, and update the maximum suppression rate of the sub-equivalence class to the suppression budget divided by the equivalence class size.

[0146] e) If the inhibition rate of the equivalence class is greater than the maximum inhibition rate, then the following process is executed until the maximum inhibition rate constraint is met: If the size of the subequivalence class list is less than or equal to 2, then the subequivalence class list is cleared and execution is stopped; the first two subequivalence classes are merged, and the generalization value and generalization number of the merged subequivalence class are set to the generalization value and generalization number of the current equivalence class.

[0147] 3) Calculate the suppression number of the equivalence class based on the equivalence class tree structure, deduct the suppression number of the current equivalence class from the suppression budget, and deduct the size of the current equivalence class from the dataset size.

[0148] The numerical data generalization desensitization method described in this application will be further illustrated below with specific embodiments.

[0149] Without loss of generality, let the dataset A = {0.111, 0.112, 0.121, 0.122, 0.131, 0.132, 0.132, 0.133, 0.134, 0.134, 0.134, 0.135, 0.135, 0.141, 0.142, 111, 121, 122, 123, 214}.

[0150] Step 1: Parameter initialization.

[0151] Anonymity factor k=3, suppression budget α=5, dataset size s=20.

[0152] Step 2: Dataset partitioning.

[0153] 1) Divide dataset A into two datasets according to the least significant digits: A1={0.111, 0.112, 0.121, 0.122, 0.131, 0.132, 0.132, 0.133, 0.134, 0.134, 0.134, 0.135, 0.135, 0.141, 0.142} and A2={111, 121, 122, 123, 214}.

[0154] 2) Generalize the data subset to the least significant digits and divide it according to the generalization value. A1 remains unchanged, while A2 is divided into A3 and A4, resulting in equivalence classes A1={0.111, 0.112, 0.121, 0.122, 0.131, 0.132, 0.132, 0.133, 0.134, 0.134, 0.134, 0.135, 0.135, 0.141, 0.142}, A3={111, 121, 122, 123}, and A4={214}.

[0155] 3) Since the equivalence class A4={214} has a size of 1, which is smaller than the anonymity factor, it is deleted. At the same time, the suppression budget α=4 is updated, and the dataset size s=19 is updated.

[0156] Step 3: Equivalence class partitioning.

[0157] The data is generalized from smallest to largest number of significant digits, and equivalence classes are partitioned based on the generalization results until the size of each equivalence class is less than or equal to the anonymity factor. This constructs an equivalence class tree structure, and each level is sorted from smallest to largest by generalization value. The equivalence class tree structure corresponding to equivalence class A1 is shown below. Figure 6 As shown, the equivalence class tree structure corresponding to equivalence class A3 is as follows: Figure 7 As shown.

[0158] Step 4: Equivalence class sorting.

[0159] The inhibition rate of equivalence classes is calculated. Equivalence class A1 has a size of 15. In its equivalence class tree structure, the sum of the sizes of the leaf nodes smaller than the anonymous factor is 12, resulting in an inhibition rate of 0.8. Equivalence class A3 has a size of 4. In its equivalence class tree structure, the sum of the sizes of the leaf nodes smaller than the anonymous factor is 1, resulting in an inhibition rate of 0.25. Therefore, the result of the equivalence class sort is...<A3,A1> .

[0160] Step 5: Combine the pruning.

[0161] 1) Calculate the maximum inhibition rate α / s = 0.21 (4 / 19).

[0162] 2) First, process equivalence class A3: Since its current suppression rate is 0.25 (1 / 4), which is greater than the maximum suppression rate of 0.21, perform a merge pruning operation on it. Also, since it only has two sub-equivalence classes, both of which are leaf nodes, delete the two leaf nodes, resulting in the following... Figure 8 The generalization result is shown. At this point, the size of equivalence class A3 is 4, and the suppression number is 0. Therefore, the suppression budget remains α=4, and the dataset size is updated to s=15.

[0163] 3) Update the maximum inhibition rate α / s = 0.27 (4 / 15).

[0164] 4) Reprocess equivalence class A1: Since its current suppression rate is 0.8, which is greater than the maximum suppression rate of 0.27, a merge pruning operation is performed on it. The current sub-equivalence classes are A11={0.111, 0.112}, A12={0.121, 0.122}, A13={0.131, 0.132, 0.132, 0.133, 0.134, 0.134, 0.134, 0.135, 0.135} and A14={0.141, 0.142}. The suppression rates are calculated for each class and sorted in ascending order of suppression rate to obtain the following results.<A13,A11,A12,A14> .

[0165] 5) First, perform a merge pruning on A13. Its suppression rate is 0.67 (6 / 9), which is greater than the maximum suppression rate of 0.27. Since its sub-equivalence classes are all leaf nodes, merge the first two leaf nodes, as follows: Figure 9 As shown. At this point, the inhibition rate is 0.33 (3 / 9), still greater than the maximum inhibition rate of 0.27. Therefore, based on merging the first two leaf nodes, as... Figure 10 As shown. At this point, the suppression rate is 0.22 (2 / 9), which is less than the maximum suppression rate of 0.27, so the operation on A13 is stopped. The size of A13 is 9, and the number of suppressions is 2. Therefore, the suppression budget is updated to 2, and the dataset size is updated to 6.

[0166] 6) Since A11, A12, and A14 are all leaf nodes, and the size of equivalence class A1 is 15 with a suppression number of 8, the suppression rate is 0.53 (8 / 15), which is still greater than the maximum suppression rate of 0.27. Therefore, the first two leaf nodes are merged, as follows: Figure 11 As shown. At this point, the inhibition number of equivalence class A1 is 4, and the inhibition rate is 0.27 (4 / 15), which is equal to the maximum inhibition rate. Therefore, the processing of equivalence class A1 is stopped.

[0167] It should be noted that the above suppression rates are all retained to two decimal places if they cannot be divided evenly.

[0168] Step 6: Result set construction.

[0169] For equivalence class A3, traverse the leaf nodes of its equivalence class tree structure and add the generalized values ​​to the result set, resulting in R3 = {100, 100, 100, 100}. For equivalence class A1, traverse the leaf nodes of its equivalence class tree structure and add the generalized values ​​to the result set, resulting in R1 = {0.1, 0.1, 0.1, 0.1, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.134, 0.134, 0.134, 100, 100, 100, 100}.

[0170] Based on the same inventive concept, this application also provides a numerical data generalization desensitization device for implementing the numerical data generalization desensitization method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the numerical data generalization desensitization device provided below can be found in the limitations of the numerical data generalization desensitization method described above, and will not be repeated here.

[0171] In one exemplary embodiment, such as Figure 12 As shown, a numerical data generalization desensitization device is provided, which includes the following units.

[0172] The parameter initialization unit is used to initialize the anonymity factor, suppression budget, and dataset size.

[0173] The dataset partitioning unit is used to divide the dataset according to the least significant digit, resulting in several data subsets. Each data subset is then generalized and filtered to obtain several equivalence classes; each data subset corresponds to a least significant digit.

[0174] The equivalence class partitioning unit is used to generalize the data based on each equivalence class, from smallest to largest number of significant digits, and to partition the equivalence classes according to the generalization results, until the size of the equivalence class is less than or equal to the anonymity factor, thereby constructing an equivalence class tree structure.

[0175] The equivalence class sorting unit is used to calculate the inhibition rate of each equivalence class according to the equivalence class tree structure, sort the equivalence classes in ascending order of inhibition rate, and obtain the sorting result; the inhibition rate is the inhibition number of the equivalence class divided by the size of the equivalence class.

[0176] The merge pruning unit is used to update the current maximum inhibition rate for each equivalence class tree structure based on the sorting result, and to perform recursive merge pruning until the maximum inhibition rate constraint is met.

[0177] The result set construction unit is used to traverse the leaf nodes of all equivalence class tree structures. When the size of the corresponding leaf node is greater than or equal to the anonymity factor, the data in the equivalence class is replaced with the generalized value corresponding to the equivalence class and added to the result dataset to obtain the result set.

[0178] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 13 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores anonymization factors, suppression budgets, and dataset sizes. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a numerical data generalization desensitization method.

[0179] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0180] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method embodiments.

[0181] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described method embodiments.

[0182] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method embodiments.

[0183] It should be noted that 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, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0184] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0185] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0186] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0187] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for generalizing and de-identifying numerical data, characterized in that, The numerical data generalization desensitization method includes: Initialize the anonymity factor, suppression budget, and dataset size; The dataset is divided into several subsets based on the least significant digit. Each subset is then generalized and filtered to obtain several equivalence classes. Each subset corresponds to a least significant digit. Based on each equivalence class, the data is generalized from smallest to largest number of significant digits, and the equivalence classes are divided according to the generalization results until the size of the equivalence class is less than or equal to the anonymity factor, thereby constructing an equivalence class tree structure. The inhibition rate of each equivalence class is calculated based on the equivalence class tree structure. The equivalence classes are then sorted in ascending order of inhibition rate to obtain the sorting result. The inhibition rate is the inhibition number of the equivalence class divided by the size of the equivalence class. Based on the sorting results, for each equivalence class tree structure, update the current maximum inhibition rate and perform recursive merging and pruning until the maximum inhibition rate constraint is satisfied. Traverse all leaf nodes of the equivalence class tree structure. When the size of the corresponding leaf node is greater than or equal to the anonymity factor, replace the data in the equivalence class with the generalized value corresponding to the equivalence class and add it to the result dataset to obtain the result set.

2. The numerical data generalization desensitization method according to claim 1, characterized in that, The dataset is divided into several subsets based on the least significant digit. Generalization and filtering are then performed on each subset to obtain several equivalence classes, specifically including: Based on the dataset, the positional notation is used to represent numbers, and the significant digits are numbered. The numbering rule is as follows: with the decimal point as the origin, the significant digits in the decimal part to the right of the decimal point are numbered from left to right starting from 1, and the significant digits in the integer part to the left of the decimal point are numbered from right to left starting from -1. Each significant digit corresponds to a significant place value. Calculate the least significant digits of the data in the dataset, and divide the dataset into several subsets according to the least significant digits; the data in each subset has the same least significant digits. The data in each subset is generalized to the least significant digit, i.e., the generalization digit, and the subset is divided into several equivalence classes based on the generalization value; each equivalence class corresponds to a generalization digit and a generalization value. Determine whether the size of each equivalence class is less than the anonymity factor to obtain the first judgment result; If the first judgment result is negative, then the corresponding equivalence class is retained; If the first judgment result is yes, then the corresponding equivalence class size is subtracted from the suppression budget and the dataset size respectively, and the corresponding equivalence class is deleted.

3. The numerical data generalization desensitization method according to claim 1, characterized in that, Based on each equivalence class, the data is generalized from smallest to largest number of significant digits, and the equivalence classes are divided according to the generalization results until the size of each equivalence class is less than or equal to the anonymity factor, thereby constructing an equivalence class tree structure, specifically including: Increment the generalization number of the current generalization number position to the equivalence class by 1, and determine whether it exceeds the maximum significant number of digits to obtain the second judgment result; If the second judgment result is yes, then the division stops; If the second judgment result is negative, then the data in the equivalence class is generalized to the current generalization digit, and the equivalence class is divided into several sub-equivalence classes according to the generalization value; each sub-equivalence class corresponds to a generalization value, and the generalization digit position of the sub-equivalence class is used as the current generalization digit; Sort the sub-equivalence classes according to their generalization values ​​to obtain a list of sub-equivalence classes of the current equivalence class; Determine whether the size of the sub-equivalence classes in the sub-equivalence class list is greater than the anonymity factor to obtain a third determination result; If the third judgment result is yes, then return "increase the generalization number of the current generalization number position which is the equivalence class by 1"; If the third judgment result is negative, then an equivalence class tree structure is constructed.

4. The numerical data generalization desensitization method according to claim 1, characterized in that, The inhibition rate of each equivalence class is calculated based on the equivalence class tree structure. The equivalence classes are then sorted in ascending order of inhibition rate to obtain the sorting result, which specifically includes: Determine if the list of sub-equivalence classes of an equivalence class is empty to obtain the fourth result; If the fourth judgment result is negative, then the suppression number of each sub-equivalence class is calculated, and the suppression number of the equivalence class is the sum of the suppression numbers of each sub-equivalence class; If the fourth judgment result is yes, and the size of the equivalence class is less than the anonymity factor, then the inhibition number of the equivalence class is the size of the equivalence class; otherwise, the inhibition number of the equivalence class is 0. The inhibition rate of each equivalence class is calculated based on the inhibition number, and the equivalence classes are sorted in ascending order of inhibition rate to obtain the sorting result.

5. The numerical data generalization desensitization method according to claim 1, characterized in that, Based on the sorting results, for each equivalence class tree structure, the current maximum inhibition rate is updated, and recursive merging and pruning are performed until the maximum inhibition rate constraint is met. Specifically, this includes: Divide the current suppression budget by the current dataset size to obtain the current maximum suppression rate; Based on the current maximum inhibition rate, the equivalence class tree structure corresponding to the current equivalence class is recursively merged and pruned until its inhibition rate is less than or equal to the current maximum inhibition rate, and the merged and pruned result is obtained. Based on the merging and pruning results, the suppression number of the equivalence class is calculated according to the equivalence class tree structure. The suppression number of the current equivalence class is deducted from the suppression budget, and the size of the current equivalence class is deducted from the dataset size.

6. The numerical data generalization desensitization method according to claim 5, characterized in that, Based on the current maximum suppression rate, the equivalence class tree structure corresponding to the current equivalence class is recursively merged and pruned until its suppression rate is less than or equal to the current maximum suppression rate, resulting in the merged and pruned outcome, specifically including: Initialize the maximum inhibition rate and equivalence class size, and calculate the inhibition budget based on the maximum inhibition rate and equivalence class size; Calculate the inhibition number of the equivalence class, divide the inhibition number by the size of the equivalence class to obtain the inhibition rate of the equivalence class, and determine whether the inhibition rate is less than the maximum inhibition rate to obtain the fifth judgment result; If the result of the fifth judgment is yes, then execution stops; If the fifth judgment result is negative, then calculate the inhibition rate of each sub-equivalence class, sort them in ascending order, and initialize the maximum inhibition rate of the sub-equivalence class with the maximum inhibition rate; Select sub-equivalence classes from the sub-equivalence class list one by one as the current sub-equivalence class. First, use the maximum suppression rate of the sub-equivalence class and the size of the current sub-equivalence class as parameters to recursively merge and prune the current sub-equivalence class. Then, calculate the suppression number of the current sub-equivalence class, subtract the suppression number of the current sub-equivalence class from the suppression budget, subtract the size of the current sub-equivalence class from the equivalence class size, and update the maximum suppression rate of the sub-equivalence class to the suppression budget divided by the equivalence class size. Determine whether the inhibition rate of the equivalence class is greater than the maximum inhibition rate to obtain the sixth judgment result; If the result of the sixth judgment is negative, then the merged pruning result is obtained; If the sixth judgment result is yes, then determine whether the size of the sub-equivalence class list is less than or equal to 2, and obtain the seventh judgment result; If the seventh judgment result is yes, then clear the sub-equivalence class list and stop execution; merge the first two sub-equivalence classes, and set the generalization value and generalization number of the merged sub-equivalence class to the generalization value and generalization number of the current equivalence class, until the maximum suppression rate constraint is satisfied; If the result of the seventh judgment is negative, then the merged pruning result is obtained.

7. A numerical data generalization desensitization device, wherein the numerical data generalization desensitization device is used to implement the numerical data generalization desensitization method according to any one of claims 1-6, characterized in that, The numerical data generalization desensitization device includes: The parameter initialization unit is used to initialize the anonymity factor, suppression budget, and dataset size; The dataset partitioning unit is used to divide the dataset according to the least significant digit, resulting in several data subsets. Generalization and filtering are performed on each data subset to obtain several equivalence classes; each data subset corresponds to a least significant digit. An equivalence class partitioning unit is used to generalize the data based on each equivalence class, according to the number of significant digits from smallest to largest, and to partition the equivalence classes according to the generalization results, until the size of the equivalence class is less than or equal to the anonymity factor, thereby constructing an equivalence class tree structure. The equivalence class sorting unit is used to calculate the inhibition rate of each equivalence class according to the equivalence class tree structure, sort the equivalence classes in ascending order of inhibition rate, and obtain the sorting result; the inhibition rate is the inhibition number of the equivalence class divided by the size of the equivalence class. The merge pruning unit is used to update the current maximum inhibition rate for each equivalence class tree structure based on the sorting result, and to perform recursive merge pruning until the maximum inhibition rate constraint is met. The result set construction unit is used to traverse the leaf nodes of all equivalence class tree structures. When the size of the corresponding leaf node is greater than or equal to the anonymity factor, the data in the equivalence class is replaced with the generalized value corresponding to the equivalence class and added to the result dataset to obtain the result set.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the numerical data generalization desensitization method according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the numerical data generalization desensitization method as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the numerical data generalization desensitization method as described in any one of claims 1-6.