Method for processing private data based on TEE, user equipment and server

By using preset algorithms in TEE to process facial feature data, generate obfuscated data and perform user identification, the problem of high computing resources and time consumption in the prior art is solved, and an efficient facial recognition experience is achieved.

CN119249491APending Publication Date: 2025-01-03ANT GROUP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411440547.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the prior art, data encryption and decryption consumes more computing resources and time in facial recognition, resulting in a decline in user experience and making it difficult to efficiently process privacy data.

Method used

Use preset conversion functions in TEE to process private data, generate obfuscated data, and use metadata and inverse conversion functions to identify users to reduce computing resources and time consumption.

Benefits of technology

By quickly processing obfuscated data in TEE, the efficiency of facial recognition is improved, computing resources and time is saved, and user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249491A_ABST
    Figure CN119249491A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for processing privacy data based on TEE, user equipment and server, the method is executed by a first TEE, a plurality of preset conversion functions are stored in the first TEE, the plurality of conversion functions respectively have corresponding inverse conversion functions, and the method comprises the following steps: obtaining first feature data from the outside of the first TEE, the first feature data is private data; selecting a first conversion function from the plurality of conversion functions, and converting the first feature data by using the first conversion function to obtain first conversion data; generating metadata, wherein the metadata comprises an identifier of the first conversion function; combining the metadata and the first conversion data to obtain first confused data; and providing the first obfuscated data to the outside of the first TEE.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification belong to the field of data processing technology, and in particular, relate to a method, user equipment, and server for processing private data based on TEE. Background Art

[0002] Facial recognition technology has been widely used in recent years and has become an important biometric identification method. Facial recognition technology identifies individuals by capturing and analyzing facial images. Its workflow usually includes the following steps: detecting and locating the face area from an image or video stream; extracting facial feature points, such as the location of the eyes, nose, and mouth and their relative distances; matching the extracted features with known facial features in the database to determine the identity. The extracted facial features include facial recognition information, which can be used to retrieve or reconstruct facial images. Therefore, in order to protect user privacy, the security of facial feature data needs to be guaranteed.

[0003] In a related data, facial feature data can be encrypted, ciphertext can be generated, and the ciphertext can be stored to ensure the security of facial feature data. However, since encryption and decryption of data requires more computing resources and time, the user experience of online facial recognition is reduced. Summary of the invention

[0004] The purpose of the present invention is to provide a method for processing private data based on TEE to improve the efficiency of processing private data.

[0005] In a first aspect, the present specification provides a method for processing private data based on TEE, the method being executed by a first TEE, wherein the first TEE stores a plurality of preset conversion functions, each of the plurality of conversion functions having a corresponding inverse conversion function, and the method comprising:

[0006] Acquire first feature data from outside the first TEE, where the first feature data is private data;

[0007] Selecting a first conversion function from the plurality of conversion functions, and using the first conversion function to convert the first feature data to obtain first conversion data;

[0008] generating metadata, the metadata comprising an identification of the first conversion function;

[0009] combining the metadata and the first converted data to obtain first obfuscated data;

[0010] The first obfuscated data is provided to the outside of the first TEE.

[0011] In one implementation, the metadata further includes values ​​of parameters of the first conversion function.

[0012] In one implementation, the parameter includes at least one of the following parameters: a scaling value, an offset value, and filling position information.

[0013] In one embodiment, the first feature data includes a first feature vector, the metadata is a metadata vector including N elements, the first conversion data is a first conversion vector, and the combining the metadata and the first conversion data to obtain the first obfuscated data includes: concatenating the metadata vector with the first conversion vector to obtain a first obfuscated vector, wherein the metadata vector is located at N elements of a preset position of the first obfuscated vector.

[0014] In one implementation, the metadata vector further includes a first dimension value, where the first dimension value is used to indicate a first dimension of the first feature vector, and the converting the first feature data using the first conversion function to obtain first converted data includes:

[0015] The first eigenvector is transformed using the first transformation function to obtain a second transformation vector, and elements are filled in the second transformation vector to obtain the first transformation vector of the first dimension.

[0016] In one implementation, the using the first conversion function to convert the first feature data to obtain first conversion data includes:

[0017] The first conversion function is used to convert the value of each element of the first eigenvector to obtain a first conversion vector.

[0018] In one embodiment, the first TEE also includes multiple inverse conversion functions of the multiple conversion functions, the first TEE is deployed in a user device, the first feature vector is a feature vector generated when the user enters biometric data, and the method further includes:

[0019] Acquire a second feature vector and the first confusion vector from outside the first TEE, where the second feature vector is a feature vector generated by the user when performing user identification;

[0020] Obtaining the metadata from the first obfuscation vector;

[0021] Based on the identifier of the first conversion function in the metadata, obtaining a first inverse conversion function from the plurality of inverse conversion functions;

[0022] Processing the first confusion vector based on the first inverse conversion function to obtain the first feature vector;

[0023] The first feature vector and the second feature vector are compared to identify the user.

[0024] In one implementation, the processing the first confusion vector based on the first inverse conversion function to obtain the first feature vector includes:

[0025] Obtaining a first transformation vector from the first obfuscation vector based on the first dimension value in the metadata and the value of the parameter;

[0026] The first transformation vector is processed based on the first inverse transformation function to obtain the first eigenvector.

[0027] A second aspect of the present specification provides a method for processing private data based on TEE, the method being executed by a second TEE in a server, wherein the second TEE stores a plurality of preset inverse conversion functions, the plurality of inverse conversion functions respectively corresponding to a plurality of conversion functions, the method comprising:

[0028] Obtain first obfuscated data from outside the second TEE;

[0029] Acquire a first inverse conversion function from the plurality of inverse conversion functions according to an identifier of the first conversion function in the metadata in the first obfuscated data;

[0030] The first obfuscated data is processed based on the first inverse conversion function to obtain first feature data.

[0031] In one embodiment, the first obfuscated data is received by the server from a user device, and the method further includes:

[0032] Obtaining pre-stored second obfuscated data corresponding to the current user from outside the second TEE;

[0033] Reading a second inverse conversion function from the plurality of inverse conversion functions according to an identifier of the second conversion function in the metadata in the second obfuscated data, and processing the second obfuscated data based on the second inverse conversion function to obtain second feature data;

[0034] The first feature data and the second feature data are compared to perform user identification.

[0035] A third aspect of the specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect or the second aspect is implemented.

[0036] A fourth aspect of the present specification provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method described in the first aspect or the second aspect.

[0037] In the embodiments of this specification, by processing private data (such as facial feature data) based on a preset algorithm in TEE, obfuscated data can be obtained at a relatively fast speed, and user identification (such as facial recognition) can be performed based on the obfuscated data, thereby saving computing resources and computing time compared to the existing technology and bringing a better experience to users. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 creative labor.

[0039] Figure 1 This is a flow chart of a method for processing private data based on TEE in an embodiment of this specification;

[0040] Figure 2 A schematic diagram of a process of processing private data in a client device in an embodiment of this specification;

[0041] Figure 3 This is a flowchart of data processing based on obfuscated data in TEE in an embodiment of this specification;

[0042] Figure 4 Schematic diagram of a method for processing obfuscated data in TEE in an embodiment of this specification;

[0043] Figure 5 Schematic diagram of a method for performing data processing based on feature vectors in a TEE of a client device in an embodiment of this specification;

[0044] Figure 6 This is a schematic diagram of a method for performing data processing based on feature vectors in a TEE of a server in an embodiment of this specification. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0046] In response to the above-mentioned problems existing in the prior art, the embodiments of this specification provide a method for processing privacy data based on TEE, by processing the privacy data (such as facial feature data) based on a preset algorithm in TEE, so as to obtain obfuscated data at a faster speed, and perform user identification (such as facial recognition) based on the obfuscated data, thereby saving computing resources and computing time compared to the prior art, and bringing a better experience to users.

[0047] It is understood that the private data in the embodiments of this specification is not limited to facial feature data, and may be, for example, fingerprint data, iris data, etc. In addition, the private data is not limited to biometric data, and may include other private data, such as user's historical transaction data, etc. The following description takes facial feature data as an example.

