Anonymization method and system, terminal equipment, storage medium and product
Through a model based on preset anonymization parameter values and attack success rate, data anonymization is flexibly processed, which solves the problems of sensitive data leakage and poor data availability in traditional anonymization methods, and achieves a balance between data security and availability.
Patent Information
- Application Number
- CN202411326970.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-10
AI Technical Summary
Traditional anonymization processing performs the same degree of anonymization of data of different risk levels, resulting in the leakage of sensitive data with higher risk levels, and excessive anonymization of data with lower risk levels leads to poor data availability.
Based on the preset anonymization parameter value, the original data set is anonymously processed to obtain the attack success rate of the data intermediate state, and the anonymization parameter value prediction model is used to determine the appropriate anonymization parameter value based on the target attack success rate, and treat anonymity. The data set is flexible and anonymous.
It realizes flexible anonymization of data of different risk levels while ensuring data security and availability, avoiding the problems of sensitive information leakage and reduced data availability.
Smart Images

Figure CN119293840A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to an anonymization method, system, terminal device, storage medium and product. Background Art
[0002] With the development of the digital economy, global data is growing explosively, and the circulation and application of data elements will become an important issue to stimulate the value of data. However, it is difficult to have both the circulation, application and security of data. Therefore, data used for circulation and application usually needs to be anonymized to ensure that the risk is small enough to be acceptable, thereby avoiding the leakage of individual sensitive information.
[0003] However, traditional anonymization processes anonymize data of different risk levels to the same degree, which will lead to the leakage of sensitive data with higher risk levels. In addition, for data with lower risk levels, traditional anonymization processes also have the problem of over-anonymization, resulting in poor data availability. Therefore, how to propose a flexible data anonymization method is a technical problem that has yet to be solved by those skilled in the art. Summary of the invention
[0004] The main purpose of this application is to provide an anonymization method, system, terminal device, storage medium and product, aiming to solve the technical problem of how to propose a flexible data anonymization method.
[0005] To achieve the above purpose, the present application proposes an anonymization method, which includes:
[0006] Based on the preset anonymization parameter values, the original data sets are anonymized respectively to obtain the data intermediate states corresponding to the respective anonymization parameter values;
[0007] Attacking each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states;
[0008] Obtain a data set to be anonymized and a target attack success rate corresponding to the data set to be anonymized, and input the target attack success rate into a preset anonymization parameter value prediction model to obtain a target anonymization parameter value of the data set to be anonymized; wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and each of the anonymization parameter values as model training labels;
[0009] The data set to be anonymized is anonymized according to the target anonymization parameter value to obtain an anonymized data set.
[0010] In one embodiment, the attack success rate includes: individual attack success rate;
[0011] The step of attacking each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states includes:
[0012] Traversing each of the data intermediate states respectively to obtain data attributes corresponding to each of the data intermediate states;
[0013] Generating data query statements corresponding to each of the data intermediate states according to the data attributes corresponding to each of the data intermediate states;
[0014] Using each of the data query statements, querying the original data set, if it is detected that the queried data entry is one, then determining that the attack is successful, and calculating the number of successful attacks;
[0015] The ratio of the number of successful attacks to the total number of attacks is taken as the individual attack success rate.
[0016] In one embodiment, the data attribute includes a plurality of different sub-attributes, and the step of generating a data query statement corresponding to each of the data intermediate states according to the data attribute corresponding to each of the data intermediate states includes:
[0017] Randomly selecting a plurality of sub-attributes from the data attributes corresponding to each of the data intermediate states, to obtain attribute combinations corresponding to each of the data intermediate states;
[0018] Based on the attribute combinations corresponding to the data intermediate states, data query statements corresponding to the data intermediate states are generated.
[0019] In one embodiment, the attack success rate further includes: matching attack success rate;
[0020] The step of attacking each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states includes:
[0021] For each of the data intermediate states, obtaining a preset first external data set and a second external data set, wherein the first external data set and the second external data set are disjoint, and attributes in the first external data set and the second external data set all belong to the data intermediate state;
[0022] Obtaining a preset number of first nearest neighbors corresponding to the first external data set, and obtaining the preset number of second nearest neighbors corresponding to the second external data set;
[0023] If it is detected that there is an overlapping entry between the first nearest neighbor and the second nearest neighbor, and it is detected that the overlapping entry exists in the original data set, then it is determined that the attack is successful, and the number of successful attacks is calculated;
[0024] The ratio of the number of successful attacks to the total number of attacks is taken as the matching attack success rate.
[0025] In one embodiment, the attack success rate also includes: an inference attack success rate;
[0026] The step of attacking each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states includes:
[0027] Obtaining preset reasoning auxiliary information corresponding to each of the data intermediate states, and real information corresponding to each of the reasoning auxiliary information;
[0028] Determining target anonymous information corresponding to each of the reasoning auxiliary information in each of the data intermediate states;
[0029] If it is detected that the target anonymous information and the real information corresponding to the same inference auxiliary information are the same, the attack is determined to be successful, and the number of successful attacks is calculated;
[0030] The ratio of the number of successful attacks to the total number of attacks is taken as the inference attack success rate.
[0031] In one embodiment, the step of obtaining the target attack success rate corresponding to the data set to be anonymized includes:
[0032] According to a preset risk level classification rule, the data set to be anonymized is classified into levels to obtain a risk level corresponding to the data set to be anonymized;
[0033] The preset attack success rate corresponding to the risk level is used as the target attack success rate.
[0034] In one embodiment, after the step of classifying the data set to be anonymized to obtain the risk level corresponding to the data set to be anonymized, the method further includes:
[0035] If it is detected that the risk level is higher than a preset risk level threshold, the step of using the preset attack success rate corresponding to the risk level as the target attack success rate is executed;
[0036] If it is detected that the risk level is lower than the risk level threshold, the data set to be anonymized is released.
[0037] In addition, to achieve the above purpose, the present application also proposes an anonymization system, which includes:
[0038] A first anonymization module, configured to perform anonymization processing on the original data set based on preset anonymization parameter values, to obtain data intermediate states corresponding to the respective anonymization parameter values;
[0039] An attack module, used to attack each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states;
[0040] An anonymization parameter determination module is used to obtain a data set to be anonymized and a target attack success rate corresponding to the data set to be anonymized, and input the target attack success rate into a preset anonymization parameter value prediction model to obtain a target anonymization parameter value of the data set to be anonymized; wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and with each of the anonymization parameter values as model training labels;
[0041] The second anonymization module is used to perform anonymization processing on the data set to be anonymized according to the target anonymization parameter value to obtain an anonymized data set.
[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a terminal device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the anonymization method as described above.
[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the anonymization method described above are implemented.
[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the anonymization method described above are implemented.
[0045] In this embodiment, the present application performs anonymization processing on the original data set based on preset anonymization parameter values, respectively, to obtain the data intermediate states corresponding to each of the anonymization parameter values, and can anonymize the training set used to train the anonymization parameter value prediction model according to different anonymization parameter values; then attack each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states, and attack the anonymized data to obtain the attack success rate; then obtain the data set to be anonymized and the target attack success rate corresponding to the data set to be anonymized; then input the target attack success rate into the preset anonymization parameter value prediction model to obtain the data set to be anonymized. The target anonymization parameter value of the data set is determined according to the preset target attack success rate and the model; wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as the model input data and each of the anonymization parameter values as the model training label. The anonymization parameter value prediction model for outputting the anonymization parameter value according to the input attack success rate can be trained according to the corresponding relationship between the attack success rate and the anonymization parameter value. Thus, for the data to be anonymized, the target anonymization parameter value for anonymization can be determined according to the preset target attack success rate and the model; finally, the data set to be anonymized is anonymized according to the target anonymization parameter value to obtain the anonymized data set.
[0046] In this way, for any data that needs to be anonymized, the set target attack success rate can be input into the trained anonymization parameter value prediction model to obtain the target anonymization parameter value for anonymization, thereby anonymizing the data that needs to be anonymized. Therefore, the present application can ensure the flexibility of data anonymization based on the preset target attack success rate corresponding to the data to be anonymized and the trained anonymization parameter value prediction model, thereby achieving the purpose of anonymizing data while ensuring data security and availability. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 A flowchart of the first embodiment of the anonymization method of the present application is provided;
[0050] Figure 2A flowchart diagram of another embodiment of the anonymization method of the present application is provided;
[0051] Figure 3 This is a flowchart of a specific embodiment of the anonymization method of this application;
[0052] Figure 4 This is a schematic diagram of the module structure of the anonymization system of the embodiment of the present application;
[0053] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the anonymization method in the embodiment of the present application.
[0054] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0055] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0056] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0057] The main solution of the embodiment of the present application is: based on the preset anonymization parameter values, the original data sets are anonymized respectively to obtain the data intermediate states corresponding to each of the anonymization parameter values; each of the data intermediate states is attacked to obtain the attack success rate corresponding to each of the data intermediate states; the data set to be anonymized and the target attack success rate corresponding to the data set to be anonymized are obtained, and the target attack success rate is input into the preset anonymization parameter value prediction model to obtain the target anonymization parameter value of the data set to be anonymized; wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and with each of the anonymization parameter values as model training labels; the data set to be anonymized is anonymized according to the target anonymization parameter value to obtain an anonymized data set.
[0058] Nowadays, with the development of the digital economy, global data is growing explosively, and the circulation and application of data elements will become an important issue to stimulate the value of data. However, it is difficult to have both the circulation, application and security of data. Therefore, data used for circulation and application usually needs to be anonymized to ensure that the risk is small enough to be acceptable, thereby avoiding the leakage of individual sensitive information.
[0059] However, traditional anonymization processes anonymize data of different risk levels to the same degree, which will lead to the leakage of sensitive data with higher risk levels. In addition, for data with lower risk levels, traditional anonymization processes also have the problem of over-anonymization, resulting in poor data availability. Therefore, how to propose a flexible data anonymization method is a technical problem that has yet to be solved by those skilled in the art.
[0060] To solve this technical problem, the present application performs anonymization processing on the original data set based on preset anonymization parameter values, obtains the data intermediate states corresponding to each of the anonymization parameter values, and can anonymize the training set used to train the anonymization parameter value prediction model according to different anonymization parameter values; then attacks are performed on each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states, and the anonymized data can be attacked to obtain the attack success rate; then the data set to be anonymized and the target attack success rate corresponding to the data set to be anonymized are obtained; then the target attack success rate is input into the preset anonymization parameter value prediction model to obtain the data set to be anonymized. The target anonymization parameter value of the anonymized data set is determined, wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and with each of the anonymization parameter values as model training labels. The anonymization parameter value prediction model for outputting anonymization parameter values according to the input attack success rate can be trained according to the corresponding relationship between the attack success rate and the anonymization parameter value. Thus, for the data to be anonymized, the target anonymization parameter value for anonymization can be determined according to the preset target attack success rate. Finally, the data set to be anonymized is anonymized according to the target anonymization parameter value to obtain the anonymized data set.
[0061] In this way, for any data that needs to be anonymized, the set target attack success rate can be input into the trained anonymization parameter value prediction model to obtain the target anonymization parameter value for anonymization, thereby anonymizing the data that needs to be anonymized. Therefore, the present application can ensure the flexibility of data anonymization based on the preset target attack success rate corresponding to the data to be anonymized and the trained anonymization parameter value prediction model, thereby achieving the purpose of anonymizing data while ensuring data security and availability.
[0062] It should be noted that the execution subject of the anonymization method of the present application may be a terminal device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a server, etc. The following takes the server as an example to illustrate various embodiments of the anonymization method of the present application.
[0063] Based on this, this application provides an anonymization method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the anonymization method of the present application.
[0064] In this embodiment, the anonymization method includes steps S10 to S40:
[0065] Step S10, based on the preset anonymization parameter values, respectively anonymize the original data set to obtain the data intermediate state corresponding to each of the anonymization parameter values;
[0066] It should be noted that the anonymization parameter value refers to the pre-set value of the parameter used for anonymization processing. For example, the anonymization parameters can be k and l. Among them, k means that each set of equivalence classes (record combinations with the same sensitive attribute values) in the data set must contain at least k records, and l means that the sensitive attribute values in each equivalence class must have at least l different modes or values. For example, when k is 5, if a data set achieves 5-anonymity, it means that for any set of records in the data set with the same combination of non-sensitive attributes, there are at least 5 records; when l is 3, in a data set that achieves 3-diversity, there are at least 3 different sensitive attribute values (for example, disease categories) in each equivalence class.
[0067] In addition, the original data set refers to the data set used to train the anonymized parameter value prediction model. Specifically, the original data set can be a data set from different sources that may involve sensitive information. Specifically, the original data set can be a data set of personal information or a data set of corporate information, which is not limited in this application. The data intermediate state refers to the data obtained after the original data set is anonymized.
[0068] It is understandable that in this embodiment, multiple parameter values may be preset for the anonymization parameter k and / or l. For example, for the anonymization parameter k, the parameter value of k may be preset to 1, 5, 9, 14, etc., and then the original data set may be anonymized according to different parameter values.
[0069] Exemplarily, when the anonymization parameter is only k, and the values of k are 1, 5, 9, and 14 respectively, for the original data set, generalization and suppression can be performed based on the value of k to achieve anonymization processing, so that the intermediate state of the data when k is 1,..., the intermediate state of the data when k is 14 can be obtained.
[0070] Step S20, attacking each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states;
[0071] It should be noted that, in order to verify the security of the data intermediate states obtained after anonymization, each data intermediate state can be attacked, and the attack success rate corresponding to each data intermediate state can be calculated.
[0072] Step S30, obtaining the data set to be anonymized and the target attack success rate corresponding to the data set to be anonymized, and inputting the target attack success rate into a preset anonymization parameter value prediction model to obtain the target anonymization parameter value of the data set to be anonymized; wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and each of the anonymization parameter values as model training labels;
[0073] It should be noted that the data set to be anonymized refers to the data set that currently needs to be anonymized. It is worth mentioning that the above original data set is used to determine the correspondence between the anonymization parameter value and the successful attack rate to train the anonymization parameter value prediction model, which is different from the data set to be anonymized in this embodiment.
[0074] In addition, the target attack success rate refers to the attack success rate set in advance for the data set to be anonymized. For example, for a company's revenue information, if the set attack success rate is 5%, then the target attack success rate corresponding to the revenue information is 5%.
[0075] It is understandable that the anonymized parameter value prediction model may be a machine learning model. For example, the anonymized parameter value prediction model may be a decision tree model or a support vector machine model. The present application does not limit the specific type of the anonymized parameter value prediction model.
[0076] It should be noted that the target anonymization parameter value refers to the parameter value output by the model for anonymizing the data set to be anonymized.
[0077] Step S40: Anonymize the data set to be anonymized according to the target anonymization parameter value to obtain an anonymized data set.
[0078] It can be understood that after determining the target anonymization parameter value of the data set to be anonymized, the data set to be anonymized can be anonymized based on the target anonymization parameter value, thereby obtaining the anonymized data set to be anonymized.
[0079] In this embodiment, the present application performs anonymization processing on the original data set based on each preset anonymization parameter value, obtains the data intermediate state corresponding to each of the anonymization parameter values, and can anonymize the training set used to train the anonymization parameter value prediction model according to different anonymization parameter values; then attacks each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states, and can attack the anonymized data to obtain the attack success rate; then obtains the data set to be anonymized and the target attack success rate corresponding to the data set to be anonymized; then inputs the target attack success rate into the preset anonymization parameter value prediction model to obtain the data set to be anonymized. The target anonymization parameter value of the data set, wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and with each of the anonymization parameter values as model training labels. The anonymization parameter value prediction model for outputting anonymization parameter values according to the input attack success rate can be trained according to the corresponding relationship between the attack success rate and the anonymization parameter value. Thus, for the data to be anonymized, the target anonymization parameter value for anonymization can be determined according to the preset target attack success rate. Finally, the data set to be anonymized is anonymized according to the target anonymization parameter value to obtain an anonymized data set.
[0080] In this way, for any data that needs to be anonymized, the set target attack success rate can be input into the trained anonymization parameter value prediction model to obtain the target anonymization parameter value for anonymization, thereby anonymizing the data that needs to be anonymized. Therefore, the present application can ensure the flexibility of data anonymization based on the preset target attack success rate corresponding to the data to be anonymized and the trained anonymization parameter value prediction model, thereby achieving the purpose of anonymizing data while ensuring data security and availability.
[0081] Furthermore, based on the above-mentioned first embodiment of the anonymization method of the present application, a second embodiment of the anonymization method of the present application is proposed.
[0082] In this embodiment, the attack success rate includes: individual attack success rate, and the above step S20 further includes:
[0083] Step S201, traversing each of the data intermediate states respectively to obtain data attributes corresponding to each of the data intermediate states;
[0084] Step S202, generating data query statements corresponding to each of the data intermediate states according to the data attributes corresponding to each of the data intermediate states;
[0085] Step S203, using each of the data query statements to query the original data set, if it is detected that the queried data entry is one, it is determined that the attack is successful, and the number of successful attacks is calculated;
[0086] Step S204: taking the ratio of the number of successful attacks to the total number of attacks as the individual attack success rate.
[0087] It can be understood that the individual identification attack method in the data intermediate state refers to the individual data in the original data set that can be located through the data intermediate state. The principle of the individual identification attack method is that the rare or unique attributes in the data intermediate state are also rare or unique in the original data set. Therefore, access to the data intermediate state will allow the generation of meaningful predictions. For example, the attacker finds in the data intermediate state: "There is only one company, with an address in Nanshan District, and the tax paid this year is >xxx". The attacker can easily determine the specific information of this company by combining some external information, and at the same time obtain its sensitive information, that is, the range of tax amounts.
[0088] It is understandable that the data attributes of the intermediate state of the data include different multiple sub-attributes. For example, the data attributes may include category type and value type. In the category attribute, the high-risk entry is undoubtedly the only entry in the data set; while in the value attribute, the high-risk entry is an outlier, that is, the maximum value or the minimum value.
[0089] For example, by traversing all the attributes of the data intermediate state, a query condition (data query statement) can be generated for each attribute, and then the query condition can be used to retrieve the original data set. If the original data set has a unique entry that satisfies the query condition, it is recorded as 1 (indicating a successful attack), otherwise it is recorded as 0. Therefore, the ratio between the number of successful attacks and the total number of attacks can be used as the individual attack success rate.
[0090] In addition, since it is difficult for an attacker to collect all the attributes in the original data set for attack, the individual attack success rate can also be obtained by sampling and calculating the proportion of successful attacks.
[0091] In a feasible implementation manner, the above step S202 further includes:
[0092] Step S2021, randomly selecting a plurality of sub-attributes from the data attributes corresponding to each of the data intermediate states, to obtain attribute combinations corresponding to each of the data intermediate states;
[0093] It can be understood that the attribute combination corresponds to the data intermediate state, and each attribute combination includes a plurality of randomly selected data attributes.
[0094] Step S2022: Generate data query statements corresponding to each of the data intermediate states based on the attribute combinations corresponding to each of the data intermediate states.
[0095] It is understandable that in the above embodiment, a data query statement is generated based on a single data attribute for query. However, in actual application scenarios, an attacker can also attack by combining multiple data attributes. Therefore, in this embodiment, a data query statement can also be generated based on multiple data attributes, so that an attack can be carried out on the data intermediate state based on the generated data query statement.
[0096] Exemplarily, entries can be randomly selected from the data "intermediate state" data set, and query statements can be created for the selected attribute combination. For example, a single variable query statement can be combined by a logical "AND" operator to form a multivariate query statement, thereby obtaining a data query statement corresponding to the attribute combination. For example, if the selected attribute combination includes gender, age, and residential area, the multivariate predicate may be "gender = male AND age > 65 AND residential area = Nanshan District". The query condition can then be used to retrieve the original data set. If the original data set has a unique entry that satisfies the query condition, it is recorded as 1, otherwise it is recorded as 0. Finally, the individual attack success rate is obtained by sampling and calculating the proportion of successful attacks.
[0097] In a feasible implementation manner, the attack success rate further includes: matching the attack success rate, the above step S20 further includes:
[0098] Step S205: for each of the data intermediate states, obtaining a preset first external data set and a second external data set, wherein the first external data set and the second external data set are disjoint, and attributes in the first external data set and the second external data set all belong to the data intermediate state;
[0099] It should be noted that the first external data set and the second external data set are different data sets and do not have intersecting attributes. The first external data set and the second external data set both contain a set of attributes in the original data set, and the attributes in the first external data set and the second external data set also exist in the data intermediate state.
[0100] Step S206, obtaining a preset number of first nearest neighbors corresponding to the first external data set, and obtaining the preset number of second nearest neighbors corresponding to the second external data set;
[0101] It is understandable that the first nearest neighbor is the nearest neighbor corresponding to the first external data set calculated by the nearest neighbor algorithm, and the second nearest neighbor is the nearest neighbor corresponding to the second external data set calculated by the nearest neighbor algorithm. The method for determining the nearest neighbor is not limited in this application.
[0102] Step S207: if it is detected that there is an overlapping entry between the first nearest neighbor and the second nearest neighbor, and it is detected that the overlapping entry exists in the original data set, then it is determined that the attack is successful, and the number of successful attacks is calculated;
[0103] It is understood that overlapping entries refer to overlapping attributes.
[0104] Step S208: taking the ratio of the number of successful attacks to the total number of attacks as the matching attack success rate.
[0105] Exemplarily, assuming that there are two (or more) external data sets A (first external data set) and B (second external data set) containing certain attributes of a set of original data sets, and these attributes also exist in the data "intermediate state", the nearest neighbor algorithm can be used to calculate the m (preset number) nearest neighbors of A and B respectively. If the nearest neighbor of an entry in A coincides with the nearest neighbor of the corresponding entry in B, and actually belongs to the same entry in the original data, the attack is successful, and the probability of successful attack can be calculated. Specifically, when m is 1, it is the probability of strict success. When m is greater than 1, the probability of the attacker's guess success within a certain range is considered.
[0106] In a feasible implementation manner, the attack success rate further includes: inference attack success rate; the above step S20 further includes:
[0107] Step S209, obtaining preset inference auxiliary information corresponding to each of the data intermediate states, and real information corresponding to each of the inference auxiliary information;
[0108] It should be noted that, in this embodiment, the inference auxiliary information refers to the attribute value randomly extracted from the original data set in advance for simulating the inference attack. The real information refers to the information in the original data set corresponding to the inference auxiliary information. For example, the inference auxiliary information can be the attribute of a user randomly extracted from the original data set, for example, it can be age and occupation information. Then the real information corresponding to the inference auxiliary information can be the information of the user other than age and occupation.
[0109] Step S210, determining target anonymous information corresponding to each of the reasoning auxiliary information in each of the data intermediate states;
[0110] It should be noted that the target anonymous information refers to the information of the item with the highest similarity to the inference auxiliary information. In this embodiment, the similarity between each item in the data intermediate state and the inference auxiliary information can be calculated respectively, so that the item corresponding to the highest similarity can be used as the target item, and then the information in the target item other than the inference auxiliary information can be used as the target anonymous information.
[0111] Step S211, if it is detected that the target anonymous information corresponding to the same inference auxiliary information is the same as the real information, then the attack is determined to be successful, and the number of successful attacks is calculated;
[0112] Step S212: taking the ratio of the number of successful attacks to the total number of attacks as the inference attack success rate.
[0113] Thus, this embodiment can obtain the attack success rates corresponding to different anonymization parameter values based on individual identification attack, matching attack and reasoning attack. In addition, in a feasible implementation, for the data intermediate state corresponding to a certain anonymization parameter value, multiple attack methods can be used simultaneously to attack, so as to obtain multiple attack success rates corresponding to the anonymization parameter value. Thus, the anonymization parameter value prediction model can be trained based on the anonymization parameter value and its corresponding multiple attack success rates to measure the anonymization effect of the anonymization parameter value as a whole.
[0114] Furthermore, based on the first embodiment and / or the second embodiment of the anonymization method of the present application, a third embodiment of the anonymization method of the present application is proposed.
[0115] Please refer to Figure 2 In this embodiment, the above step S30 further includes:
[0116] Step S301, classifying the data set to be anonymized according to a preset risk level classification rule to obtain a risk level corresponding to the data set to be anonymized;
[0117] It is understandable that the risk level classification rules are pre-set based on data security rules.
[0118] Step S302: taking the preset attack success rate corresponding to the risk level as the target attack success rate.
[0119] It is understandable that the value of current data is often extracted from data at the expense of privacy. However, perfect anonymization of data is not only technically difficult to achieve, but also greatly loses the value of data. Therefore, data anonymization needs to be performed according to data risk classification so as not to damage the availability of data. Therefore, in this embodiment, the risk level corresponding to the data set to be anonymized can be determined according to the risk level classification rules, so as to determine the success rate of the target attack based on the risk level.
[0120] Exemplarily, for data with a higher risk level, a lower attack success rate may be preset, so that an anonymization parameter value corresponding to the data with a higher risk level may be obtained based on the lower attack success rate.
[0121] In a feasible embodiment, after the above step S301, the method further includes:
[0122] Step S303, if it is detected that the risk level is higher than a preset risk level threshold, executing the step of using the preset attack success rate corresponding to the risk level as the target attack success rate;
[0123] It should be noted that the risk level threshold refers to the maximum value of the risk level of data that does not need to be anonymized. For example, the risk level can be pre-set to be 1-3 levels without anonymization, and the risk level threshold is level 3.
[0124] Step S304: if it is detected that the risk level is lower than the risk level threshold, the data set to be anonymized is released.
[0125] For example, for data whose risk level is lower than the risk level threshold, it can be considered that the risk level of the data is low, and therefore the data can be published directly; for data whose risk level is higher than the risk level threshold, the anonymization parameter value can be determined based on the set attack success rate, and then anonymization processing can be performed to reduce the risk.
[0126] In this embodiment, the present application can achieve a good balance between data availability and security by grading the risk levels of the data to be anonymized and automatically performing graded anonymization on the graded data.
[0127] Furthermore, based on the various embodiments of the above-mentioned anonymization method, a specific embodiment of the anonymization method of the present application is proposed.
[0128] Please refer to Figure 3 , Figure 3The flowchart of a specific embodiment of the anonymization method of the present application is shown in FIG. The database includes classification and grading information (risk level classification rules) and a large amount of data that needs to be anonymized. In order to determine the anonymization parameter values of different data, for the data stored in the database, it is necessary to obtain the original data set by means of column vector retrieval or table merging. Then, for the parameters k and l required for anonymization, different parameter values can be set respectively, and the original data set is anonymized. Then, for the data intermediate state obtained by anonymization, the attack success rate corresponding to each of the different anonymous parameter values can be obtained by risk assessment (attack by various attack methods), and then the decision tree model can be trained according to the attack success rate corresponding to each of the different anonymous parameter values to obtain a trained decision tree model. Then, for the data that needs to be anonymized, the target attack success rate can be determined according to the classification and grading information, and then the target attack success rate is input into the decision tree model to obtain the numerical value of the anonymization parameter. Then, the data that needs to be anonymized can be anonymized based on the numerical value of the anonymization parameter obtained.
[0129] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the anonymization method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0130] This application also provides an anonymization system, please refer to Figure 4 , the anonymization system comprises:
[0131] A first anonymization module 10 is used to perform anonymization processing on the original data set based on preset anonymization parameter values to obtain data intermediate states corresponding to the respective anonymization parameter values;
[0132] An attack module 20, used to attack each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states;
[0133] The anonymization parameter determination module 30 is used to obtain the data set to be anonymized and the target attack success rate corresponding to the data set to be anonymized, and input the target attack success rate into a preset anonymization parameter value prediction model to obtain the target anonymization parameter value of the data set to be anonymized; wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and each of the anonymization parameter values as model training labels;
[0134] The second anonymization module 40 is used to perform anonymization processing on the to-be-anonymized data set according to the target anonymization parameter value to obtain an anonymized data set.
[0135] In a feasible implementation manner, the attack success rate includes: individual attack success rate, and the attack module 20 is further used for:
[0136] Traversing each of the data intermediate states respectively to obtain data attributes corresponding to each of the data intermediate states;
[0137] Generating data query statements corresponding to each of the data intermediate states according to the data attributes corresponding to each of the data intermediate states;
[0138] Using each of the data query statements, querying the original data set, if it is detected that the queried data entry is one, then determining that the attack is successful, and calculating the number of successful attacks;
[0139] The ratio of the number of successful attacks to the total number of attacks is taken as the individual attack success rate.
[0140] In one embodiment, the data attribute includes a plurality of different sub-attributes, and the attack module 20 is further configured to:
[0141] Randomly selecting a plurality of sub-attributes from the data attributes corresponding to each of the data intermediate states, to obtain attribute combinations corresponding to each of the data intermediate states;
[0142] Based on the attribute combinations corresponding to the data intermediate states, data query statements corresponding to the data intermediate states are generated.
[0143] In one embodiment, the attack success rate further includes: matching the attack success rate, the attack module 20 is further used to:
[0144] For each of the data intermediate states, obtaining a preset first external data set and a second external data set, wherein the first external data set and the second external data set are disjoint, and attributes in the first external data set and the second external data set all belong to the data intermediate state;
[0145] Obtaining a preset number of first nearest neighbors corresponding to the first external data set, and obtaining the preset number of second nearest neighbors corresponding to the second external data set;
[0146] If it is detected that there is an overlapping entry between the first nearest neighbor and the second nearest neighbor, and it is detected that the overlapping entry exists in the original data set, then it is determined that the attack is successful, and the number of successful attacks is calculated;
[0147] The ratio of the number of successful attacks to the total number of attacks is taken as the matching attack success rate.
[0148] In one embodiment, the attack success rate further includes: an inference attack success rate, and the attack module 20 is further used to:
[0149] Obtaining preset reasoning auxiliary information corresponding to each of the data intermediate states, and real information corresponding to each of the reasoning auxiliary information;
[0150] Determining target anonymous information corresponding to each of the reasoning auxiliary information in each of the data intermediate states;
[0151] If it is detected that the target anonymous information and the real information corresponding to the same inference auxiliary information are the same, the attack is determined to be successful, and the number of successful attacks is calculated;
[0152] The ratio of the number of successful attacks to the total number of attacks is taken as the inference attack success rate.
[0153] In one embodiment, the anonymization parameter determination module 30 is further used to:
[0154] According to a preset risk level classification rule, the data set to be anonymized is classified into levels to obtain a risk level corresponding to the data set to be anonymized;
[0155] The preset attack success rate corresponding to the risk level is used as the target attack success rate.
[0156] In one embodiment, the anonymization system comprises:
[0157] A first level comparison module, configured to execute the step of using the preset attack success rate corresponding to the risk level as the target attack success rate if it is detected that the risk level is higher than a preset risk level threshold;
[0158] The second level comparison module is used to publish the data set to be anonymized if it is detected that the risk level is lower than the risk level threshold.
[0159] The anonymization system provided by the present application adopts the anonymization method in the above embodiment, and can take into account the availability and security of data according to the level of data when anonymizing data, thereby realizing a flexible data anonymization method. Compared with the prior art, the beneficial effects of the anonymization system provided by the present application are the same as the beneficial effects of the anonymization method provided by the above embodiment, and other technical features in the anonymization system are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0160] The present application provides a terminal device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the anonymization method in the above-mentioned embodiment 1.
[0161] Reference below Figure 5 , which shows a schematic diagram of the structure of a terminal device suitable for implementing an embodiment of the present application. Figure 5 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0162] like Figure 5 As shown, the terminal device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read On ly Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the terminal device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the terminal device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a terminal device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0163] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0164] The terminal device provided by the present application adopts the anonymization method in the above embodiment, which can solve the technical problem of how to propose a flexible data anonymization method. Compared with the prior art, the beneficial effects of the terminal device provided by the present application are the same as the beneficial effects of the anonymization method provided by the above embodiment, and the other technical features in the terminal device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0165] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0166] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0167] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the anonymization method in the above-mentioned embodiment.
[0168] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read On ly Memory), an erasable programmable read-only memory (EPROM: Erasable Programmab le Read On ly Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read On ly Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0169] The computer-readable storage medium may be included in the terminal device; or may exist independently without being installed in the terminal device.
[0170] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a terminal device, the terminal device: based on preset anonymization parameter values, respectively anonymizes the original data set to obtain the data intermediate state corresponding to each of the anonymization parameter values; attacks each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states; obtains the data set to be anonymized and the target attack success rate corresponding to the data set to be anonymized, and inputs the target attack success rate into a preset anonymization parameter value prediction model to obtain the target anonymization parameter value of the data set to be anonymized; wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and with each of the anonymization parameter values as model training labels; anonymizes the data set to be anonymized according to the target anonymization parameter value to obtain an anonymized data set.
[0171] The computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0172] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0173] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0174] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned anonymization method, and can solve the technical problem of how to propose a flexible data anonymization method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the anonymization method provided in the above-mentioned embodiment, and will not be repeated here.
[0175] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned anonymization method when executed by a processor.
[0176] The computer program product provided by this application can solve the technical problem of how to propose a flexible data anonymization method. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the anonymization method provided by the above embodiment, which will not be repeated here.
[0177] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An anonymization method, characterized in that: The anonymization method includes: Based on the preset anonymization parameter values, the original data sets are anonymized respectively to obtain the data intermediate states corresponding to the respective anonymization parameter values; Attacking each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states; Obtain a data set to be anonymized and a target attack success rate corresponding to the data set to be anonymized, and input the target attack success rate into a preset anonymization parameter value prediction model to obtain a target anonymization parameter value of the data set to be anonymized; wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and each of the anonymization parameter values as model training labels; The data set to be anonymized is anonymized according to the target anonymization parameter value to obtain an anonymized data set.
2. The anonymization method according to claim 1, characterized in that: The attack success rate includes: individual attack success rate; The step of attacking each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states includes: Traversing each of the data intermediate states respectively to obtain data attributes corresponding to each of the data intermediate states; Generating data query statements corresponding to each of the data intermediate states according to the data attributes corresponding to each of the data intermediate states; Using each of the data query statements, querying the original data set, if it is detected that the queried data entry is one, then determining that the attack is successful, and calculating the number of successful attacks; The ratio of the number of successful attacks to the total number of attacks is taken as the individual attack success rate.
3. The anonymization method according to claim 2, characterized in that: The data attribute includes a plurality of different sub-attributes, and the step of generating a data query statement corresponding to each of the data intermediate states according to the data attribute corresponding to each of the data intermediate states includes: Randomly selecting a plurality of sub-attributes from the data attributes corresponding to each of the data intermediate states, to obtain attribute combinations corresponding to each of the data intermediate states; Based on the attribute combinations corresponding to the data intermediate states, data query statements corresponding to the data intermediate states are generated.
4. The anonymization method according to claim 1, characterized in that: The attack success rate also includes: matching attack success rate; The step of attacking each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states includes: For each of the data intermediate states, obtaining a preset first external data set and a second external data set, wherein the first external data set and the second external data set are disjoint, and data attributes in the first external data set and the second external data set all belong to the data intermediate state; Obtaining a preset number of first nearest neighbors corresponding to the first external data set, and obtaining the preset number of second nearest neighbors corresponding to the second external data set; If it is detected that there is an overlapping entry between the first nearest neighbor and the second nearest neighbor, and it is detected that the overlapping entry exists in the original data set, then it is determined that the attack is successful, and the number of successful attacks is calculated; The ratio of the number of successful attacks to the total number of attacks is taken as the matching attack success rate.
5. The anonymization method according to claim 1, characterized in that: The attack success rate also includes: reasoning attack success rate; The step of attacking each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states includes: Obtaining preset reasoning auxiliary information corresponding to each of the data intermediate states, and real information corresponding to each of the reasoning auxiliary information; Determining target anonymous information corresponding to each of the reasoning auxiliary information in each of the data intermediate states; If it is detected that the target anonymous information and the real information corresponding to the same inference auxiliary information are the same, the attack is determined to be successful, and the number of successful attacks is calculated; The ratio of the number of successful attacks to the total number of attacks is taken as the inference attack success rate.
6. The anonymization method according to claim 1, characterized in that: The steps for obtaining the target attack success rate corresponding to the data set to be anonymized include: According to a preset risk level classification rule, the data set to be anonymized is classified into levels to obtain a risk level corresponding to the data set to be anonymized; The preset attack success rate corresponding to the risk level is used as the target attack success rate.
7. The anonymization method according to claim 6, characterized in that: After the step of classifying the data set to be anonymized to obtain the risk level corresponding to the data set to be anonymized, the method further includes: If it is detected that the risk level is higher than a preset risk level threshold, the step of using the preset attack success rate corresponding to the risk level as the target attack success rate is executed; If it is detected that the risk level is lower than the risk level threshold, the data set to be anonymized is released.
8. An anonymization system, characterized in that: The anonymization system comprises: A first anonymization module, configured to perform anonymization processing on the original data set based on preset anonymization parameter values, and obtain data intermediate states corresponding to the respective anonymization parameter values; An attack module, used to attack each of the data intermediate states to obtain the attack success rate corresponding to each of the data intermediate states; An anonymization parameter determination module is used to obtain a data set to be anonymized and a target attack success rate corresponding to the data set to be anonymized, and input the target attack success rate into a preset anonymization parameter value prediction model to obtain a target anonymization parameter value of the data set to be anonymized; wherein the anonymization parameter value prediction model is obtained by training with the attack success rate corresponding to each of the anonymization parameter values as model input data and with each of the anonymization parameter values as model training labels; The second anonymization module is used to perform anonymization processing on the data set to be anonymized according to the target anonymization parameter value to obtain an anonymized data set.
9. A terminal device, characterized in that: The terminal device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the anonymization method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the anonymization method according to any one of claims 1 to 7 are implemented.
11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the anonymization method according to any one of claims 1 to 7 are implemented.