Feature extraction method and device, medium and equipment

Through the encoding layer, gradient inversion layer and decoding layer in the privacy protection model, the encoding layer parameters are adjusted to reduce the probability of user characteristics being reversely restored, solve the risk of user information leakage, and achieve information protection effects.

CN118568469APending Publication Date: 2024-08-30ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410712787.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the existing technology, e-commerce platforms convert users' personal information into features and provide them to merchants. There is a risk of reverse restoration, resulting in a high risk of user information leakage.

Method used

Adopt a privacy protection model, including encoding layer, gradient inversion layer and decoding layer, input the original user information into the encoding layer to obtain user characteristics, adjust the encoding layer parameters through the gradient inversion layer, reduce the probability of user characteristics being reversely restored, and reduce information Risk of leakage.

Benefits of technology

The parameters of the encoding layer are adjusted through the gradient inversion layer, which reduces the probability that the user characteristics in the privacy protection model are reversely restored by the decoding layer, and realizes that the confused user information output by the decoding layer is as different as possible from the original user information, reducing the Risk of user information leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568469A
    Figure CN118568469A
Patent Text Reader

Abstract

The invention discloses a feature extraction method and device, a medium and equipment. Original user information is input into a coding layer to obtain user features, and the user features are input into a decoding layer to obtain confused user information. A loss is determined from the obfuscated user information and the original user information, and at least a first gradient of the coding layer is determined from the loss. And inverting the first gradient through a preset inversion coefficient in the gradient inversion layer, and adjusting the parameters of the coding layer according to the inverted first gradient. And in response to a feature extraction request of target user information, inputting the target user information into a coding layer in the trained privacy protection model, determining user features and returning the user features. The probability that the user features are reversely restored by the decoding layer is reduced, and the risk of user information leakage is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a feature extraction method, device, medium and equipment. Background Art

[0002] At present, with the rapid development of technologies such as big data, cloud computing and artificial intelligence, the interactive scenarios of users on Internet platforms are becoming increasingly extensive, and the user information generated is showing explosive growth. For example, when a user uses the use-now-pay-later function to purchase a product on an e-commerce platform, the merchant to which the product belongs needs to obtain the user's personal information from the e-commerce platform in order to ensure that the user meets the conditions for using the use-now-pay-later function, and determine the user's risk level through the merchant's own verification procedures. If the user's risk level is low, the merchant will support the user to use the use-now-pay-later function.

[0003] In the prior art, in order to avoid providing the personal information in plain text directly to the merchants, thus causing information leakage, e-commerce platforms usually convert the personal information into features and then provide the features to the merchants. However, the features provided to the merchants may be reversely restored, which will cause the risk of leakage of the user's personal information.

[0004] Therefore, in order to reduce the risk of personal information leakage, this specification provides a feature extraction method, device, medium and equipment. Summary of the invention

[0005] This specification provides a feature extraction method, device, medium and equipment to partially solve the above-mentioned problems existing in the prior art.

[0006] This manual adopts the following technical solutions:

[0007] This specification provides a feature extraction method, wherein the privacy protection model to be trained includes an encoding layer, a gradient reversal layer, and a decoding layer, including:

[0008] Inputting original user information into the encoding layer to obtain user features, and inputting the user features into the decoding layer to obtain obfuscated user information;

[0009] Determine a loss according to the obfuscated user information and the original user information, and determine at least a first gradient of the coding layer according to the loss;

[0010] Inverting the first gradient by using an inversion coefficient preset in the gradient inversion layer, and adjusting the parameters of the coding layer according to the inverted first gradient;

[0011] In response to a feature extraction request for target user information, the target user information is input into the encoding layer of the trained privacy protection model, and the user features are determined and returned.

[0012] Optionally, the privacy protection model further includes a classification layer;

[0013] According to the inverted first gradient, the parameters of the coding layer are adjusted, specifically including:

[0014] Determining a classification label of the original user information;

[0015] Determining a predicted label of the original user information by sequentially using the encoding layer and the classification layer in the privacy protection model to be trained;