[0048] The scheme for processing privacy data based on TEE in the embodiments of this specification will be described in detail below with reference to the accompanying drawings.

[0049] Figure 1 This is a flow chart of a method for processing private data based on TEE in an embodiment of this specification. The method is used to process feature data in TEE to obtain obfuscated feature data, thereby protecting feature data. The method can be executed by TEE in a client device, such as a mobile phone, tablet, or facial recognition device at an airport or train station.

[0050] like Figure 1 As shown, in step S101, TEE obtains feature data from outside TEE.

[0051] TEE is a trusted execution environment that is completely isolated from the outside and based on the security extension of CPU hardware. Currently, there are many TEE solutions, such as TPM (Trusted Platform Module) in software and Intel SGX (Software Guard Extensions), ARM Trustzone and AMD PSP (Platform Security Processor) in hardware. TEE can play the role of a black box. The code and data executed in TEE cannot be peeped even at the operating system layer. They can only be operated through the pre-defined interfaces in the code. In terms of efficiency, due to the black box nature of TEE, the calculations in TEE are plaintext data, not the complex cryptographic operations in homomorphic encryption, and the efficiency of the calculation process is almost lost. Therefore, the use of TEE technology can perform trusted computing with relatively little performance loss.

[0052] The following is an example of SGX technology. Client devices can create Enclaves (enclaves or enclaves) based on SGX technology as TEEs for processing private data. Among them, the client device can use the newly added processor instructions in the CPU to allocate a part of the area EPC (Enclave Page Cache, enclave page cache or enclave page cache) in the memory for the above Enclave to reside. The memory area corresponding to the above EPC is encrypted by the memory encryption engine MEE (Memory Encryption Engine) inside the CPU. The content in the memory area (code and data in the Enclave) can only be decrypted in the CPU core, and the key used for encryption and decryption is only generated and stored in the CPU when the EPC is started. It can be seen that the security boundary of the Enclave only includes itself and the CPU. Neither privileged software nor non-privileged software can access the Enclave. Even the operating system administrator and VMM (Virtual Machine Monitor, virtual machine monitor; or Hypervisor) cannot affect the code and data in the Enclave, so it has extremely high security. Under the premise of the above security guarantees, the CPU can process data in the Enclave with extremely high computing efficiency, thus taking into account both data security and computing efficiency.

[0053] Figure 2 FIG. 1 is a schematic diagram of a process for processing private data in a client device in an embodiment of this specification. Figure 2As shown, the client device may include a shooting component, through which the client device shoots a facial image of the user and extracts features from the facial image to obtain a feature vector X corresponding to the facial image. The feature vector X is, for example, (x1, x2, ..., x k ).

[0054] The dimension k of the feature vector can be between hundreds and thousands of dimensions, and the feature vector contains key information of the image, such as color, shape, texture, edge, structure, content, etc. In addition, the image features of the feature vector can include various forms of features, such as pixel-level features, local features, deep features (such as the output of convolutional neural network CNN), etc. Different types of features can be used in combination to enhance the comprehensiveness and robustness of image representation.

[0055] Afterwards, the shooting component can provide the feature vector to the TEE. The shooting component can provide the feature vector to the TEE by calling the interface provided by the TEE. For example, the TEE can provide an ECALL (Enclave Call) interface, and the shooting component can pass the data to the TEE (i.e., Enclave) by calling the ECALL interface. In one embodiment, the client device can first encrypt the feature vector, for example, using the public key of the TEE, and provide the resulting ciphertext vector to the TEE.

[0056] In one embodiment, the client device includes, for example, a mobile phone. The mobile phone may provide a function of unlocking through facial recognition. In order to implement this function, the user first needs to set a template feature vector for facial recognition. During the setting process, the mobile phone will scan the user's face through a front camera or a dedicated infrared sensor to obtain facial images of the user at one or more angles, and then create a facial feature vector of the user based on the multiple facial images. The facial feature vector may be referred to as a template feature vector. After obtaining the template feature vector, the mobile phone may provide the template feature vector to the TEE for generating an obfuscated template.

