Sensitive data classification method and device, electronic equipment, storage medium and product
By splitting the sensitive data classification model into multiple subtasks in parallel, combining the multi-grained scanning cascading forest classification model and data generation and identification processing, the slow training problem of ID3 algorithm under large-scale data is solved, and sensitive data classification is improved speed and accuracy.
Patent Information
- Application Number
- CN202411277982.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-17
AI Technical Summary
The existing ID3 algorithms are slow in processing large-scale sensitive data, resulting in slower classification results, and it is difficult to quickly and accurately judge sensitive data types in big data environments, and the model lacks the ability to unknown sensitive data.
By splitting each task in the sensitive data classification model into multiple subtasks and assigning computing nodes to each subtask, a classification model of multiple computing nodes is constructed in parallel, and a cascading forest classification model with multi-grained scanning is used for classification. Combining data generation and identification processing, improve computing efficiency and model robustness.
It accelerates the acquisition of sensitive data classification results, improves the scalability of the model in the big data environment and the processing ability of unknown sensitive data, and improves the accuracy and speed of classification results.
Smart Images

Figure CN119150159A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data classification, and in particular to a sensitive data classification method, device, electronic device, storage medium and product. Background Art
[0002] In relevant sensitive data classification schemes, the ID3 algorithm is usually used to classify sensitive data. However, the ID3 algorithm is a decision tree algorithm based on information gain. Information gain needs to be calculated in each iteration to determine the best split node in the decision tree. When faced with a large scale of sensitive data, the training process using the ID3 algorithm may become very slow, which in turn slows down the speed of obtaining sensitive data classification results. Summary of the invention
[0003] The present disclosure provides a sensitive data classification method, device, electronic device, storage medium and product to solve the problems in the related art.
[0004] A first aspect of the present disclosure provides a sensitive data classification method, the method comprising:
[0005] Acquire a first data set, where the first data set includes at least one sensitive data;
[0006] Splitting each task in a first classification model into a first preset number of subtasks, wherein the first classification model is a cascade forest classification model of multi-granularity scanning, and the task is used to indicate a forest in each cascade layer;
[0007] Assign a corresponding computing node to each subtask, and construct a first classification model with multiple computing nodes in parallel, wherein multiple subtasks may correspond to the same computing node, and subtasks on different computing nodes may be calculated in parallel;
[0008] The sensitive data in the first data set is classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0009] In one embodiment, obtaining a first data set includes:
[0010] Acquire a second data set and a first random vector, wherein the second data set includes at least one sensitive data;
[0011] Using the first data generation model to generate and authenticate the sensitive data in the second data set and the first random vector, to obtain first sensitive data whose generation loss value is in a first preset range and whose authentication loss value is in a second preset range;
[0012] The sensitive data in the second data set and the first sensitive data are merged to obtain a first data set.
[0013] In one embodiment, the sensitive data in the second data set and the first random vector are generated and authenticated using a first data generation model to obtain first sensitive data having a generation loss value in a first preset range and an authentication loss value in a second preset range, including:
[0014] Preprocessing the sensitive data in the second data set to obtain a preprocessed second data set;
[0015] The first data generation model is used to generate and identify the sensitive data in the preprocessed second data set and the first random vector to obtain first sensitive data with a generation loss value in a first preset interval and an identification loss value in a second preset interval.
[0016] In one embodiment, the sensitive data in the first data set is classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set, including:
[0017] Scanning the sensitive data in the first data set using a window of a first preset width to obtain a first type of vector corresponding to the sensitive data in the first data set;
[0018] Concatenating the first type of vectors corresponding to the sensitive data in the first data set to obtain the second type of vectors corresponding to the sensitive data in the first data set;
[0019] The second type of vectors corresponding to the sensitive data in the first data set are classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0020] In one embodiment, the second type of vectors corresponding to the sensitive data in the first data set are classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set, including:
[0021] Acquire a first overhead of the first classification model of the plurality of computing nodes in parallel and a second overhead of the first classification model of the plurality of computing nodes in parallel at different segmentation granularities, wherein the segmentation granularity is used to indicate how to allocate subtasks to computing nodes;
[0022] Determine an optimal segmentation granularity of the first classification model of the plurality of computing nodes in parallel based on a first cost of the first classification model of the plurality of computing nodes in parallel at the different segmentation granularities and a second cost of the first classification model of the plurality of computing nodes in parallel;
[0023] Determine the first classification model in parallel for the plurality of computing nodes based on the optimal segmentation granularity of the first classification model in parallel for the plurality of computing nodes;
[0024] The second type of vectors corresponding to the sensitive data in the first data set are classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0025] In one embodiment, the method provided by the present disclosure comprises: classifying the second type of vectors corresponding to the sensitive data in the first data set by using the first classification model in parallel of the multiple computing nodes to obtain the classification result of the sensitive data in the first data set;
[0026] If the classification result error of the sensitive data in the first data set is not less than a first preset value, obtaining second sensitive data and a first number of computing nodes;
[0027] Using the second sensitive data as input of the first classification model of the plurality of computing nodes in parallel, using the first number of computing nodes as computing nodes of the first classification model of the plurality of computing nodes in parallel, and obtaining an updated first classification model of the plurality of computing nodes in parallel;
[0028] The second type of vectors corresponding to the sensitive data in the first data set are classified using the updated first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0029] A second aspect of the present disclosure provides a sensitive data classification device, the device comprising:
[0030] An acquiring unit, configured to acquire a first data set, wherein the first data set includes at least one sensitive data;
[0031] A splitting unit, used to split each task in a first classification model into a first preset number of subtasks, wherein the first classification model is a cascade forest classification model of multi-granularity scanning, and the task is used to indicate a forest in each cascade layer;
[0032] An allocation unit, used to allocate a corresponding computing node to each subtask, and construct a first classification model with multiple computing nodes in parallel, wherein multiple subtasks can correspond to the same computing node, and subtasks on different computing nodes can be calculated in parallel;
[0033] A classification unit is used to classify the sensitive data in the first data set by using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0034] A third aspect of the present disclosure provides an electronic device, including:
[0035] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable 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 method described in the embodiment of the first aspect of the present disclosure.
[0036] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.
[0037] The fifth aspect embodiment of the present disclosure provides a computer program product, including a computer program, which implements the method described in the first aspect embodiment of the present disclosure when executed by a processor.
[0038] In summary, the present disclosure proposes a sensitive data classification method, which includes: obtaining a first data set, which includes at least one sensitive data; splitting each task in the first classification model into a first preset number of subtasks, the first classification model is a cascade forest classification model with multi-granularity scanning, and the task is used to indicate the forest in each cascade layer; assigning a corresponding computing node to each subtask, and constructing a first classification model with multiple computing nodes in parallel, wherein multiple subtasks can correspond to the same computing node, and subtasks on different computing nodes can be calculated in parallel; using the first classification model with multiple computing nodes in parallel to classify the sensitive data in the first data set, and obtain the classification result of the sensitive data in the first data set.
[0039] According to the solution provided by the present disclosure, by obtaining a first data set, the first data set includes at least one sensitive data; by splitting each task in the first classification model into a first preset number of subtasks, and assigning a corresponding computing node to each subtask, a first classification model with multiple computing nodes in parallel is constructed, and subtasks on different computing nodes in the first classification model with multiple computing nodes in parallel can be calculated in parallel. By using the first classification model with multiple computing nodes in parallel to classify the sensitive data in the first data set, the speed of obtaining the classification results of the sensitive data in the first data set can be improved by speeding up the speed of calculating the results of each subtask.
[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0042] Figure 1 A flowchart of a sensitive data classification method provided in an embodiment of the present disclosure;
[0043] Figure 2 A schematic diagram of a flow chart of a method for obtaining a first data set provided in an embodiment of the present disclosure;
[0044] Figure 3 A schematic diagram of the structure of the LSGAN sensitive data generation module provided in an embodiment of the present disclosure;
[0045] Figure 4 A flowchart of a method for obtaining first sensitive data provided by an embodiment of the present disclosure;
[0046] Figure 5 A flowchart of a method for obtaining classification results of sensitive data provided by an embodiment of the present disclosure;
[0047] Figure 6 A schematic diagram of the structure of the multi-granularity scanning stage provided by an embodiment of the present disclosure;
[0048] Figure 7 A schematic diagram of the structure of a sensitive data classification module based on a multi-granularity deep forest provided in an embodiment of the present disclosure;
[0049] Figure 8 A flowchart of another method for obtaining classification results of sensitive data provided by an embodiment of the present disclosure;
[0050] Fig. 9 A schematic diagram of the structure of the cascaded deep forest stage provided in an embodiment of the present disclosure;
[0051] Fig.10 A flowchart of another method for obtaining classification results of sensitive data provided by an embodiment of the present disclosure;
[0052] Fig.11 A flowchart of a sensitive data classification method provided for an application example of the present disclosure;
[0053] Fig.12 A schematic diagram of the structure of a sensitive data classification device provided in an embodiment of the present disclosure;
[0054] Fig.13 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0055] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0056] In relevant sensitive data classification schemes, the ID3 algorithm is usually used to classify sensitive data. However, the ID3 algorithm is a decision tree algorithm based on information gain. Information gain needs to be calculated in each iteration to determine the best split node in the decision tree. When faced with a large scale of sensitive data, the training process using the ID3 algorithm may become very slow, which in turn slows down the speed of obtaining sensitive data classification results.
[0057] The following is a brief introduction to a sensitive data classification method in related technologies:
[0058] The scheme proposes a sensitive data classification method based on an improved ID3 decision tree, which mainly includes the following steps:
[0059] Step 1: Collect sensitive data with the same conditional attributes to form a sample data set. Each piece of sensitive data has a sensitivity level label, which includes four sensitivity levels: public data, external sensitive, internal inter-department sensitive, and internal department sensitive data. Divide the sample data set into a sample training set and a sample test set in a ratio of 7:3, and perform data preprocessing;
[0060] Step 2: Based on the information gain theory, calculate the change in information entropy before and after the sample training set is divided according to a certain conditional attribute, which is the information gain of the conditional attribute; introduce attribute weights to weight the information gain of each conditional attribute; select the conditional attribute with the maximum weighted information gain of the sample data in the sample training set.
[0061] Step 3: Use the conditional attribute with the maximum weighted information gain as the split node attribute of the decision tree, build an improved ID3 decision tree and perform model verification;
[0062] Step 4: Classify sensitive data using the improved ID3 decision tree. The prior art classifies sensitive data by improving the ID3 decision tree model.
[0063] The above solution has the following defects:
[0064] First, when using the ID3 algorithm to select the branch attributes in the root node and each internal node, information gain is used as the evaluation criterion. The disadvantage of information gain is that it tends to select attributes with more values, which may not provide much valuable information in some cases. In addition, the partitioning process may stop due to insufficient statistical features caused by the small size of the subset.
[0065] Second, in the current big data environment, the scale of sensitive data is growing, and the types are complex and diverse. The ID3 algorithm cannot quickly and accurately determine the type of sensitive data in the big data environment, so it cannot be applied to the classification of sensitive data in the big data environment.
[0066] Third, detection based on machine learning or deep learning methods has good performance in identifying sensitive data types. However, potential attackers can carefully modify the original sample data and add subtle disturbances to it, forcing the model generated by classification method training to make mistakes. Therefore, using existing sensitive data as the sample set of the model, the model is insufficient to deal with unknown sensitive data.
[0067] In order to solve the defects in the related art, the present disclosure obtains a first data set, which includes at least one sensitive data; by splitting each task in the first classification model into a first preset number of subtasks, and assigning a corresponding computing node to each subtask, a first classification model with multiple computing nodes in parallel is constructed, and subtasks on different computing nodes in the first classification model with multiple computing nodes in parallel can be calculated in parallel. By using the first classification model with multiple computing nodes in parallel to classify the sensitive data in the first data set, the speed of obtaining the classification results of the sensitive data in the first data set can be improved by speeding up the speed of calculating the results of each subtask.
[0068] The present disclosure is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0069] like Figure 1 As shown, Figure 1 A flowchart of a sensitive data classification method provided in an embodiment of the present disclosure. The sensitive data classification method provided in an embodiment of the present disclosure includes the following steps:
[0070] Step 101, obtaining a first data set, wherein the first data set includes at least one sensitive data;
[0071] In one embodiment, the first data set may include only real sensitive data or generated sensitive data, or may include both real sensitive data and generated sensitive data.
[0072] In one embodiment, the first data set may be obtained from a public data set related to sensitive data.
[0073] In one embodiment, the first data set may also be obtained from relevant sensitive data classification documents.
[0074] Step 102, splitting each task in the first classification model into a first preset number of subtasks, wherein the first classification model is a cascade forest classification model of multi-granularity scanning, and the task is used to indicate the forest in each cascade layer;
[0075] In one embodiment, the multi-granularity scanning cascade forest classification model includes at least two cascade-layer forests, wherein each cascade layer also includes at least two forests, and the inputs of the forests in the same cascade layer are the same.
[0076] In one embodiment, splitting each task in the first classification model into a first preset number of subtasks means splitting the forest in each cascade layer into at least two sub-forests, and the inputs of the sub-forests in the same cascade layer are the same.
[0077] In one embodiment, each task in the first classification model can be split into a first preset number of subtasks as needed. Specifically, if the user needs a faster computing speed, each task in the first classification model can be split into more subtasks, such as splitting the task into 10 subtasks; if the user needs to reduce computing overhead, each task in the first classification model can be split into fewer subtasks, such as splitting the task into 2 subtasks.
[0078] Step 103, assigning a corresponding computing node to each subtask, and constructing a first classification model with multiple computing nodes in parallel, wherein multiple subtasks may correspond to the same computing node, and subtasks on different computing nodes may be calculated in parallel;
[0079] In one embodiment, one subtask can only correspond to one computing node.
[0080] In one embodiment, according to the number of subtasks, the subtasks may be evenly distributed to two adjacent computing nodes, or the subtasks may be randomly distributed to two adjacent computing nodes.
[0081] In one embodiment, a Ray distributed architecture may be used to construct a first classification model with multiple computing nodes in parallel, or a Spark distributed architecture may be used to construct a first classification model with multiple computing nodes in parallel.
[0082] In one embodiment, by constructing a first classification model with multiple computing nodes in parallel, the efficiency of the operation process can be improved.
[0083] Step 104: Classify the sensitive data in the first data set by using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0084] In one embodiment, in the present application, the classification results of the sensitive data in the first data set include externally sensitive, internally sensitive between departments, and internally sensitive within departments.
[0085] In one embodiment, by using a first classification model in parallel with multiple computing nodes to classify the sensitive data in the first data set, the speed of classifying the sensitive data in the first data set can be improved by speeding up the calculation of each subtask result.
[0086] In one embodiment, if Figure 2 As shown, obtaining a first data set includes:
[0087] Step 201, obtaining a second data set and a first random vector, wherein the second data set includes at least one sensitive data;
[0088] In one embodiment, the second data set refers to an original data set, which can be obtained from a public data set or from documents related to sensitive data.
[0089] In one embodiment, the first random vector may be obtained from a Gaussian distribution.
[0090] In one embodiment, the first random vector is used to generate new sensitive data to expand the original data set.
[0091] Step 202, using a first data generation model to generate and authenticate the sensitive data in the second data set and the first random vector, to obtain first sensitive data with a generation loss value in a first preset range and an authentication loss value in a second preset range;
[0092] In one embodiment, the first data generation model refers to a least squares generative adversarial network (LSGAN) model, and the loss function used by the LSGAN model is a least squares loss function.
[0093] Specifically, the loss function of LSGAN is:
[0094]
[0095]
[0096] Among them, z is random noise, z obeys Gaussian distribution Pz , E represents the expected value, P data represents the real sensitive data sample. G(z) is the data that the generator imitates and outputs, which is relatively real compared to the real sensitive sample data. D(x) represents the probability that the data sample x is real data. D(G(z)) is the probability that the discriminator judges that the false sensitive data G(z) generated by the generator is real sensitive data. a is the real sensitive sample data label; b is the generated sample data label; c is the generator parameter, V LSGAN (D) is the loss function of the discriminator, V LSGAN (G) is the loss function of the generator. The theoretically optimal discriminator formula and the final optimization goal of the LSGAN model are:
[0097]
[0098]
[0099]
[0100] In the training of sensitive data classification, sensitive data can be marked as 1 and non-sensitive data can be marked as 0. Therefore, in formula (1) and formula (2), a=c=1, b=0, and the optimization function of sensitive data classification training can be obtained:
[0101]
[0102]
[0103] When the generator loss function V of the LSGAN model LSGAN (G) and the discriminator loss function V of the LSGAN model LSGAN (D) tends to be stable, indicating that the model has been trained. At this time, the sensitive data generated by the generator can deceive the discriminator to output and obtain the generated sensitive data.
[0104] In one embodiment, the sensitive data in the second data set may be stored in a record pool of the generator, where the record pool refers to the input of the generator, which may specifically be a file.
[0105] In one embodiment, if Figure 3 As shown, the first data generation model is used to generate and identify the sensitive data in the second data set and the first random vector, including: using the generator of the LSGAN model to generate the first random vector to obtain the generated sensitive data, and then using the identifier to identify the sensitive data in the second data set and the generated sensitive data to determine the first sensitive data whose generation loss value is in the first preset interval and whose identification loss value is in the second preset interval.
[0106] In one embodiment, the first sensitive data whose generation loss value is in a first preset interval and whose identification loss value is in a second preset interval is used to measure whether the generation loss value and the identification loss value tend to be stable, wherein the size and interval boundaries of the first preset interval and the second preset interval can be determined based on historical experimental results or actual needs.
[0107] Step 203: merge the sensitive data in the second data set and the first sensitive data to obtain a first data set.
[0108] In one embodiment, the first data set is obtained by merging the sensitive data in the second data set and the first sensitive data. The expanded data set can support the training of a sensitive data classification model in a big data environment, so that the model has stronger scalability for various types of sensitive data existing in the big data environment, and at the same time can improve the robustness of the model and its ability to deal with unknown sensitive data.
[0109] In one embodiment, the aforementioned first data set may be used as a new original data set, and the LSGAN model may continue to be used to obtain new first sensitive data, and the first data set may be continuously updated to further improve the robustness of the model and its ability to cope with unknown sensitive data.
[0110] In one embodiment, if Figure 4 As shown, the first data generation model is used to generate and identify the sensitive data in the second data set and the first random vector, so as to obtain the first sensitive data whose generation loss value is in the first preset interval and whose identification loss value is in the second preset interval, including:
[0111] Step 401, preprocessing the sensitive data in the second data set to obtain a preprocessed second data set;
[0112] In one embodiment, the preprocessing of the sensitive data in the second data set includes cleaning and labeling the sensitive data in the second data set. The cleaning of the sensitive data in the second data set is to remove missing values, abnormal values and duplicate values in the sensitive data in the second data set, so that the sensitive data in the second data set is more standardized; the labeling of the sensitive data in the second data set refers to adding a corresponding sensitive type to each piece of sensitive data.
[0113] In one embodiment, after the sensitive data in the second data set is cleaned, the sensitive data in the second data set may be denoised using convolutional neural networks and other means. The denoised sensitive data is used as input to a first classification model in parallel with multiple computing nodes, which can improve the accuracy of the sensitive data classification results.
[0114] In one embodiment, a corresponding sensitive type field may be added to each sensitive data in a table storing sensitive data.
[0115] Step 402, using a first data generation model to generate and identify the sensitive data in the preprocessed second data set and the first random vector, to obtain first sensitive data with a generation loss value in a first preset interval and an identification loss value in a second preset interval.
[0116] In one embodiment, since the sensitive data in the preprocessed second data set is more standardized and accurate, the sensitive data in the preprocessed second data set and the first random vector are generated and authenticated using the first data generation model to obtain more standardized and accurate first sensitive data.
[0117] In one embodiment, after generating and identifying the sensitive data in the preprocessed second data set and the first random vector using the first data generation model to obtain first sensitive data with a generation loss value in a first preset interval and an identification loss value in a second preset interval, the sensitive data classification method also includes re-labeling all sensitive data in the first data set including the first sensitive data, such as 0 indicates external sensitive, 1 indicates internal departmental sensitive, and 2 indicates internal departmental sensitive data.
[0118] In one embodiment, if Figure 5 As shown, the sensitive data in the first data set is classified using the first classification model in parallel of the multiple computing nodes to obtain the classification result of the sensitive data in the first data set, including:
[0119] Step 501, using a window of a first preset width to scan sensitive data in the first data set, to obtain a first type of vector corresponding to the sensitive data in the first data set;
[0120] In one embodiment, the window of the first preset width generally refers to a window of fixed width, and the window width is not greater than the width of the sensitive data to be scanned, such as Figure 6 As shown, in the present application, multiple windows of different widths can be used to scan the sensitive data in the first data set to obtain a first class vector corresponding to the sensitive data in the first data set. For example, if the sensitive data in the first data set is 400-dimensional, a window with a first preset width of 300 dimensions is used to scan the sensitive data in the first data set to obtain 101 groups of class vectors, a window with a first preset width of 200 dimensions is used to scan the sensitive data in the first data set to obtain 201 groups of class vectors, and a window with a first preset width of 100 dimensions is used to scan the sensitive data in the first data set to obtain 301 groups of class vectors.
[0121] In one embodiment, a window of a first preset width is used to scan the sensitive data in the first data set to obtain a first type of vector corresponding to the sensitive data in the first data set. This is essentially to obtain the first type of vector corresponding to the sensitive data by passing the original features of the sensitive data through a set of random forest models or other base learners.
[0122] In one embodiment, the first category vector corresponding to the sensitive data includes the probability that the sensitive data belongs to each category. For example, when the first category vector corresponding to the sensitive data is (0.1, 0.2, 0.7), it indicates that the probability that the sensitive data belongs to the first category is 0.1, the probability that it belongs to the second category is 0.2, and the probability that it belongs to the third category is 0.7. For the same sensitive data, the first category vectors corresponding to the sensitive data obtained in different random forest models or other base learners may also be different.
[0123] In one embodiment, by using a window of a first preset width to scan the sensitive data in the first data set and obtaining a first type of vector corresponding to the sensitive data in the first data set, local features of different granularities can be obtained, which can provide more training dimensions and accuracy for subsequent training.
[0124] Step 502, concatenating first-category vectors corresponding to the sensitive data in the first data set to obtain second-category vectors corresponding to the sensitive data in the first data set;
[0125] In one embodiment, taking the first category vector corresponding to the sensitive data in the first data set as a row vector as an example, all the first category vectors corresponding to the sensitive data in the first data set are concatenated row by row to obtain the second category vector corresponding to the sensitive data in the first data set, such as concatenating the category vectors described in the embodiment of the aforementioned step 501 row by row to obtain the second category vector corresponding to the sensitive data in the first data set.
[0126] In one embodiment, a connect function may be used to concatenate all first-category vectors corresponding to sensitive data in the first data set row by row. Assume that S represents the first data set, window wd , (wd=1,2,3) represents windows of different widths used to scan sensitive data in the first data set, S i (window wd ) represents the first data set is windowed wd The sample corresponding to the i-th feature set obtained by scanning. Multi-Grained-Scanning It is the forest structure used in the multi-granularity scanning stage. If the forest structure includes ForestA and ForestB, that is, Forest Multi-Grained-Scanning =ForestA, ForestB, use ForestA(Si (window wd ) represents the class vector obtained by inputting the sample corresponding to the feature set S i (window wd ) into ForestA. By performing a multi-granularity scan once, multiple class vectors similar to the above can be obtained. Assuming these class vectors are all row vectors, the final result of the multi-granularity scan can be expressed as:
[0127] d = connect α=A,B {Forest α (S i (window wd ))}. (8)
[0128] In formula (8), i is jointly determined by the dimension of the sensitive data and the width of the scanning window. When the feature set is an n-dimensional row vector and the scanning window is an s (s < n)-dimensional row vector, there are at most n - s + 1 groups of class vectors, and d is the feature input from the multi-granularity scanning layer to the cascaded forest layer.
[0129] Step 503: Use the first classification model parallelly executed by the multiple computing nodes to classify the second type of vectors corresponding to the sensitive data in the first dataset, and obtain the classification result of the sensitive data in the first dataset.
[0130] In one embodiment, since the second type of vectors corresponding to the sensitive data in the first dataset contain multiple local features of the sensitive data, therefore, by using the first classification model parallelly executed by the multiple computing nodes to classify the second type of vectors corresponding to the sensitive data in the first dataset, a more accurate classification result of the sensitive data in the first dataset can be obtained.
[0131] In one embodiment, as Figure 7 shown, the structure of the cascaded forest classification model is given. Using the second type of vectors obtained in the foregoing step 503 as the input, training is performed in the multi-layer and multi-morphology cascaded forest classification model to mine the cross relationships between features. Among them, each layer of the model is obtained by integrating multiple random forests and completely random forests. During the training process, the forest for all input features and the random forest for specific features cooperate with each other, which can effectively complete the extraction of feature information and deliver the result to the next layer. The features of the second type of vectors obtained in the foregoing step 503 input to the cascaded forest layer are denoted as d1, d2 to d n , and the classification models of each layer of the cascaded forest are denoted as layar1, layar2, layar3 to layarn. Among them, layarn is the final output result. The iterative classification structure of each layer of the cascaded forest layer can be described by the following formula:
[0132] d1=outputoflayer1=layer1(d). (9)
[0133] d2=outputoflayer2=layer2(connect(d,d1)). (10)
[0134] d3=outputoflayer3=layer3(connect(d,d2)). (11)
[0135] …
[0136] d k =outputoflayer k =layer k (connect(d,d k-1 )). (12)
[0137] …
[0138] d n =finaloutput=layer output (connect(d,d n-1 )). (13)
[0139] Among them, the final output result of the cascade forest model is d n , which is composed of multiple groups of class vectors, n The class vectors in d are averaged. n The numerical value on each dimension of represents the probability that the data is externally sensitive, internally sensitive between departments, or internally sensitive within departments. The classification result is the category corresponding to the largest probability in the class vector after taking the average.
[0140] In one embodiment, if Figure 8 As shown, the second type of vectors corresponding to the sensitive data in the first data set are classified using the first classification model in parallel of the multiple computing nodes to obtain the classification result of the sensitive data in the first data set, including:
[0141] Step 801, obtaining a first overhead of a first classification model of the plurality of computing nodes in parallel and a second overhead of the first classification model of the plurality of computing nodes in parallel at different segmentation granularities, wherein the segmentation granularity is used to indicate how to allocate subtasks to computing nodes;
[0142] In one embodiment, the first overhead of the first classification model in parallel by multiple computing nodes refers to the first classification model computing overhead.
[0143] In one embodiment, the second overhead of the first classification model in parallel with multiple computing nodes refers to the data communication overhead of the first classification model.
[0144] In one embodiment, the first overhead of the first classification model in which the plurality of computing nodes are in parallel at different segmentation granularities and the second overhead of the first classification model in which the plurality of computing nodes are in parallel can be obtained based on the number of forests, forest size, segmentation granularity, total data amount, number of feature categories, and feedback frequency of each cascade layer in the first classification model. Specifically, the expressions for obtaining the first overhead and the second overhead are respectively:
[0145]
[0146]
[0147] Among them, F represents the number of forests in each cascade layer, T represents the forest size, e represents the segmentation granularity, N represents the total amount of data, C represents the number of feature categories, K represents the feedback frequency, S1 represents the first overhead, and S2 represents the second overhead.
[0148] In one embodiment, if Fig. 9 This is a schematic diagram of the structure of the sensitive data classification module based on multi-granularity deep forests, in which one of the different segmentation granularities is given. ForestA, ForestB, and ForestC in the figure represent three independent random forest models in the cascade forest. A1 to A4, B1 to B4, and C1 to C4 represent the subtasks obtained by splitting these forests. Nodes 1 to 5 represent the computing nodes that perform distributed operations on the subforests. After obtaining the intermediate results, they will be merged from the bottom up to generate the final results and output to the next cascade layer. The segmentation granularity shown in the figure is: A1 to A3 are assigned to node 1, A4 and B1 are assigned to node 2, B2 to B3 are assigned to node 3, B4 and C1 to C2 are assigned to node 4, and C3 to C4 are assigned to node 5.
[0149] In one embodiment, it can be seen from the expressions of the first overhead and the second overhead mentioned above that when the segmentation granularity is different, the first overhead of the first classification model and the second overhead of the first classification model will also be different, that is, by balancing the segmentation granularity, the parallelism and communication load of the model can be balanced, so that the model can achieve optimal training, detection and update of the model according to hardware resource conditions and feedback frequency requirements.
[0150] Step 802, determining an optimal segmentation granularity of the first classification model of the plurality of computing nodes in parallel based on the first cost of the first classification model of the plurality of computing nodes in parallel at the different segmentation granularities and the second cost of the first classification model of the plurality of computing nodes in parallel;
[0151] In one embodiment, the optimal segmentation granularity refers to the segmentation granularity corresponding to the balance between the model overhead and the model accuracy, and the model overhead refers to the computational overhead of the aforementioned model and the data communication overhead of the model.
[0152] In one embodiment, based on the first overhead of the first classification model of multiple computing nodes in parallel at each segmentation granularity and the second overhead of the first classification model of multiple computing nodes in parallel at different segmentation granularities, combined with the accuracy of the first classification model, the optimal segmentation granularity of the first classification model of multiple computing nodes in parallel is determined.
[0153] Step 803, determining the first classification model of the plurality of computing nodes in parallel based on the optimal segmentation granularity of the first classification model of the plurality of computing nodes in parallel;
[0154] In one embodiment, the final first classification model of multiple computing nodes in parallel is determined according to the allocation method of subtasks and computing nodes in the best segmentation granularity.
[0155] In one embodiment, by determining the final first classification model of multiple computing nodes in parallel according to the allocation method of subtasks and computing nodes in the optimal segmentation granularity, a first classification model can be obtained that can improve the efficiency during parallel operation and reduce the overall overhead during model operation.
[0156] Step 804: Classify the second type of vectors corresponding to the sensitive data in the first data set by using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0157] In one embodiment, by using a first classification model in parallel with multiple computing nodes to classify the second type of vectors corresponding to the sensitive data in the first data set, the sensitive data classification results can be quickly obtained while reducing the model overhead.
[0158] In one embodiment, if Fig.10 As shown, after the second type of vectors corresponding to the sensitive data in the first data set are classified using the first classification model in parallel of the multiple computing nodes to obtain the classification result of the sensitive data in the first data set, the sensitive data classification method includes:
[0159] Step 1001, if the classification result error of the sensitive data in the first data set is not less than a first preset value, obtaining second sensitive data and a first number of computing nodes;
[0160] In one embodiment, the first preset value refers to a preset critical value for determining the classification result error. The present disclosure does not limit the specific value of the first preset value, and it can be adjusted according to the model accuracy requirements.
[0161] In one embodiment, the error of the classification result of the sensitive data in the first data set is not less than a first preset value, indicating that the error of the classification result of the sensitive data is large.
[0162] In one embodiment, the second sensitive data refers to sensitive data that is sampled and cached in a buffer during online real-time operation.
[0163] In one embodiment, the second sensitive data refers to sensitive data containing new features.
[0164] In one embodiment, the specific value of the first number of computing nodes may be determined according to a classification result error of sensitive data in the first data set.
[0165] In one embodiment, first classification models of a plurality of first number of computing nodes may be established respectively, and specific values of the first number of computing nodes may be determined according to classification result errors of sensitive data in the first data set.
[0166] Step 1002: using the second sensitive data as input of the first classification model of the plurality of computing nodes in parallel, using a first number of computing nodes as computing nodes of the first classification model of the plurality of computing nodes in parallel, and obtaining an updated first classification model of the plurality of computing nodes in parallel;
[0167] In one embodiment, since the second sensitive data may contain new features, the updated first classification model of multiple computing nodes in parallel can timely capture changes in sensitive data features, continuously optimize and adapt to complex data environments, achieve timely adjustment and adaptation to changes in sensitive data features, and meet practical needs in complex environments.
[0168] Step 1003: Classify the second type of vectors corresponding to the sensitive data in the first data set using the updated first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0169] In one embodiment, since the updated first classification model in parallel with multiple computing nodes has a better ability to deal with unknown sensitive data characteristics, a more accurate classification result of sensitive data can be obtained by using the updated first classification model in parallel with multiple computing nodes to classify the second type of vectors corresponding to the sensitive data in the first data set.
[0170] In summary, the solution provided by the present disclosure is:
[0171] First, a first data set is obtained, wherein the first data set includes at least one sensitive data; each task in the first classification model is divided into a first preset number of subtasks, and a corresponding computing node is assigned to each subtask, thereby constructing a first classification model with multiple computing nodes in parallel, and subtasks on different computing nodes in the first classification model with multiple computing nodes in parallel can be calculated in parallel. By using the first classification model with multiple computing nodes in parallel to classify the sensitive data in the first data set, the speed of obtaining the classification results of the sensitive data in the first data set can be improved by speeding up the speed of calculating the results of each subtask.
[0172] Secondly, by merging the sensitive data in the second data set and the first sensitive data, a first data set is obtained. The expanded data set can support the training of a sensitive data classification model in a big data environment, making the model more scalable for various types of sensitive data in a big data environment, while improving the robustness of the model and its ability to deal with unknown sensitive data.
[0173] Again, by using the first data generation model to generate and identify the sensitive data in the preprocessed second data set and the first random vector, more standardized and accurate first sensitive data can be obtained.
[0174] Again, by using a window of a first preset width to scan the sensitive data in the first data set and obtaining a first type of vector corresponding to the sensitive data in the first data set, local features of different granularities can be obtained, which can provide more training dimensions and accuracy for subsequent training.
[0175] Thirdly, by allocating subtasks and computing nodes in the optimal segmentation granularity, the final first classification model of multiple computing nodes in parallel is determined, and the first classification model can be obtained, which can improve the efficiency during parallel operation and reduce the overall overhead during model operation.
[0176] Again, by using the second sensitive data as the input of the first classification model of the multiple computing nodes in parallel, and the first number of computing nodes as the computing nodes of the first classification model of the multiple computing nodes in parallel, an updated first classification model of the multiple computing nodes in parallel is obtained, and the second type of vectors corresponding to the sensitive data in the first data set are classified using the updated first classification model of the multiple computing nodes in parallel, so that when facing unknown sensitive data, more accurate sensitive data classification results can be obtained.
[0177] The following is an application example to further illustrate the sensitive data classification method provided by the present disclosure:
[0178] like Fig.11 As shown, Fig.11 A flowchart of a sensitive data classification method provided for an application example of the present disclosure. The sensitive data classification method provided for an application example of the present disclosure includes the following steps:
[0179] Step 1101, obtaining a second data set and a first random vector, wherein the second data set includes at least one sensitive data;
[0180] Step 1102, preprocessing the sensitive data in the second data set to obtain a preprocessed second data set;
[0181] Step 1103, using the first data generation model to generate and identify the sensitive data in the preprocessed second data set and the first random vector, to obtain first sensitive data with a generation loss value in a first preset range and an identification loss value in a second preset range;
[0182] Step 1104, merging the sensitive data in the second data set and the first sensitive data to obtain a first data set;
[0183] Step 1105, using a window of a first preset width to scan the sensitive data in the first data set, to obtain a first type of vector corresponding to the sensitive data in the first data set;
[0184] Step 1106, concatenating the first type of vectors corresponding to the sensitive data in the first data set to obtain the second type of vectors corresponding to the sensitive data in the first data set;
[0185] Step 1107, obtaining a first overhead of the first classification model of the plurality of computing nodes in parallel and a second overhead of the first classification model of the plurality of computing nodes in parallel at different segmentation granularities, wherein the segmentation granularity is used to indicate how to allocate subtasks to computing nodes;
[0186] Step 1108, determining an optimal segmentation granularity of the first classification model of the plurality of computing nodes in parallel based on the first cost of the first classification model of the plurality of computing nodes in parallel at the different segmentation granularities and the second cost of the first classification model of the plurality of computing nodes in parallel;
[0187] Step 1109, determining the first classification model of the plurality of computing nodes in parallel based on the optimal segmentation granularity of the first classification model of the plurality of computing nodes in parallel;
[0188] Step 1110, classifying the second type of vectors corresponding to the sensitive data in the first data set by using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set;
[0189] Step 1111: if the classification result error of the sensitive data in the first data set is not less than a first preset value, obtaining second sensitive data and a first number of computing nodes;
[0190] Step 1112, using the second sensitive data as input of the first classification model of the plurality of computing nodes in parallel, using the first number of computing nodes as computing nodes of the first classification model of the plurality of computing nodes in parallel, and obtaining an updated first classification model of the plurality of computing nodes in parallel;
[0191] Step 1113: Classify the second type of vectors corresponding to the sensitive data in the first data set by using the updated first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0192] In order to implement the sensitive data classification method provided by the embodiment of the present disclosure, the embodiment of the present disclosure also provides a sensitive data classification device, such as Fig.12 shown. Fig.12 The structure diagram of the sensitive data classification device provided in the embodiment of the present disclosure is as follows. The sensitive data classification device 1200 includes:
[0193] An acquiring unit 1201 is configured to acquire a first data set, wherein the first data set includes at least one sensitive data;
[0194] A splitting unit 1202 is used to split each task in the first classification model into a first preset number of subtasks, wherein the first classification model is a cascade forest classification model of multi-granularity scanning, and the task is used to indicate the forest in each cascade layer;
[0195] An allocating unit 1203 is used to allocate a corresponding computing node to each subtask, and construct a first classification model with multiple computing nodes in parallel, wherein multiple subtasks may correspond to the same computing node, and subtasks on different computing nodes may be calculated in parallel;
[0196] The classification unit 1204 is used to classify the sensitive data in the first data set by using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0197] In one embodiment, the acquisition unit 1201 is specifically configured to:
[0198] Acquire a second data set and a first random vector, wherein the second data set includes at least one sensitive data;
[0199] Using the first data generation model to generate and authenticate the sensitive data in the second data set and the first random vector, to obtain first sensitive data whose generation loss value is in a first preset range and whose authentication loss value is in a second preset range;
[0200] The sensitive data in the second data set and the first sensitive data are merged to obtain a first data set.
[0201] In one embodiment, the acquisition unit 1201 is specifically configured to:
[0202] Preprocessing the sensitive data in the second data set to obtain a preprocessed second data set;
[0203] The first data generation model is used to generate and identify the sensitive data in the preprocessed second data set and the first random vector to obtain first sensitive data with a generation loss value in a first preset interval and an identification loss value in a second preset interval.
[0204] In one embodiment, the classification unit 1204 is specifically configured to:
[0205] Scanning the sensitive data in the first data set using a window of a first preset width to obtain a first type of vector corresponding to the sensitive data in the first data set;
[0206] Concatenating the first type of vectors corresponding to the sensitive data in the first data set to obtain the second type of vectors corresponding to the sensitive data in the first data set;
[0207] The second type of vectors corresponding to the sensitive data in the first data set are classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0208] In one embodiment, the classification unit 1204 is specifically configured to:
[0209] Acquire a first overhead of the first classification model of the plurality of computing nodes in parallel and a second overhead of the first classification model of the plurality of computing nodes in parallel at different segmentation granularities, wherein the segmentation granularity is used to indicate how to allocate subtasks to computing nodes;
[0210] Determine an optimal segmentation granularity of the first classification model of the plurality of computing nodes in parallel based on a first cost of the first classification model of the plurality of computing nodes in parallel at the different segmentation granularities and a second cost of the first classification model of the plurality of computing nodes in parallel;
[0211] Determine the first classification model in parallel for the plurality of computing nodes based on the optimal segmentation granularity of the first classification model in parallel for the plurality of computing nodes;
[0212] The second type of vectors corresponding to the sensitive data in the first data set are classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0213] In one embodiment, the sensitive data classification device 1200 further includes an updating unit, which is used to:
[0214] If the classification result error of the sensitive data in the first data set is not less than a first preset value, obtaining second sensitive data and a first number of computing nodes;
[0215] Using the second sensitive data as input of the first classification model of the plurality of computing nodes in parallel, using the first number of computing nodes as computing nodes of the first classification model of the plurality of computing nodes in parallel, and obtaining an updated first classification model of the plurality of computing nodes in parallel;
[0216] The second type of vectors corresponding to the sensitive data in the first data set are classified using the updated first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
[0217] It should be noted that: the sensitive data classification device provided in the above embodiment only uses the division of the above program modules as an example when classifying sensitive data. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the sensitive data classification device is divided into different program modules to complete all or part of the processing described above. In addition, the sensitive data classification device provided in the above embodiment and the sensitive data classification method embodiment provided in the embodiment of the present disclosure belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0218] Fig.13 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure is shown in FIG. Fig.13 As shown, the electronic device 1300 includes at least one processor 1302; and a memory 1301 communicatively connected to the at least one processor 1302; wherein the memory 1301 stores instructions that can be executed by the at least one processor 1302, and the instructions are executed by the at least one processor 1302 to implement the steps of the sensitive data classification method of the embodiment of the present disclosure.
[0219] Optionally, the electronic device may specifically be a sensitive data classification device in an embodiment of the present application, and the electronic device may implement the corresponding processes implemented by the sensitive data classification device in each method in the embodiment of the present application, which will not be described in detail here for the sake of brevity.
[0220] It is understood that the electronic device also includes a communication interface 1303. The various components in the electronic device are coupled together through a bus system 1304. It is understood that the bus system 1304 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1304 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.13 Various buses are labeled as bus system 1304.
[0221] It can be understood that the memory 1301 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 1301 described in the embodiments of the present invention is intended to include but is not limited to these and any other suitable types of memories.
[0222] The method disclosed in the above embodiment of the present disclosure can be applied to the processor 1302, or implemented by the processor 1302. The processor 1302 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 1302 or the instruction in the form of software. The above processor 1302 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1302 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 1301. The processor 1302 reads the information in the memory 1301 and completes the steps of the above method in combination with its hardware.
[0223] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), FPGAs, general purpose processors, controllers, MCUs, microprocessors, or other electronic components to execute the aforementioned method.
[0224] This public security embodiment also provides a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to implement the steps of the sensitive data classification method of the embodiment of the present invention when the computer executes them.
[0225] Optionally, the computer-readable storage medium can be applied to the sensitive data classification device in the embodiments of the present application, and the computer instructions enable the computer to execute the corresponding processes implemented by the sensitive data classification device in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.
[0226] The embodiments of the present disclosure also provide a computer program product, including a computer program, which implements the steps of the sensitive data classification method provided by the embodiments of the present disclosure when executed by a processor.
[0227] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0228] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0229] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0230] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, disks or optical disks.
[0231] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0232] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A sensitive data classification method, characterized in that: include: Acquire a first data set, where the first data set includes at least one sensitive data; Splitting each task in a first classification model into a first preset number of subtasks, wherein the first classification model is a cascade forest classification model of multi-granularity scanning, and the task is used to indicate a forest in each cascade layer; Assign a corresponding computing node to each subtask, and construct a first classification model with multiple computing nodes in parallel, wherein multiple subtasks may correspond to the same computing node, and subtasks on different computing nodes may be calculated in parallel; The sensitive data in the first data set is classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
2. The method according to claim 1, characterized in that The obtaining of the first data set includes: Acquire a second data set and a first random vector, wherein the second data set includes at least one sensitive data; Using the first data generation model to generate and authenticate the sensitive data in the second data set and the first random vector, to obtain first sensitive data whose generation loss value is in a first preset range and whose authentication loss value is in a second preset range; The sensitive data in the second data set and the first sensitive data are merged to obtain a first data set.
3. The method according to claim 2, characterized in that The generating and identifying processing is performed on the sensitive data in the second data set and the first random vector by using the first data generation model to obtain the first sensitive data whose generation loss value is in the first preset range and whose identification loss value is in the second preset range, including: Preprocessing the sensitive data in the second data set to obtain a preprocessed second data set; The first data generation model is used to generate and identify the sensitive data in the preprocessed second data set and the first random vector to obtain first sensitive data with a generation loss value in a first preset interval and an identification loss value in a second preset interval.
4. The method according to claim 1, characterized in that: The classifying the sensitive data in the first data set by using the first classification model in parallel of the multiple computing nodes to obtain the classification result of the sensitive data in the first data set includes: Scanning the sensitive data in the first data set using a window of a first preset width to obtain a first type of vector corresponding to the sensitive data in the first data set; Concatenating the first type of vectors corresponding to the sensitive data in the first data set to obtain the second type of vectors corresponding to the sensitive data in the first data set; The second type of vectors corresponding to the sensitive data in the first data set are classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
5. The method according to claim 4, characterized in that The classifying the second type of vectors corresponding to the sensitive data in the first data set by using the first classification model in parallel of the multiple computing nodes to obtain the classification result of the sensitive data in the first data set includes: Acquire a first overhead of the first classification model of the plurality of computing nodes in parallel and a second overhead of the first classification model of the plurality of computing nodes in parallel at different segmentation granularities, wherein the segmentation granularity is used to indicate how to allocate subtasks to computing nodes; Determine an optimal segmentation granularity of the first classification model of the plurality of computing nodes in parallel based on a first cost of the first classification model of the plurality of computing nodes in parallel at the different segmentation granularities and a second cost of the first classification model of the plurality of computing nodes in parallel; Determine the first classification model in parallel for the plurality of computing nodes based on the optimal segmentation granularity of the first classification model in parallel for the plurality of computing nodes; The second type of vectors corresponding to the sensitive data in the first data set are classified using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
6. The method according to claim 4, characterized in that After classifying the second type of vectors corresponding to the sensitive data in the first data set using the first classification model in parallel of the multiple computing nodes to obtain the classification result of the sensitive data in the first data set, the method includes: If the classification result error of the sensitive data in the first data set is not less than a first preset value, obtaining second sensitive data and a first number of computing nodes; Using the second sensitive data as input of the first classification model of the plurality of computing nodes in parallel, using the first number of computing nodes as computing nodes of the first classification model of the plurality of computing nodes in parallel, and obtaining an updated first classification model of the plurality of computing nodes in parallel; The second type of vectors corresponding to the sensitive data in the first data set are classified using the updated first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
7. A sensitive data classification device, characterized in that: include: An acquiring unit, configured to acquire a first data set, wherein the first data set includes at least one sensitive data; A splitting unit, used to split each task in a first classification model into a first preset number of subtasks, wherein the first classification model is a cascade forest classification model of multi-granularity scanning, and the task is used to indicate a forest in each cascade layer; An allocation unit, used to allocate a corresponding computing node to each subtask, and construct a first classification model with multiple computing nodes in parallel, wherein multiple subtasks can correspond to the same computing node, and subtasks on different computing nodes can be calculated in parallel; A classification unit is used to classify the sensitive data in the first data set by using the first classification model in parallel of the multiple computing nodes to obtain a classification result of the sensitive data in the first data set.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory 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 to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, wherein the computer program implements the method according to any one of claims 1 to 6 when executed by a processor.