[0016] Determine the loss of the classification layer according to the difference between the classification label of the original user information and the predicted label, and determine the second gradient of the encoding layer with minimizing the loss of the classification layer as an optimization goal;

[0017] The parameters of the coding layer are adjusted according to the inverted first gradient and the second gradient.

[0018] Optionally, adjusting the parameters of the coding layer according to the inverted first gradient and the second gradient specifically includes:

[0019] Fusing the inverted first gradient and the second gradient of the coding layer as a fused gradient;

[0020] According to the fused gradient, the parameters of the coding layer are adjusted.

[0021] Optionally, determining a loss according to the obfuscated user information and the original user information, and determining at least a first gradient of the coding layer according to the loss specifically includes:

[0022] Determine a loss according to a difference between the original user information and the obfuscated user information, determine a parameter gradient of the decoding layer with the maximum loss as an optimization target, and adjust the parameters of the decoding layer according to the parameter gradient of the decoding layer;

[0023] A first gradient of the encoding layer is determined according to a parameter gradient of the decoding layer and a loss relationship between the decoding layer and the encoding layer.

[0024] Optionally, determining a loss according to the obfuscated user information and the original user information, and determining at least a first gradient of the coding layer according to the loss specifically includes:

[0025] Determine the loss according to the difference between the original user information and the obfuscated user information, and take minimizing the loss as an optimization goal;

[0026] A first gradient of the coding layer is determined according to the optimization target and the user feature output by the coding layer.

[0027] Optionally, the first gradient is inverted by using a preset inversion coefficient in the gradient inversion layer, specifically including:

[0028] Determining a preset inversion coefficient in the gradient inversion layer;

[0029] The first gradient of the coding layer received by the gradient reversal layer is multiplied by the negative reversal coefficient to achieve the inversion of the first gradient.

[0030] Optionally, the classification label is a risk type of the user;

[0031] Determining the classification label of the original user information specifically includes:

[0032] Determining a risk type of a user of the original user information;

[0033] Determining the predicted label of the original user information by sequentially using the encoding layer and the classification layer in the privacy protection model to be trained specifically includes:

[0034] Determining the prediction type of the original user information through the encoding layer and the classification layer in the privacy protection model to be trained in sequence;

[0035] Determining the loss of the classification layer according to the difference between the classification label of the original user information and the predicted label specifically includes:

[0036] The loss of the classification layer is determined according to the risk type of the user of the original user information and the difference between the predicted types.

[0037] This specification provides a feature extraction device, wherein the privacy protection model to be trained includes an encoding layer, a gradient reversal layer, and a decoding layer, including:

[0038] An input module, used to input original user information into the encoding layer to obtain user features, and input the user features into the decoding layer to obtain obfuscated user information;

[0039] a determining module, configured to determine a loss according to the obfuscated user information and the original user information, and to determine at least a first gradient of the coding layer according to the loss;

[0040] An adjustment module, configured to invert the first gradient by using an inversion coefficient preset in the gradient inversion layer, and adjust the parameters of the coding layer according to the inverted first gradient;

[0041] The extraction module is used to respond to a feature extraction request of the target user information, input the target user information into the encoding layer of the trained privacy protection model, determine the user features and return them.

[0042] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned feature extraction method is implemented.

[0043] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a feature extraction method when executing the program.

[0044] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0045] The feature extraction method provided in this specification, the privacy protection model to be trained includes a coding layer, a gradient reversal layer and a decoding layer. The original user information is input into the coding layer to obtain user features, and the user features are input into the decoding layer to obtain obfuscated user information. The loss is determined according to the obfuscated user information and the original user information, and at least the first gradient of the coding layer is determined according to the loss. The first gradient is inverted by the inversion coefficient preset in the gradient reversal layer, and the parameters of the coding layer are adjusted according to the inverted first gradient. In response to the feature extraction request of the target user information, the target user information is input into the coding layer in the trained privacy protection model, and the user features are determined and returned.

[0046] Through the gradient reversal layer, the first gradient of the encoding layer is inverted, so that the encoding layer is trained according to the inverted first gradient, which reduces the probability that the user features output by the encoding layer in the privacy protection model are reversely restored by the decoding layer, and achieves the effect that the obfuscated user information decoded by the decoding layer is as different as possible from the original user information, reducing the risk of user information leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0048] Figure 1 A flowchart of a feature extraction method provided in an embodiment of this specification;

