A facial attribute processing method, device and equipment
By combining the Laplace mechanism, exponential mechanism and differential privacy mechanism of deep learning, and combining it with the smart contract of the blockchain system, facial attribute information is processed for privacy protection, which solves the problem of privacy leakage in the facial recognition system and achieves a strong privacy protection effect.
Patent Information
- Application Number
- CN202210296236.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-24
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-03-24
AI Technical Summary
Existing facial recognition systems lack privacy protection when outputting facial attribute information, resulting in the risk of user privacy leakage and weakening the privacy protection strength of facial images or features.
The privacy protection rules of the Laplace mechanism and the exponential mechanism are combined with the differential privacy mechanism of deep learning to perturb the facial attribute information, and privacy protection is performed through the smart contract in the blockchain system.
It provides strong privacy protection strength while keeping the output distribution of the facial recognition system almost unchanged, ensuring that the user's facial attribute information is not leaked, thereby improving the privacy protection effect.
Smart Images

Figure CN114756889B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer technology, and in particular to a method, device, and apparatus for processing facial attributes. Background Art
[0002] Facial recognition technology has been widely used in recent years, with devices deployed in supermarkets, train stations, residential complexes, and corporate access control systems. With user authorization, facial recognition systems not only identify the user's identity but also their facial attributes. While facial attributes don't directly indicate the user's identity, many of these attributes can help attackers narrow their search for user identities or even directly locate a specific user, threatening the user's information and financial security.
[0003] Currently, facial recognition systems directly output the user's facial attribute information after being called, which poses a potential risk of privacy leakage for the user and weakens the strength of privacy protection for facial images or facial features. Therefore, it is necessary to provide a technical solution that can better protect the privacy of facial attributes while meeting the plaintext query requirements of the face recognition system for facial attributes. Summary of the Invention
[0004] The purpose of the embodiments of this specification is to provide a technical solution that can better protect the privacy of facial attributes while meeting the plaintext query requirements of the face recognition system for facial attributes.
[0005] In order to implement the above technical solution, the embodiments of this specification are implemented as follows:
[0006] An embodiment of this specification provides a method for processing facial attributes, the method comprising: obtaining a target facial image to be identified; performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image; performing privacy protection processing on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information; and outputting the privacy protection-processed facial attribute information based on the generated privacy protection attribute information.
[0007] A facial attribute processing method provided in an embodiment of this specification is applied to a blockchain system, the method comprising: obtaining privacy protection processing rule information for facial attributes, generating a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploying the first smart contract to the blockchain system. A target facial image to be identified is obtained based on the first smart contract. Attributes of the target facial image are identified based on the first smart contract to obtain facial attribute information corresponding to the target facial image. Based on the first smart contract, privacy protection processing is performed on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Based on the first smart contract and the generated privacy protection attribute information, the facial attribute information that has undergone privacy protection processing is output.
[0008] An embodiment of this specification provides a facial attribute processing device, comprising: a facial image acquisition module for acquiring a target facial image to be identified; a facial attribute recognition module for performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image; a privacy protection module for performing privacy protection processing on the facial attribute information using one or more different privacy protection processing rules to generate privacy-protected attribute information corresponding to the facial attribute information; and a facial attribute output module for outputting the privacy-protected facial attribute information based on the generated privacy-protected attribute information.
[0009] The embodiments of this specification provide a facial attribute processing device, which is a device in a blockchain system and includes: a contract deployment module, which obtains privacy protection processing rule information for facial attributes, generates a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploys the first smart contract into the blockchain system. A facial image acquisition module, which obtains a target facial image to be identified based on the first smart contract. A facial attribute recognition module, which performs attribute recognition on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image. A privacy protection module, which performs privacy protection processing on the facial attribute information using one or more different privacy protection processing rules based on the first smart contract to generate privacy protection attribute information corresponding to the facial attribute information. A facial attribute output module, which outputs the facial attribute information that has undergone privacy protection processing based on the first smart contract and the generated privacy protection attribute information.
[0010] An embodiment of this specification provides a facial attribute processing device, comprising: a processor; and a memory configured to store computer-executable instructions. When executed, the executable instructions cause the processor to: obtain a target facial image to be identified; perform attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image; perform privacy protection processing on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information; and output the privacy protection-processed facial attribute information based on the generated privacy protection attribute information.
[0011] An embodiment of this specification provides a facial attribute processing device, which is a device in a blockchain system. The facial attribute processing device includes: a processor; and a memory configured to store computer-executable instructions. When executed, the executable instructions cause the processor to: obtain privacy protection processing rule information for facial attributes, generate a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploy the first smart contract into the blockchain system. A target facial image to be identified is obtained based on the first smart contract. Attributes of the target facial image are identified based on the first smart contract to obtain facial attribute information corresponding to the target facial image. Based on the first smart contract, privacy protection processing is performed on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Based on the first smart contract and the generated privacy protection attribute information, the privacy-protected facial attribute information is output.
[0012] An embodiment of this specification also provides a storage medium for storing computer-executable instructions that, when executed, implement the following process: obtaining a target facial image to be identified; performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image; performing privacy protection processing on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information; and outputting the privacy protection-processed facial attribute information based on the generated privacy protection attribute information.
[0013] An embodiment of this specification also provides a storage medium, wherein the storage medium is used to store computer-executable instructions, and when the executable instructions are executed, the following process is implemented: obtaining privacy protection processing rule information of facial attributes, using the privacy protection processing rule information of facial attributes to generate a corresponding first smart contract, and deploying the first smart contract to the blockchain system. Based on the first smart contract, a target facial image to be identified is obtained. Based on the first smart contract, attribute recognition is performed on the target facial image to obtain facial attribute information corresponding to the target facial image. Based on the first smart contract, privacy protection processing is performed on the facial attribute information respectively through one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Based on the first smart contract and the generated privacy protection attribute information, the facial attribute information that has undergone privacy protection processing is output. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0015] Figure 1 This is an embodiment of a facial attribute processing method of this specification;
[0016] Figure 2 This is another embodiment of a facial attribute processing method of this specification;
[0017] Figure 3A This is another embodiment of a method for processing facial attributes of this specification;
[0018] Figure 3B This is a schematic diagram of another facial attribute processing process in this manual;
[0019] Figure 4 This is an embodiment of a facial attribute processing device of the present specification;
[0020] Figure 5 This is another embodiment of a facial attribute processing device of the present specification;
[0021] Figure 6 This is an embodiment of a facial attribute processing device in this specification. DETAILED DESCRIPTION
[0022] The embodiments of this specification provide a method, apparatus, and device for processing facial attributes.
[0023] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.
[0024] Example 1
[0025] like Figure 1 As shown, an embodiment of this specification provides a method for processing facial attributes. The execution subject of this method can be a terminal device or a server, wherein the terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, or a device such as a personal computer. The server can be an independent server or a server cluster composed of multiple servers. The server can be a background server for financial services or online shopping services, or a background server for an application. This method can be applied to related scenarios such as processing facial attribute information in facial images. This embodiment is described in detail with the server as the execution subject. For the case of terminal devices, please refer to the following related content, which will not be repeated here. The method can specifically include the following steps:
[0026] In step S102, a target facial image to be recognized is obtained.
[0027] Among them, the target facial image can be any facial image, the target facial image can be a facial image collected by the terminal device after the user's consent, and can be used for facial recognition or biometric verification, etc. The target facial image can include color features, structural features, depth features, etc. The target facial image can be a static image, a dynamic image, or a static image and a dynamic image. The target facial image can include one or multiple images, which can be set according to actual conditions. The embodiments of this specification do not limit this.
[0028] In recent years, facial recognition technology has been widely used. For example, facial recognition equipment has been deployed in supermarkets, train stations, residential complexes, and corporate access control systems. With user authorization, facial recognition systems not only identify the user's identity but also their facial attributes. While facial attributes don't directly indicate the user's identity, many of these attributes can help attackers narrow their search for user identities or even directly locate a specific user, threatening the user's information and financial security.
[0029] Currently, facial recognition systems directly output the user's facial attribute information after being called, without performing any privacy protection processing. This exposes the user's privacy to potential leakage risks and weakens the privacy protection strength of facial images or facial features. Therefore, it is necessary to provide a technical solution that can better protect the privacy of facial attributes while meeting the face recognition system's requirements for plaintext queries on facial attributes. The embodiments of this specification provide a feasible technical solution, namely, through the privacy protection rules of the Laplace mechanism and the exponential mechanism, combined with the differential privacy mechanism of deep learning to perform a perturbation transformation on facial attribute information, thereby providing stronger privacy protection strength, and the entire system remains almost unchanged in terms of output distribution (i.e., query accuracy).
[0030] When a user is handling a certain business, if the business involves verification or identification of the user's identity, the user can be prompted to verify or identify the user's identity. If the user agrees to verify or identify the user's identity, the terminal device can start the image acquisition component, which can collect the current user's facial information through the image acquisition component and then generate a facial image. The facial image collected by the terminal device can be used as the target facial image to be identified. Alternatively, if the facial attributes of the current user need to be identified in a certain business, the terminal device can also start the image acquisition component, which can collect the current user's facial information through the image acquisition component and then generate a facial image, thereby obtaining the target facial image to be identified. In actual applications, in addition to obtaining the target facial image to be identified through the above-mentioned triggering method, the target facial image can also be obtained through a variety of different triggering methods.
[0031] In step S104, attribute recognition is performed on the target facial image to obtain facial attribute information corresponding to the target facial image.
[0032] Among them, facial attribute information may include multiple types, such as beard, hair color, eyebrow shape and expression, etc., which can be set according to actual conditions and are not limited in this embodiment of the present specification.
[0033] In implementation, after obtaining the target facial image in the above manner, the target facial image can be analyzed. Through analysis, relevant information of various facial attributes in the target facial image can be determined. For example, the facial parts of the user contained in the target facial image can be detected to determine the positions of the various facial parts of the user. Then, the morphology, state, style, color and other related information of the facial parts in different positions can be analyzed, and then whether the user has a beard, the color of the hair, the shape of the eyebrows (such as thick eyebrows, willow-shaped eyebrows, etc.) and other information can be determined, thereby obtaining the facial attribute information corresponding to the target facial image.
[0034] It should be noted that there are many ways to perform attribute recognition on the target facial image. For example, the target facial image can be recognized by a pre-set image analysis algorithm, or by image analysis rules pre-set by technicians (which can be rules set based on expert experience, etc.), or by a model pre-trained with sample data. The specific settings can be made according to actual conditions, and the embodiments of this specification do not limit this.
[0035] In step S106, privacy protection processing is performed on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information.
[0036] Among them, the privacy protection processing rules can be rules for protecting certain private data so that the private data will not be leaked to others. The privacy protection processing rules can include multiple types. For example, encryption algorithms or signature algorithms can be used to encrypt or sign certain data, or pre-set data perturbation rules can be used to perturb certain data. Specifically, noise data or specified interference data can be added to certain data. The specific settings can be based on actual conditions, and the embodiments of this specification do not limit this.
[0037] In practice, in order to protect the facial attribute information in the target facial image, one or more different privacy protection processing rules can be pre-set. After the facial attribute information in the target facial image is obtained in the above manner, the facial attribute information can be subjected to privacy protection processing using the above privacy protection processing rules. For example, if the pre-set privacy protection rules include encrypting the facial attribute information and perturbing the facial attribute information, the facial attribute information can be encrypted using a pre-set encryption algorithm to obtain encrypted facial attribute information. At the same time, a pre-set perturbation processing algorithm can be used to add specified noise data to the facial attribute information to perturb the facial attribute information and obtain perturbed facial attribute information. Through the above processing, privacy protection attribute information corresponding to the facial attribute information can be obtained, such as the encrypted facial attribute information and perturbed facial attribute information.
[0038] In step S108 , based on the generated privacy protection attribute information, the face attribute information that has undergone the privacy protection processing is output.
[0039] In implementation, the generated privacy-preserving attribute information can be obtained through the above-described method, and the facial attribute information processed after privacy protection can be output according to a pre-set result output rule. For example, if the above-described privacy-preserving processing rule includes one, the generated privacy-preserving attribute information can be used as the finalized facial attribute information processed after privacy protection, and the facial attribute information processed after privacy protection can be output. If the above-described privacy-preserving processing rule includes multiple, a privacy-preserving attribute information can be selected from the multiple generated privacy-preserving attribute information according to a pre-set selection rule as the facial attribute information processed after privacy protection, and the facial attribute information processed after privacy protection can be output. The selection rule can include multiple, for example, a random selection rule, or a selection rule that selects the larger of a certain numerical value or characteristic value corresponding to the two. The specific setting can be based on actual conditions and is not limited in the embodiments of this specification.
[0040] An embodiment of the present specification provides a method for processing facial attributes. By obtaining a target facial image to be identified, the target facial image can be subjected to attribute recognition to obtain facial attribute information corresponding to the target facial image. Then, the facial attribute information can be subjected to privacy protection processing respectively through one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Finally, based on the generated privacy protection attribute information, the facial attribute information subjected to privacy protection processing can be output. In this way, the facial attribute information in the target facial image is subjected to privacy protection processing by combining a plurality of different privacy protection processing rules, so that the facial attribute information in the target facial image is transformed, thereby protecting the user's facial attribute information from being leaked. The above processing method can not only provide a stronger privacy protection strength, but also the entire facial recognition system remains almost unchanged in output distribution (i.e., query accuracy), and can provide a better privacy protection effect.
[0041] Example 2
[0042] like Figure 2As shown, an embodiment of this specification provides a method for processing facial attributes. The execution subject of this method can be a terminal device or a server, wherein the terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, or a device such as a personal computer. The server can be an independent server or a server cluster composed of multiple servers. The server can be a background server for financial services or online shopping services, or a background server for an application. This method can be applied to related scenarios such as processing facial attribute information in facial images. This embodiment is described in detail with the server as the execution subject. For the case of terminal devices, please refer to the following related content, which will not be repeated here. The method can specifically include the following steps:
[0043] In step S202, a training sample set including a preset number of facial attributes is obtained.
[0044] The training sample set may include multiple different training sample data. The training sample data may include a facial image of a user. Each training sample data may include a preset number of facial attributes, such as 20 or 30 facial attributes. In practical applications, the training sample set may be the CelebA (CelebFaces Attribute) data sample set, and the preset number of attributes may be 40.
[0045] In implementation, the training sample data in the CelebA data sample set composed of celebrity facial attributes can be selected as the training data of the model. The CelebA data sample set contains 202,599 facial images of 10,177 celebrities. Each image is set with feature tags, including the face bbox annotation box, 5 facial feature point coordinates and 40 attribute tags.
[0046] In step S204, a facial attribute recognition model is trained based on a training sample set of a preset number of facial attributes to obtain a trained facial attribute recognition model. The facial attribute recognition model is constructed by a preset residual network model.
[0047] The facial attribute recognition model may be a model that can recognize facial attributes contained in a facial image.
[0048] In implementation, the model architecture of the facial attribute recognition model can be constructed in a variety of different ways. For example, the model architecture of the facial attribute recognition model can be constructed using a neural network algorithm, or the model architecture of the facial attribute recognition model can be constructed using a residual network model. The specific configuration can be determined based on actual conditions. In this embodiment, the model architecture of the facial attribute recognition model is constructed using a residual network model as an example. The residual network model can include multiple types, such as ResNet18 or ResNet50, where the numbers "18" and "50" respectively represent the number of network layers included in the model. For example, ResNet18 can include 17 convolutional layers and 1 fully connected layer. In this way, after constructing the facial attribute recognition model through the residual network model, since the above construction is only the model architecture of the facial attribute recognition model, which also includes data such as model parameters that need to be determined, the facial attribute recognition model can be trained using the training sample set of the preset number of facial attributes obtained above (such as the CelebA data sample set including 40 facial attributes mentioned above). That is, the residual network model can be used to perform facial attribute classification training of 40 facial attributes on the CelebA data sample set, and finally the trained facial attribute recognition model can be obtained.
[0049] In step S206, facial attribute sample data is obtained, and the facial attribute sample data is input into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data.
[0050] The facial attribute sample data may be image data containing one or more different facial attributes, and the facial attribute sample data may include multiple data. A facial recognition model may be a model used to identify a user's facial image to determine the user's identity. The facial recognition model may be constructed in a variety of different ways. For example, the facial recognition model may be constructed using a neural network algorithm or a multi-layer perceptron (MLP) (a forward-structured artificial neural network). The specific configuration may be based on actual circumstances and is not limited in this embodiment of the present specification.
[0051] In practice, in order to provide various privacy protections for facial attribute information in facial images, a facial recognition model can be constructed and trained. In this embodiment, the model architecture of the facial recognition model is constructed using a multi-layer perceptron (MLP). Subsequently, multiple facial images can be obtained and used as training samples to train the facial recognition model, ultimately yielding a trained facial recognition model. Furthermore, facial attribute sample data can be obtained through a variety of different methods, such as using data from the aforementioned CelebA data sample set, or purchasing a user's facial image as facial attribute sample data. The specific method can be determined based on actual circumstances. The obtained facial attribute sample data can be input into a pre-trained facial recognition model to determine the facial recognition features corresponding to each facial attribute sample data.
[0052] In step S208, the facial attribute sample data is input into a privacy protection processing model based on facial attribute adversarial analysis, and the loss function of the privacy protection processing model is used to maximize the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model. The privacy protection processing model is trained to obtain a trained privacy protection processing model.
[0053] Among them, the privacy protection processing model based on facial attribute confrontation can include multiple types. The privacy protection processing model based on facial attribute confrontation in this embodiment can be used to adjust the facial attribute information with higher sensitivity contained in the facial image to achieve the purpose of privacy protection.
[0054] In implementation, for a certain facial attribute of the facial attribute sample data input into the privacy protection processing model based on facial attribute adversarial, the loss function L = max(D(O,O')) can be used, that is, to maximize the similarity between the facial recognition feature corresponding to the facial attribute sample data and the facial recognition feature corresponding to the facial attribute information output by the privacy protection processing model (which can be represented by the distance D between the two facial recognition features (represented by O and O' in the above formula respectively)). That is, by modifying the input facial attribute information, the identity characteristics of the user are weakened, thereby playing a role in privacy protection. Compared with the input facial attribute information, the new facial attribute information obtained in the above manner is recorded as high-sensitivity attribute information (such as the user's identity information).
[0055] Through the above method, a facial attribute recognition model and a privacy protection processing model for adjusting the highly sensitive facial attribute information contained in the facial image to achieve the purpose of privacy protection can be obtained. Subsequently, based on the above facial attribute recognition model and the privacy protection processing model based on facial attribute adversarial, the facial attribute information of the facial image in actual application can be subjected to privacy protection processing. For details, please refer to the processing of the following steps S210 to S220.
[0056] In step S210, a target facial image to be recognized is obtained.
[0057] In practice, a user's facial image can be obtained through a variety of different methods, the specific methods of which can be found in the relevant content above. The obtained user's facial image can then be analyzed to determine the region of the user's face within the facial image. This region can then be separated from the facial image, and the separated image can serve as the target facial image to be identified.
[0058] In step S212, the target facial image is input into a pre-trained facial attribute recognition model, and the facial attribute recognition model is used to perform attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image. The target attribute recognition model is obtained by model training based on a training sample set including a preset number of facial attributes.
[0059] In step S214, based on the attribute category corresponding to the above-mentioned facial attribute information, differential privacy processing is performed on the facial attribute information corresponding to the attribute category using the differential privacy algorithm corresponding to the attribute category to obtain privacy protection attribute information corresponding to the facial attribute information.
[0060] Differential privacy processing can be a method of randomizing the data by adding noise that satisfies a certain information distribution. Differential privacy processing can include various different processing mechanisms, such as differential privacy based on the Laplace mechanism and differential privacy based on exponentials. Attribute categories can be categories corresponding to facial attributes, such as continuous, discrete, or numerical or non-numerical, and can be set based on actual circumstances.
[0061] During implementation, differential privacy algorithms corresponding to different attribute categories can be pre-selected and set according to actual conditions. For example, the numerical type corresponds to the differential privacy processing based on the Laplace mechanism, the non-numerical type corresponds to the differential privacy processing based on the exponential mechanism, or the continuous type corresponds to the differential privacy processing based on the Laplace mechanism, and the discrete type corresponds to the differential privacy processing based on the exponential mechanism. Then, based on the above correspondence, the corresponding differential privacy algorithm (i.e., the differential privacy algorithm based on the Laplace mechanism or the differential privacy algorithm based on the exponential mechanism, etc.) can be determined for each attribute category in the above facial attribute information. The differential privacy algorithm corresponding to the attribute category can be used to perform differential privacy processing on the facial attribute information corresponding to the attribute category to obtain the privacy protection attribute information corresponding to the facial attribute information.
[0062] There are many specific processing methods for the above step S214. An optional processing method is provided below, which may specifically include the processing of the following steps A2 and A4.
[0063] In step A2, first facial attribute information of the continuous attribute type is obtained from the facial attribute information.
[0064] In step A4, differential privacy processing is performed on the first facial attribute information using a differential privacy algorithm based on the Laplace mechanism to obtain privacy-preserving attribute information corresponding to the first facial attribute information.
[0065] Among them, the differential privacy algorithm based on the Laplace mechanism includes a Laplace distribution with a location parameter of 0 and a scale parameter of 1.
[0066] In implementation, for continuous first facial attribute information (such as age information, etc.), a differential privacy algorithm based on the Laplace mechanism can be used to add noise data that satisfies the Laplace distribution to the first facial attribute information, thereby obtaining privacy-protected attribute information corresponding to the first facial attribute information. For example, for the first facial attribute information A, after privacy protection, A'=A+L(0,1), where L(0,1) is a Laplace distribution with a position parameter of 0 and a scale parameter of 1.
[0067] There are many specific processing methods for the above step S214. An optional processing method is provided below, which may specifically include the processing of the following steps A6 and A8.
[0068] In step A6, second facial attribute information of discrete attribute type in the facial attribute information is obtained.
[0069] In step A8, differential privacy processing is performed on the second facial attribute information using a differential privacy algorithm based on an exponential mechanism to obtain privacy-preserving attribute information corresponding to the second facial attribute information.
[0070] In implementation, for continuous second facial attribute information (such as whether the person has long eyelashes, etc.), a differential privacy algorithm based on an exponential mechanism can be used to add noise data that satisfies the exponential distribution to the second facial attribute information, thereby obtaining the privacy-protected attribute information corresponding to the second facial attribute information. For example, for the second facial attribute information D, after privacy protection, D'=exp(D / 2*0.25).
[0071] Based on the above different differential privacy algorithms, for the N input facial attribute information {A1, A2, …, AN}, Laplace privacy protection or exponential privacy protection is performed according to the corresponding type of facial attribute information to obtain the privacy-preserving attribute information {A1', A2', …, AN'}.
[0072] In step S216, the facial attribute information is subjected to privacy protection processing by using a privacy protection processing model based on facial attribute adversarial methods to generate privacy protection attribute information corresponding to the facial attribute information.
[0073] In implementation, the facial attribute information can be adjusted based on the trained facial attribute adversarial privacy-preserving processing model to generate privacy-preserving attribute information corresponding to the facial attribute information. Specifically, for a certain input facial attribute information, a loss function L = max(D(O, O')) is used to maximize the similarity (which can be represented by the distance between the two facial recognition features) between the facial recognition features corresponding to the facial attribute information and the facial recognition features corresponding to the facial attribute information output by the facial attribute adversarial privacy-preserving processing model. In other words, by modifying the input facial attribute information, the identity characteristics of the user are weakened, thereby achieving a privacy protection effect. Compared with the input facial attribute information, the new facial attribute information obtained in the above manner is recorded as high-sensitivity attribute information (such as the user's identity information). Ultimately, the result output by the facial attribute adversarial privacy-preserving processing model is the privacy-preserving attribute information corresponding to the facial attribute information.
[0074] After obtaining the privacy protection attribute information through the above-mentioned multiple different privacy protection processing rules, the information to be output can be determined in the following manner. For details, please refer to the processing of the following steps S218 and S220.
[0075] In step S218 , the weight corresponding to the privacy protection attribute information obtained through each privacy protection processing rule is obtained.
[0076] In step S220, based on the obtained weights, the privacy-preserving attribute information obtained through the multiple privacy-preserving processing rules is weightedly summed to obtain the facial attribute information after the privacy-preserving processing, and the facial attribute information after the privacy-preserving processing is output.
[0077] An embodiment of the present specification provides a method for processing facial attributes. By acquiring a target facial image to be identified, the target facial image can be subjected to attribute recognition to obtain facial attribute information corresponding to the target facial image. Then, the facial attribute information can be subjected to privacy protection processing respectively through one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Finally, based on the generated privacy protection attribute information, the facial attribute information subjected to privacy protection processing can be output. In this way, the facial attribute information in the target facial image is subjected to privacy protection processing by combining a plurality of different privacy protection processing rules, so that the facial attribute information in the target facial image is transformed, thereby protecting the user's facial attribute information from being leaked. The above processing method can not only provide a stronger privacy protection strength, but also keep the output distribution (i.e., query accuracy) of the entire facial recognition system almost unchanged.
[0078] In addition, through the privacy protection rules of the Laplace mechanism and the exponential mechanism, combined with the differential privacy mechanism of deep learning, the facial attribute information is perturbed and transformed, thereby providing stronger privacy protection strength. Moreover, the entire system remains almost unchanged in the output distribution (i.e., query accuracy) and can provide better privacy protection effect.
[0079] Example 3
[0080] like Figure 3A and Figure 3B As shown, embodiments of this specification provide a method for processing facial attributes. The method can be executed by a blockchain system, which can be composed of terminal devices and / or servers. The terminal devices can be mobile terminal devices such as mobile phones and tablets, or devices such as personal computers. The server can be an independent server or a server cluster composed of multiple servers. The server can be a backend server for financial services or online shopping services, or a backend server for an application. The method can be applied to related scenarios such as processing facial attribute information in facial images. The method can specifically include the following steps:
[0081] In step S302, privacy protection processing rule information of facial attributes is obtained, a corresponding first smart contract is generated using the privacy protection processing rule information of facial attributes, and the first smart contract is deployed to the blockchain system.
[0082] Among them, the first smart contract can be a computer protocol designed to disseminate, verify or execute a contract in an information-based manner. The first smart contract allows trusted interaction without a third party, and the above-mentioned interaction process is traceable and irreversible. The first smart contract includes an agreement on which the contract participants can execute the rights and obligations agreed upon by the contract participants.
[0083] In implementation, to improve the traceability of the privacy protection processing process for facial attributes, a designated blockchain system can be created or added. In this way, facial attributes can be processed based on the blockchain system. Specifically, a corresponding application can be installed in the blockchain node, and the application can be provided with an input box and / or selection box for information on privacy protection processing rules for facial attributes, and corresponding information can be set in the above input box and / or selection box. The blockchain system can then receive the privacy protection processing rule information for facial attributes. The blockchain system can generate a corresponding first smart contract based on the privacy protection processing rule information for facial attributes and can deploy the first smart contract to the blockchain system. In this way, the blockchain system stores the privacy protection processing rule information for facial attributes and the corresponding first smart contract, and other users cannot tamper with the privacy protection processing rule information for facial attributes and the corresponding first smart contract. Moreover, the blockchain system processes facial attributes through the first smart contract.
[0084] In step S304, a target facial image to be identified is obtained based on the first smart contract.
[0085] In implementation, the first smart contract may be provided with relevant rule information for obtaining the target facial image to be identified. In this way, the corresponding processing mentioned above may be implemented based on the above rule information in the first smart contract. For details, please refer to the above relevant content and will not be repeated here.
[0086] In step S306, attribute recognition is performed on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image.
[0087] In implementation, the first smart contract may be provided with relevant rule information for attribute recognition of the target facial image. In this way, the corresponding processing mentioned above may be implemented based on the above rule information in the first smart contract. For details, please refer to the above related content and will not be repeated here.
[0088] In step S308, based on the first smart contract, privacy protection processing is performed on the facial attribute information through one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information.
[0089] In implementation, the first smart contract may be provided with relevant rule information for performing privacy protection processing on the facial attribute information through one or more different privacy protection processing rules. In this way, the corresponding processing mentioned above can be implemented based on the above rule information in the first smart contract. For details, please refer to the above related content and will not be repeated here.
[0090] In step S310, based on the first smart contract and the generated privacy protection attribute information, the facial attribute information that has undergone privacy protection processing is output.
[0091] During implementation, the first smart contract may be provided with relevant rule information for outputting the facial attribute information processed for privacy protection based on the generated privacy protection attribute information. In this way, the corresponding processing mentioned above may be implemented based on the above rule information in the first smart contract. For details, please refer to the above related content and will not be repeated here.
[0092] The processing of the above-mentioned step S308 can be varied. An optional processing method is provided below, which may specifically include the following: based on the first smart contract, the facial attribute information is subjected to privacy protection processing by a privacy protection processing model based on facial attribute adversarial, and privacy protection attribute information corresponding to the facial attribute information is generated. The privacy protection processing model based on facial attribute adversarial is obtained by training the model using facial attribute sample data and based on a preset loss function.
[0093] During implementation, the first smart contract may be provided with relevant rule information for performing privacy protection processing on the facial attribute information through a privacy protection processing model based on facial attribute confrontation. In this way, the corresponding processing mentioned above can be implemented based on the above rule information in the first smart contract. For details, please refer to the above related content and will not be repeated here.
[0094] The above privacy protection processing model can be obtained in the following way:
[0095] In step B2, facial attribute sample data is obtained based on a second smart contract pre-deployed in the blockchain system, and the facial attribute sample data is input into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data.
[0096] In step B4, based on the second smart contract, the facial attribute sample data is input into the privacy protection processing model based on facial attribute adversarial, and the privacy protection processing model is trained by taking the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model to obtain the trained privacy protection processing model.
[0097] In implementation, the second smart contract can be provided with relevant rule information for obtaining facial attribute sample data, inputting the facial attribute sample data into a pre-trained facial recognition model, and inputting the facial attribute sample data into a privacy protection processing model based on facial attribute adversarial, and training the privacy protection processing model by maximizing the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model. In this way, the above-mentioned corresponding processing can be achieved based on the above-mentioned rule information in the second smart contract. For details, please refer to the above-mentioned relevant content and will not be repeated here.
[0098] The processing of the above-mentioned step S306 can be varied. The following is an optional processing method, which may specifically include the following: based on the first smart contract, the target facial image is input into a pre-trained facial attribute recognition model, and the facial attribute recognition model is used to perform attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image. The target attribute recognition model is obtained by model training based on a training sample set including a preset number of facial attributes.
[0099] In implementation, the first smart contract may be provided with relevant rule information for inputting the target facial image into a pre-trained facial attribute recognition model and performing attribute recognition on the target facial image through the facial attribute recognition model. In this way, the above-mentioned corresponding processing can be implemented based on the above-mentioned rule information in the first smart contract. For details, please refer to the above-mentioned relevant content and will not be repeated here.
[0100] The above facial attribute recognition model can be obtained in the following way:
[0101] In step C2, a training sample set including a preset number of facial attributes is obtained based on a third smart contract pre-deployed in the blockchain system.
[0102] In step C4, based on the third smart contract and a training sample set of facial attributes of a preset number of types, the facial attribute recognition model is trained to obtain a trained facial attribute recognition model. The facial attribute recognition model is constructed through a preset residual network model.
[0103] In implementation, the third smart contract may be provided with relevant rule information for obtaining a training sample set including a preset number of facial attributes, and training a facial attribute recognition model based on the training sample set of the preset number of facial attributes. In this way, the corresponding processing mentioned above can be implemented based on the above rule information in the third smart contract. For details, please refer to the above related content and will not be repeated here.
[0104] For the specific processing of the above steps S304 to S310, please refer to the relevant content in the above embodiments 1 to 2. That is, the various processing involved in the above embodiments 1 to 2 can be implemented through the corresponding smart contract.
[0105] The embodiments of this specification provide a facial attribute processing method, which is applied to a blockchain system. By obtaining a target facial image to be identified, the target facial image can be subjected to attribute recognition to obtain facial attribute information corresponding to the target facial image. Then, the facial attribute information can be subjected to privacy protection processing respectively through one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Finally, based on the generated privacy protection attribute information, the facial attribute information subjected to privacy protection processing can be output. In this way, the facial attribute information in the target facial image is subjected to privacy protection processing by combining a plurality of different privacy protection processing rules, so that the facial attribute information in the target facial image is transformed, thereby protecting the user's facial attribute information from being leaked. The above processing method can not only provide a stronger privacy protection strength, but also keep the output distribution (i.e., query accuracy) of the entire facial recognition system almost unchanged.
[0106] In addition, through the privacy protection rules of the Laplace mechanism and the exponential mechanism, combined with the differential privacy mechanism of deep learning, the facial attribute information is perturbed and transformed, thereby providing stronger privacy protection strength. Moreover, the entire system remains almost unchanged in the output distribution (i.e., query accuracy) and can provide better privacy protection effect.
[0107] Example 4
[0108] The above is a method for processing facial attributes provided by the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a device for processing facial attributes, such as Figure 4 shown.
[0109] The facial attribute processing device includes: a facial image acquisition module 401, a facial attribute recognition module 402, a privacy protection module 403 and a facial attribute output module 404, wherein:
[0110] The facial image acquisition module 401 acquires the target facial image to be identified;
[0111] The facial attribute recognition module 402 performs attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image;
[0112] The privacy protection module 403 performs privacy protection processing on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information;
[0113] The facial attribute output module 404 outputs the facial attribute information that has undergone privacy protection processing based on the generated privacy protection attribute information.
[0114] In an embodiment of this specification, the privacy protection module 403 performs differential privacy processing on the facial attribute information corresponding to the attribute category using a differential privacy algorithm corresponding to the attribute category based on the attribute category corresponding to the facial attribute information, to obtain privacy protection attribute information corresponding to the facial attribute information.
[0115] In the embodiment of this specification, the privacy protection module 403 includes:
[0116] a first attribute acquisition unit, acquiring first facial attribute information of which the attribute category is continuous from the facial attribute information;
[0117] The first privacy protection unit performs differential privacy processing on the first facial attribute information using a differential privacy algorithm based on the Laplace mechanism to obtain privacy protection attribute information corresponding to the first facial attribute information.
[0118] In the embodiments of this specification, the differential privacy algorithm based on the Laplace mechanism includes a Laplace distribution with a position parameter of 0 and a scale parameter of 1.
[0119] In the embodiment of this specification, the privacy protection module 403 includes:
[0120] a second attribute acquisition unit, acquiring second facial attribute information of which the attribute category is discrete in the facial attribute information;
[0121] The second privacy protection unit performs differential privacy processing on the second facial attribute information using a differential privacy algorithm based on an exponential mechanism to obtain privacy protection attribute information corresponding to the second facial attribute information.
[0122] In an embodiment of the present specification, the privacy protection module 403 performs privacy protection processing on the facial attribute information through a privacy protection processing model based on facial attribute adversarial analysis to generate privacy protection attribute information corresponding to the facial attribute information. The privacy protection processing model based on facial attribute adversarial analysis is obtained by training the model using facial attribute sample data and based on a preset loss function.
[0123] In the embodiment of this specification, the device further includes:
[0124] A first sample acquisition module acquires facial attribute sample data and inputs the facial attribute sample data into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data;
[0125] The first model training module inputs the facial attribute sample data into the privacy protection processing model based on facial attribute adversarial, and trains the privacy protection processing model by maximizing the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model to obtain a trained privacy protection processing model.
[0126] In an embodiment of the present specification, the facial attribute recognition module 402 inputs the target facial image into a pre-trained facial attribute recognition model, performs attribute recognition on the target facial image through the facial attribute recognition model, and obtains facial attribute information corresponding to the target facial image. The target attribute recognition model is obtained by model training based on a training sample set including a preset number of facial attributes.
[0127] In the embodiment of this specification, the device further includes:
[0128] A second sample acquisition module acquires a training sample set including a preset number of facial attributes;
[0129] The second model training module performs model training on the facial attribute recognition model based on a training sample set of a preset number of facial attributes to obtain a trained facial attribute recognition model, wherein the facial attribute recognition model is constructed through a preset residual network model.
[0130] In the embodiment of this specification, the training sample set is a CelebA data sample set, and the preset number is 40.
[0131] In the embodiment of this specification, the privacy protection attribute information is obtained by performing privacy protection processing on the facial attribute information using a plurality of different privacy protection processing rules. The facial attribute output module 404 includes:
[0132] a weight obtaining unit, which obtains the weight corresponding to the privacy protection attribute information obtained by each privacy protection processing rule;
[0133] The facial attribute output unit performs weighted summation on the privacy protection attribute information obtained through the multiple privacy protection processing rules based on the acquired weights to obtain the facial attribute information after privacy protection processing, and outputs the facial attribute information after privacy protection processing.
[0134] An embodiment of the present specification provides a facial attribute processing device. By acquiring a target facial image to be identified, the target facial image can be subjected to attribute recognition to obtain facial attribute information corresponding to the target facial image. Then, the facial attribute information can be subjected to privacy protection processing respectively through one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Finally, based on the generated privacy protection attribute information, the facial attribute information subjected to privacy protection processing can be output. In this way, the facial attribute information in the target facial image is subjected to privacy protection processing by combining a plurality of different privacy protection processing rules, so that the facial attribute information in the target facial image is transformed, thereby protecting the user's facial attribute information from being leaked. The above processing method can not only provide a stronger privacy protection strength, but also keep the output distribution (i.e., query accuracy) of the entire facial recognition system almost unchanged.
[0135] In addition, through the privacy protection rules of the Laplace mechanism and the exponential mechanism, combined with the differential privacy mechanism of deep learning, the facial attribute information is perturbed and transformed, thereby providing stronger privacy protection strength. Moreover, the entire system remains almost unchanged in the output distribution (i.e., query accuracy) and can provide better privacy protection effect.
[0136] Example 5
[0137] Based on the same idea, the embodiment of this specification also provides a facial attribute processing device, which is a device in the blockchain system, such as Figure 5 shown.
[0138] The facial attribute processing device includes: a contract deployment module 501, a facial image acquisition module 502, a facial attribute recognition module 503, a privacy protection module 504 and a facial attribute output module 505, wherein:
[0139] A contract deployment module 501 obtains privacy protection processing rule information for facial attributes, generates a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploys the first smart contract into the blockchain system;
[0140] A facial image acquisition module 502 acquires a target facial image to be identified based on the first smart contract;
[0141] A facial attribute recognition module 503 performs attribute recognition on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image;
[0142] The privacy protection module 504 performs privacy protection processing on the facial attribute information based on the first smart contract and uses one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information;
[0143] The facial attribute output module 505 outputs the facial attribute information processed with privacy protection based on the first smart contract and the generated privacy protection attribute information.
[0144] In an embodiment of the present specification, the privacy protection module 504, based on the first smart contract, performs privacy protection processing on the facial attribute information through a privacy protection processing model based on facial attribute adversarial, and generates privacy protection attribute information corresponding to the facial attribute information. The privacy protection processing model based on facial attribute adversarial is obtained by training the model through facial attribute sample data and based on a preset loss function.
[0145] In the embodiment of this specification, the device further includes:
[0146] a first sample acquisition module, which acquires facial attribute sample data based on a second smart contract pre-deployed in the blockchain system, and inputs the facial attribute sample data into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data;
[0147] The first model training module inputs the facial attribute sample data into the privacy protection processing model based on facial attribute adversarial based on the second smart contract, and trains the privacy protection processing model by maximizing the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model to obtain a trained privacy protection processing model.
[0148] In an embodiment of the present specification, the facial attribute recognition module 503 inputs the target facial image into a pre-trained facial attribute recognition model based on the first smart contract, performs attribute recognition on the target facial image through the facial attribute recognition model, and obtains facial attribute information corresponding to the target facial image. The target attribute recognition model is obtained by model training based on a training sample set including a preset number of facial attributes.
[0149] In the embodiment of this specification, the device further includes:
[0150] A second sample acquisition module acquires a training sample set including a preset number of facial attributes based on a third smart contract pre-deployed in the blockchain system;
[0151] The second model training module performs model training on the facial attribute recognition model based on the third smart contract and a training sample set of a preset number of facial attributes to obtain a trained facial attribute recognition model, wherein the facial attribute recognition model is constructed using a preset residual network model.
[0152] An embodiment of the present specification provides a facial attribute processing device. By acquiring a target facial image to be identified, the target facial image can be subjected to attribute recognition to obtain facial attribute information corresponding to the target facial image. Then, the facial attribute information can be subjected to privacy protection processing respectively through one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Finally, based on the generated privacy protection attribute information, the facial attribute information subjected to privacy protection processing can be output. In this way, the facial attribute information in the target facial image is subjected to privacy protection processing by combining a plurality of different privacy protection processing rules, so that the facial attribute information in the target facial image is transformed, thereby protecting the user's facial attribute information from being leaked. The above processing method can not only provide a stronger privacy protection strength, but also keep the output distribution (i.e., query accuracy) of the entire facial recognition system almost unchanged.
[0153] In addition, through the privacy protection rules of the Laplace mechanism and the exponential mechanism, combined with the differential privacy mechanism of deep learning, the facial attribute information is perturbed and transformed, thereby providing stronger privacy protection strength. Moreover, the entire system remains almost unchanged in the output distribution (i.e., query accuracy) and can provide better privacy protection effect.
[0154] Example 6
[0155] The above is a facial attribute processing device provided by the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a facial attribute processing device, such as Figure 6 shown.
[0156] The facial attribute processing device may provide a terminal device, a server, or a device in a blockchain system, etc. for the above-mentioned embodiment.
[0157] The facial attribute processing device may vary significantly due to different configurations or performance. It may include one or more processors 601 and memory 602. Memory 602 may store one or more applications or data. Memory 602 may be either ephemeral or persistent. The applications stored in memory 602 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for the facial attribute processing device. Furthermore, processor 601 may be configured to communicate with memory 602, allowing the facial attribute processing device to execute the series of computer-executable instructions in memory 602. The facial attribute processing device may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input / output interfaces 605, and one or more keyboards 606.
[0158] Specifically, in this embodiment, the facial attribute processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the facial attribute processing device, and the one or more programs are configured to be executed by one or more processors, including computer-executable instructions for performing the following:
[0159] Obtaining a target facial image to be recognized;
[0160] Performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image;
[0161] performing privacy protection processing on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information;
[0162] Based on the generated privacy protection attribute information, the facial attribute information that has undergone privacy protection processing is output.
[0163] In the embodiments of this specification, the facial attribute information is subjected to privacy protection processing by one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information, including:
[0164] Based on the attribute category corresponding to the facial attribute information, differential privacy processing is performed on the facial attribute information corresponding to the attribute category using a differential privacy algorithm corresponding to the attribute category to obtain privacy protection attribute information corresponding to the facial attribute information.
[0165] In the embodiment of this specification, based on the attribute category corresponding to the facial attribute information, differential privacy processing is performed on the facial attribute information corresponding to the attribute category using a differential privacy algorithm corresponding to the attribute category to obtain privacy-preserving attribute information corresponding to the facial attribute information, including:
[0166] Acquire first facial attribute information of which the attribute category is continuous in the facial attribute information;
[0167] A differential privacy algorithm based on the Laplace mechanism is used to perform differential privacy processing on the first facial attribute information to obtain privacy protection attribute information corresponding to the first facial attribute information.
[0168] In the embodiments of this specification, the differential privacy algorithm based on the Laplace mechanism includes a Laplace distribution with a position parameter of 0 and a scale parameter of 1.
[0169] In the embodiment of this specification, based on the attribute category corresponding to the facial attribute information, differential privacy processing is performed on the facial attribute information corresponding to the attribute category using a differential privacy algorithm corresponding to the attribute category to obtain privacy-preserving attribute information corresponding to the facial attribute information, including:
[0170] Acquire second facial attribute information in which the attribute category is discrete in the facial attribute information;
[0171] A differential privacy algorithm based on an exponential mechanism is used to perform differential privacy processing on the second facial attribute information to obtain privacy protection attribute information corresponding to the second facial attribute information.
[0172] In the embodiments of this specification, the facial attribute information is subjected to privacy protection processing by one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information, including:
[0173] The facial attribute information is subjected to privacy protection processing by a privacy protection processing model based on facial attribute adversarial measures to generate privacy protection attribute information corresponding to the facial attribute information. The privacy protection processing model based on facial attribute adversarial measures is obtained by training the model using facial attribute sample data and based on a preset loss function.
[0174] In the embodiment of this specification, it also includes:
[0175] Acquire facial attribute sample data, and input the facial attribute sample data into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data;
[0176] The facial attribute sample data is input into the privacy protection processing model based on facial attribute adversarial, and the privacy protection processing model is trained by taking the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model to obtain the trained privacy protection processing model.
[0177] In the embodiment of this specification, performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image includes:
[0178] The target facial image is input into a pre-trained facial attribute recognition model, and the facial attribute recognition model is used to perform attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image. The target attribute recognition model is obtained by model training based on a training sample set including a preset number of facial attributes.
[0179] In the embodiments of this specification, further comprising:
[0180] Obtaining a training sample set including a preset number of facial attributes;
[0181] Based on a training sample set of facial attributes of a preset number of types, the facial attribute recognition model is trained to obtain a trained facial attribute recognition model, wherein the facial attribute recognition model is constructed through a preset residual network model.
[0182] In the embodiment of this specification, the training sample set is a CelebA data sample set, and the preset number is 40.
[0183] In the embodiment of this specification, the privacy protection attribute information is obtained by performing privacy protection processing on the facial attribute information using a variety of different privacy protection processing rules.
[0184] Outputting the facial attribute information processed for privacy protection based on the generated privacy protection attribute information includes:
[0185] Obtaining a weight corresponding to the privacy protection attribute information obtained through each of the privacy protection processing rules;
[0186] Based on the obtained weights, the privacy protection attribute information obtained through the multiple privacy protection processing rules is weightedly summed to obtain the facial attribute information after privacy protection processing, and the facial attribute information after privacy protection processing is output.
[0187] Furthermore, specifically in this embodiment, the facial attribute processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the facial attribute processing device, and the one or more programs are configured to be executed by one or more processors, including computer-executable instructions for performing the following:
[0188] Obtaining privacy protection processing rule information for facial attributes, generating a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploying the first smart contract into the blockchain system;
[0189] Acquire a target facial image to be identified based on the first smart contract;
[0190] Performing attribute recognition on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image;
[0191] Based on the first smart contract, perform privacy protection processing on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information;
[0192] Based on the first smart contract and the generated privacy-preserving attribute information, the facial attribute information processed after privacy protection is output.
[0193] In the embodiment of this specification, based on the first smart contract, the facial attribute information is subjected to privacy protection processing by one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information, including:
[0194] Based on the first smart contract, the facial attribute information is subjected to privacy protection processing by a privacy protection processing model based on facial attribute adversarial measures to generate privacy protection attribute information corresponding to the facial attribute information. The privacy protection processing model based on facial attribute adversarial measures is obtained by training the model using facial attribute sample data and based on a preset loss function.
[0195] In the embodiments of this specification, further comprising:
[0196] Obtaining facial attribute sample data based on a second smart contract pre-deployed in the blockchain system, and inputting the facial attribute sample data into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data;
[0197] Based on the second smart contract, the facial attribute sample data is input into the privacy protection processing model based on facial attribute adversarial, and the privacy protection processing model is trained by taking maximizing the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model to obtain a trained privacy protection processing model.
[0198] In the embodiment of this specification, the attribute recognition of the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image includes:
[0199] Based on the first smart contract, the target facial image is input into a pre-trained facial attribute recognition model, and attributes of the target facial image are recognized by the facial attribute recognition model to obtain facial attribute information corresponding to the target facial image. The target attribute recognition model is obtained by model training based on a training sample set including a preset number of facial attributes.
[0200] In the embodiment of this specification, it also includes:
[0201] Obtaining a training sample set including a preset number of facial attributes based on a third smart contract pre-deployed in the blockchain system;
[0202] Based on the third smart contract and a training sample set of facial attributes of a preset number of types, the facial attribute recognition model is trained to obtain a trained facial attribute recognition model, where the facial attribute recognition model is constructed using a preset residual network model.
[0203] An embodiment of the present specification provides a facial attribute processing device. By acquiring a target facial image to be identified, the target facial image can be subjected to attribute recognition to obtain facial attribute information corresponding to the target facial image. Then, the facial attribute information can be subjected to privacy protection processing respectively through one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Finally, based on the generated privacy protection attribute information, the facial attribute information subjected to privacy protection processing can be output. In this way, the facial attribute information in the target facial image is subjected to privacy protection processing by combining a plurality of different privacy protection processing rules, so that the facial attribute information in the target facial image is transformed, thereby protecting the user's facial attribute information from being leaked. The above processing method can not only provide a stronger privacy protection strength, but also keep the output distribution (i.e., query accuracy) of the entire facial recognition system almost unchanged.
[0204] In addition, through the privacy protection rules of the Laplace mechanism and the exponential mechanism, combined with the differential privacy mechanism of deep learning, the facial attribute information is perturbed and transformed, thereby providing stronger privacy protection strength. Moreover, the entire system remains almost unchanged in the output distribution (i.e., query accuracy) and can provide better privacy protection effect.
[0205] Example 7
[0206] Furthermore, based on the above Figures 1 to 3B In one or more embodiments of the present specification, a storage medium is provided for storing computer-executable instruction information. In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer-executable instruction information stored in the storage medium is executed by a processor, the following process can be implemented:
[0207] Obtaining a target facial image to be recognized;
[0208] Performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image;
[0209] performing privacy protection processing on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information;
[0210] Based on the generated privacy protection attribute information, the facial attribute information that has undergone privacy protection processing is output.
[0211] In the embodiments of this specification, the facial attribute information is subjected to privacy protection processing by one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information, including:
[0212] Based on the attribute category corresponding to the facial attribute information, differential privacy processing is performed on the facial attribute information corresponding to the attribute category using a differential privacy algorithm corresponding to the attribute category to obtain privacy protection attribute information corresponding to the facial attribute information.
[0213] In the embodiment of this specification, based on the attribute category corresponding to the facial attribute information, differential privacy processing is performed on the facial attribute information corresponding to the attribute category using a differential privacy algorithm corresponding to the attribute category to obtain privacy-preserving attribute information corresponding to the facial attribute information, including:
[0214] Acquire first facial attribute information of which the attribute category is continuous in the facial attribute information;
[0215] A differential privacy algorithm based on the Laplace mechanism is used to perform differential privacy processing on the first facial attribute information to obtain privacy protection attribute information corresponding to the first facial attribute information.
[0216] In the embodiments of this specification, the differential privacy algorithm based on the Laplace mechanism includes a Laplace distribution with a position parameter of 0 and a scale parameter of 1.
[0217] In the embodiment of this specification, based on the attribute category corresponding to the facial attribute information, differential privacy processing is performed on the facial attribute information corresponding to the attribute category using a differential privacy algorithm corresponding to the attribute category to obtain privacy-preserving attribute information corresponding to the facial attribute information, including:
[0218] Acquire second facial attribute information in which the attribute category is discrete in the facial attribute information;
[0219] A differential privacy algorithm based on an exponential mechanism is used to perform differential privacy processing on the second facial attribute information to obtain privacy protection attribute information corresponding to the second facial attribute information.
[0220] In the embodiments of this specification, the facial attribute information is subjected to privacy protection processing by one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information, including:
[0221] The facial attribute information is subjected to privacy protection processing by a privacy protection processing model based on facial attribute adversarial measures to generate privacy protection attribute information corresponding to the facial attribute information. The privacy protection processing model based on facial attribute adversarial measures is obtained by training the model using facial attribute sample data and based on a preset loss function.
[0222] In the embodiment of this specification, it also includes:
[0223] Acquire facial attribute sample data, and input the facial attribute sample data into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data;
[0224] The facial attribute sample data is input into the privacy protection processing model based on facial attribute adversarial, and the privacy protection processing model is trained by taking the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model to obtain the trained privacy protection processing model.
[0225] In the embodiment of this specification, performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image includes:
[0226] The target facial image is input into a pre-trained facial attribute recognition model, and the facial attribute recognition model is used to perform attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image. The target attribute recognition model is obtained by model training based on a training sample set including a preset number of facial attributes.
[0227] In the embodiments of this specification, further comprising:
[0228] Obtaining a training sample set including a preset number of facial attributes;
[0229] Based on a training sample set of facial attributes of a preset number of types, the facial attribute recognition model is trained to obtain a trained facial attribute recognition model, wherein the facial attribute recognition model is constructed through a preset residual network model.
[0230] In the embodiment of this specification, the training sample set is a CelebA data sample set, and the preset number is 40.
[0231] In the embodiment of this specification, the privacy protection attribute information is obtained by performing privacy protection processing on the facial attribute information using a variety of different privacy protection processing rules.
[0232] Outputting the facial attribute information processed for privacy protection based on the generated privacy protection attribute information includes:
[0233] Obtaining a weight corresponding to the privacy protection attribute information obtained through each of the privacy protection processing rules;
[0234] Based on the obtained weights, the privacy protection attribute information obtained through the multiple privacy protection processing rules is weightedly summed to obtain the facial attribute information after privacy protection processing, and the facial attribute information after privacy protection processing is output.
[0235] Furthermore, in another specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc., and the computer executable instruction information stored in the storage medium, when executed by the processor, can implement the following process:
[0236] Obtaining privacy protection processing rule information for facial attributes, generating a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploying the first smart contract into the blockchain system;
[0237] Acquire a target facial image to be identified based on the first smart contract;
[0238] Performing attribute recognition on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image;
[0239] Based on the first smart contract, perform privacy protection processing on the facial attribute information using one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information;
[0240] Based on the first smart contract and the generated privacy-preserving attribute information, the facial attribute information processed after privacy protection is output.
[0241] In the embodiment of this specification, based on the first smart contract, the facial attribute information is subjected to privacy protection processing by one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information, including:
[0242] Based on the first smart contract, the facial attribute information is subjected to privacy protection processing by a privacy protection processing model based on facial attribute adversarial measures to generate privacy protection attribute information corresponding to the facial attribute information. The privacy protection processing model based on facial attribute adversarial measures is obtained by training the model using facial attribute sample data and based on a preset loss function.
[0243] In the embodiments of this specification, further comprising:
[0244] Obtaining facial attribute sample data based on a second smart contract pre-deployed in the blockchain system, and inputting the facial attribute sample data into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data;
[0245] Based on the second smart contract, the facial attribute sample data is input into the privacy protection processing model based on facial attribute adversarial, and the privacy protection processing model is trained by taking maximizing the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model to obtain a trained privacy protection processing model.
[0246] In the embodiment of this specification, the attribute recognition of the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image includes:
[0247] Based on the first smart contract, the target facial image is input into a pre-trained facial attribute recognition model, and attributes of the target facial image are recognized by the facial attribute recognition model to obtain facial attribute information corresponding to the target facial image. The target attribute recognition model is obtained by model training based on a training sample set including a preset number of facial attributes.
[0248] In the embodiment of this specification, it also includes:
[0249] Obtaining a training sample set including a preset number of facial attributes based on a third smart contract pre-deployed in the blockchain system;
[0250] Based on the third smart contract and a training sample set of facial attributes of a preset number of types, the facial attribute recognition model is trained to obtain a trained facial attribute recognition model, where the facial attribute recognition model is constructed using a preset residual network model.
[0251] An embodiment of the present specification provides a storage medium. By acquiring a target facial image to be identified, the target facial image can be subjected to attribute recognition to obtain facial attribute information corresponding to the target facial image. Then, the facial attribute information can be subjected to privacy protection processing respectively through one or more different privacy protection processing rules to generate privacy protection attribute information corresponding to the facial attribute information. Finally, based on the generated privacy protection attribute information, the facial attribute information subjected to privacy protection processing can be output. In this way, the facial attribute information in the target facial image is subjected to privacy protection processing by combining a plurality of different privacy protection processing rules, so that the facial attribute information in the target facial image is transformed, thereby protecting the user's facial attribute information from being leaked. The above processing method can not only provide a stronger privacy protection strength, but also keep the output distribution (i.e., query accuracy) of the entire facial recognition system almost unchanged.
[0252] In addition, through the privacy protection rules of the Laplace mechanism and the exponential mechanism, combined with the differential privacy mechanism of deep learning, the facial attribute information is perturbed and transformed, thereby providing stronger privacy protection strength. Moreover, the entire system remains almost unchanged in the output distribution (i.e., query accuracy) and can provide better privacy protection effect.
[0253] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0254] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures such as diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, 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 will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0255] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, 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: ARC625D, 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 will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the means for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as both a software module implementing the method and a structure within the hardware component.
[0256] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having 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 smartphone, 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.
[0257] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0258] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, one or more embodiments of 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 magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0259] The embodiments of this specification are 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 fraud case serial and parallel device to produce a machine, so that the instructions executed by the processor of the computer or other programmable fraud case serial and parallel device generate instructions for implementing the process in the process. 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.
[0260] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable fraud case serial and parallel 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, the instruction device being implemented in the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0261] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0262] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0263] 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. Memory is an example of a computer-readable medium.
[0264] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The 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 disc read-only memory (CD-ROM), digital versatile disc (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 transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0265] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0266] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, one or more embodiments of this specification may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, one or more embodiments of 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 magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0267] One or more embodiments of 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, and the like that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0268] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0269] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A method for processing facial attributes, the method comprising: Obtaining a target facial image to be recognized; Performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image; Performing differential privacy processing on first facial attribute information of the facial attribute information whose attribute category is continuous using a differential privacy algorithm based on a Laplace mechanism to obtain privacy-preserving attribute information corresponding to the first facial attribute information; performing differential privacy processing on second facial attribute information of the facial attribute information of the facial attribute information whose attribute category is discrete using a differential privacy algorithm based on an exponential mechanism to obtain privacy-preserving attribute information corresponding to the second facial attribute information; performing privacy protection processing on the facial attribute information using a privacy protection processing model based on facial attribute adversarial analysis to generate privacy protection attribute information corresponding to the facial attribute information, wherein the privacy protection processing model based on facial attribute adversarial analysis is obtained by training the model using facial attribute sample data and based on a preset loss function; Based on the generated privacy protection attribute information, the facial attribute information that has undergone privacy protection processing is output.
2. The method according to claim 1, wherein the differential privacy algorithm based on the Laplace mechanism includes a Laplace distribution with a position parameter of 0 and a scale parameter of 1.
3. The method according to claim 1, further comprising: Acquire facial attribute sample data, and input the facial attribute sample data into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data; The facial attribute sample data is input into the privacy protection processing model based on facial attribute adversarial, and the privacy protection processing model is trained by taking the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model to obtain the trained privacy protection processing model.
4. The method according to claim 1, wherein the step of performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image comprises: The target facial image is input into a pre-trained facial attribute recognition model, and the facial attribute recognition model is used to perform attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image. The facial attribute recognition model is trained based on a training sample set including a preset number of facial attributes.
5. The method according to claim 4, further comprising: Obtaining a training sample set including a preset number of facial attributes; Based on a training sample set of facial attributes of a preset number of types, the facial attribute recognition model is trained to obtain a trained facial attribute recognition model, wherein the facial attribute recognition model is constructed through a preset residual network model.
6. The method according to claim 5, wherein the training sample set is a CelebA data sample set, and the number of preset categories is 40.
7. The method according to claim 1, wherein the privacy protection attribute information is obtained by performing privacy protection processing on the facial attribute information using a plurality of different privacy protection processing rules. Outputting the facial attribute information processed for privacy protection based on the generated privacy protection attribute information includes: Obtaining a weight corresponding to the privacy protection attribute information obtained through each of the privacy protection processing rules; Based on the obtained weights, the privacy protection attribute information obtained through the multiple privacy protection processing rules is weightedly summed to obtain the facial attribute information after privacy protection processing, and the facial attribute information after privacy protection processing is output.
8. A method for processing facial attributes, applied to a blockchain system, comprising: Obtaining privacy protection processing rule information for facial attributes, generating a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploying the first smart contract into the blockchain system; Acquire a target facial image to be identified based on the first smart contract; Performing attribute recognition on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image; Based on the first smart contract, differential privacy processing is performed on first facial attribute information of the facial attribute information whose attribute category is continuous using a differential privacy algorithm based on the Laplace mechanism to obtain privacy-preserving attribute information corresponding to the first facial attribute information. Differential privacy processing is performed on second facial attribute information of the facial attribute information of the facial attribute information whose attribute category is discrete using a differential privacy algorithm based on the exponential mechanism to obtain privacy-preserving attribute information corresponding to the second facial attribute information. Based on the first smart contract, performing privacy protection processing on the facial attribute information using a privacy protection processing model based on facial attribute adversarial means to generate privacy protection attribute information corresponding to the facial attribute information, wherein the privacy protection processing model based on facial attribute adversarial means is trained using facial attribute sample data and a preset loss function; Based on the first smart contract and the generated privacy-preserving attribute information, the facial attribute information processed after privacy protection is output.
9. The method according to claim 8, further comprising: Obtaining facial attribute sample data based on a second smart contract pre-deployed in the blockchain system, and inputting the facial attribute sample data into a pre-trained facial recognition model to obtain facial recognition features corresponding to the facial attribute sample data; Based on the second smart contract, the facial attribute sample data is input into the privacy protection processing model based on facial attribute adversarial, and the privacy protection processing model is trained by taking maximizing the similarity between the facial recognition features corresponding to the facial attribute sample data and the facial recognition features corresponding to the facial attribute information output by the privacy protection processing model as the loss function of the privacy protection processing model to obtain a trained privacy protection processing model.
10. The method according to claim 8, wherein the step of performing attribute recognition on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image comprises: Based on the first smart contract, the target facial image is input into a pre-trained facial attribute recognition model, and attributes of the target facial image are recognized by the facial attribute recognition model to obtain facial attribute information corresponding to the target facial image. The facial attribute recognition model is trained based on a training sample set including a preset number of facial attributes.
11. The method according to claim 10, further comprising: Obtaining a training sample set including a preset number of facial attributes based on a third smart contract pre-deployed in the blockchain system; Based on the third smart contract and a training sample set of facial attributes of a preset number of types, the facial attribute recognition model is trained to obtain a trained facial attribute recognition model, where the facial attribute recognition model is constructed using a preset residual network model.
12. A facial attribute processing device, comprising: A facial image acquisition module acquires the target facial image to be identified; A facial attribute recognition module performs attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image; A privacy protection module, which uses a differential privacy algorithm based on a Laplace mechanism to perform differential privacy processing on first facial attribute information with a continuous attribute category in the facial attribute information to obtain privacy-protected attribute information corresponding to the first facial attribute information; and uses a differential privacy algorithm based on an exponential mechanism to perform differential privacy processing on second facial attribute information with a discrete attribute category in the facial attribute information to obtain privacy-protected attribute information corresponding to the second facial attribute information; performs privacy protection processing on the facial attribute information using a privacy protection processing model based on facial attribute adversarial to generate privacy-protected attribute information corresponding to the facial attribute information, wherein the privacy protection processing model based on facial attribute adversarial is obtained by training the model using facial attribute sample data and based on a preset loss function; The facial attribute output module outputs the facial attribute information processed for privacy protection based on the generated privacy protection attribute information.
13. A facial attribute processing device, the device being a device in a blockchain system, the device comprising: a contract deployment module for obtaining privacy protection processing rule information for facial attributes, generating a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploying the first smart contract into the blockchain system; A facial image acquisition module, which acquires a target facial image to be identified based on the first smart contract; a facial attribute recognition module, performing attribute recognition on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image; The privacy protection module, based on the first smart contract, uses a differential privacy algorithm based on the Laplace mechanism to perform differential privacy processing on first facial attribute information with a continuous attribute category in the facial attribute information to obtain privacy-protected attribute information corresponding to the first facial attribute information, and uses a differential privacy algorithm based on the exponential mechanism to perform differential privacy processing on second facial attribute information with a discrete attribute category in the facial attribute information to obtain privacy-protected attribute information corresponding to the second facial attribute information; based on the first smart contract, performs privacy protection processing on the facial attribute information using a privacy protection processing model based on facial attribute adversarial to generate privacy-protected attribute information corresponding to the facial attribute information, wherein the privacy protection processing model based on facial attribute adversarial is obtained by training the model using facial attribute sample data and a preset loss function; A facial attribute output module outputs the facial attribute information processed with privacy protection based on the first smart contract and the generated privacy protection attribute information.
14. A facial attribute processing device, comprising: processor; as well as a memory arranged to store computer-executable instructions which, when executed, cause the processor to: Obtaining a target facial image to be recognized; Performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image; Performing differential privacy processing on first facial attribute information of the facial attribute information whose attribute category is continuous using a differential privacy algorithm based on a Laplace mechanism to obtain privacy-preserving attribute information corresponding to the first facial attribute information; performing differential privacy processing on second facial attribute information of the facial attribute information of the facial attribute information whose attribute category is discrete using a differential privacy algorithm based on an exponential mechanism to obtain privacy-preserving attribute information corresponding to the second facial attribute information; performing privacy protection processing on the facial attribute information using a privacy protection processing model based on facial attribute adversarial analysis to generate privacy protection attribute information corresponding to the facial attribute information, wherein the privacy protection processing model based on facial attribute adversarial analysis is obtained by training the model using facial attribute sample data and based on a preset loss function; Based on the generated privacy protection attribute information, the facial attribute information that has undergone privacy protection processing is output.
15. A facial attribute processing device, the device being a device in a blockchain system, the facial attribute processing device comprising: processor; as well as a memory arranged to store computer-executable instructions which, when executed, cause the processor to: Obtaining privacy protection processing rule information for facial attributes, generating a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploying the first smart contract into the blockchain system; Acquire a target facial image to be identified based on the first smart contract; Performing attribute recognition on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image; Based on the first smart contract, differential privacy processing is performed on first facial attribute information of the facial attribute information whose attribute category is continuous using a differential privacy algorithm based on the Laplace mechanism to obtain privacy-preserving attribute information corresponding to the first facial attribute information. Differential privacy processing is performed on second facial attribute information of the facial attribute information of the facial attribute information whose attribute category is discrete using a differential privacy algorithm based on the exponential mechanism to obtain privacy-preserving attribute information corresponding to the second facial attribute information. Based on the first smart contract, performing privacy protection processing on the facial attribute information using a privacy protection processing model based on facial attribute adversarial means to generate privacy protection attribute information corresponding to the facial attribute information, wherein the privacy protection processing model based on facial attribute adversarial means is trained using facial attribute sample data and a preset loss function; Based on the first smart contract and the generated privacy-preserving attribute information, the facial attribute information processed after privacy protection is output.
16. A storage medium for storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the following process: Obtaining a target facial image to be recognized; Performing attribute recognition on the target facial image to obtain facial attribute information corresponding to the target facial image; Performing differential privacy processing on first facial attribute information of the facial attribute information whose attribute category is continuous using a differential privacy algorithm based on a Laplace mechanism to obtain privacy-preserving attribute information corresponding to the first facial attribute information; performing differential privacy processing on second facial attribute information of the facial attribute information of the facial attribute information whose attribute category is discrete using a differential privacy algorithm based on an exponential mechanism to obtain privacy-preserving attribute information corresponding to the second facial attribute information; performing privacy protection processing on the facial attribute information using a privacy protection processing model based on facial attribute adversarial analysis to generate privacy protection attribute information corresponding to the facial attribute information, wherein the privacy protection processing model based on facial attribute adversarial analysis is obtained by training the model using facial attribute sample data and based on a preset loss function; Based on the generated privacy protection attribute information, the facial attribute information that has undergone privacy protection processing is output.
17. A storage medium for storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the following process: Obtaining privacy protection processing rule information for facial attributes, generating a corresponding first smart contract using the privacy protection processing rule information for facial attributes, and deploying the first smart contract into the blockchain system; Acquire a target facial image to be identified based on the first smart contract; Performing attribute recognition on the target facial image based on the first smart contract to obtain facial attribute information corresponding to the target facial image; Based on the first smart contract, differential privacy processing is performed on first facial attribute information of the facial attribute information whose attribute category is continuous using a differential privacy algorithm based on the Laplace mechanism to obtain privacy-preserving attribute information corresponding to the first facial attribute information. Differential privacy processing is performed on second facial attribute information of the facial attribute information of the facial attribute information whose attribute category is discrete using a differential privacy algorithm based on the exponential mechanism to obtain privacy-preserving attribute information corresponding to the second facial attribute information. Based on the first smart contract, performing privacy protection processing on the facial attribute information using a privacy protection processing model based on facial attribute adversarial means to generate privacy protection attribute information corresponding to the facial attribute information, wherein the privacy protection processing model based on facial attribute adversarial means is trained using facial attribute sample data and a preset loss function; Based on the first smart contract and the generated privacy-preserving attribute information, the facial attribute information processed after privacy protection is output.
Citation Information
Patent Citations
Facial attribute recognition method and device, storage medium and processor
CN111291604A
Data leakage protection method for big data cloud service and big data server
CN112765659A
Data processing method, device and equipment based on privacy protection
CN114036571A