[0057] In one embodiment, the client performs facial recognition on the user by communicating with the server to authenticate the user. In this case, the mobile phone scans the user's face through the front camera or a dedicated infrared sensor to obtain facial images of the user from one or more angles, and then creates a facial feature vector of the user based on the multiple facial images.

[0058] In step S103, the TEE selects a conversion function from a plurality of conversion functions, and uses the selected conversion function to convert the feature data to obtain conversion data.

[0059] like Figure 2As shown in , for example, n conversion functions may be preset in the TEE. In one embodiment, the n conversion functions are, for example, f i (x) = a i x+b i of the form, where a i is the scaling factor, b i is the offset value. i (x) can be selected by random option a i and b i The value of , determines the conversion function. In TEE, for example, the conversion function f i The serial number i corresponding to (x) is used as the identifier of the conversion function. For example, "i=1" is used to indicate function f1(x), "i=2" is used to indicate function f2(x), and so on.

[0060] In another embodiment, the n conversion functions include, for example, different calculation formulas g i (x), the different calculation formula g i (x) all satisfy g i (x) and x have a one-to-one correspondence. For example, g1(x) = a + bx, g2(x) = a + c x , g3(x)=a+dx 3 , etc. Among them, the values ​​of parameters such as a, b, c, and d are not fixed values, but can be used using the conversion function g i (x) is randomly determined when transforming the feature vector. Similarly, in TEE, for example, the transformation function g i The serial number i corresponding to (x) is used as the identifier of the conversion function. For example, "i=1" is used to indicate the function g1(x), "i=2" is used to indicate the function g2(x), and so on.

[0061] TEE can randomly select a conversion function from n conversion functions to convert the feature data, for example, select the i=2nd function f2(x)=a2x+b2.

[0062] In a first embodiment, the TEE may use a selected function (e.g., f2(x)) to transform each element of the feature vector X, such as transforming x1 into y1=a2x1+b2, transforming x2 into y2=a2x2+b2, ..., and so on, thereby obtaining a vector Y1=(y1, y2, ..., y k ), and the vector Y1 can be used as conversion data (the conversion vector is described below as an example of conversion data).

[0063] In a second embodiment, a random number M may be generated in the TEE as the dimension of the final output TEE obfuscation vector, where, for example, M may be set to twice the dimension of the feature vector X, i.e., 2k. As described below, the TEE may set the first N dimensions of the obfuscation vector as metadata of the obfuscation vector, thereby determining that the dimension value of the transformation vector Y2 to be generated is m=MN, where m>k. In one embodiment, after the TEE generates the above-mentioned vector Y1, in order to expand the dimension of the vector Y1 to m dimensions, mk random numbers may be padded at the end of the vector Y1 to obtain an m-dimensional transformation vector Y2=(y1, y2,…, y k ,*,*,…,*), where “*,*,…,*” represents the random number elements filled. In another specific implementation, after generating the above vector Y1, the TEE can randomly determine the position of the random number filled in the middle of the vector Y1. For example, it can be determined to fill p elements between the sth element and the tth element of the vector Y1, so that the vector Y1 is filled according to the position, and the vector Y3=(y1,y2,…,y s ,*,*,…*,y t ,…,y k ), where “*,*,…*” represents p random number elements. After this filling, if the number of elements in the obtained vector Y3 is less than m, continue to fill the end of the vector Y3 with random numbers to obtain an m-dimensional vector Y2 = (y1, y2,…, y s ,*,*,…*,y t ,…,y k ,*,*,…,*). It can be understood that only one intermediate filling of the conversion vector Y2 is described here, and the present specification is not limited thereto. For example, a second filling may be performed between the s2th element and the t2th element of the conversion vector Y2.

[0064] In step S105 , the TEE generates metadata including the identifier of the conversion function selected above.

[0065] Specifically, as described above, TEE uses the first N elements of the obfuscation vector as metadata, where the value of N is determined based on the number of metadata that TEE needs to provide externally.

[0066] For example, in the first implementation of converting the feature data mentioned above, if each element of the feature vector is converted by the selected conversion function f2(x), TEE only needs to provide the function identifier "i=2" of the conversion function f2(x) as metadata. In this case, N=1.