[0049] Figure 2 A schematic diagram of the structure of a privacy protection model provided in this manual;

[0050] Figure 3 A schematic diagram of the privacy protection model structure provided in this manual;

[0051] Figure 4 A schematic diagram of a feature extraction device provided in this specification;

[0052] Figure 5 A method corresponding to the Figure 1 Schematic diagram of the structure of an electronic device. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0055] Figure 1 A flow chart of a feature extraction method provided in an embodiment of this specification includes the following steps:

[0056] S100: Inputting original user information into the encoding layer to obtain user features, and inputting the user features into the decoding layer to obtain obfuscated user information.

[0057] The process of feature extraction in this specification generally involves processing of data. In the embodiments of this specification, the feature extraction process can be performed by a server. Of course, this specification does not limit which device is used to perform the feature extraction process. For example, a personal computer and a mobile terminal can also be used to perform feature extraction. For ease of description, the following description is based on the server as the execution subject.

[0058] In one or more embodiments of the present specification, the privacy protection model includes an encoding layer, a gradient reversal layer, and a decoding layer, wherein the output of the gradient reversal layer is the same as the input, that is, the gradient reversal layer does not change the data input therein.

[0059] Figure 2 This is a structural diagram of a privacy protection model provided in this specification. The privacy protection model includes a coding layer, a gradient reversal layer, and a decoding layer. The original user information passes through the coding layer, the gradient reversal layer, and the decoding layer in sequence to obtain the obfuscated user information output by the decoding layer.

[0060] In one or more embodiments of the present specification, the server may input the original user information into the privacy protection model to be trained, and obtain the user features of the original user information output by the encoding layer through the encoding layer. The gradient reversal layer still outputs the user features of the original user information and does not change the user features of the original user information. The user features of the original user information output by the gradient reversal layer are then input into the decoding layer to obtain the obfuscated user information output by the decoding layer.

[0061] Of course, the user features of the original user information output by the encoding layer may not be input into the gradient reversal layer, but may be directly input into the decoding layer.

[0062] S102: Determine a loss according to the obfuscated user information and the original user information, and determine at least a first gradient of the coding layer according to the loss.

[0063] In one or more embodiments of the present specification, the server may determine a loss according to the obfuscated user information and the original user information, and determine at least a first gradient of the coding layer according to the loss.

[0064] Specifically, the server may determine the loss according to the difference between the original user information and the obfuscated user information, and determine the parameter gradient of the decoding layer with the minimum loss as the optimization goal. Thereafter, the parameters of the decoding layer may be adjusted according to the parameter gradient of the decoding layer.

[0065] It is worth noting that this manual does not restrict how to determine the loss, and the specific circumstances can be set according to actual conditions.

[0066] Afterwards, in one or more embodiments of the present specification, the server may train the decoding layer according to the determined parameter gradient of the decoding layer, and determine the loss relationship between the encoding layer and the decoding layer in the privacy protection model during the back propagation of the privacy protection model to be trained. And according to the loss relationship between the encoding layer and the decoding layer, and the parameter gradient of the decoding layer, the first gradient of the encoding layer is determined. That is, the loss gradient is calculated based on the loss relationship from the parameter gradient of the decoding layer, thereby determining the first gradient of the encoding layer, which is equivalent to telling the encoding layer how the encoding layer should be adjusted, and then determining the first gradient of the encoding layer.

[0067] Of course, in one or more embodiments of the present specification, the server may also determine the loss based on the difference between the original user information and the obfuscated user information. Since the intermediate state generated when the coding layer outputs the user features based on the original user information and the intermediate state when the decoding layer decodes the obfuscated user information based on the user features during the forward propagation of the feature extraction model to be trained can be saved and used in the reverse propagation process during the forward propagation process, it is only necessary to minimize the loss as the optimization target and combine the intermediate state generated during the forward propagation process. Then, according to the optimization target and the user features output by the coding layer, the first gradient of the coding layer is determined, that is, the first gradient of the coding layer is determined only according to the loss of the decoding layer and the user features output by the coding layer.

