Data security processing method, device, computer equipment and storage medium
By using the data security processing model in the user database to determine the noise extraction range, process user data and determine whether its output value is within the preset range, the problem of low efficiency of user data desensitization processing is solved, and data security and value are achieved Double satisfaction.
Patent Information
- Application Number
- CN201811187262.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-10-12
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2038-10-12
AI Technical Summary
Currently, user data desensitization processing is large in volume, inconvenient operation and time-consuming, making it difficult to meet the security needs of the financial insurance industry for data sharing.
Obtain the user data to be tested from the user database through the target combination feature, determine the target noise extraction range according to the data security processing model, process the user data to be tested, generate valid user data, and input it into the data security processing model to obtain the output value , determine whether it is within the preset monitoring range to determine whether the data meets security requirements.
It realizes the secure processing of user data, reduces data accuracy to ensure security, and meets the maximum utilization of data value, improving the convenience and efficiency of data operation.
Smart Images

Figure CN109543442B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and in particular to a data security processing method, device, computer equipment and storage medium. Background Art
[0002] In recent years, with the rapid development of information technology, the application of big data has become more and more extensive, and data sharing has become a trend in social development. However, when sharing data, it needs to meet specific conditions to ensure that it does not contain personal identity information and personal privacy information that can be easily inferred. For example, when the financial and insurance industries share data, according to the regulations of the China Banking Regulatory Commission (CBRC) and the China Insurance Regulatory Commission (CIRC), information that represents the identity of the user and information that can easily infer the identity of the user needs to be desensitized, which can not only ensure that the user of the data cannot easily infer the user's personal privacy information, but also maximize the value of the data. At present, user data is desensitized one by one according to regulations, and the desensitization process involves a large amount of data, is inconvenient to operate, and is time-consuming and labor-intensive. Summary of the invention
[0003] The embodiments of the present invention provide a data security processing method, apparatus, computer equipment and storage medium to solve the problems of large data volume, inconvenient operation and time-consuming and labor-intensive user data desensitization processing.
[0004] A data security processing method, comprising:
[0005] Obtaining a data processing request, wherein the data processing request includes a target combination feature;
[0006] According to the target combination characteristics, obtaining the user data to be tested from the user database;
[0007] Determine a target noise extraction range according to a data security processing model, and process the user data to be tested based on the target noise extraction range to obtain valid user data;
[0008] Inputting the valid user data into the data security processing model to obtain an output value of the target combination feature corresponding to the valid user data;
[0009] When the output value of the target combination feature is within a preset monitoring range, the valid user data is used as safe user data.
[0010] A data security processing device, comprising:
[0011] A data processing request acquisition module, used to acquire a data processing request, wherein the data processing request includes a target combination feature;
[0012] A test user data acquisition module is used to acquire the test user data from the user database according to the target combination characteristics;
[0013] An effective user data acquisition module is used to determine a target noise extraction range according to a data security processing model, and process the user data to be tested based on the target noise extraction range to obtain effective user data;
[0014] A data security processing module, used for inputting the valid user data into the data security processing model, and obtaining an output value of a target combination feature corresponding to the valid user data;
[0015] The safe user data acquisition module is used to use the valid user data as safe user data when the output value of the target combination feature is within a preset monitoring range.
[0016] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned data security processing method when executing the computer program.
[0017] A computer-readable storage medium stores a computer program, which implements the steps of the above-mentioned data security processing method when executed by a processor.
[0018] The above-mentioned data security processing method, device, computer equipment and storage medium obtain the user data to be tested from the user database through the target combination feature, and then extract the user data corresponding to a specific number of non-target combination features according to the target noise extraction range determined by the data security processing model and add them to the user data to be tested, thereby reducing the accuracy of the user data to be tested to ensure the security of the user data. The target noise extraction range is determined according to the trained data security processing model, so that the valid user data obtained according to the target noise extraction range is more accurate, meets the user requirements, and ensures the security of the user data and enables the user data to play the value of the data. After obtaining the valid user data, in order to further determine whether the valid user data meets the requirements, it is also necessary to input the valid user data into the data security processing model to obtain the output value of the target combination feature corresponding to the valid user data. When the output value is within the preset monitoring range, it means that the valid user data meets the requirements, and the valid user data is used as the safe user data, so that the safe user data meets the requirements of desensitization processing, which ensures that it cannot easily deduce personal private chat information and maximizes the value of the target data. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0020] Figure 1 This is an application scenario diagram of a data security processing method in one embodiment of the present invention;
[0021] Figure 2 is a flow chart of a data security processing method in one embodiment of the present invention;
[0022] Figure 3 yes Figure 2 A specific flow chart of step S30;
[0023] Figure 4 yes Figure 2 A flow chart before step S30;
[0024] Figure 5 yes Figure 4 A specific flow chart of step S301;
[0025] Figure 6 is a schematic diagram of a data security processing device in one embodiment of the present invention;
[0026] Figure 7 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] The data security processing method provided in this application can be applied in Figure 1 In an application environment, a client communicates with a server via a network. The client may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0029] In one embodiment, if Figure 2 As shown, a data security processing method is provided, which is applied in Figure 1The server in the example is used as an example to illustrate the process, including the following steps:
[0030] S10: Obtain a data processing request, where the data processing request includes target combination features.
[0031] The data processing request in this embodiment refers to a request sent by the client to the server for processing user data, and the data processing request includes a target combination feature. The target combination feature refers to the features of the user data filled in by the user on the client as needed, including but not limited to the user's age, gender, whether there is a car, whether insurance (including but not limited to car insurance, property insurance and life insurance) stored in the user database. It can be understood that the target combination feature includes at least one feature of the user data.
[0032] S20: Acquire the user data to be tested from the user database according to the target combination characteristics.
[0033] Among them, the user database refers to a database for storing user data. The user data stored in the user database in this embodiment includes but is not limited to the user's basic information, purchase behavior and transaction data. Among them, the basic information includes but is not limited to name, age (date of birth), gender, place of origin, ethnicity, educational background and work experience. Purchase behavior refers to the behavior of users purchasing products on the platform, including but not limited to financial products and insurance products purchased by users. Transaction data refers to the record data of users' investments, consumption and transfers.
[0034] Specifically, after the user sets the target combination feature on the client, it sends it to the server, and the server obtains the user data corresponding to the target combination feature from the user database as the user data to be tested based on the obtained target combination feature. The user data to be tested refers to the user data that needs to be tested.
[0035] S30: Determine a target noise extraction range according to the data security processing model, and process the user data to be tested based on the target noise extraction range to obtain valid user data.
[0036] In order to protect the security of user data, this embodiment adds user data corresponding to non-target combination features to the user data to be tested, so that the acquired valid user data is not entirely user data corresponding to the target combination features, thereby reducing the accuracy of basic information user data to ensure the security of user data.
[0037] Among them, the data security processing model refers to a pre-trained model for determining the target noise extraction range. The target noise extraction range refers to the range of user data corresponding to the non-target combination features used to extract. The data security processing model in this embodiment includes a target gradient boosting decision tree model and a target logistic regression model. The target gradient boosting decision tree model refers to a pre-trained gradient boosting decision tree that meets user requirements. The gradient boosting decision tree (Gradient Boosting Decision Tree, GBDT) is an iterative decision tree algorithm, which consists of multiple decision trees, and the conclusions of all trees are accumulated as the final prediction result. The target logistic regression model refers to a pre-trained logistic regression model for obtaining the target noise extraction range. The logistic regression model (Logistic Regression, LR) is a regression model that reduces the prediction range and limits the prediction value to [0,1].
[0038] After obtaining the user data to be tested, the target noise extraction range is determined according to the security processing model, and a specific number of user data corresponding to non-target combination features are extracted from the user database, added to the user data to be tested, and valid user data is generated. Valid user data refers to the data obtained after adding the user data corresponding to the non-target combination features to the user data to be tested. It should be noted that the specific number in this embodiment refers to the number within the target noise extraction range. The server extracts the user data corresponding to the non-target combination features according to the target noise extraction range and adds it to the user data to be tested, so that the secure user data obtained in the subsequent steps can not only ensure the security of the user data, but also meet the demand for the value of the user data.
[0039] S40: Input the valid user data into the data security processing model to obtain the output value of the target combination feature corresponding to the valid user data.
[0040] Specifically, after obtaining valid user data, it is necessary to further verify the valid user data to determine whether the valid user data meets the user's requirements. Therefore, it is necessary to input the obtained valid user data into a pre-trained data security processing model for processing, and obtain the output value of the valid user data after being processed by the data security processing model. The output value is a probability value, which is used to detect whether the valid user data meets the requirements set by the user.
[0041] S50: When the output value of the target combination feature is within a preset monitoring range, the valid user data is used as safe user data.
[0042] Specifically, the preset monitoring range refers to a preset range for detecting whether the valid user data meets the user's requirements. The preset monitoring range set in this implementation is 70%-90%, which can not only ensure the security of user data, but also meet the value requirements of user data. When the output value of the target combination feature obtained by calculation of the data security processing model is within the preset monitoring range, it means that the valid user data meets the requirements, and the valid user data is used as safe user data.
[0043] Step S10-Step S50, the user data to be tested is obtained from the user database through the target combination feature, and then according to the target noise extraction range determined by the data security processing model, a specific number of user data corresponding to the non-target combination feature is extracted and added to the user data to be tested, so as to obtain valid user data, reduce the accuracy of the valid user data to ensure the security of the user data. After obtaining the valid user data, in order to further determine whether the valid user data meets the requirements, it is also necessary to input the valid user data into the data security processing model, obtain the output value of the target combination feature corresponding to the valid user data, when the output value is within the preset monitoring range, it means that the valid user data meets the requirements, and the valid user data is sent as secure user data to the client that needs to send the data processing request, which not only ensures that the user of the data cannot easily infer the user's personal privacy information, but also maximizes the value of the target data.
[0044] In one embodiment, if Figure 3 As shown, in step S30, the user data to be measured is processed based on the target noise extraction range to obtain valid user data, which specifically includes the following steps:
[0045] S31: Based on the target noise extraction range, user data corresponding to the non-target combination features are selected from the user database as target noise data.
[0046] Specifically, after the data security processing model determines the target noise extraction range, the server selects user data corresponding to a specific number of non-target combination features from the user database as target noise data based on the target noise extraction range, providing a data source for subsequent steps.
[0047] For example, if the target noise extraction range is determined to be 0.05-0.25 according to the data security processing model, and there are 100,000 user data corresponding to the non-target combination features, the server selects user data corresponding to any non-target combination feature between 5000-25000 from the user database as target noise data based on the target noise extraction range of 5000-25000.
[0048] S32: Add the target noise data to the user data to be tested to obtain valid user data.
[0049] Specifically, after obtaining the target noise data, the target noise data is added to the user data to be tested to obtain valid user data, so that the valid user data is not entirely user data corresponding to the target combination features, thereby reducing the accuracy of the valid user data, so that the valid user data can both meet the user's demand for user data and ensure the security of the user data.
[0050] Step S31-Step S32, through the target noise extraction range, select the user data corresponding to the non-target combination features from the user database as the target noise data, and add the target noise data to the user data to be tested to obtain valid user data to ensure the security of the user data.
[0051] In one embodiment, if Figure 4 As shown, before step S30, that is, before the step of determining the target noise extraction range according to the data security processing model, the data security processing method further includes the following steps:
[0052] S301: Obtain the data to be trained, and divide the data to be trained into a training set and a test set.
[0053] Specifically, the data to be trained is obtained from the sample database, and the data to be trained is divided into a training set and a test set for training the model and testing the model. The model to be trained in this embodiment refers to the original gradient boosting decision tree model. Among them, the sample database refers to a database for storing the data to be trained. The data to be trained refers to the data used to train the original gradient boosting decision tree model. The training set is a collection of data to be trained for training the original gradient boosting decision tree model. The test set is a collection of data to be trained for testing whether the trained original gradient boosting decision tree model is accurate.
[0054] S302: Initialize model parameters of the original gradient boosting decision tree model, where the model parameters include the maximum depth and maximum number of iterations of the gradient boosting decision tree.
[0055] Specifically, before training the original gradient boosting decision tree model, it is first necessary to initialize the model parameters in the original gradient boosting decision tree model. The model parameters in this embodiment include the maximum depth and maximum number of iterations of the original gradient boosting decision tree. According to experimental data, the maximum depth of the original gradient boosting decision tree is set to 3, and the maximum number of iterations is set to 50, which has the best effect. In this embodiment, the maximum depth is initialized to 3 and the maximum number of iterations is 50. Initializing the model parameters of the original gradient boosting decision tree model can shorten the training time and improve the recognition accuracy when training the original gradient boosting decision tree model later.
[0056] S303: Input the data to be trained corresponding to the training set into the original gradient boosting decision tree model. When the training depth in the original gradient boosting decision tree model reaches the maximum depth and the number of iterations reaches the maximum number of iterations, stop training the original gradient boosting decision tree model and obtain the original combination features corresponding to each decision tree path in the original gradient boosting decision tree model.
[0057] Specifically, after the original gradient boosting decision tree model is initialized, the data to be trained in the training set is input into the original gradient boosting decision tree model. The original gradient boosting decision tree model selects a feature from the target combination features corresponding to the data to be trained as the first bifurcation point, obtains the residual of the data to be trained in the training set at the bifurcation point, and then bifurcates the remaining features in the target combination features again, and uses the residual corresponding to the first bifurcation point as the second decision tree input, and iterates continuously. When the training depth in the original gradient boosting decision tree model reaches the maximum depth and the number of iterations reaches the maximum number of iterations, the training of the original gradient boosting decision tree model is stopped, and the original combination features corresponding to each decision tree path in the original gradient boosting decision tree model are obtained. Among them, the original combination features refer to the combination features corresponding to each decision tree path when the data to be trained corresponding to the training set is input into the original gradient boosting decision tree model.
[0058] S304: Input the original combined features into the original logistic regression model to obtain output values corresponding to the original combined features.
[0059] Specifically, after obtaining the original combination features, the original combination features are input into the original logistic regression model, and the probability corresponding to the original combination features, that is, the output value corresponding to the original combination features, is calculated by the Sigmoid function. The Sigmoid function in this embodiment can be expressed as: Among them, g (x) is the probability of occurrence of the original combination feature, g (x) ∈(0,1), x is the original combination feature, T is the parameter of the speed of θ change set by the user, and θ is the combination of weights corresponding to the features of each user data in the original gradient boosting decision tree model. q=1 means that the original combination feature is the target combination feature, and q=0 means that the original combination feature is not the target combination feature, that is, the original combination feature is a non-target combination feature.
[0060] S305: When the output value corresponding to the original combination feature is within a preset monitoring range, the original gradient boosting decision tree model and the original logistic regression model are used as the target gradient boosting decision tree model and the target logistic regression model.
[0061] Specifically, when the output value corresponding to the original combined feature is within the preset monitoring range, it means that the original gradient boosting decision tree model and the original logistic regression model are trained successfully, and the original gradient boosting decision tree model and the original logistic regression model are used as the target gradient boosting decision tree model and the target logistic regression model.
[0062] S306: Use the training data corresponding to the test set to test the target gradient boosting decision tree model and the target logistic regression model. If the output values corresponding to each training data obtained are within the preset monitoring range, the target gradient boosting decision tree model and the target logistic regression model are used as data security processing models.
[0063] After determining that the original gradient boosting decision tree model and the original logistic regression model are the target gradient boosting decision tree model and the target logistic regression model, in order to prevent overfitting, it is necessary to use the data to be trained in the test set to test the target gradient boosting decision tree model and the target logistic regression model to verify the accuracy of the target gradient boosting decision tree model and the target logistic regression model. If the output value corresponding to each data to be trained in the obtained test set is within the preset monitoring range, it is indicated that the training of the target gradient boosting decision tree model and the target logistic regression model is relatively successful and meets the requirements, then the target gradient boosting decision tree model and the target logistic regression model are used as data security processing models.
[0064] Step S301-step S306, train the original gradient boosting decision tree model with the data to be trained in the training set, and input the original combination features corresponding to each decision tree path in the original gradient boosting decision tree model into the original logistic regression model to obtain the output value corresponding to the original combination features. If the output value corresponding to the original combination features is within the preset monitoring range, it means that the original gradient boosting decision tree model and the original logistic regression model are trained successfully. In order to prevent overfitting, it is also necessary to input the data to be trained corresponding to the test set into the trained target gradient boosting decision tree model and the target logistic regression model for testing. If the output values corresponding to each data to be trained are within the preset monitoring range, it means that the trained target gradient boosting decision tree model and the target logistic regression model meet the requirements, and can be used as a data security processing model to finally determine the target noise extraction range, and to obtain valid user data for subsequent steps.
[0065] In one embodiment, if Figure 5 As shown, step S301, obtaining the data to be trained, and dividing the data to be trained into a training set and a test set, specifically includes the following steps:
[0066] S3011: Obtain a model training request, where the model training request includes a training combination feature.
[0067] The model training request refers to the request sent by the client for model training. The training combination feature refers to the feature of the user data used to train the model set by the user on the client as required. Specifically, the user sets the training combination feature on the client as required, and then clicks the send operation, and the server obtains the model training request carrying the training combination feature.
[0068] S3012: According to the training combination feature, select from the user database the training user data that matches the training combination feature and the non-training user data that does not match the training combination feature.
[0069] Specifically, after obtaining the model training request, the server selects training user data that matches the training combination features and non-training user data that does not match the training combination features from the user database according to the training combination features included in the model training request. Among them, the training user data refers to the user data that matches the training combination features. Non-training user data refers to user data that does not match the training combination features. If the training combination features are age 20-30 years old and purchase of property insurance, then according to the training features, user data of age 20-30 years old and purchase of property insurance are obtained as training user data, and user data that does not include age 20-30 years old and purchase of property insurance are selected as non-training user data. Acquiring training user data and non-training user data according to the training combination features provides a data source for subsequent acquisition of original positive samples and original negative samples.
[0070] Furthermore, to facilitate the subsequent processing of user data, after obtaining the training user data, the training combination features are used as user labels for the training user data, and the non-target combination features are used as user labels for the non-training user data. For example, the training combination features of age 20-30 years old and purchase of property insurance are used as user labels for the training user data, and age not 20-30 years old and no purchase of property insurance are used as labels for the non-training user data.
[0071] S3013: According to a preset number of positive samples, corresponding training user data is selected from the training user data as original positive samples.
[0072] In this embodiment, the number of positive samples refers to the number of preset positive samples used to obtain the original positive samples. The original positive samples refer to the training user data extracted from the training user data according to the preset number of positive samples. According to the preset number of positive samples, the original positive samples are obtained from the training user data to provide a data source for obtaining valid positive samples and valid negative samples in the subsequent steps.
[0073] S3014: According to the ratio of positive and negative samples, corresponding non-training user data is selected from the non-training user data as original negative samples.
[0074] Specifically, after obtaining the original positive sample, the server selects the corresponding non-training user data from the non-training user data as the original negative sample according to the preset positive-negative sample ratio. The positive-negative sample ratio refers to a preset ratio for determining the number of original negative samples according to the number of positive samples. The number of original negative samples in this embodiment is determined according to the number of positive samples, so that the number of original negative samples and the number of positive samples are in a certain ratio, which meets the requirements for subsequent model training.
[0075] S3015: extracting negative noise data from the original positive sample according to the first noise extraction range, and adding the negative noise data to the original negative sample to generate a valid negative sample.
[0076] Among them, the first extraction range refers to the pre-set ratio range of the original positive sample as negative noise data. Negative noise data refers to the artificial modification of the user labels corresponding to some user data in the original positive sample, so that the user labels carried by this part of the user data become user labels corresponding to non-target user features. For example, if the user labels carried by the user data in the original positive sample are 20-30 years old and purchase of property insurance, some user labels are artificially modified to user labels corresponding to non-target combination features (such as modifying the user label to 35-45 years old and purchase of property insurance, or modifying the user label to 20-30 years old and purchase of car insurance, or modifying it to 30-40 years old and owning a car and other user labels corresponding to any non-target combination features).
[0077] Specifically, after obtaining the original positive sample and the original negative sample, the server randomly extracts a specific amount of user data from the original positive sample according to the first noise extraction range, artificially modifies the user label corresponding to the part of the user data to the user label corresponding to the non-target combination feature, and uses the part of the user data with the modified user label as negative noise data. It can be understood that the specific number refers to any number within the first noise extraction range. After obtaining the negative noise data, the negative noise data is added to the original negative sample to generate a valid negative sample, reduce the accuracy of the original negative sample, so that the user data in the original negative sample is not all user data corresponding to the non-target combination feature, so as to achieve the purpose of reducing the sensitivity of the user data in the original negative sample.
[0078] For example, the number of original positive samples is 100,000, and the first extraction range is set to 0.1-0.3. According to the first extraction range, 10,000-30,000 user data are randomly extracted from the 100,000 original positive samples, and the user labels carried by this part of user data are modified to user labels corresponding to non-target combination features, and this part of user data is used as negative noise data.
[0079] S3016: Extract positive noise data from the original negative sample according to the second noise extraction range, and add the positive noise data to the original positive sample to generate a valid positive sample.
[0080] Among them, the second extraction range refers to a preset ratio range of the original negative samples as positive noise data. Positive noise data refers to the user labels corresponding to part of the user data in the original negative samples being changed into user labels corresponding to the target combination features. It should be noted that since the number of positive samples and the number of negative samples are selected according to the preset positive-negative sample ratio, the first extraction range and the second extraction range are also inconsistent. For example, if the first extraction range is set to 0.1-0.3, the second extraction range is set to 0.05-0.2.
[0081] Specifically, according to the second extraction range, a specific amount of user data is randomly extracted from the original negative sample, the user label corresponding to the part of the user data is artificially modified, the user label is modified to the user label corresponding to the target combination feature, and the part of the original negative sample with the modified user label is used as the positive noise data. It can be understood that the specific number refers to any number within the second noise extraction range. After obtaining the positive noise data, the positive noise data is added to the original positive sample to form a valid positive sample. It can be understood that the valid positive sample refers to the positive sample formed after adding the negative noise data to the original positive sample.
[0082] For example, the number of original negative samples is 1 million, and the second extraction range is set to 0.05-0.2. According to the second extraction range, user data corresponding to any number in the range of 50,000-200,000 is randomly extracted from the 1 million original negative samples, and then the user label carried by the extracted user data is artificially modified to the user label corresponding to the target combination feature. After the user label is modified, the original negative sample with the modified user label is used as positive noise data and added to the original positive sample to generate a valid positive sample.
[0083] Positive noise data is added to the original positive sample, so that the original positive sample not only includes the user data corresponding to the real target combination feature, but also includes some positive noise data of non-target combination features, so that the user data in the original positive sample is not 100% real training user data, which can avoid outputting real user data and there is no need to desensitize some sensitive data in the user data one by one, thereby ensuring the security of user data.
[0084] S3017: Use the valid positive samples and the valid negative samples as data to be trained and store them in a sample database.
[0085] Specifically, after obtaining valid positive samples and valid negative samples, in order to facilitate the subsequent training of the original gradient boosting decision tree model and verify whether the trained target gradient boosting decision tree model is accurate, the valid positive samples and valid negative samples are stored in the sample database as data to be trained.
[0086] Step S3011-step S3017, by adding positive noise data to the original positive sample to obtain a valid positive sample, and adding negative noise data to the original negative sample to obtain a valid negative sample, the accuracy of the original positive sample and the original negative sample is forcibly changed, so that the user data in the generated valid positive sample and the valid negative sample are not all user data containing target combination features or user data with non-target combination features, avoiding the output of real user data and eliminating the need to desensitize some sensitive data in the user data one by one, thereby ensuring the security of the user data.
[0087] In one embodiment, after the step of inputting the original combined features into the original logistic regression model and obtaining the output values corresponding to the original combined features in step S304, the data security processing method further includes: when the output values corresponding to the original combined features are lower than the preset monitoring range, reducing the first noise extraction range and the second noise extraction range, and increasing the ratio of positive and negative samples; when the output values corresponding to the original combined features are higher than the preset monitoring range, increasing the first noise extraction range and the second noise extraction range, and reducing the ratio of positive and negative samples.
[0088] Specifically, when the training data corresponding to the training set is trained and calculated by the original gradient boosting decision tree model and the original logistic regression model, the output value corresponding to the original combined feature is not within the preset monitoring range, which means that the first noise extraction range, the second noise extraction range and the positive and negative sample ratio are not accurately set, and the first noise extraction range, the second noise extraction range and the positive and negative sample ratio need to be dynamically adjusted.
[0089] Furthermore, when the output value corresponding to the original combined feature is lower than the preset monitoring range, it means that the number of negative samples is too large, and the ratio of positive and negative samples should be increased to reduce the number of negative samples. At this time, the first noise extraction range and the second noise extraction range are set too high, and the settings of the first noise extraction range and the second noise extraction range are reduced. When the output value corresponding to the original combined feature is higher than the preset monitoring range, it means that the number of negative samples is too small, and the ratio of positive and negative samples should be reduced to increase the number of negative samples. At this time, the first noise extraction range and the second noise extraction range are set too low, and the settings of the first noise extraction range and the second noise extraction range should be increased.
[0090] The data security processing method provided by the present invention obtains the user data to be tested from the user database through the target combination feature, and then extracts the user data corresponding to a specific number of non-target combination features according to the target noise extraction range determined by the data security processing model and adds them to the user data to be tested, thereby reducing the accuracy of the user data to be tested to ensure the security of the user data. The target noise extraction range is determined according to the trained data security processing model, so that the effective user data obtained according to the target noise extraction range is more accurate, meets the user requirements, and ensures the security of the user data and enables the user data to play the value of the data. After obtaining the effective user data, in order to further determine whether the effective user data meets the requirements, it is also necessary to input the effective user data into the data security processing model, obtain the output value of the target combination feature corresponding to the effective user data, and when the output value is within the preset monitoring range, it means that the effective user data meets the requirements, and the effective user data is sent to the required user as safe user data. When the output value corresponding to the original combined feature is lower than the preset monitoring range, the first noise extraction range and the second noise extraction range are reduced, and the ratio of positive and negative samples is increased; when the output value corresponding to the original combined feature is higher than the preset monitoring range, the first noise extraction range and the second noise extraction range are increased, and the ratio of positive and negative samples is reduced, so that the acquisition of safe user data is closer to the user's requirements.
[0091] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0092] In one embodiment, a data security processing device is provided, and the data security processing device corresponds one-to-one to the data security processing method in the above embodiment. Figure 6 As shown, the data security processing device includes a data processing request acquisition module 10, a test user data acquisition module 20, a valid user data acquisition module 30, a data security processing module 40 and a secure user data acquisition module 50. The functional modules are described in detail as follows:
[0093] The data processing request acquisition module 10 is used to acquire a data processing request, wherein the data processing request includes a target combination feature.
[0094] The user data acquisition module 20 is used to acquire the user data to be tested from the user database according to the target combination characteristics.
[0095] The effective user data acquisition module 30 is used to determine the target noise extraction range according to the data security processing model, and process the user data to be tested based on the target noise extraction range to obtain effective user data.
[0096] The data security processing module 40 is used to input the valid user data into the data security processing model to obtain the output value of the target combination feature corresponding to the valid user data.
[0097] The safe user data acquisition module 50 is used to use the valid user data as the safe user data when the output value of the target combination feature is within a preset monitoring range.
[0098] Further, the effective user data acquisition module 30 includes a target noise data acquisition unit and an effective user data acquisition unit.
[0099] The target noise data acquisition unit is used to select user data corresponding to the non-target combination feature from the user database as the target noise data based on the target noise extraction range.
[0100] The effective user data acquisition unit is used to add the target noise data to the user data to be tested to acquire the effective user data.
[0101] Furthermore, before the effective user data acquisition module, the data security processing device further includes:
[0102] The training data processing unit is used to obtain the training data and divide the training data into a training set and a test set.
[0103] The model parameter initialization unit is used to initialize the model parameters of the original gradient boosting decision tree model. The model parameters include the maximum depth and maximum number of iterations of the gradient boosting decision tree.
[0104] The model training unit is used to input the training data corresponding to the training set into the original gradient boosting decision tree model. When the training depth in the original gradient boosting decision tree model reaches the maximum depth and the number of iterations reaches the maximum number of iterations, the training of the original gradient boosting decision tree model is stopped, and the original combination features corresponding to each decision tree path in the original gradient boosting decision tree model are obtained.
[0105] The output value calculation unit is used to input the original combination features into the original logistic regression model to obtain the output value corresponding to the original combination features.
[0106] The model determination unit is used to use the original gradient boosting decision tree model and the original logistic regression model as the target gradient boosting decision tree model and the target logistic regression model when the output value corresponding to the original combination feature is within a preset monitoring range.
[0107] The model testing unit is used to test the target gradient boosting decision tree model and the target logistic regression model using the training data corresponding to the test set. If the output values corresponding to each training data obtained are within the preset monitoring range, the target gradient boosting decision tree model and the target logistic regression model will be used as data security processing models.
[0108] Furthermore, the training data processing unit includes a model training request acquisition subunit, a user data selection subunit, an original positive sample acquisition subunit, an original negative sample acquisition subunit, a valid negative sample acquisition subunit, a valid positive sample acquisition subunit and a training data generation subunit.
[0109] The model training request acquisition subunit is used to obtain a model training request, where the model training request includes a training combination feature.
[0110] The user data selection subunit is used to select, from the user database, training user data that matches the training combination feature and non-training user data that does not match the training combination feature according to the training combination feature.
[0111] The original positive sample acquisition subunit is used to select corresponding training user data from the training user data as original positive samples according to a preset number of positive samples.
[0112] The original negative sample acquisition subunit is used to select corresponding non-training user data from the non-training user data as original negative samples according to the positive and negative sample ratio.
[0113] The effective negative sample acquisition subunit is used to extract negative noise data from the original positive sample according to the first noise extraction range, and add the negative noise data to the original negative sample to generate a effective negative sample.
[0114] The effective positive sample acquisition subunit is used to extract positive noise data from the original negative sample according to the second noise extraction range, and add the positive noise data to the original positive sample to generate a effective positive sample.
[0115] The training data generation subunit is used to store the valid positive samples and the valid negative samples as the training data in the sample database.
[0116] Furthermore, the data security processing method is also used to reduce the first noise extraction range and the second noise extraction range and increase the ratio of positive and negative samples when the output value corresponding to the original combined feature is lower than the preset monitoring range; when the output value corresponding to the original combined feature is higher than the preset monitoring range, increase the first noise extraction range and the second noise extraction range and reduce the ratio of positive and negative samples.
[0117] For the specific definition of the data security processing device, please refer to the definition of the data security processing method above, which will not be repeated here. Each module in the above-mentioned data security processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0118] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the data security processing method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data security processing method is implemented.
[0119] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned data security processing method are implemented, such as Figure 2 Steps S10 to S50 are shown. Or Figures 3 to 5 To avoid repetition, the steps are not described here. Alternatively, when the processor executes the computer program, the steps of the data security processing device are implemented, such as Figure 6 The data processing request acquisition module 10, the test user data acquisition module 20, the valid user data acquisition module 30, the data security processing module 40 and the secure user data acquisition module 50 are shown. To avoid repetition, they are not described here.
[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data security processing method are implemented, such as Figure 2 Steps S10 to S50 are shown. Or Figures 3 to 5 To avoid repetition, the steps are not described here. Alternatively, when the computer program is executed by the processor, the steps of the above-mentioned data security processing device are implemented, such as Figure 6The data processing request acquisition module 10, the test user data acquisition module 20, the valid user data acquisition module 30, the data security processing module 40 and the secure user data acquisition module 50 are shown. To avoid repetition, they are not described here.
[0121] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0122] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0123] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A data security processing method, characterized in that: include: Obtaining a data processing request, wherein the data processing request includes a target combination feature; According to the target combination characteristics, obtaining the user data to be tested from the user database; Determine a target noise extraction range according to a data security processing model, and based on the target noise extraction range, select user data corresponding to non-target combination features from a user database as target noise data; The data security processing model refers to a model used to determine the target noise extraction range; the data security processing model includes a target gradient boosting decision tree model and a target logistic regression model; the target noise extraction range refers to a range used to extract user data corresponding to non-target combination features; the target noise data is added to the user data to be tested to obtain valid user data; Inputting the valid user data into the data security processing model to obtain an output value of the target combination feature corresponding to the valid user data; When the output value of the target combination feature is within a preset monitoring range, the valid user data is used as safe user data.
2. The data security processing method according to claim 1, characterized in that: Before the step of determining the target noise extraction range according to the data security processing model, the data security processing method further includes: Obtaining data to be trained, and dividing the data to be trained into a training set and a test set; Initialize model parameters of the original gradient boosting decision tree model, wherein the model parameters include a maximum depth and a maximum number of iterations of the gradient boosting decision tree; Input the to-be-trained data corresponding to the training set into the original gradient boosting decision tree model, and when the training depth in the original gradient boosting decision tree model reaches the maximum depth and the number of iterations reaches the maximum number of iterations, stop training the original gradient boosting decision tree model, and obtain the original combination features corresponding to each decision tree path in the original gradient boosting decision tree model; Inputting the original combined features into the original logistic regression model to obtain the output value corresponding to the original combined features; When the output value corresponding to the original combined feature is within the preset monitoring range, the original gradient boosting decision tree model and the original logistic regression model are used as the target gradient boosting decision tree model and the target logistic regression model; The target gradient boosting decision tree model and the target logistic regression model are tested using the data to be trained corresponding to the test set. If the output values corresponding to each of the data to be trained are within the preset monitoring range, the target gradient boosting decision tree model and the target logistic regression model are used as data security processing models.
3. The data security processing method according to claim 2, characterized in that: The step of obtaining the data to be trained and dividing the data to be trained into a training set and a test set includes: Obtaining a model training request, wherein the model training request includes a training combination feature; According to the training combination feature, selecting training user data matching the training combination feature and non-training user data not matching the training combination feature from a user database; According to a preset number of positive samples, corresponding training user data are selected from the training user data as original positive samples; According to the ratio of positive and negative samples, corresponding non-training user data are selected from the non-training user data as original negative samples; Extracting negative noise data from the original positive sample according to the first noise extraction range, and adding the negative noise data to the original negative sample to generate a valid negative sample; Extracting positive noise data from the original negative sample according to the second noise extraction range, and adding the positive noise data to the original positive sample to generate a valid positive sample; The valid positive samples and the valid negative samples are stored in a sample database as data to be trained.
4. The data security processing method according to claim 3, characterized in that: After the step of inputting the original combined features into the original logistic regression model to obtain the output value corresponding to the original combined features, the data security processing method further includes: When the output value corresponding to the original combined feature is lower than the preset monitoring range, the first noise extraction range and the second noise extraction range are reduced, and the ratio of positive and negative samples is increased; when the output value corresponding to the original combined feature is higher than the preset monitoring range, the first noise extraction range and the second noise extraction range are increased, and the ratio of positive and negative samples is reduced.
5. A data security processing device, characterized in that: include: A data processing request acquisition module, used to acquire a data processing request, wherein the data processing request includes a target combination feature; A user data acquisition module to be tested, used to acquire the user data to be tested from a user database according to the target combination characteristics; An effective user data acquisition module is used to determine a target noise extraction range according to a data security processing model, and based on the target noise extraction range, select user data corresponding to non-target combination features from a user database as target noise data; The data security processing model refers to a model used to determine the target noise extraction range; the data security processing model includes a target gradient boosting decision tree model and a target logistic regression model; the target noise extraction range refers to a range used to extract user data corresponding to non-target combination features; the target noise data is added to the user data to be tested to obtain valid user data; A data security processing module, used for inputting the valid user data into the data security processing model, and obtaining an output value of a target combination feature corresponding to the valid user data; The safe user data acquisition module is used to use the valid user data as safe user data when the output value of the target combination feature is within a preset monitoring range.
6. The data security processing device according to claim 5, characterized in that: Before the effective user data acquisition module, the data security processing device further includes: A training data processing unit is used to obtain the training data and divide the training data into a training set and a test set; A model parameter initialization unit, used to initialize the model parameters of the original gradient boosting decision tree model, wherein the model parameters include the maximum depth and maximum number of iterations of the gradient boosting decision tree; A model training unit, used for inputting the to-be-trained data corresponding to the training set into the original gradient boosting decision tree model, and stopping the training of the original gradient boosting decision tree model when the training depth in the original gradient boosting decision tree model reaches the maximum depth and the number of iterations reaches the maximum number of iterations, and obtaining the original combination features corresponding to each decision tree path in the original gradient boosting decision tree model; An output value calculation unit, used to input the original combination feature into the original logistic regression model to obtain an output value corresponding to the original combination feature; A model determination unit, configured to use the original gradient boosting decision tree model and the original logistic regression model as a target gradient boosting decision tree model and a target logistic regression model when the output value corresponding to the original combined feature is within the preset monitoring range; The model testing unit is used to test the target gradient boosting decision tree model and the target logistic regression model using the training data corresponding to the test set. If the output values corresponding to each of the training data obtained are within the preset monitoring range, the target gradient boosting decision tree model and the target logistic regression model are used as data security processing models.
7. The data security processing device according to claim 6, characterized in that: The to-be-trained data processing unit comprises: A model training request acquisition subunit, used to acquire a model training request, wherein the model training request includes a training combination feature; A user data selection subunit is used to select, from a user database, safe user data that matches the training combination feature and non-safe user data that does not match the training combination feature according to the training combination feature; An original positive sample acquisition subunit, used to select corresponding safe user data from the safe user data as original positive samples according to a preset number of positive samples; An original negative sample acquisition subunit, configured to select corresponding non-safe user data from the non-safe user data as original negative samples according to the positive-negative sample ratio; An effective negative sample acquisition subunit, used to extract negative noise data from the original positive sample according to the first noise extraction range, and add the negative noise data to the original negative sample to generate an effective negative sample; An effective positive sample acquisition subunit, used to extract positive noise data from the original negative sample according to the second noise extraction range, and add the positive noise data to the original positive sample to generate an effective positive sample; The to-be-trained data generating subunit is used to store the valid positive samples and the valid negative samples as to-be-trained data in a sample database.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the data security processing method according to any one of claims 1 to 4 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the data security processing method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Data indexing method based on privacy protection
CN104133903A
TopN collaborative filtering recommendation method based on differential privacy
CN107491557A
Transformer multi-feature parameter selection method on basis of big data and random forest
CN107782442A
Method for pushing loan advertisement in application program, electronic device and medium
CN107895277A
Overdue risk prediction method and device of credit application
CN108389125A