[0067] In the first implementation of the feature data conversion, if each element of the feature vector is converted by the selected conversion function g1(x), the TEE needs to provide the function identifier "i=1" of the conversion function g1(x) as metadata, and also the values ​​of the parameters a and b in the function g1(x) as metadata, where a can be called an offset value and b can be called a scaling value. In this case, N=3.

[0068] In the second embodiment of the above-mentioned conversion of feature data, in addition to converting each element of the feature vector through the selected conversion function, the TEE also fills the feature vector with random numbers. Therefore, the TEE needs to provide data corresponding to the selected conversion function (such as function identification, offset value, and scaling value) to the outside, and also needs to provide data related to the filling of random numbers as metadata. In one embodiment, the TEE only fills the end of the feature vector with random numbers. In this case, the TEE can generate metadata including the following data: function identification, offset value, scaling value, and length k of the feature vector. After generating the metadata, the TEE can represent the metadata as a metadata vector. In another embodiment, the TEE fills the middle and end of the feature vector with random numbers. In this case, the TEE can generate metadata including the following data: function identification, offset value, scaling value, length k of the feature vector, middle filling position s, t, and number of middle filling elements p. Among them, the middle filling position s, t indicates that random numbers are filled between the sth element and the tth element of the feature vector. In this case, N=7.

[0069] In one embodiment, the TEE may also periodically update the N conversion functions to improve data security. In this case, a version number may be set for the conversion function, and the version number of the conversion function is increased by 1 each time it is updated. In this case, the TEE also includes the version number of the selected conversion function in the metadata.

[0070] In step S107, TEE combines the metadata and the converted data to obtain obfuscated data.

[0071] Specifically, after obtaining the conversion vector (e.g., vector Y2) and the metadata vector respectively as described above, TEE concatenates the metadata vector and the conversion vector into the obfuscated vector C1. For example, the elements in the metadata vector may be sequentially placed in the first N rows of the obfuscated vector, and the elements in the conversion vector may be sequentially placed in multiple rows of the obfuscated vector C1 starting from the N+1th row.

[0072] In step S109 , the TEE provides the obfuscated data to the outside of the TEE.

[0073] like Figure 2As shown, after generating the obfuscation vector C1, the TEE may, for example, store the obfuscation vector C1 outside the TEE.

[0074] In the scenario where the client unlocks the phone through facial recognition, the obfuscation vector C1 can be stored as an obfuscation template, so that the obfuscation template can be read for facial recognition when unlocking the phone and the phone can be unlocked when the recognition is successful.

[0075] In the above scenario where the client performs identity authentication through facial recognition, the client may send the confusion vector C1 to the server to perform facial recognition based on the confusion vector C1.

[0076] Figure 3 This is a flowchart of data processing based on obfuscated data in TEE in an embodiment of this specification.

[0077] Specifically, in scenarios such as the unlocking described above, the method may be executed by the TEE in the client device (or user device), and in scenarios such as the identity authentication described above, the method may be executed by the TEE in the server.

[0078] like Figure 3 As shown, in step S301, obfuscated data is obtained from outside the TEE.

[0079] Figure 4 Schematic diagram of a method for processing obfuscated data in TEE in an embodiment of this specification. Figure 4 As shown, the TEE in the client device can read the pre-stored template obfuscation vector from outside the TEE. The TEE in the server can read the obfuscation vector received from the client from outside the TEE.

[0080] In step S303, TEE obtains metadata from the obfuscated data.

[0081] TEE can read the first N elements from the obfuscation vector according to the preset dimension N of the metadata vector to obtain metadata.

[0082] As described above, the metadata includes at least the identifier of the conversion function corresponding to the obfuscated vector. In other implementations, in addition to the identifier of the conversion function, the metadata may also include at least one of the following: function identifier, offset value, scaling value, length k of the feature vector, intermediate filling position s, t, number of intermediate filling elements p, version number of the conversion function, etc.

[0083] In step S305, the TEE selects an inverse conversion function from a plurality of inverse conversion functions based on the identifier of the conversion function in the metadata.

[0084] like Figure 4As shown, n inverse conversion functions corresponding to the above n conversion functions may be preset in the TEE.