[0068] S104: inverting the first gradient using an inversion coefficient preset in the gradient inversion layer, and adjusting parameters of the coding layer according to the inverted first gradient.

[0069] In one or more embodiments of the present specification, the server may invert the first gradient of the coding layer by using the inversion coefficient preset in the gradient inversion layer to obtain the inverted first gradient, and then adjust the parameters of the coding layer according to the inverted first gradient.

[0070] This ensures that during the next round of training of the privacy-preserving model, the user features output by the encoding layer can no longer be restored by the decoding layer.

[0071] Specifically, the server may determine a preset inversion coefficient in the gradient inversion layer, and multiply the first gradient of the coding layer received by the gradient inversion layer by the negative inversion coefficient to achieve gradient inversion.

[0072] The gradient reversal layer code is as follows:

[0073] #Gradient reversal layer reversal coefficient (alpha)

[0074] #Define the GradReverse class to implement gradient reversal

[0075] class GradReverse(torch.autograd.Function):

[0076] #torch.autograd.Function is a base class in the deep learning framework, used to define the GradReverse class, inherit the torch.autograd.Function class and implement forword and backword

[0077] @staticmethod

[0078] #Static method decorator

[0079] def forward(ctx,x,alpha):

[0080] #Forward propagation method of the GradReverse class, ctx is a context object used to pass information between forward and backward propagation and save the intermediate variables required for backward propagation; x is the input tensor; the forward propagation process does not perform any operations and directly outputs

[0081] ctx.alpha = alpha

[0082] #Save the inversion coefficient alpha in the context object ctx for use in backpropagation.

[0083] return x.view_as(x)

[0084] #Return the input tensor x, but ensure that the returned tensor has the same shape as the input tensor through the .view_as(x) method. During the forward propagation process, no operation is actually performed on the input tensor.

[0085] @staticmethod

[0086] def backward(ctx,grad_output):

[0087] #Backward propagation method of the GradReverse class. It receives ctx and grad_output as parameters, where grad_output is the gradient of the output. During the back propagation process, the gradient is multiplied by the opposite weight coefficient output = grad_output.neg() * ctx.alpha

[0088] #Neg grad_output (.neg() method), and then multiply it by the reversal coefficient alpha previously saved in ctx to achieve gradient reversal.

[0089] return output,None

[0090] #The returned output is the gradient after gradient reversal, and None means that no additional parameters need to be returned.

[0091] class GradientReversalLayer(nn.Module):

[0092] def__init__(self,alpha=1.0):

[0093] #Initialize alpha, the default value is 1.0.

[0094] super(GradientReversalLayer,self).__init__()

[0095] self.alpha = alpha

[0096] #Call the GradientReversalLayer class

[0097] def forward(self,x,alpha):

[0098] #Receive input tensors x and alpha

[0099] alpha=alpha if alpha else self.alpha

[0100] #Multiply the gradient by the negative inversion coefficient

[0101] return GradReverse.apply(x,alpha)

[0102] S106: In response to a feature extraction request for target user information, the target user information is input into a coding layer in a trained privacy protection model, user features are determined and returned.

[0103] In one or more embodiments of the present specification, the server responds to a feature extraction request for target user information, inputs the target user information carried in the feature extraction request into a trained privacy protection model, determines the user features output by the encoding layer in the trained privacy protection model, and returns them.

[0104] Specifically, the server responds to a feature extraction request for the target user information, inputs the target user information carried in the feature extraction request into the trained privacy protection model, and determines the encoding result of the target user information after passing through the encoding layer through the encoding layer in the trained privacy protection model, and returns it as the user feature of the target user information.

[0105] At this time, the user characteristics of the returned target user information are provided to a third-party user, and the third-party user cannot reversely restore the user information to be sent through decoding, thereby reducing the risk of privacy leakage of the target user information.

