Data masking method and device
A data masking method includes: displaying one or more groups of relational data, where the relational data includes a data subject, privacy data, and a relationship that the data subject and the privacy data meet; obtaining selection of a user for target relational data in the one or more groups of relational data; and performing masking processing on the target relational data in a data source.
1 . A method, comprising:
displaying, on a display of an electronic device, a first user interface comprising one or more groups of relational data, wherein the relational data comprises a data subject, privacy data, and a relationship between the data subject and the privacy data;
obtaining, from an input device of the electronic device, a masking degree and a first selection of target relational data in the one or more groups;
performing, by one or more processors of the electronic device, in a data source, and based on the masking degree, masking processing on the target relational data to obtain masked relational data; and
displaying, on the display of the electronic device, a second user interface comprising the masked relational data.
2 . The method of claim 1 , further comprising obtaining, from the input device of the electronic device, a second selection of a masking target in the target relational data, wherein the masking target comprises the data subject, the privacy data, or the relationship.
3 . The method of claim 2 , wherein performing the masking processing comprises performing, by the one or more processors of the electronic device and in the data source, hash masking, cover masking, replacement masking, transform masking, encryption masking, or shuffle masking on the masking target, and wherein the masking target comprises the data subject, the privacy data, or the relationship.
4 . The method of claim 1 , wherein the data source is from a cloud computing system, and wherein the method further comprises obtaining, from the data source and based on the target relational data meeting a data masking condition, the target relational data.
5 . The method of claim 1 , wherein after performing the masking processing, the method further comprises providing, to a data analysis device, the data source.
6 . The method of claim 1 , further comprising sharing the data source.
7 . The method of claim 1 , further comprising displaying, for the one or more groups of relational data, a confidence, wherein the confidence reflects credibility that the data subject and the privacy data have the relationship, and wherein the confidence is a reference for the user to select the target relational data.
8 . The method of claim 1 , further comprising:
obtaining the data subject and the relationship; and
obtaining, from the data source, privacy data that has the relationship with the data subject.
9 . The method of claim 1 , wherein the first user interface displays the one or more groups in a form of a knowledge graph.
10 . An apparatus, comprising:
a display;
an input device;
a memory configured to store instructions; and
one or more processors coupled to the display, the input device, and the memory and configured to execute the instructions to:
display, on the display, a first user interface comprising one or more groups of relational data, wherein the relational data comprises a data subject, privacy data, and a relationship between the data subject and the privacy data;
obtain, from the input device, a masking degree and a first selection of target relational data in the one or more groups;
perform, in a data source and based on the masking degree, masking processing on the target relational data to obtain masked relational data; and
display, on the display, a second user interface comprising the masked relational data.
11 . The apparatus of claim 10 , wherein the one or more processors are further configured to execute the instructions to obtain, from the input device, a second selection of a masking target in the target relational data, and wherein the masking target comprises the data subject, the privacy data, or the relationship.
12 . The apparatus of claim 11 , wherein the one or more processors are further configured to execute the instructions to perform, in the data source, hash masking, cover masking, replacement masking, transform masking, encryption masking, or shuffle masking on the masking target, and wherein the masking target comprises the data subject, the privacy data, or the relationship.
13 . The apparatus of claim 10 , wherein the data source is from a cloud computing system, and wherein the one or more processors are further configured to execute the instructions to obtain, from the data source and based on the target relational data meeting a data masking condition, the target relational data.
14 . The apparatus of claim 10 , wherein the one or more processors are further configured to execute the instructions to provide, to a data analysis device, the data source.
15 . The apparatus of claim 10 , wherein the one or more processors are further configured to share the data source.
16 . The apparatus of claim 10 , wherein the one or more processors are further configured to display, for the one or more groups of relational data, a confidence, wherein the confidence reflects credibility that the data subject and the privacy data have the relationship, and wherein the confidence is a reference for the user to select the target relational data.
17 . The apparatus of claim 10 , wherein the one or more processors are further configured to:
obtain the data subject and the relationship; and
obtain, from the data source, privacy data that has the relationship with the data subject.
18 . The apparatus of claim 10 , wherein the first user interface displays the one or more groups in a form of a knowledge graph.
19 . The method of claim 1 , wherein the masked relational data displayed in the second user comprises an element, and wherein after performing the masking processing, a proportion of masked characters in the element to total characters in element is equal to the masking degree.
20 . A method, comprising:
displaying, on a display of an electronic device, a first user interface comprising one or more groups of relational data, wherein the relational data comprises a data subject, privacy data, and a relationship between the data subject and the privacy data;
obtaining, from an input device of the electronic device, a first selection of target relational data in the one or more groups and a second selection of a masking target in the target relational data, wherein the masking target comprises the data subject, the privacy data, or the relationship;
performing, by one or more processors of the electronic device and in a data source, masking processing on the target relational data to obtain masked relational data by performing hash masking, cover masking, replacement masking, transform masking, encryption masking, or shuffle masking on the masking target; and
displaying, on the display of the electronic device, a second user interface comprising the masked relational data.