[0085] For example, in one embodiment, the n conversion functions are, for example, f i (x) = a i x+b i In this method, the n inverse conversion functions in TEE are, for example: In this embodiment, when the identifier of the conversion function in the metadata is, for example, i=2, the TEE selects the inverse conversion function i=2 from the n inverse conversion functions. Among them, parameters a2 and b2 are the inverse conversion function f2 -1 Parameters that come with it.

[0086] In another embodiment, the n conversion functions are, for example, g1(x)=a+bx, g2(x)=a+c x , g3(x)=a+dx 3 , etc., then in this method, the n inverse conversion functions in TEE are the inverse functions of the corresponding conversion functions. For example, the inverse function of g2(x) is In this embodiment, when the identifier of the conversion function in the metadata is, for example, i=2, the TEE selects the inverse conversion function i=2 from the n inverse conversion functions. The metadata of the obfuscation vector includes the values ​​of parameter a and parameter c in the inverse conversion function.

[0087] In step S307, TEE processes the obfuscated data based on the selected inverse conversion function to obtain a feature vector.

[0088] In one embodiment, N=1, the metadata includes the identifier of the conversion function i=2, and the selected inverse conversion function is the above According to N=1, TEE obtains the elements of the 2nd to k+1th rows in the confusion vector and obtains the conversion vector, for example, Y1=(y1,y2,…,y k ), each element y in the transformation vector Y1 i Substitute as the value of y Thus, each element in the eigenvector X can be obtained.

[0089] In one embodiment, N=3, the metadata includes the identifier of the conversion function i=2, and the selected inverse conversion function is the above In addition, the metadata also includes the values ​​of parameters a and c. TEE obtains the elements of the 4th to k+3th rows in the confusion vector according to N=3, and obtains the conversion vector, for example, Y1=(y1,y2,…,y k ), each element y in the transformation vector Y1i Substitute as the value of y Thus, each element in the eigenvector X can be obtained.

[0090] In one embodiment, N=4, and the metadata includes the following four items arranged in a preset order: the identifier of the conversion function i=2, the offset value a, the scaling value c, and the length k of the feature vector. TEE obtains the elements of the 5th to Mth rows in the confusion vector according to N=4, and obtains the conversion vector, Y2=(y1, y2,…, y k ,*,*,…,*), get the elements of the 5th to k+4th rows in vector Y2, and get the vector Y1=(y1,y2,…,y k ), each element y in the transformation vector Y1 i Substitute as the value of y Thus, each element in the eigenvector X can be obtained.

[0091] In one embodiment, N=7, and the metadata includes the following seven items arranged in a preset order: the identifier of the conversion function i=2, the offset value a, the scaling value c, the length of the feature vector k, the intermediate filling positions s and t, and the number of intermediate filling elements p. TEE obtains the elements of the 8th to Mth rows in the confusion vector according to N=7, and obtains the conversion vector, Y2=(y1, y2,…, y s ,*,*,…*,y t ,…,y k ,*,*,…,*), get the elements of the 8th to s+7th rows and the s+7+pth to k+7+pth rows in vector Y2, and get the vector Y1=(y1,y2,…,y k ), each element y in the transformation vector Y1 i Substitute as the value of y Thus, each element in the eigenvector X can be obtained.

[0092] In one embodiment, N=8, and the metadata includes the following 8 items arranged in a preset order: the version number v3 of the conversion function, the identifier of the conversion function i=2, the offset value a, the scaling value c, the length k of the feature vector, the intermediate filling positions s and t, and the number of intermediate filling elements p. TEE obtains the elements of the 9th to Mth rows in the obfuscation vector according to N=8, and obtains the conversion vector, Y2=(y1, y2,…, y s ,*,*,…*,y t ,…,y k ,*,*,…,*), get the elements of the 9th to s+8th rows and the s+8+pth to k+8+pth rows in vector Y2, and get the vector Y1=(y1,y2,…,y k ), each element y in the transformation vector Y1 iSubstitute the value of y into the inverse conversion function with i=2 among the n inverse conversion functions with version number v3. Thus, each element in the eigenvector X can be obtained.