[0106] based on Figure 1A feature extraction method is shown, and the privacy protection model to be trained includes a coding layer, a gradient reversal layer, and a decoding layer. The original user information is input into the coding layer to obtain user features, and the user features are input into the decoding layer to obtain obfuscated user information. The loss is determined according to the obfuscated user information and the original user information, and at least the first gradient of the coding layer is determined according to the loss. The first gradient is inverted by the inversion coefficient preset in the gradient reversal layer, and the parameters of the coding layer are adjusted according to the inverted first gradient. In response to a feature extraction request of the target user information, the target user information is input into the coding layer in the trained privacy protection model, and the user features are determined and returned.

[0107] The first gradient of the coding layer is inverted through the gradient reversal layer, so that the coding layer is trained according to the inverted first gradient. The coding layer trained with the inverted first gradient encodes the original user information again, obtains the user features of the original user information and decodes it, and the obfuscated user information obtained after decoding by the decoding layer will be different from the original user information and cannot be consistent with the original user information, which reduces the probability that the user features output by the coding layer in the privacy protection model are reversely restored by the decoding layer, and achieves the effect that the obfuscated user information decoded by the decoding layer is as different as possible from the original user information, thereby reducing the risk of user information leakage.

[0108] also, Figure 3 This is a schematic diagram of the privacy protection model structure provided in this manual.

[0109] In one or more embodiments of this specification, Figure 3 As shown, the privacy protection model also includes a classification layer. The server can determine the classification label of the original user information. The original user information input into the privacy protection model to be trained is sequentially passed through the encoding layer and the classification layer in the privacy protection model to be trained to determine the predicted label of the original user information.

[0110] According to the difference between the classification label of the original user information and the predicted label of the original user information, the loss of the classification layer is determined, and the second gradient of the encoding layer is determined with the minimum loss of the classification layer as the optimization goal.

[0111] Afterwards, the parameters of the coding layer are adjusted according to the inverted first gradient and the second gradient.

[0112] It is worth noting that the method for adjusting the parameters of the coding layer according to the negated first gradient and the second gradient can be to fuse the negated first gradient and the second gradient of the coding layer as a fused gradient, and adjust the parameters of the coding layer according to the fused gradient.

[0113] The parameters of the coding layer are adjusted according to the fused gradient after the inversion of the first gradient and the second gradient of the coding layer, so that the risk of privacy leakage of user characteristics of the user information output by the coding layer is reduced, which not only achieves the purpose of shielding user information, but also better enhances the use value of user information, thereby better utilizing the characteristics of user information to perform tasks.

[0114] In one or more embodiments of the present specification, the method for adjusting the parameters of the coding layer according to the inverted first gradient and the second gradient can also be to first adjust the parameters of the coding layer according to the second gradient. Then, the parameters of the coding layer are adjusted according to the first gradient. Of course, the parameters of the coding layer can also be adjusted according to the first gradient first, and then according to the second gradient. Similarly, the influence of the decoding layer and the classification layer can be taken into account, which not only reduces the risk of privacy leakage of user features output by the coding layer, but also enhances the use value of the user features output by the coding layer.

[0115] In one or more embodiments of the present specification, in order to make the obfuscated user information decoded by the decoding layer as different from the original user information as possible, so as to reduce the probability of reverse restoration to the original user information, in the present specification, the obfuscated user information decoded by the decoding layer needs to be as different from the original user information as possible, and there needs to be a large difference between the original user information and the obfuscated user information. However, at this time, the encoding result output by the encoding layer, that is, the user information may be over-shielded, resulting in the user features output by the encoding layer having no use value when performing tasks.

[0116] Therefore, in this specification, when the privacy protection model also includes a classification layer, the server can determine the loss based on the difference between the original user information and the obfuscated user information, and determine the parameter gradient of the decoding layer with the maximum loss as the optimization goal.

[0117] The features output by the encoding layer further reduce the risk of privacy leakage. At the same time, the user features output by the encoding layer will not excessively block user information and still have value for use.

[0118] Of course, in one or more embodiments of the present specification, the server may also input the original user information into the privacy protection model to be trained, and sequentially pass through the encoding layer, gradient reversal layer, and decoding layer of the privacy protection model to obtain decoded obfuscated user information.