[0093] like Figure 4 As shown, after obtaining the characteristic data in TEE, corresponding data processing can be performed based on the characteristic data according to business needs to obtain data processing results, and the data processing results are provided to the outside of TEE.

[0094] Figure 5 Schematic diagram of a method for processing data based on feature vectors in a TEE of a client device in an embodiment of this specification. The TEE of the client device is preset with multiple conversion functions and multiple inverse conversion functions corresponding to the multiple conversion functions.

[0095] In the scenario where the client device is unlocked by facial recognition, the client device captures the facial image of the current user through a photographing component, extracts features from the facial image, and obtains a feature vector Z. The feature vector Z is, for example, (z1, z2, …, z k ), and input the feature vector Z into the TEE. The TEE obtains the pre-stored obfuscation vector from outside the TEE, and obtains the feature vector X=(x1, x2,…, x3) based on the obfuscation vector through the above steps S303 and S305. k ). Then the similarity between vector Z and vector X can be calculated for vector comparison. For example, the inner product X·Z of vector X and vector Z can be calculated in TEE as the similarity between vector Z and vector X. When the similarity between vector Z and vector X is greater than a preset threshold, it can be determined that facial recognition has been passed and unlocking is performed.

[0096] Figure 6 Schematic diagram of a method for processing data based on feature vectors in a TEE of a server in an embodiment of this specification. The server TEE is preset with multiple inverse conversion functions corresponding to multiple conversion functions.

[0097] In the scenario where the server device performs identity authentication through facial recognition, the client device captures the facial image of the current user through the camera component, extracts features from the facial image, and obtains a feature vector Z. The feature vector Z is, for example, (z1, z2, …, z k ), the feature vector Z is input into TEE, so that Figure 1 The method shown obtains a confusion vector C2 corresponding to the feature vector Z. The client device sends the confusion vector C2 to the server for identity authentication.

[0098] The TEE in the server obtains the feature vector Z=(z1,z2,…,z3) based on the obfuscation vector C2 through the above steps S303 and S305. k ).

[0099] The TEE in the server then obtains the obfuscation vector C1 of the user corresponding to the client stored in advance from outside the TEE. Similarly, through the above steps S303 and S305, the feature vector X=(x1, x2,…, x k ). Then, the similarity between vector Z and vector X can be calculated to perform vector comparison. For example, the inner product X·Z of vector X and vector Z can be calculated in TEE as the similarity between vector Z and vector X. When the similarity between vector Z and vector X is greater than a preset threshold, it can be determined that the user's identity authentication is passed.

[0100] The embodiment of the present specification also provides a first TEE in a user equipment, wherein the first TEE stores a plurality of preset conversion functions, each of the plurality of conversion functions has a corresponding inverse conversion function, and the first TEE is used to execute Figure 1 or Figure 3 The method shown comprises:

[0101] an acquiring unit, configured to acquire first characteristic data from outside the first TEE, where the first characteristic data is private data;

[0102] a conversion unit, configured to select a first conversion function from the plurality of conversion functions, and use the first conversion function to convert the first feature data to obtain first conversion data;

[0103] A generating unit, configured to generate metadata, wherein the metadata includes an identifier of the first conversion function;

[0104] a combining unit, configured to combine the metadata and the first converted data to obtain first obfuscated data;

[0105] A providing unit is used to provide the first obfuscated data to the outside of the first TEE.

[0106] The embodiment of the present specification also provides a second TEE execution in a server, wherein the second TEE stores a plurality of preset inverse conversion functions, wherein the plurality of inverse conversion functions correspond to a plurality of conversion functions respectively, and the second TEE is used to execute Figure 1 or Figure 3 The method shown comprises:

[0107] an acquisition unit, configured to acquire first obfuscated data from outside the second TEE; and acquire a first inverse conversion function from the plurality of inverse conversion functions according to an identifier of the first conversion function in the metadata in the first obfuscated data;

[0108] A processing unit is used to process the first obfuscated data based on the first inverse conversion function to obtain first feature data.

[0109] The embodiment of the present specification also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the following Figure 1 or Figure 3 The method shown.