[0119] In one or more embodiments of the present specification, the classification label is the risk type of the user. The server may also determine the risk type of the user of the original user information, such as high risk and low risk. The prediction type of the original user information is determined by sequentially passing through the coding layer and the classification layer in the privacy protection model to be trained. According to the difference between the risk type of the user of the original user information and the prediction type, the loss of the classification layer is determined, and the second gradient of the coding layer is determined with the minimum loss of the classification layer as the optimization goal.

[0120] When applying the trained privacy protection model to online business, the user features output and returned by the encoding layer can be utilized, such as inputting the features into a pre-trained classifier and determining the risk level of the user who owns the original user information from which the features are extracted based on the classification results given by the classifier.

[0121] The above is a feature extraction method provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding feature extraction device, such as Figure 4 shown.

[0122] Figure 4 A schematic diagram of a feature extraction device provided in this specification, wherein the privacy protection model to be trained includes an encoding layer, a gradient reversal layer, and a decoding layer, specifically including:

[0123] An input module 400 is used to input original user information into the encoding layer to obtain user features, and input the user features into the decoding layer to obtain obfuscated user information;

[0124] A determination module 402, configured to determine a loss according to the obfuscated user information and the original user information, and to determine at least a first gradient of the coding layer according to the loss;

[0125] An adjustment module 404, configured to invert the first gradient using an inversion coefficient preset in the gradient inversion layer, and adjust the parameters of the coding layer according to the inverted first gradient;

[0126] The extraction module 406 is used to respond to a feature extraction request of the target user information, input the target user information into the encoding layer of the trained privacy protection model, determine the user features and return them.

[0127] Optionally, the privacy protection model further includes a classification layer;

[0128] The adjustment module 404 is specifically used to determine the classification label of the original user information, determine the predicted label of the original user information through the encoding layer and the classification layer in the privacy protection model to be trained in turn, determine the loss of the classification layer according to the difference between the classification label of the original user information and the predicted label, and determine the second gradient of the encoding layer with the minimum loss of the classification layer as the optimization goal, and adjust the parameters of the encoding layer according to the inverted first gradient and the second gradient.

[0129] Optionally, the adjustment module 404 is further configured to fuse the inverted first gradient and the second gradient of the coding layer as a fused gradient, and adjust the parameters of the coding layer according to the fused gradient.

[0130] Optionally, the adjustment module 404 is also used to determine the loss based on the difference between the original user information and the confused user information, and determine the parameter gradient of the decoding layer with the maximum loss as the optimization target, and adjust the parameters of the decoding layer according to the parameter gradient of the decoding layer, and determine the first gradient of the encoding layer according to the parameter gradient of the decoding layer and the loss relationship between the decoding layer and the encoding layer.

[0131] Optionally, the determination module 402 is specifically used to determine the loss based on the difference between the original user information and the confused user information, and to take minimizing the loss as an optimization goal, and to determine the first gradient of the coding layer based on the optimization goal and the user features output by the coding layer.

[0132] Optionally, the adjustment module 404 is specifically configured to determine a preset inversion coefficient in the gradient inversion layer, and multiply the first gradient of the coding layer received by the gradient inversion layer by the negative inversion coefficient to invert the first gradient.

[0133] Optionally, the classification label is a risk type of the user;

[0134] The adjustment module 404 is also used to determine the risk type of the user of the original user information, and determine the predicted type of the original user information through the encoding layer and the classification layer in the privacy protection model to be trained in turn, and determine the loss of the classification layer according to the risk type of the user of the original user information and the difference between the predicted type.

[0135] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A feature extraction method is provided.

[0136] This manual also provides Figure 5 The schematic structure diagram of the electronic device shown in FIG. Figure 5 As shown, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The feature extraction method described.

[0137] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0138] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0139] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0140] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0141] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0142] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0143] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0146] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0147] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0148] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0149] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0150] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0151] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0152] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0153] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A feature extraction method, wherein the privacy protection model to be trained includes an encoding layer, a gradient reversal layer, and a decoding layer, including: Inputting original user information into the encoding layer to obtain user features, and inputting the user features into the decoding layer to obtain obfuscated user information; Determine a loss according to the obfuscated user information and the original user information, and determine at least a first gradient of the coding layer according to the loss; Inverting the first gradient by using an inversion coefficient preset in the gradient inversion layer, and adjusting the parameters of the coding layer according to the inverted first gradient; In response to a feature extraction request for target user information, the target user information is input into the encoding layer of the trained privacy protection model, and the user features are determined and returned.

2. The method of claim 1, wherein the privacy protection model further comprises a classification layer; According to the inverted first gradient, the parameters of the coding layer are adjusted, specifically including: Determining a classification label of the original user information; Determining a predicted label of the original user information by sequentially using the encoding layer and the classification layer in the privacy protection model to be trained; Determine the loss of the classification layer according to the difference between the classification label of the original user information and the predicted label, and determine the second gradient of the encoding layer with minimizing the loss of the classification layer as an optimization goal; The parameters of the coding layer are adjusted according to the inverted first gradient and the second gradient.

3. The method according to claim 2, wherein the parameters of the coding layer are adjusted according to the inverted first gradient and the second gradient, specifically comprising: Fusing the inverted first gradient and the second gradient of the coding layer as a fused gradient; According to the fused gradient, the parameters of the coding layer are adjusted.

4. The method according to claim 2, determining a loss according to the obfuscated user information and the original user information, and determining at least a first gradient of the coding layer according to the loss, specifically comprising: Determine a loss according to a difference between the original user information and the obfuscated user information, determine a parameter gradient of the decoding layer with the maximum loss as an optimization target, and adjust the parameters of the decoding layer according to the parameter gradient of the decoding layer; A first gradient of the encoding layer is determined according to a parameter gradient of the decoding layer and a loss relationship between the decoding layer and the encoding layer.

5. The method according to claim 1, determining a loss according to the obfuscated user information and the original user information, and determining at least a first gradient of the coding layer according to the loss, specifically comprising: Determine the loss according to the difference between the original user information and the obfuscated user information, and take minimizing the loss as an optimization goal; A first gradient of the coding layer is determined according to the optimization target and the user feature output by the coding layer.

6. The method according to claim 1, wherein the first gradient is inverted by using a preset inversion coefficient in the gradient inversion layer, specifically comprising: Determining a preset inversion coefficient in the gradient inversion layer; The first gradient of the coding layer received by the gradient reversal layer is multiplied by the negative reversal coefficient to achieve the inversion of the first gradient.

7. The method according to claim 2, wherein the classification label is the risk type of the user; Determining the classification label of the original user information specifically includes: Determining a risk type of a user of the original user information; Determining the predicted label of the original user information by sequentially using the encoding layer and the classification layer in the privacy protection model to be trained specifically includes: Determining the prediction type of the original user information through the encoding layer and the classification layer in the privacy protection model to be trained in sequence; Determining the loss of the classification layer according to the difference between the classification label of the original user information and the predicted label specifically includes: The loss of the classification layer is determined according to the risk type of the user of the original user information and the difference between the predicted types.

8. A feature extraction device, wherein the privacy protection model to be trained includes an encoding layer, a gradient reversal layer, and a decoding layer, including: An input module, used to input original user information into the encoding layer to obtain user features, and input the user features into the decoding layer to obtain obfuscated user information; a determining module, configured to determine a loss according to the obfuscated user information and the original user information, and to determine at least a first gradient of the coding layer according to the loss; An adjustment module, configured to invert the first gradient by using an inversion coefficient preset in the gradient inversion layer, and adjust the parameters of the coding layer according to the inverted first gradient; The extraction module is used to respond to a feature extraction request of the target user information, input the target user information into the encoding layer of the trained privacy protection model, determine the user features and return them.

9. A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.

Citation Information

Patent Citations

  • Model training and prediction method and system for protecting data privacy

    CN111125760A

  • Classification model training method and device, equipment and storage medium

    CN112580733A

  • Adversarial domain adaptive differential privacy protection method in multi-source domain migration

    CN112800471A

  • Physical layer key generation method and device based on multi-task auto-encoder

    CN115134072A

  • Voice resource determination method and device, electronic equipment and nonvolatile storage medium

    CN117690414A