[0110] The embodiment of the present specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the following is implemented: Figure 1 or Figure 3 The method shown.

[0111] The embodiments of the present specification also provide a computer program product, including a computer program / instruction, which is executed by a processor to implement the following Figure 1 or Figure 3 The steps of the method are shown.

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

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

[0114] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0115] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0116] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

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

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

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

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

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

[0123] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

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

[0125] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

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

Claims

1. A method for processing private data based on TEE, the method being executed by a first TEE, wherein the first TEE stores a plurality of preset conversion functions, each of the plurality of conversion functions having a corresponding inverse conversion function, the method comprising: Acquire first feature data from outside the first TEE, where the first feature data is private data; Selecting a first conversion function from the plurality of conversion functions, and using the first conversion function to convert the first feature data to obtain first conversion data; generating metadata, the metadata comprising an identification of the first conversion function; combining the metadata and the first converted data to obtain first obfuscated data; The first obfuscated data is provided to the outside of the first TEE. 2 . The method according to claim 1 , wherein the metadata further includes values ​​of parameters of the first conversion function. 3 . The method according to claim 2 , wherein the parameter comprises at least one of the following parameters: a scaling value, an offset value, and padding position information.

4. The method according to claim 3, wherein the first feature data comprises a first feature vector, the metadata is a metadata vector comprising N elements, the first conversion data is a first conversion vector, and the combining the metadata and the first conversion data to obtain the first obfuscated data comprises: The metadata vector is concatenated with the first conversion vector to obtain a first obfuscation vector, wherein the metadata vector is located at N elements of a preset position of the first obfuscation vector.

5. According to the method of claim 4, the metadata vector further includes a first dimension value, the first dimension value is used to indicate a first dimension of the first feature vector, and the using the first conversion function to convert the first feature data to obtain the first conversion data includes: The first eigenvector is transformed using the first transformation function to obtain a second transformation vector, and elements are filled in the second transformation vector to obtain the first transformation vector of the first dimension.

6. The method according to claim 4, wherein the first feature data is converted using the first conversion function to obtain first conversion data, comprising: The first conversion function is used to convert the value of each element of the first eigenvector to obtain the first conversion vector.

7. The method according to claim 4, wherein the first TEE further includes multiple inverse conversion functions of the multiple conversion functions, the first TEE is deployed in a user device, the first feature vector is a feature vector generated when the user enters biometric data, and the method further includes: Acquire a second feature vector and the first confusion vector from outside the first TEE, where the second feature vector is a feature vector generated by the user when performing user identification; Obtaining the metadata from the first obfuscation vector; Based on the identifier of the first conversion function in the metadata, obtaining a first inverse conversion function from the plurality of inverse conversion functions; Processing the first confusion vector based on the first inverse conversion function to obtain the first feature vector; The first feature vector and the second feature vector are compared to identify the user.

8. The method according to claim 7, wherein the processing the first confusion vector based on the first inverse conversion function to obtain the first feature vector comprises: Obtaining a first transformation vector from the first obfuscation vector based on the first dimension value in the metadata and the value of the parameter; The first transformation vector is processed based on the first inverse transformation function to obtain the first eigenvector.

9. A method for processing private data based on TEE, the method being executed by a second TEE in a server, wherein the second TEE stores a plurality of preset inverse conversion functions, the plurality of inverse conversion functions respectively corresponding to a plurality of conversion functions, the method comprising: Obtain first obfuscated data from outside the second TEE; Acquire a first inverse conversion function from the plurality of inverse conversion functions according to an identifier of the first conversion function in the metadata in the first obfuscated data; The first obfuscated data is processed based on the first inverse conversion function to obtain first feature data.

10. The method according to claim 9, wherein the first obfuscated data is received by the server from a user device, the method further comprising: Obtaining pre-stored second obfuscated data corresponding to the current user from outside the second TEE; Reading a second inverse conversion function from the plurality of inverse conversion functions according to an identifier of the second conversion function in the metadata in the second obfuscated data, and processing the second obfuscated data based on the second inverse conversion function to obtain second feature data; The first feature data and the second feature data are compared to perform user identification.

11. A computing device, comprising a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 10 is implemented.