WO2021114911A1 - User risk assessment method and apparatus, electronic device, and storage medium - Google Patents

User risk assessment method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2021114911A1
WO2021114911A1 PCT/CN2020/124013 CN2020124013W WO2021114911A1 WO 2021114911 A1 WO2021114911 A1 WO 2021114911A1 CN 2020124013 W CN2020124013 W CN 2020124013W WO 2021114911 A1 WO2021114911 A1 WO 2021114911A1
Authority
WO
WIPO (PCT)
Prior art keywords
sample data
target sample
target
data
teacher
Prior art date
Application number
PCT/CN2020/124013
Other languages
French (fr)
Chinese (zh)
Inventor
陈岑
Original Assignee
支付宝(杭州)信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021114911A1 publication Critical patent/WO2021114911A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0635Risk analysis of enterprise or organisation activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance

Definitions

  • One or more embodiments of this specification relate to the field of artificial intelligence technology, and in particular to a user risk assessment method and device, electronic equipment, and storage medium.
  • Risk control means that risk managers take various measures and methods to eliminate or reduce the various possibilities of risk events, or risk controllers to reduce the losses caused when risk events occur. By accurately identifying potential risks for users, companies can improve the security protection capabilities of themselves and their partners, and contribute to business growth.
  • one or more embodiments of this specification provide a user risk assessment method and device, electronic equipment, and storage medium.
  • a user risk assessment method which includes: inputting behavior information of users of a target partner into a student risk control model corresponding to the target partner;
  • the student risk control model is obtained by knowledge distillation of the target sample data based on the soft label value of the target sample data of the target partner and the risk label value originally marked as the hard label value of the target sample data.
  • the soft label value is obtained by integrating the prediction results of multiple teacher risk control models for the target sample data in a trusted execution environment.
  • Each teacher risk control model is decrypted in the trusted execution environment, and each teacher The risk control model is obtained by training the corresponding sample data of other partners; wherein any sample data contains behavioral information marked with a risk label value; the risk of the user is determined according to the output result of the student risk control model score.
  • a knowledge transfer method based on a machine learning model which includes: obtaining teacher networks in multiple source fields and obtaining target sample data in the target field, and obtaining The teacher network in the trusted execution environment is read into the trusted execution environment for decryption, and each teacher network is obtained by training the sample data of their respective source fields; in the trusted execution environment, the target sample data is input into each teacher network to obtain each teacher The network predicts the result of the target sample data, and integrates the obtained prediction results to obtain the soft label value corresponding to the target sample data; based on the soft label value and the hard label originally marked on the target sample data Value, perform knowledge distillation on the target sample data to obtain a student network in the target field.
  • a knowledge transfer method based on a machine learning model which includes: obtaining teacher networks in multiple source fields and obtaining target sample data in the target field, and obtaining The teacher network in the trusted execution environment is read into the trusted execution environment for decryption, and each teacher network is obtained by training the sample data of their respective source fields; in the trusted execution environment, the target sample data is input into each teacher network to obtain each teacher According to the prediction result of the target sample data, the network integrates the obtained prediction results to obtain the soft label value corresponding to the target sample data, and encrypts the soft label value; to the provider of the target sample data Return the encrypted soft label value, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the hard label value originally marked by the target sample data, Perform knowledge distillation on the target sample data to obtain a student network in the target field.
  • a method for knowledge transfer based on a machine learning model includes: sending target sample data to a maintainer of a trusted execution environment, so that the maintainer is In the trusted execution environment, the target sample data is input into teacher networks in multiple source fields to obtain the prediction results of each teacher network for the target sample data, and the obtained prediction results are integrated to obtain the corresponding target sample data.
  • each teacher network is obtained by training the sample data in their respective source fields and is decrypted in the trusted execution environment; receiving the encrypted soft label value returned by the maintainer, Decrypt the received soft label value, and perform knowledge distillation on the target sample data based on the decrypted soft label value and the original hard label value of the target sample data to obtain the target Network of students in the field.
  • a user risk assessment device which includes: an information input unit that inputs behavior information of a user of a target partner into student risk control corresponding to the target partner Model; the student risk control model is based on the target sample data soft label value of the target sample data and the target sample data originally marked as the hard label value of the risk label value, the target sample data Knowledge distillation is obtained.
  • the soft label value is obtained by integrating the prediction results of multiple teacher risk control models for the target sample data in a trusted execution environment, and each teacher risk control model is obtained in the trusted execution environment.
  • each teacher's risk control model is obtained by training the corresponding sample data of other partners; among them, any sample data contains behavioral information marked with a risk label value; the risk assessment unit is based on the student's risk control model The output result determines the risk score of the user.
  • a knowledge transfer device based on a machine learning model which includes: an acquiring unit, acquiring teacher networks in multiple source fields, and acquiring target sample data in the target field, and Read the obtained teacher network into the trusted execution environment for decryption.
  • Each teacher network is obtained by training the sample data of their respective source fields; the integration unit, in the trusted execution environment, the target sample data is input to each teacher Network to obtain the prediction results of each teacher network for the target sample data, and integrate the obtained prediction results to obtain the soft label value corresponding to the target sample data; the training unit is based on the soft label value and the target
  • the sample data is originally marked with hard label values, and knowledge distillation is performed on the target sample data to obtain a student network in the target field.
  • a knowledge transfer device based on a machine learning model, which includes: an acquiring unit, acquiring teacher networks in multiple source fields, and acquiring target sample data in the target field, and Read the acquired teacher network into the trusted execution environment for decryption.
  • Each teacher network is obtained by training the sample data of their respective source fields; the integration unit inputs the target sample data into each of the trusted execution environments.
  • the teacher network obtains the prediction results of each teacher network for the target sample data, integrates the obtained prediction results to obtain a soft label value corresponding to the target sample data, and encrypts the soft label value; a returning unit, Return the encrypted soft label value to the provider of the target sample data, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the target sample
  • the data is originally marked with hard label values, and knowledge distillation is performed on the target sample data to obtain a student network in the target field.
  • a knowledge transfer device based on a machine learning model, including: a sending unit that sends target sample data to a maintainer of a trusted execution environment, so that the maintenance In the trusted execution environment, each party inputs the target sample data into teacher networks in multiple source fields to obtain the prediction results of each teacher network for the target sample data, and integrates the obtained prediction results to obtain corresponding The soft label value of the target sample data; each teacher network is obtained by training the sample data in their respective source fields and is decrypted in the trusted execution environment; the training unit receives the encrypted data returned by the maintainer The soft label value decrypts the received soft label value, and performs knowledge on the target sample data based on the decrypted soft label value and the original hard label value of the target sample data Distill to get a network of students in the target field.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor runs the executable instructions In order to realize the user risk assessment method as described in the above first aspect.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor runs the executable instructions In order to realize the knowledge transfer method based on the machine learning model as described in the above second aspect.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor runs the executable Instructions to implement the knowledge transfer method based on the machine learning model as described in the third aspect above.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor runs the executable Instructions to implement the knowledge transfer method based on the machine learning model as described in the fourth aspect above.
  • a computer-readable storage medium having computer instructions stored thereon, which when executed by a processor implements the steps of the user risk assessment method described in the first aspect.
  • a fourteenth aspect of the embodiments of the present disclosure there is provided a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, realizes the knowledge transfer based on the machine learning model as described in the second aspect above Method steps.
  • a computer-readable storage medium having computer instructions stored thereon, and when the instructions are executed by a processor, the machine learning model-based knowledge transfer as described in the third aspect is realized Method steps.
  • a computer-readable storage medium having computer instructions stored thereon, and when the instructions are executed by a processor, the machine learning model-based knowledge transfer as described in the above fourth aspect is realized Method steps.
  • Fig. 1 is a schematic structural diagram of a knowledge transfer system based on a machine learning model provided by an exemplary embodiment.
  • Fig. 2 is a flowchart of a method for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
  • Fig. 3 is a flowchart of another method for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
  • Fig. 4 is a flowchart of another method for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
  • Fig. 5 is a flowchart of a user risk assessment method provided by an exemplary embodiment.
  • Fig. 6 is a flowchart of issuing public and private keys of a digital envelope according to an exemplary embodiment.
  • Fig. 7 is an interaction diagram of a method for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
  • Fig. 8 is a schematic structural diagram of a device provided by an exemplary embodiment.
  • Fig. 9 is a block diagram of a user risk assessment device provided by an exemplary embodiment.
  • Fig. 10 is a schematic structural diagram of another device provided by an exemplary embodiment.
  • Fig. 11 is a block diagram of a device for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
  • Fig. 12 is a schematic structural diagram of another device provided by an exemplary embodiment.
  • Fig. 13 is a block diagram of another apparatus for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
  • Fig. 14 is a schematic structural diagram of another device provided by an exemplary embodiment.
  • Fig. 15 is a block diagram of another apparatus for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
  • the steps of the corresponding method may not be executed in the order shown and described in this specification.
  • the method may include more or fewer steps than described in this specification.
  • a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step in other embodiments. description.
  • Fig. 1 is a schematic structural diagram of a knowledge transfer system based on a machine learning model provided by an exemplary embodiment.
  • the system may include a server 11, a network 12, and several electronic devices, such as a mobile phone 13, a mobile phone 14, and a PC15-16.
  • the server 11 may be a physical server including an independent host, or the server 11 may be a virtual server carried by a host cluster. During operation, the server 11 is used as a server to interface with each partner, that is, to provide a platform for cooperation with each partner, for migrating the performance of the teacher network trained by each partner to the student network.
  • Mobile phones 13-14 and PC15-16 are just one type of electronic equipment that users can use.
  • the partners that interface with the server 11 can obviously also use electronic devices such as the following types: tablet devices, notebook computers, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.) Etc., one or more embodiments of this specification do not limit this.
  • each partner uses its own sample data to train to obtain a teacher network, which can guide the training of related student networks, and take the model parameters learned by the teacher network (also can be understood as The knowledge learned by the teacher network) is shared with the student network to improve the performance of the student network.
  • the network 12 for interaction between the mobile phone 13-14, the PC 15-16 and the server 11, it may include multiple types of wired or wireless networks.
  • the network 12 may include a Public Switched Telephone Network (PSTN) and the Internet.
  • PSTN Public Switched Telephone Network
  • Fig. 2 is a flowchart of a method for knowledge transfer based on a machine learning model provided by an exemplary embodiment. As shown in Figure 2, the method is applied to the server and may include steps 202-206.
  • Step 202 Obtain teacher networks in multiple source fields and obtain target sample data in the target field, and read the obtained teacher networks into a trusted execution environment for decryption. Each teacher network obtains the results by training the sample data in their respective source fields. .
  • sample data labeled with label values when training a supervised machine learning model, it may be difficult to collect sample data labeled with label values. For example, sample data is less accumulated due to time issues, and the amount of data collected for sample data is relatively large, which is time-consuming. ,higher cost. Furthermore, even when the sample data is sufficient, the cost of building a model from scratch is higher and the efficiency is lower. therefore.
  • transfer learning Transfer Learning
  • transfer Learning technology can be used to learn from the trained model that is related to the field (for example, of the same type, high similarity, etc.) The acquired knowledge is transferred to the machine learning model in the field, thereby improving the efficiency of training the model.
  • the domain of the existing knowledge is called the source domain
  • the domain of the new knowledge to be learned is called the target domain.
  • the source domain usually has a large amount of label data, while the target domain often There are only a small number of label samples, and the source field and the target field are different but related to a certain extent. Knowledge transfer can be carried out by reducing the distribution difference between the source field and the target field.
  • the teacher-student network is used to guide the training of the student network by distilling the knowledge of the teacher network.
  • the teacher network is often a more complex network with very good performance and generalization ability.
  • the teacher network can be used as a soft target to guide another simpler student network to learn, making it simpler and more computationally expensive.
  • a few student models can also have performance similar to that of a teacher network.
  • the teacher network corresponds to the source domain, that is, the supervised learning model that has been trained in the source domain is used as the teacher network to guide students' network learning and learn from themselves
  • the knowledge of is transferred to the student network
  • the student network corresponds to the target field, that is, the model to be trained in the target field is used as the student network.
  • the server when a partner docking with the server has a model to be trained, the server can perform migration learning on the supervised machine learning models that have been trained by other partners related to the partner's field. To guide the learning of the model to be trained. Then, in the process of training the student network in the target field, there is no need to recollect a large amount of sample data in the target field for training, so that the efficiency of training the student network can be improved. At the same time, the student network can also inherit the better generalization ability and performance of the teacher network.
  • one or more teacher networks can be selected to guide the training of student networks.
  • a field with higher similarity to the target field can be selected as the source field.
  • the knowledge transfer scheme based on the machine learning model of this specification can be understood as the data providers of various source fields work together to complete the training of the student network, namely Multiple data providers have their own sample data and can use each other's data to train machine learning models in a unified manner. It should be noted that the sample data of each data provider belongs to its own private data, so the above-mentioned multi-party joint modeling (joint modelling) process should be carried out while ensuring the security of the data of all parties. Therefore, the data provider, as the executive body of training the teacher network, uses its own labeled sample data to train the teacher network in their respective source fields.
  • each teacher network uses its own private data as sample data for training through data providers in their respective source fields. It can be seen that, on the one hand, each data provider cooperates to train their own teacher network, which can improve the efficiency of subsequent training of the student network; on the other hand, the training process of the teacher network in each source field does not need to be out of the domain, which can ensure The privacy of the sample data in the field.
  • each teacher network belongs to the private data of its source field
  • the target sample data belongs to the private data of the target field
  • the prediction result of each teacher network for the target sample data belongs to decision privacy (that is, the privacy of the output result of each teacher network) . Therefore, for privacy and security, TEE (Trusted Execution Environment) can be introduced, the teacher network is used in the TEE to predict the target sample data, and the obtained prediction results can be integrated learning.
  • TEE can play the role of a black box in the hardware. Neither the code executed in the TEE nor the data operating system layer can be peeped, and only the pre-defined interface in the code can operate on it.
  • the teacher network provider before sending the teacher network trained by the teacher network to the server, can encrypt the teacher network, and then the server decrypts the teacher network in the TEE, and then uses the decrypted teacher network to analyze the target sample Data to predict.
  • the provider of the target sample data can also encrypt the target sample data before sending the target sample data to the server, and then the server decrypts the target sample data in the TEE first, and then decrypts the decrypted target sample data Enter the teacher network.
  • Step 204 Input the target sample data into each teacher network in the trusted execution environment to obtain a prediction result of each teacher network for the target sample data, and integrate the obtained prediction results to obtain a result corresponding to the The soft label value of the target sample data.
  • the trained student network in order to improve the trained student network to be a diverse (comprehensive) strong supervision model, so that the student network is stable and performs well in all aspects, instead of preference (weak supervision model, in some It performs better in terms of performance), and can perform integrated learning on the obtained prediction results of multiple teacher networks in the TEE.
  • the integrated learning of the obtained multiple prediction results when a certain teacher network has an error prediction for the target sample data, the error prediction can be corrected by other teacher networks, thereby reducing bagging and bias (boosting) and improving the effect of prediction (stacking).
  • the specific implementation manner of the integrated learning can be flexibly selected according to the actual situation, and one or more embodiments of this specification do not limit this. For example, voting, weighted average, etc. can be adopted.
  • algorithms such as Bagging (bootstrap aggregating, bagging; such as random forest), Boosting, and Stacking can be used.
  • Step 206 Perform knowledge distillation on the target sample data based on the soft label value and the original hard label value of the target sample data to obtain a student network in the target field.
  • the hard label value is the label value originally marked in the target sample data.
  • the hard label value is obtained by annotating the target sample data by the provider (belonging to the target field) of the target sample data.
  • the soft label value (soft target) corresponding to the target sample data through integrated learning
  • knowledge distillation is performed on the target sample data to obtain the target Network of students in the field.
  • the hard target originally labeled from the target sample data contains a lower amount of information (information entropy); while the soft target comes from the prediction output of the large model (teacher network), which has higher entropy. Can provide more information than hard target.
  • the soft target is used to assist the hard target to train together, that is, less data and a larger learning rate are used, so that a simpler student model with fewer parameter calculations can also have performance similar to that of a teacher network (and therefore also Can be understood as a way of model compression).
  • the training of the student network contains two objective functions: one corresponds to the hard target, that is, the original objective function, which is the cross-entropy of the class probability output of the student network and the true value of the label; the other corresponds to the soft target, which is The cross entropy of the category probability output of the student network and the category probability output of the teacher network.
  • the soft target add the temperature parameter T to the softmax function:
  • q i is the probability value of the i-th class
  • the input z i is the prediction vector (logarithmic logits) of the i-th class
  • logits is the original (non-standardized) generated by the classification model, and the prediction vector is usually passed to the normalization function.
  • logits are usually used as the input of the softmax function to generate a (normalized) probability vector from the softmax function, corresponding to each possible category.
  • the softmax function calculates the logit z i of each category as a probability q i by comparing the input z i with other logits.
  • the objective function corresponding to the hard target and the objective function corresponding to the soft target can be used as the final objective function of the student network through a weighted average. For example, it can be set to have a larger weight for soft target.
  • the value of T can take an intermediate value, and the weight assigned by the soft target is T ⁇ 2, and the weight of the hard target is 1.
  • other arbitrary weights can also be set, and one or more embodiments of this specification do not limit this.
  • a student network with strong interpretability can be obtained.
  • a classifier with strong interpretability can be used for training.
  • FIG. 3 is a flowchart of another method for knowledge transfer based on a machine learning model provided by an exemplary embodiment. As shown in Figure 3, the method is applied to the server and may include steps 304-306.
  • Step 302 Obtain teacher networks in multiple source fields and obtain target sample data in the target field, and read the obtained teacher networks into a trusted execution environment for decryption. Each teacher network obtains the results by training the sample data in their respective source fields. .
  • Step 304 Input the target sample data into each teacher network in the trusted execution environment to obtain a prediction result of each teacher network for the target sample data, and integrate the obtained prediction results to obtain a result corresponding to the target
  • the soft label value of the sample data is encrypted, and the soft label value is encrypted.
  • the encryption can be performed in the form of a digital envelope, which combines a symmetric encryption algorithm and an asymmetric encryption algorithm.
  • the provider of the teacher network can use the symmetric encryption algorithm to encrypt the teacher network (that is, use the symmetric key used by itself to encrypt the teacher network), and then use the asymmetric encryption algorithm
  • the public key (that is, the digital envelope public key) encrypts the symmetric key.
  • the provider can use the server public key (ie, the digital envelope public key) to encrypt the symmetric key used to encrypt the teacher network.
  • the process for the provider to obtain the server public key will be described in detail below.
  • the server can first obtain the symmetric key corresponding to the provider, and then use the obtained symmetric key to decrypt the data to be decrypted in the TEE.
  • the server private key ie, the digital envelope private key
  • TEE is a secure extension based on CPU hardware and a trusted execution environment that is completely isolated from the outside.
  • TEE was first proposed by Global Platform to solve the security isolation of resources on mobile devices, and parallel to the operating system to provide a trusted and secure execution environment for applications.
  • ARM's Trust Zone technology is the first to realize the real commercial TEE technology.
  • security requirements are getting higher and higher.
  • Not only mobile devices, cloud devices, and data centers have put forward more demands on TEE.
  • the concept of TEE has also been rapidly developed and expanded. Compared with the original concept, the TEE referred to now is a broader TEE. For example, server chip manufacturers Intel, AMD, etc.
  • TEE hardware-assisted TEE
  • enriched the concept and characteristics of TEE which has been widely recognized in the industry.
  • the TEE mentioned now usually refers more to this kind of hardware-assisted TEE technology.
  • cloud access requires remote access, and the end user is invisible to the hardware platform. Therefore, the first step in using TEE is to confirm the authenticity of TEE. Therefore, a remote certification mechanism can be introduced for the TEE technology, endorsed by hardware vendors (mainly CPU vendors) and digital signature technology to ensure that users can verify the state of the TEE.
  • hardware vendors mainly CPU vendors
  • digital signature technology to ensure that users can verify the state of the TEE.
  • TEEs including Intel SGX and AMD SEV also provide memory encryption technology to limit the trusted hardware to the CPU, and the data on the bus and memory are ciphertexts to prevent malicious users from snooping.
  • TEE technologies such as Intel’s Software Protection Extensions (SGX) isolate code execution, remote attestation, secure configuration, secure storage of data, and trusted paths for code execution.
  • the applications running in the TEE are protected by security and are almost impossible to be accessed by third parties.
  • SGX provides a circle, that is, an encrypted trusted execution area in the memory, and the CPU protects data from being stolen.
  • the CPU that supports SGX on the server side as an example, using the newly added processor instructions, a part of the area EPC (Enclave Page Cache, Enclave Page Cache, Enclave Page Cache) can be allocated in the memory, through the encryption engine MEE in the CPU (Memory Encryption Engine) encrypts the data in it.
  • MEE Memory Encryption Engine
  • the encrypted content in the EPC will only be decrypted into plaintext after entering the CPU. Therefore, in SGX, users can distrust the operating system, VMM (Virtual Machine Monitor), and even BIOS (Basic Input Output System). They only need to trust the CPU to ensure that private data will not leakage.
  • the TEE on the server side can be established through the SGX architecture.
  • the digital envelope public key is sent by the key management server to the provider of the data to be decrypted
  • the digital envelope private key is sent by the key management server to the TEE circle.
  • Step 306 Return the encrypted soft label value to the provider of the target sample data, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the value of the soft label.
  • the target sample data is originally marked with a hard label value, and knowledge distillation is performed on the target sample data to obtain a student network in the target field.
  • FIG. 4 is a flowchart of another method for knowledge transfer based on a machine learning model provided by an exemplary embodiment. As shown in FIG. 4, the method is applied to the provider of target sample data, and may include steps 402-406.
  • Step 402 Send the encrypted target sample data to the maintainer of the trusted execution environment, so that the maintainer can input the target sample data into teacher networks in multiple source fields in the trusted execution environment.
  • each teacher network is obtained by training the sample data of their respective source fields , And is decrypted in the trusted execution environment.
  • Step 404 Receive the encrypted soft label value returned by the maintainer, decrypt the received soft label value, and mark the original value based on the decrypted soft label value and the target sample data The hard label value of, the knowledge distillation is performed on the target sample data to obtain the student network in the target field.
  • the specific content of the sample data can be flexibly set according to actual application scenarios.
  • the data type of the sample data can include image, text, voice, and so on.
  • the labeling of sample data can also be flexibly set according to actual application scenarios, as described below with examples.
  • the potential risks of users or merchants can be predicted, such as the risks of predicting loans and real-time transactions.
  • the cooperation platform has docked and cooperated with merchants, and each merchant has accumulated a large amount of sample data during the business process.
  • the sample data in text form, or other data types
  • the sample data includes the user's basic information, behavior information, transaction information, and so on.
  • merchants can label sample data in the transaction risk dimension.
  • the newly accessed merchant a can cooperate with other merchants of the same type on the cooperation platform to perform joint modeling.
  • the newly-accessed merchant a belongs to the target field, a small amount of sample data it owns is the target sample data, and the risk control model to be trained is the student network; the other merchants on the cooperation platform are in the same industry as the newly-accessed merchant (For example, the merchants 1-n belonging to the same fund, insurance company, etc.) belong to the source field, and the merchants 1-n can use the large amount of sample data they have accumulated to train the teacher network to guide the training of the student network.
  • the merchant a can input the acquired user's basic information, behavior information, transaction information and other data into the student network, thereby predicting the risk score of the current transaction with the user.
  • the potential needs of users can be predicted, such as predicting the products the user wants to buy, news of interest, books that they like to read, and so on.
  • the cooperation platform has docked and cooperated with multiple sellers, and each seller has accumulated a large number of user purchase records in the course of business.
  • the sample data (in text form, or other data types) is user information such as occupation, income, age, gender, etc.
  • the merchant can mark the sample data according to the products purchased by the user in the user purchase record.
  • the newly connected seller a can cooperate with other sellers of the same type on the cooperation platform to perform joint modeling.
  • the newly accessed merchant a belongs to the target field, a small number of user purchase records in its own hands are used as the target sample data, and the product recommendation model to be trained is the student network; other sellers on the cooperation platform are the same as the newly accessed seller Sellers 1-n in the industry (for example, catering, clothing, etc.) belong to the source field, and sellers 1-n can use their accumulated large number of user purchase records training to obtain a teacher network to guide the training of the student network.
  • seller a can enter the user information of the acquired user into the student network, thereby predicting that the user may have a purchase demand product, and then recommending the corresponding product to the user based on the prediction result commodity.
  • the cooperation platform cooperates with many companies, and each company has accumulated a large amount of dialogue data in the process of providing customer service to users.
  • the sample data can be text, image, user's voice, etc. input by the user, and the annotation for the sample data is the content of the customer service's reply to the user in the conversation data.
  • another company a newly accesses the cooperation platform and hopes to provide users with intelligent customer service, if the conversation data between the user and the customer service is limited, it can work with other companies in the cooperation platform to conduct joint modeling.
  • companies 1-n that provide customer service services such as voice assistants, chat tools, and answering questions can conduct joint modeling through their own accumulated conversation data.
  • customer service services such as voice assistants, chat tools, and answering questions
  • the newly-connected company a belongs to the target field, the small amount of dialogue data it owns is the target sample data, and the customer service model to be trained is the student network; the company 1-n belongs to the source field, and the company 1-n can use each
  • the accumulated large amount of dialogue data is trained by the teacher network to guide the training of the student network.
  • enterprise a (or enterprise 1-n) can use the student network to provide users with intelligent customer service, that is, the conversation content (text, image, voice, etc.) initiated by the user as The input of the student network, and the output result as a reply to this conversation.
  • intelligent customer service that is, the conversation content (text, image, voice, etc.) initiated by the user as The input of the student network, and the output result as a reply to this conversation.
  • FIG. 5 is a flowchart of a user risk assessment method provided by an exemplary embodiment.
  • the evaluation method may include the following steps:
  • Step 502 Input the behavior information of the user of the target partner into the student risk control model corresponding to the target partner; the student risk control model uses the soft label value based on the target sample data of the target partner and the
  • the target sample data is originally marked as the hard label value of the risk label value, which is obtained by knowledge distillation of the target sample data, and the soft label value is calculated against the risk control model of multiple teachers in a trusted execution environment.
  • the prediction results of the target sample data are integrated, each teacher risk control model and the target sample data are decrypted in the trusted execution environment, and each teacher risk control model is obtained by training the corresponding sample data of other partners ; Among them, any sample data contains behavioral information marked with a risk label value.
  • Step 504 Determine the risk score of the user according to the output result of the student risk control model.
  • the student risk control model corresponds to the student network in the above embodiment in Figures 2-4
  • the teacher risk control model corresponds to the teacher network in the above embodiment in Figures 2-4 Corresponding.
  • the specific content of the sample data for training each model is the user's behavior information, and the marked content is the user's risk score; in other words, the input of each model is the user's behavior information, and the output is the user's risk score (including probability distribution).
  • Multiple parties cooperate on the same platform.
  • the target partner belongs to the target field and is the provider of the target sample data.
  • the model to be trained is the student risk control model.
  • the teacher risk control model of other partners can be used to guide the training of the student risk control model.
  • For the specific process of training refer to the embodiments shown in FIGS. 2-4, which will not be repeated here.
  • the student risk control model can be configured on the client side of the target partner. Then, after the target partner obtains the user's behavior information, The client can input behavior information into the student's risk control model to determine the user's risk score based on the output result, and then determine the subsequent processing method for the user. For example, when the risk score is low (indicating that the user is safer), consumer rights can be issued to the user; when the risk score is high (indicating that the user has potential risks), the user's registration request can be intercepted.
  • the student risk control model can be configured on the server side that is docked with the target partner. After obtaining the user's behavior information, the target partner can send the behavior information to the server through the client. The server uses the student risk control model to determine the user's risk score and returns to the client for display.
  • the target partner in order to improve the generalization ability and performance of the student's risk control model (that is, the generalization ability and performance of the teacher's risk control model can be better transferred to the student's risk control model), the target partner can be selected similar to the target partner Teacher risk control models of other partners with higher degrees to guide students' risk control model training.
  • it can be set that the target partner and the other partner belong to the same type of partner. For example, all belong to the catering category, and all belong to the financial category.
  • each teacher risk control model is obtained through training on its own sample data by the corresponding other partner.
  • other partners use their own labeled sample data to train the teacher's risk control model.
  • FIG. 6 is a flowchart of issuing public and private keys of digital envelopes according to an exemplary embodiment. As shown in FIG. 6, the process may include steps 602 to 616B.
  • step 602 the key management server 61 sends a verification request for SGX to the server 62.
  • the public key (that is, the server public key) and the private key (that is, the server private key) of the digital envelope can be generated by the key management server, and after the SGX on the server has passed the remote certification, the key management server Send the private key to the SGX circle on the server, and send the public key to the client docking with the server.
  • the key management server 61 which issued the EVM code of SGX, initiates a challenge to the server 62, requiring the server 62 to present a verification report to prove that the EVM code running in the SGX of the server 62 is owned by the key.
  • the management server 61 issues, or is consistent with the EVM code stored in the key management server 61.
  • step 604 the server 62 generates a verification report and signs it with the private key of the SGX CPU.
  • step 606 the server 62 returns a verification report to the key management server 61.
  • step 608 the key management server 61 forwards the verification report to the IAS 63.
  • the server 62 exports the EVM code of the SGX to generate a verification report based on the EVM code.
  • the EVM code can be hashed to obtain the corresponding hash value, and the hash value can be stored in the quote (quote structure), and the private key of the SGX CPU can be used to sign the quote (as a verification report).
  • Intel configures a private key for the CPU when the CPU leaves the factory, but does not disclose the public key corresponding to the private key, but configures it in Intel's IAS (Intel Attestation Server). Then, after using the CPU's private key to sign the verification report, since there is no corresponding public key, the key management server 61 needs to forward the quote returned by the server 62 to the IAS for the IAS to verify the signature.
  • IAS Intelligent Attestation Server
  • step 610 the IAS63 uses the public key of the CPU of the SGX to verify the signature.
  • the verification result is returned to the key management server 61.
  • an AVR report can be generated.
  • "YES” is used to indicate that the verification signature is passed
  • "NO” is used to indicate that the verification signature is not passed.
  • IAS in order to prevent the AVR report from being intercepted or modified during transmission, in addition to using SSL (Secure Sockets Layer) encryption for the transmission link, IAS can also use its own certificate to sign the AVR report.
  • SSL Secure Sockets Layer
  • step 612 the IAS 63 returns the verification result to the key management server 61.
  • step 614 the key management server 61 verifies the SGX.
  • the key management server 61 after receiving the verification result, the key management server 61 first verifies the signature of the IAS, and then obtains the verification result recorded in the AVR report after the verification is passed. If it is YES, compare the hash value in the quote with the local hash value (obtained by hash calculation of the locally maintained SGX EVM code). When the comparison results are consistent, it is determined that the remote attestation is passed.
  • step 616A the key management server 61 sends the public key of the digital envelope to the client 64 docking with the server.
  • the key management server 61 can sign the public key of the digital envelope, so that the client 64 can verify the authenticity of the public key.
  • the client segment 64 is a client used by a provider of the teacher network, or a client used by a provider of target sample data. In other words, both the target sample data and the provider of the teacher network can obtain the public key of the digital envelope in the above-mentioned manner.
  • step 616B the key management server 61 encrypts and transmits the private key of the digital envelope to the server 62.
  • the key management server 61 and the server 62 may negotiate a key for encrypting the private key of the digital envelope in the interaction process of step 602 and step 606. Then, the key management server 61 may encrypt the private key of the digital envelope through the key obtained through negotiation, so as to encrypt and transmit the private key of the digital envelope to the server 62.
  • the private key of the digital envelope can be passed into the circle of the server.
  • the server can contain multiple enclosures, and the above private key can be passed into the security enclosures in these enclosures; for example, the security enclosure can be a QE (Quoting Enclave) enclosure instead of an AE (Application Enclave) enclosure. ring.
  • FIG. 7 is an interaction diagram of a knowledge transfer solution based on a machine learning model provided by an exemplary embodiment. As shown in Figure 7, the interaction process may include the following steps:
  • step 702A the partner 1 obtains the teacher network 1 through the training of the private data marked by itself.
  • step 702B the partner 2 obtains the teacher network 2 through the training of the private data marked by itself.
  • step 702C the partner n obtains the teacher network n through the training of the private data marked by itself.
  • steps 702A-702C are mutually parallel steps, and there is no requirement on the time sequence.
  • “Merchant Health Score” is a risk assessment conducted by the server as a merchant cooperation platform to ISV (Independent Software Vendors) channel providers for merchants under the channel.
  • ISV Independent Software Vendors
  • Indicators through the evaluation of the "merchant health score” of the merchants under the channel, can help partners (ISV channel providers) to improve their risk control capabilities.
  • ISV channel providers modeling the models used to evaluate merchants’ health scores, due to limited merchant behavior data (ie limited sample data), merchant cooperation platforms can be used to obtain information from other partners (other ISV channel providers).
  • the accumulated business behavior data is jointly modeled.
  • the other partners of the joint modeling should have a certain relationship with the ISV channel provider, for example, belong to the same industry.
  • the following takes the ISV channel provider and partner 1-n joint modeling as an example for illustration.
  • the partner 1-n labels the behavior information of the merchants in the historical business process in the risk dimension, and then obtains the sample data (private data belonging to itself) used to train the teacher network, that is, the trained teacher network
  • the input of is the behavior information of the merchant
  • the output is the corresponding risk score.
  • the supervised machine learning algorithm used for training can be flexibly selected according to actual conditions, and one or more embodiments of this specification do not limit this.
  • the following takes the classifier as an example for description.
  • step 704A the partner 1 encrypts the teacher network 1.
  • step 704B the partner 2 encrypts the teacher network 2.
  • step 704C the partner n encrypts the teacher network n.
  • the partner 1-n can generate a symmetric key used by itself.
  • the teacher network can be encrypted with the symmetric key used by itself, and then the symmetric key can be encrypted with the public key of the digital envelope.
  • the ISV channel provider may send the target sample data (ie, the merchant behavior information it owns) to the cooperation platform, so that the cooperation platform can perform joint modeling with the partner 1-n based on the target sample data.
  • target sample data ie, the merchant behavior information it owns
  • step 706A the partner 1 sends the encrypted teacher network 1 to the cooperation platform.
  • step 706B the partner 2 sends the encrypted teacher network 2 to the cooperation platform.
  • step 706C the partner n sends the encrypted teacher network n to the cooperation platform.
  • this specification does not require the time sequence between steps 704A-704C and steps 706A-706C to be set in parallel.
  • the partner 1-n to send the teacher network to the cooperation platform, which can be flexibly set according to the actual situation.
  • the above steps 706A-706C are only an illustrative example, and one or more embodiments of this specification are not correct. This is limited.
  • the partner 1 can also receive the teacher network sent by the partner 2-n, and then the partner 1 can send the encrypted teacher network 1-n to the cooperation platform.
  • Step 708 the cooperation platform reads the teacher network 1-n into the TEE for decryption.
  • Step 710 When the target sample data is received, the cooperation platform reads the target sample data into the TEE for decryption.
  • the private key of the digital envelope is first used to decrypt the symmetric key of the partner 1, and then the decrypted symmetric key is used to decrypt the teacher network 1.
  • the decryption methods of other teacher networks and target sample data are similar to this, so I won’t repeat them here.
  • step 712 the cooperation platform inputs the target sample data into the teacher network 1-n to obtain prediction results 1-n.
  • each classifier fk (teacher network) can predict A probability distribution fk(xi) is obtained, then each fk(xi) can be integrated through integrated learning technology to obtain the final score.
  • Step 714 The cooperation platform integrates the prediction results 1-n to obtain the soft label value corresponding to the target sample data.
  • the obtained prediction results 1-n can be integrated learning to obtain the soft label value corresponding to the target sample data.
  • the result of ensemble learning is used as the soft label value corresponding to the target sample data.
  • the specific implementation manner of the integrated learning can be flexibly selected according to the actual situation, and one or more embodiments of this specification do not limit this. For example, voting, averaging, etc. can be adopted. For another example, algorithms such as Bagging (bootstrap aggregating, bagging; such as random forest), Boosting, and Stacking can be used.
  • Bagging bootsstrap aggregating, bagging; such as random forest
  • Boosting Boosting
  • Stacking can be used.
  • step 716 the cooperation platform performs knowledge distillation on the target sample data to obtain a student network based on the soft label value and the original hard label value of the target sample data.
  • the probability distribution output of all classifiers after differential privacy processing is averaged, and the final probability output obtained by averaging is used as a soft target to guide students' network learning.
  • the student network can be configured on the client side of the ISV channel provider.
  • the ISV channel provider can input the behavior information to the student network through the client to determine according to the output result
  • the risk score of the merchant determines the subsequent processing method for the merchant. For example, when the risk score is low (indicating that the merchant is safer), consumer rights can be issued to the merchant; when the risk score is high (indicating that the merchant has potential risks), the merchant's registration request can be intercepted.
  • the student network can be configured on the cooperation platform, then the ISV channel provider can send the behavior information to the cooperation platform through the client after obtaining the behavior information of the merchant, so that the cooperation platform can use the student network to determine The risk score of the merchant is returned to the client for display.
  • this specification also provides device embodiments.
  • the embodiments of the user risk assessment device in this specification can be applied to electronic equipment.
  • the device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware.
  • Taking software implementation as an example as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
  • FIG. 8 is a schematic structural diagram of a device provided by an exemplary embodiment. Please refer to FIG. 8.
  • the device includes a processor 802, an internal bus 804, a network interface 806, a memory 808, and a non-volatile memory 810.
  • the processor 802 reads the corresponding computer program from the non-volatile memory 810 to the memory 808 and then runs it to form a user risk assessment device on a logical level.
  • one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, and so on. That is to say, the execution subject of the following processing flow is not limited to each
  • the logic unit can also be a hardware or a logic device.
  • the user risk assessment device may include: an information input unit 91, which inputs the behavior information of the user of the target partner into the student risk control model corresponding to the target partner; the student The risk control model is obtained by performing knowledge distillation on the target sample data based on the soft label value of the target sample data of the target partner and the risk label value originally marked as the hard label value of the target sample data.
  • the soft label value is obtained by integrating the prediction results of multiple teacher risk control models for the target sample data in a trusted execution environment.
  • Each teacher risk control model is decrypted in the trusted execution environment, and each teacher's risk control model is decrypted in the trusted execution environment.
  • the control model is obtained by training the corresponding sample data of other partners; wherein any sample data contains behavior information marked with a risk label value; the risk assessment unit 92 determines the risk control model according to the output result of the student risk control model. State the user’s risk score.
  • the target partner and the other partners belong to the same type of partner.
  • each teacher's risk control model is obtained by training on its own sample data by corresponding other partners.
  • the embodiment of the knowledge transfer device based on the machine learning model of this specification can be applied to electronic equipment.
  • the device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware.
  • Taking software implementation as an example as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
  • FIG. 10 is a schematic structural diagram of a device provided by an exemplary embodiment. Please refer to FIG. 10.
  • the device includes a processor 1002, an internal bus 1004, a network interface 1006, a memory 1008, and a non-volatile memory 1010.
  • the processor 1002 reads the corresponding computer program from the non-volatile memory 1010 to the memory 10010 and then runs it to form a knowledge transfer device based on the machine learning model at the logical level.
  • one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, and so on. That is to say, the execution subject of the following processing flow is not limited to each
  • the logic unit can also be a hardware or a logic device.
  • the knowledge transfer device based on the machine learning model may include: an acquiring unit 1101, acquiring a network of teachers in multiple source fields and acquiring target sample data in a target field, and combining the acquired teachers
  • the network is read into the trusted execution environment for decryption, and each teacher network is obtained by training sample data in their respective source fields;
  • Each teacher network predicts the result of the target sample data, and integrates the obtained prediction results to obtain the soft label value corresponding to the target sample data;
  • the training unit 1103 is based on the soft label value and the target sample data For the originally marked hard label value, knowledge distillation is performed on the target sample data to obtain a student network in the target field.
  • each source domain and the target domain are of the same type.
  • each teacher network is obtained by training the data providers in their respective source fields with their own private data as sample data.
  • the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
  • the embodiments of the user risk assessment device in this specification can be applied to electronic equipment.
  • the device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware.
  • Taking software implementation as an example as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
  • FIG. 12 is a schematic structural diagram of a device provided by an exemplary embodiment.
  • the device includes a processor 1202, an internal bus 1204, a network interface 1206, a memory 1208, and a non-volatile memory 1210.
  • the processor 1202 reads the corresponding computer program from the non-volatile memory 1210 to the memory 1208 and then runs it to form a knowledge transfer device based on a machine learning model on a logical level.
  • one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, and so on. That is to say, the execution subject of the following processing flow is not limited to each
  • the logic unit can also be a hardware or a logic device.
  • the knowledge transfer device based on the machine learning model may include: an acquisition unit 1301, which acquires teacher networks in multiple source fields and acquires target sample data in the target field, and combines the acquired teachers The network is read into the trusted execution environment for decryption, and each teacher network is obtained by training the sample data of their respective source fields; the integration unit 1302, in the trusted execution environment, respectively input the target sample data into each teacher network to obtain For the prediction results of the target sample data, each teacher network integrates the obtained prediction results to obtain the soft label value corresponding to the target sample data, and encrypts the soft label value; the returning unit 1303 sends the The provider of the target sample data returns the encrypted soft label value, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the original target sample data The marked hard label value is used to perform knowledge distillation on the target sample data to obtain a student network in the target field.
  • the data to be decrypted in the trusted execution environment is encrypted by the corresponding provider using its own symmetric key, and the data to be decrypted includes any teacher network and/or the target sample data;
  • the obtaining unit 1301 is specifically configured to: obtain the symmetric key of the provider of the data to be decrypted; and decrypt the data to be decrypted by using the obtained symmetric key in the trusted execution environment.
  • the symmetric key used to encrypt the data to be decrypted is encrypted with a digital envelope public key; the obtaining unit 1301 is further configured to: pass the digital envelope private key in the trusted execution environment to The symmetric key for encrypting the data to be decrypted is decrypted to obtain the decrypted symmetric key.
  • the trusted execution environment is established through an SGX architecture, and after the trusted execution environment is remotely certified by a key management server, the digital envelope public key is sent by the key management server to the For the provider of the data to be decrypted, the digital envelope private key is sent by the key management server to the circle of the trusted execution environment.
  • the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
  • the embodiments of the user risk assessment device in this specification can be applied to electronic equipment.
  • the device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware.
  • Taking software implementation as an example as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
  • FIG. 14 is a schematic structural diagram of a device provided by an exemplary embodiment.
  • the device includes a processor 1402, an internal bus 1404, a network interface 1406, a memory 1408, and a non-volatile memory 1410.
  • the processor 1402 reads the corresponding computer program from the non-volatile memory 1410 to the memory 1408 and then runs it to form a knowledge transfer device based on a machine learning model at the logical level.
  • one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, and so on. That is to say, the execution subject of the following processing flow is not limited to each
  • the logic unit can also be a hardware or a logic device.
  • the machine learning model-based knowledge transfer device may include: a sending unit 1501, which sends target sample data to the maintainer of the trusted execution environment, so that the maintainer is in the available In the letter execution environment, the target sample data is input into teacher networks in multiple source fields to obtain the prediction results of each teacher network for the target sample data, and the obtained prediction results are integrated to obtain the target sample data corresponding to the target sample data.
  • a sending unit 1501 which sends target sample data to the maintainer of the trusted execution environment, so that the maintainer is in the available In the letter execution environment, the target sample data is input into teacher networks in multiple source fields to obtain the prediction results of each teacher network for the target sample data, and the obtained prediction results are integrated to obtain the target sample data corresponding to the target sample data.
  • the soft label value of each teacher network is obtained by training the sample data of their respective source fields and is decrypted in the trusted execution environment; the training unit 1502 receives the encrypted soft label returned by the maintainer Value, decrypt the received soft label value, and perform knowledge distillation on the target sample data based on the decrypted soft label value and the original hard label value of the target sample data to obtain the Describe the student network in the target field.
  • the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
  • the computer includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • 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, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media, can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word “if” as used herein can be interpreted as "when” or “when” or "in response to determination”.

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Educational Administration (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Tourism & Hospitality (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • Game Theory and Decision Science (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Educational Technology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A user risk assessment method, comprising: inputting behavior information of a user of a target partner into a student risk control model corresponding to the target partner, the student risk control model being obtained by performing knowledge distillation on target sample data on the basis of a soft tag value of the target sample data of the target partner and a risk tag value of the target sample data originally marked as a hard tag value; the soft tag value being obtained by integrating the prediction results of the target sample data on a plurality of teacher risk control models in a trusted execution environment; the teacher risk control models being decrypted in the trusted execution environment, and being obtained by training corresponding sample data of other partners; any sample data comprising behavior information marked with the risk tag value; and determining the risk score according to the output result of the student risk control model. According to the method, the partners can cooperatively train the student risk model used for performing risk assessment while ensuring the privacy of the partners.

Description

用户风险评估方法及装置、电子设备、存储介质User risk assessment method and device, electronic equipment, storage medium 技术领域Technical field
本说明书一个或多个实施例涉及人工智能技术领域,尤其涉及一种用户风险评估方法及装置、电子设备、存储介质。One or more embodiments of this specification relate to the field of artificial intelligence technology, and in particular to a user risk assessment method and device, electronic equipment, and storage medium.
背景技术Background technique
风险控制是指风险管理者采取各种措施和方法,消灭或减少风险事件发生的各种可能性,或风险控制者减少风险事件发生时造成的损失。企业通过对用户潜在的风险进行精准识别,可以提升自身以及合作伙伴的安全防护能力,有助于业务增长。Risk control means that risk managers take various measures and methods to eliminate or reduce the various possibilities of risk events, or risk controllers to reduce the losses caused when risk events occur. By accurately identifying potential risks for users, companies can improve the security protection capabilities of themselves and their partners, and contribute to business growth.
发明内容Summary of the invention
有鉴于此,本说明书一个或多个实施例提供一种用户风险评估方法及装置、电子设备、存储介质。In view of this, one or more embodiments of this specification provide a user risk assessment method and device, electronic equipment, and storage medium.
为实现上述目的,本说明书一个或多个实施例提供技术方案如下。In order to achieve the foregoing objectives, one or more embodiments of the present specification provide the following technical solutions.
根据本说明书一个或多个实施例的第一方面,提出了一种用户风险评估方法,包括:将目标合作方的用户的行为信息输入对应于所述目标合作方的学生风控模型;所述学生风控模型通过基于所述目标合作方的目标样本数据的软标签值和所述目标样本数据原本被标注的被作为硬标签值的风险标签值,对所述目标样本数据进行知识蒸馏得到,所述软标签值通过在可信执行环境内对多个教师风控模型针对所述目标样本数据的预测结果进行集成得到,各个教师风控模型在所述可信执行环境内被解密,各个教师风控模型通过对相应的其他合作方的样本数据进行训练得到;其中,任一样本数据包含被标注有风险标签值的行为信息;根据所述学生风控模型的输出结果确定所述用户的风险评分。According to the first aspect of one or more embodiments of this specification, a user risk assessment method is proposed, which includes: inputting behavior information of users of a target partner into a student risk control model corresponding to the target partner; The student risk control model is obtained by knowledge distillation of the target sample data based on the soft label value of the target sample data of the target partner and the risk label value originally marked as the hard label value of the target sample data. The soft label value is obtained by integrating the prediction results of multiple teacher risk control models for the target sample data in a trusted execution environment. Each teacher risk control model is decrypted in the trusted execution environment, and each teacher The risk control model is obtained by training the corresponding sample data of other partners; wherein any sample data contains behavioral information marked with a risk label value; the risk of the user is determined according to the output result of the student risk control model score.
根据本说明书一个或多个实施例的第二方面,提出了一种基于机器学习模型的知识迁移方法,包括:获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到;在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,并对得到的预测结果进行集 成得到对应于所述目标样本数据的软标签值;基于所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。According to the second aspect of one or more embodiments of this specification, a knowledge transfer method based on a machine learning model is proposed, which includes: obtaining teacher networks in multiple source fields and obtaining target sample data in the target field, and obtaining The teacher network in the trusted execution environment is read into the trusted execution environment for decryption, and each teacher network is obtained by training the sample data of their respective source fields; in the trusted execution environment, the target sample data is input into each teacher network to obtain each teacher The network predicts the result of the target sample data, and integrates the obtained prediction results to obtain the soft label value corresponding to the target sample data; based on the soft label value and the hard label originally marked on the target sample data Value, perform knowledge distillation on the target sample data to obtain a student network in the target field.
根据本说明书一个或多个实施例的第三方面,提出了一种基于机器学习模型的知识迁移方法,包括:获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到;在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值,并对所述软标签值进行加密;向所述目标样本数据的提供方返回加密后的所述软标签值,以使得所述提供方对接收到的软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。According to the third aspect of one or more embodiments of this specification, a knowledge transfer method based on a machine learning model is proposed, which includes: obtaining teacher networks in multiple source fields and obtaining target sample data in the target field, and obtaining The teacher network in the trusted execution environment is read into the trusted execution environment for decryption, and each teacher network is obtained by training the sample data of their respective source fields; in the trusted execution environment, the target sample data is input into each teacher network to obtain each teacher According to the prediction result of the target sample data, the network integrates the obtained prediction results to obtain the soft label value corresponding to the target sample data, and encrypts the soft label value; to the provider of the target sample data Return the encrypted soft label value, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the hard label value originally marked by the target sample data, Perform knowledge distillation on the target sample data to obtain a student network in the target field.
根据本说明书一个或多个实施例的第四方面,提出了一种基于机器学习模型的知识迁移方法,包括:向可信执行环境的维护方发送目标样本数据,以使得所述维护方在所述可信执行环境内分别将所述目标样本数据输入多个源领域的教师网络以得到各个教师网络针对所述目标样本数据的预测结果,以及对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;各个教师网络通过对各自源领域的样本数据进行训练得到,且在所述可信执行环境内被解密;接收所述维护方返回的加密后的所述软标签值,对接收到的所述软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。According to the fourth aspect of one or more embodiments of this specification, a method for knowledge transfer based on a machine learning model is proposed, which includes: sending target sample data to a maintainer of a trusted execution environment, so that the maintainer is In the trusted execution environment, the target sample data is input into teacher networks in multiple source fields to obtain the prediction results of each teacher network for the target sample data, and the obtained prediction results are integrated to obtain the corresponding target sample data. The soft label value of the sample data; each teacher network is obtained by training the sample data in their respective source fields and is decrypted in the trusted execution environment; receiving the encrypted soft label value returned by the maintainer, Decrypt the received soft label value, and perform knowledge distillation on the target sample data based on the decrypted soft label value and the original hard label value of the target sample data to obtain the target Network of students in the field.
根据本说明书一个或多个实施例的第五方面,提出了一种用户风险评估装置,包括:信息输入单元,将目标合作方的用户的行为信息输入对应于所述目标合作方的学生风控模型;所述学生风控模型通过基于所述目标合作方的目标样本数据的软标签值和所述目标样本数据原本被标注的被作为硬标签值的风险标签值,对所述目标样本数据进行知识蒸馏得到,所述软标签值通过在可信执行环境内对多个教师风控模型针对所述目标样本数据的预测结果进行集成得到,各个教师风控模型在所述可信执行环境内被解密,各个教师风控模型通过对相应的其他合作方的样本数据进行训练得到;其中,任一样本数据包含被标注有风险标签值的行为信息;风险评估单元,根据所述学生风控模型的输出结果确定所述用户的风险评分。According to the fifth aspect of one or more embodiments of this specification, a user risk assessment device is proposed, which includes: an information input unit that inputs behavior information of a user of a target partner into student risk control corresponding to the target partner Model; the student risk control model is based on the target sample data soft label value of the target sample data and the target sample data originally marked as the hard label value of the risk label value, the target sample data Knowledge distillation is obtained. The soft label value is obtained by integrating the prediction results of multiple teacher risk control models for the target sample data in a trusted execution environment, and each teacher risk control model is obtained in the trusted execution environment. Decrypted, each teacher's risk control model is obtained by training the corresponding sample data of other partners; among them, any sample data contains behavioral information marked with a risk label value; the risk assessment unit is based on the student's risk control model The output result determines the risk score of the user.
根据本说明书一个或多个实施例的第六方面,提出了一种基于机器学习模型的知识迁移装置,包括:获取单元,获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到;集成单元,在所述可信执行环境内分别所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,并对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;训练单元,基于所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。According to the sixth aspect of one or more embodiments of this specification, a knowledge transfer device based on a machine learning model is proposed, which includes: an acquiring unit, acquiring teacher networks in multiple source fields, and acquiring target sample data in the target field, and Read the obtained teacher network into the trusted execution environment for decryption. Each teacher network is obtained by training the sample data of their respective source fields; the integration unit, in the trusted execution environment, the target sample data is input to each teacher Network to obtain the prediction results of each teacher network for the target sample data, and integrate the obtained prediction results to obtain the soft label value corresponding to the target sample data; the training unit is based on the soft label value and the target The sample data is originally marked with hard label values, and knowledge distillation is performed on the target sample data to obtain a student network in the target field.
根据本说明书一个或多个实施例的第七方面,提出了一种基于机器学习模型的知识迁移装置,包括:获取单元,获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到;集成单元,在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值,并对所述软标签值进行加密;返回单元,向所述目标样本数据的提供方返回加密后的所述软标签值,以使得所述提供方对接收到的软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。According to the seventh aspect of one or more embodiments of this specification, a knowledge transfer device based on a machine learning model is proposed, which includes: an acquiring unit, acquiring teacher networks in multiple source fields, and acquiring target sample data in the target field, and Read the acquired teacher network into the trusted execution environment for decryption. Each teacher network is obtained by training the sample data of their respective source fields; the integration unit inputs the target sample data into each of the trusted execution environments. The teacher network obtains the prediction results of each teacher network for the target sample data, integrates the obtained prediction results to obtain a soft label value corresponding to the target sample data, and encrypts the soft label value; a returning unit, Return the encrypted soft label value to the provider of the target sample data, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the target sample The data is originally marked with hard label values, and knowledge distillation is performed on the target sample data to obtain a student network in the target field.
根据本说明书一个或多个实施例的第八方面,提出了一种基于机器学习模型的知识迁移装置,包括:发送单元,向可信执行环境的维护方发送目标样本数据,以使得所述维护方在所述可信执行环境内分别将所述目标样本数据输入多个源领域的教师网络以得到各个教师网络针对所述目标样本数据的预测结果,以及对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;各个教师网络通过对各自源领域的样本数据进行训练得到,且在所述可信执行环境内被解密;训练单元,接收所述维护方返回的加密后的所述软标签值,对接收到的所述软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。According to the eighth aspect of one or more embodiments of this specification, a knowledge transfer device based on a machine learning model is proposed, including: a sending unit that sends target sample data to a maintainer of a trusted execution environment, so that the maintenance In the trusted execution environment, each party inputs the target sample data into teacher networks in multiple source fields to obtain the prediction results of each teacher network for the target sample data, and integrates the obtained prediction results to obtain corresponding The soft label value of the target sample data; each teacher network is obtained by training the sample data in their respective source fields and is decrypted in the trusted execution environment; the training unit receives the encrypted data returned by the maintainer The soft label value decrypts the received soft label value, and performs knowledge on the target sample data based on the decrypted soft label value and the original hard label value of the target sample data Distill to get a network of students in the target field.
根据本说明书一个或多个实施例的第九方面,提出了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器通过运行所述可执行指令以实现如上述第一方面中所述的用户风险评估方法。According to a ninth aspect of one or more embodiments of this specification, an electronic device is proposed, including: a processor; a memory for storing executable instructions of the processor; wherein the processor runs the executable instructions In order to realize the user risk assessment method as described in the above first aspect.
根据本说明书一个或多个实施例的第十方面,提出了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器通过运行所述可执行指令以实现如上述第二方面中所述的基于机器学习模型的知识迁移方法。According to a tenth aspect of one or more embodiments of this specification, an electronic device is proposed, including: a processor; a memory for storing executable instructions of the processor; wherein the processor runs the executable instructions In order to realize the knowledge transfer method based on the machine learning model as described in the above second aspect.
根据本说明书一个或多个实施例的第十一方面,提出了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器通过运行所述可执行指令以实现如上述第三方面中所述的基于机器学习模型的知识迁移方法。According to the eleventh aspect of one or more embodiments of this specification, an electronic device is proposed, including: a processor; a memory for storing executable instructions of the processor; wherein the processor runs the executable Instructions to implement the knowledge transfer method based on the machine learning model as described in the third aspect above.
根据本说明书一个或多个实施例的第十二方面,提出了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器通过运行所述可执行指令以实现如上述第四方面中所述的基于机器学习模型的知识迁移方法。According to a twelfth aspect of one or more embodiments of this specification, an electronic device is proposed, including: a processor; a memory for storing executable instructions of the processor; wherein the processor runs the executable Instructions to implement the knowledge transfer method based on the machine learning model as described in the fourth aspect above.
根据本公开实施例的第十三方面,提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如上述第一方面中所述用户风险评估方法的步骤。According to a thirteenth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having computer instructions stored thereon, which when executed by a processor implements the steps of the user risk assessment method described in the first aspect.
根据本公开实施例的第十四方面,提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如上述第二方面中所述基于机器学习模型的知识迁移方法的步骤。According to a fourteenth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, realizes the knowledge transfer based on the machine learning model as described in the second aspect above Method steps.
根据本公开实施例的第十五方面,提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如上述第三方面中所述基于机器学习模型的知识迁移方法的步骤。According to a fifteenth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having computer instructions stored thereon, and when the instructions are executed by a processor, the machine learning model-based knowledge transfer as described in the third aspect is realized Method steps.
根据本公开实施例的第十六方面,提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如上述第四方面中所述基于机器学习模型的知识迁移方法的步骤。According to a sixteenth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having computer instructions stored thereon, and when the instructions are executed by a processor, the machine learning model-based knowledge transfer as described in the above fourth aspect is realized Method steps.
附图说明Description of the drawings
图1是一示例性实施例提供的一种基于机器学习模型的知识迁移系统的架构示意图。Fig. 1 is a schematic structural diagram of a knowledge transfer system based on a machine learning model provided by an exemplary embodiment.
图2是一示例性实施例提供的一种基于机器学习模型的知识迁移方法的流程图。Fig. 2 is a flowchart of a method for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
图3是一示例性实施例提供的另一种基于机器学习模型的知识迁移方法的流程图。Fig. 3 is a flowchart of another method for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
图4是一示例性实施例提供的另一种基于机器学习模型的知识迁移方法的流程图。Fig. 4 is a flowchart of another method for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
图5是一示例性实施例提供的一种用户风险评估方法的流程图。Fig. 5 is a flowchart of a user risk assessment method provided by an exemplary embodiment.
图6是一示例性实施例提供的发放数字信封的公私钥的流程图。Fig. 6 is a flowchart of issuing public and private keys of a digital envelope according to an exemplary embodiment.
图7是一示例性实施例提供的一种基于机器学习模型的知识迁移方法的交互图。Fig. 7 is an interaction diagram of a method for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
图8是一示例性实施例提供的一种设备的结构示意图。Fig. 8 is a schematic structural diagram of a device provided by an exemplary embodiment.
图9是一示例性实施例提供的一种用户风险评估装置的框图。Fig. 9 is a block diagram of a user risk assessment device provided by an exemplary embodiment.
图10是一示例性实施例提供的另一种设备的结构示意图。Fig. 10 is a schematic structural diagram of another device provided by an exemplary embodiment.
图11是一示例性实施例提供的一种基于机器学习模型的知识迁移装置的框图。Fig. 11 is a block diagram of a device for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
图12是一示例性实施例提供的另一种设备的结构示意图。Fig. 12 is a schematic structural diagram of another device provided by an exemplary embodiment.
图13是一示例性实施例提供的另一种基于机器学习模型的知识迁移装置的框图。Fig. 13 is a block diagram of another apparatus for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
图14是一示例性实施例提供的另一种设备的结构示意图。Fig. 14 is a schematic structural diagram of another device provided by an exemplary embodiment.
图15是一示例性实施例提供的另一种基于机器学习模型的知识迁移装置的框图。Fig. 15 is a block diagram of another apparatus for knowledge transfer based on a machine learning model provided by an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。The exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with one or more embodiments of this specification. Rather, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。It should be noted that in other embodiments, the steps of the corresponding method may not be executed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step in other embodiments. description.
图1是一示例性实施例提供的一种基于机器学习模型的知识迁移系统的架构示意图。如图1所示,该系统可以包括服务器11、网络12、若干电子设备,比如手机13、手机14和PC15-16等。Fig. 1 is a schematic structural diagram of a knowledge transfer system based on a machine learning model provided by an exemplary embodiment. As shown in Figure 1, the system may include a server 11, a network 12, and several electronic devices, such as a mobile phone 13, a mobile phone 14, and a PC15-16.
服务器11可以为包含一独立主机的物理服务器,或者该服务器11可以为主机集群承载的虚拟服务器。在运行过程中,服务器11作为服务端与各个合作方对接,也即向各个合作方提供合作的平台,用于将与之对接的各个合作方训练的教师网络的性能迁 移到学生网络中。The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server carried by a host cluster. During operation, the server 11 is used as a server to interface with each partner, that is, to provide a platform for cooperation with each partner, for migrating the performance of the teacher network trained by each partner to the student network.
手机13-14、PC15-16只是用户可以使用的一种类型的电子设备。实际上,与服务器11对接的合作方显然还可以使用诸如下述类型的电子设备:平板设备、笔记本电脑、掌上电脑(PDAs,Personal Digital Assistants)、可穿戴设备(如智能眼镜、智能手表等)等,本说明书一个或多个实施例并不对此进行限制。在本说明书一个或多个实施例的技术方案中,各个合作方利用自身的样本数据训练得到教师网络,从而可指导相关的学生网络的训练,将教师网络学习到的模型参数(也可理解为教师网络学到的知识)分享给学生网络从而提升学生网络的性能。Mobile phones 13-14 and PC15-16 are just one type of electronic equipment that users can use. In fact, the partners that interface with the server 11 can obviously also use electronic devices such as the following types: tablet devices, notebook computers, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.) Etc., one or more embodiments of this specification do not limit this. In the technical solutions of one or more embodiments of this specification, each partner uses its own sample data to train to obtain a teacher network, which can guide the training of related student networks, and take the model parameters learned by the teacher network (also can be understood as The knowledge learned by the teacher network) is shared with the student network to improve the performance of the student network.
而对于手机13-14、PC15-16与服务器11之间进行交互的网络12,可以包括多种类型的有线或无线网络。在一实施例中,该网络12可以包括公共交换电话网络(Public Switched Telephone Network,PSTN)和因特网。As for the network 12 for interaction between the mobile phone 13-14, the PC 15-16 and the server 11, it may include multiple types of wired or wireless networks. In an embodiment, the network 12 may include a Public Switched Telephone Network (PSTN) and the Internet.
图2是一示例性实施例提供的一种基于机器学习模型的知识迁移方法的流程图。如图2所示,该方法应用于服务端,可以包括步骤202~206。Fig. 2 is a flowchart of a method for knowledge transfer based on a machine learning model provided by an exemplary embodiment. As shown in Figure 2, the method is applied to the server and may include steps 202-206.
步骤202,获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到。Step 202: Obtain teacher networks in multiple source fields and obtain target sample data in the target field, and read the obtained teacher networks into a trusted execution environment for decryption. Each teacher network obtains the results by training the sample data in their respective source fields. .
在本实施例中,在训练监督式机器学习模型时,收集标注有标签值的样本数据可能存在一定困难,例如,样本数据因时间问题积累较少,收集样本数据的数据量较大,耗时,成本较高。进一步的,即便在样本数据充足的情况下,从头开始构建模型的成本较高,效率较低。因此。当存在训练某一领域的监督式机器学习模型的需求时,可利用迁移学习(Transfer Learning)技术,将与该领域相关(比如,属于同一类型,相似度较高等)的已经训练好的模型学习到的知识,迁移至该领域的机器学习模型中,从而提高训练模型的效率。换言之,利用已有的知识来学习新的知识,已有的知识和新的知识之间存在相似性。在迁移学习中,将已有知识所属领域称为源领域(source domain),待学习的新知识所属领域称为目标领域(target domain);其中,源领域通常有大量标签数据,而目标领域往往只有少量标签样本,源领域和目标领域不同但有一定关联,可通过减小源领域和目标领域的分布差异,进而进行知识迁移。In this embodiment, when training a supervised machine learning model, it may be difficult to collect sample data labeled with label values. For example, sample data is less accumulated due to time issues, and the amount of data collected for sample data is relatively large, which is time-consuming. ,higher cost. Furthermore, even when the sample data is sufficient, the cost of building a model from scratch is higher and the efficiency is lower. therefore. When there is a need to train a supervised machine learning model in a certain field, transfer learning (Transfer Learning) technology can be used to learn from the trained model that is related to the field (for example, of the same type, high similarity, etc.) The acquired knowledge is transferred to the machine learning model in the field, thereby improving the efficiency of training the model. In other words, using existing knowledge to learn new knowledge, there are similarities between existing knowledge and new knowledge. In transfer learning, the domain of the existing knowledge is called the source domain, and the domain of the new knowledge to be learned is called the target domain. Among them, the source domain usually has a large amount of label data, while the target domain often There are only a small number of label samples, and the source field and the target field are different but related to a certain extent. Knowledge transfer can be carried out by reducing the distribution difference between the source field and the target field.
进一步的,在迁移过程中,引入知识蒸馏(Knowledge Distillation)技术来提高待训练模型的泛化能力和性能。具体而言,采用教师-学生网络(teacher-student network), 通过对教师网络进行知识蒸馏以指导训练学生网络。其中,教师网络往往是一个更加复杂的网络,具有非常好的性能和泛化能力,可以将教师网络作为一个soft target来指导另外一个更加简单的学生网络进行学习,使得更加简单、参数运算量更少的学生模型也能够具有和教师网络相近的性能。Further, in the migration process, knowledge distillation (Knowledge Distillation) technology is introduced to improve the generalization ability and performance of the model to be trained. Specifically, the teacher-student network is used to guide the training of the student network by distilling the knowledge of the teacher network. Among them, the teacher network is often a more complex network with very good performance and generalization ability. The teacher network can be used as a soft target to guide another simpler student network to learn, making it simpler and more computationally expensive. A few student models can also have performance similar to that of a teacher network.
在本说明书一个或多个实施例的技术方案中,教师网络与源领域相对应,即由源领域已经训练好的监督式学习模型作为教师网络,用于指导学生网络的学习,将自身学习到的知识迁移至学生网络,而学生网络与目标领域相对应,即由目标领域的待训练模型作为学生网络。In the technical solutions of one or more embodiments of this specification, the teacher network corresponds to the source domain, that is, the supervised learning model that has been trained in the source domain is used as the teacher network to guide students' network learning and learn from themselves The knowledge of is transferred to the student network, and the student network corresponds to the target field, that is, the model to be trained in the target field is used as the student network.
在本实施例中,当与服务端对接的某一合作方存在待训练模型时,服务端可通过对其他与该合作方所属领域相关的合作方已经训练好的监督式机器学习模型进行迁移学习,以指导该待训练模型的学习。那么,在训练目标领域的学生网络的过程中,无需重新收集大量目标领域的样本数据以进行训练,从而可提高训练学生网络的效率。同时,学生网络还可继承教师网络较好的泛化能力和性能。In this embodiment, when a partner docking with the server has a model to be trained, the server can perform migration learning on the supervised machine learning models that have been trained by other partners related to the partner's field. To guide the learning of the model to be trained. Then, in the process of training the student network in the target field, there is no need to recollect a large amount of sample data in the target field for training, so that the efficiency of training the student network can be improved. At the same time, the student network can also inherit the better generalization ability and performance of the teacher network.
在本实施例中,可以选取一个或多个教师网络来指导学生网络的训练。其中,源领域与教师网络一一对应。为了提高学生网络的泛化能力和性能(即能够将教师网络的泛化能力和性能较好地迁移至学生网络),可选取与目标领域相似度较高的领域作为源领域。作为一示例性实施例,可设定为各个源领域与目标领域属于同一类型。例如,在图像识别领域,均用于识别车辆、均用于识别猫科动物、均用于人脸识别等。In this embodiment, one or more teacher networks can be selected to guide the training of student networks. Among them, there is a one-to-one correspondence between the source field and the teacher network. In order to improve the generalization ability and performance of the student network (that is, the generalization ability and performance of the teacher network can be better transferred to the student network), a field with higher similarity to the target field can be selected as the source field. As an exemplary embodiment, it can be set that each source domain and target domain belong to the same type. For example, in the field of image recognition, both are used to recognize vehicles, both are used to recognize felines, and both are used for face recognition.
在本实施例中,在选取多个教师网络的情况下,本说明书的基于机器学习模型的知识迁移方案,可理解为各个源领域的数据提供方共同协同合作来完成对学生网络的训练,即多个数据提供方拥有自己的样本数据,可共同使用彼此的数据来统一训练机器学习模型。需要注意的是,各个数据提供方的样本数据属于自身的隐私数据,因此上述多方联合建模(joint modelling)的过程应在保证各方数据安全的情况下进行。因此,数据提供方作为训练教师网络的执行主体,分别在各自的源领域利用自身标注的样本数据来训练得到教师网络。换言之,各个教师网络通过各自源领域的数据提供方将自身的隐私数据作为样本数据进行训练得到。由此可见,一方面,各个数据提供方协同合作训练各自的教师网络,可提高后续训练学生网络的效率;另一方面,各个源领域的教师网络的训练过程都不用出域,可以保证各个源领域的样本数据的隐私。In this embodiment, when multiple teacher networks are selected, the knowledge transfer scheme based on the machine learning model of this specification can be understood as the data providers of various source fields work together to complete the training of the student network, namely Multiple data providers have their own sample data and can use each other's data to train machine learning models in a unified manner. It should be noted that the sample data of each data provider belongs to its own private data, so the above-mentioned multi-party joint modeling (joint modelling) process should be carried out while ensuring the security of the data of all parties. Therefore, the data provider, as the executive body of training the teacher network, uses its own labeled sample data to train the teacher network in their respective source fields. In other words, each teacher network uses its own private data as sample data for training through data providers in their respective source fields. It can be seen that, on the one hand, each data provider cooperates to train their own teacher network, which can improve the efficiency of subsequent training of the student network; on the other hand, the training process of the teacher network in each source field does not need to be out of the domain, which can ensure The privacy of the sample data in the field.
在本实施例中,各个教师网络属于各自源领域的隐私数据,目标样本数据属于目标领域的隐私数据,各个教师网络针对目标样本数据的预测结果属于决策隐私(即各个 教师网络输出结果的隐私)。因此,为了隐私安全,可引入TEE(Trusted Execution Environment,可信执行环境),在TEE内利用教师网络对目标样本数据进行预测,以及对得到的预测结果进行集成学习。TEE可以起到硬件中的黑箱作用,在TEE中执行的代码和数据操作系统层都无法偷窥,只有代码中预先定义的接口才能对其进行操作。In this embodiment, each teacher network belongs to the private data of its source field, the target sample data belongs to the private data of the target field, and the prediction result of each teacher network for the target sample data belongs to decision privacy (that is, the privacy of the output result of each teacher network) . Therefore, for privacy and security, TEE (Trusted Execution Environment) can be introduced, the teacher network is used in the TEE to predict the target sample data, and the obtained prediction results can be integrated learning. TEE can play the role of a black box in the hardware. Neither the code executed in the TEE nor the data operating system layer can be peeped, and only the pre-defined interface in the code can operate on it.
相应的,教师网络的提供方在向服务端发送自身训练的教师网络之前,可对教师网络进行加密,进而服务端在TEE内先对教师网络进行解密,再利用解密后的教师网络对目标样本数据进行预测。同理,目标样本数据的提供方在向服务端发送目标样本数据之前,也可对目标样本数据进行加密,进而服务端在TEE内先对目标样本数据进行解密,再将解密后的目标样本数据输入教师网络。一方面,通过在TEE内解密教师网络和目标样本数据,可有效保证用户隐私安全;另一方面,在TEE内根据明文形式的教师网络和目标样本数据进行预测,而非密文形式的教师网络和目标样本数据,预测过程的效率没有损失。因此,通过将TEE与训练学生网络相结合可以在性能损失较小的前提下提升安全性和隐私性。针对教师网络和目标样本数据的加密过程,将在下文进行详述。同时,在TEE内执行的操作仅为加解密和预测,无需占用TEE大量的内存空间。Correspondingly, before sending the teacher network trained by the teacher network to the server, the teacher network provider can encrypt the teacher network, and then the server decrypts the teacher network in the TEE, and then uses the decrypted teacher network to analyze the target sample Data to predict. In the same way, the provider of the target sample data can also encrypt the target sample data before sending the target sample data to the server, and then the server decrypts the target sample data in the TEE first, and then decrypts the decrypted target sample data Enter the teacher network. On the one hand, by decrypting the teacher network and target sample data in the TEE, user privacy can be effectively ensured; on the other hand, prediction is made in the TEE based on the teacher network in plaintext and target sample data, instead of the teacher network in ciphertext form And the target sample data, the efficiency of the prediction process is not lost. Therefore, by combining TEE with the training student network, security and privacy can be improved under the premise of less performance loss. The encryption process of the teacher network and target sample data will be described in detail below. At the same time, the operations performed in the TEE are only encryption, decryption and prediction, without occupying a large amount of memory space in the TEE.
步骤204,在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,并对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值。Step 204: Input the target sample data into each teacher network in the trusted execution environment to obtain a prediction result of each teacher network for the target sample data, and integrate the obtained prediction results to obtain a result corresponding to the The soft label value of the target sample data.
在本实施例中,为了提高训练出的学生网络为多样性(全面性)的强监督模型,使得学生网络稳定且在各个方面表现都较好,而非存在偏好(弱监督模型,在某些方面表现的比较好),可在TEE内对获取到的多个教师网络的预测结果进行集成学习。通过对获取到的多个预测结果进行集成学习,可在某一教师网络针对目标样本数据存在错误预测的情况下,通过其他的教师网络将该错误预测纠正,从而减小方差(bagging)、偏差(boosting)和改进预测(stacking)的效果。其中,集成学习的具体实现方式可根据实际情况灵活选取,本说明书一个或多个实施例并不对此进行限制。例如,可采取投票、加权平均等方式。又如,可采用Bagging(bootstrap aggregating,装袋;例如随机森林)、Boosting和Stacking等算法。In this embodiment, in order to improve the trained student network to be a diverse (comprehensive) strong supervision model, so that the student network is stable and performs well in all aspects, instead of preference (weak supervision model, in some It performs better in terms of performance), and can perform integrated learning on the obtained prediction results of multiple teacher networks in the TEE. Through the integrated learning of the obtained multiple prediction results, when a certain teacher network has an error prediction for the target sample data, the error prediction can be corrected by other teacher networks, thereby reducing bagging and bias (boosting) and improving the effect of prediction (stacking). Among them, the specific implementation manner of the integrated learning can be flexibly selected according to the actual situation, and one or more embodiments of this specification do not limit this. For example, voting, weighted average, etc. can be adopted. For another example, algorithms such as Bagging (bootstrap aggregating, bagging; such as random forest), Boosting, and Stacking can be used.
步骤206,基于所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。Step 206: Perform knowledge distillation on the target sample data based on the soft label value and the original hard label value of the target sample data to obtain a student network in the target field.
在本实施例中,硬标签值为目标样本数据中原本被标注的标签值。例如,硬标签值由目标样本数据的提供方(属于目标领域)对目标样本数据进行标注得到。在通过集 成学习得到对应于目标样本数据的软标签值(soft target)后,基于软标签值和目标样本数据原本被标注的硬标签值(hard target),对目标样本数据进行知识蒸馏以得到目标领域的学生网络。源自目标样本数据(数据量较小)原本被标注的hard target,包含的信息量(信息熵)较低;而soft target来自于大模型(教师网络)的预测输出,具有更高的熵,能比hard target提供更加多的信息。因此,通过soft target来辅助hard target一起训练,也即使用较少的数据以及较大的学习率,使得更加简单、参数运算量更少的学生模型也能够具有和教师网络相近的性能(因此也可理解为一种模型压缩的方式)。换言之,学生网络的训练含有两个目标函数:一个与hard target对应,即原始的目标函数,为学生网络的类别概率输出与标签(label)真值的交叉熵;另一个与soft target对应,为学生网络的类别概率输出与教师网络的类别概率输出的交叉熵。在soft target中,在softmax函数中增加温度参数T:In this embodiment, the hard label value is the label value originally marked in the target sample data. For example, the hard label value is obtained by annotating the target sample data by the provider (belonging to the target field) of the target sample data. After obtaining the soft label value (soft target) corresponding to the target sample data through integrated learning, based on the soft label value and the hard label value of the target sample data originally marked (hard target), knowledge distillation is performed on the target sample data to obtain the target Network of students in the field. The hard target originally labeled from the target sample data (small amount of data) contains a lower amount of information (information entropy); while the soft target comes from the prediction output of the large model (teacher network), which has higher entropy. Can provide more information than hard target. Therefore, the soft target is used to assist the hard target to train together, that is, less data and a larger learning rate are used, so that a simpler student model with fewer parameter calculations can also have performance similar to that of a teacher network (and therefore also Can be understood as a way of model compression). In other words, the training of the student network contains two objective functions: one corresponds to the hard target, that is, the original objective function, which is the cross-entropy of the class probability output of the student network and the true value of the label; the other corresponds to the soft target, which is The cross entropy of the category probability output of the student network and the category probability output of the teacher network. In the soft target, add the temperature parameter T to the softmax function:
Figure PCTCN2020124013-appb-000001
Figure PCTCN2020124013-appb-000001
其中,q i是第i类的概率值大小,输入z i是第i类的预测向量(对数logits);logits是分类模型生成的原始(非标准化),预测向量通常会传递给标准化函数。当模型要解决多类别分类问题时,则logits通常作为softmax函数的输入,以由softmax函数生成一个(标准化)概率向量,对应于每个可能的类别。softmax函数通过将输入z i与其他logits进行比较,将每个类别的logit z i计算为概率q iAmong them, q i is the probability value of the i-th class, and the input z i is the prediction vector (logarithmic logits) of the i-th class; logits is the original (non-standardized) generated by the classification model, and the prediction vector is usually passed to the normalization function. When the model is to solve a multi-class classification problem, logits are usually used as the input of the softmax function to generate a (normalized) probability vector from the softmax function, corresponding to each possible category. The softmax function calculates the logit z i of each category as a probability q i by comparing the input z i with other logits.
进一步的,Loss值为:L=αL (soft)+(1-α)L (hard)。其中soft loss指的是对student model(学生网络)中softmax(T=20)的输出与teacher model(教师网络)的softmax(T=20)的输出求loss1;hard loss指的是对softmax(T=1)的输出与原始label求loss2。 Further, the Loss value is: L=αL (soft) + (1-α)L (hard) . Among them, soft loss refers to the output of softmax (T=20) in the student model (student network) and the output of softmax (T=20) in the teacher model (teacher network). =1) The output and the original label calculate loss2.
比如,可将与hard target对应的目标函数和与soft target对应的目标函数通过加权平均来作为学生网络的最终目标函数。例如,可以设定为soft target所占的权重更大一些。又如,T值可取一个中间值,而soft target所分配的权重为T^2,hard target的权重为1。当然,还可为其他任意权重设定,本说明书一个或多个实施例并不对此进行限制。For example, the objective function corresponding to the hard target and the objective function corresponding to the soft target can be used as the final objective function of the student network through a weighted average. For example, it can be set to have a larger weight for soft target. For another example, the value of T can take an intermediate value, and the weight assigned by the soft target is T^2, and the weight of the hard target is 1. Of course, other arbitrary weights can also be set, and one or more embodiments of this specification do not limit this.
同时,由于针对目标领域的学生网络的训练过程无任何限制,因此可得到解释性强的学生网络。以分类器为例,由于对分类器没有限制,则可采用解释性强的分类器进行训练。At the same time, since there are no restrictions on the training process of the student network in the target field, a student network with strong interpretability can be obtained. Taking the classifier as an example, since there are no restrictions on the classifier, a classifier with strong interpretability can be used for training.
在本说明书的基于机器学习模型的知识迁移方案中,除上述由服务端通过知识蒸馏来训练学生网络以外,该操作还可由目标样本数据的提供方来执行。请参见图3,图 3是一示例性实施例提供的另一种基于机器学习模型的知识迁移方法的流程图。如图3所示,该方法应用于服务端,可以包括步骤304~306。In the knowledge transfer scheme based on the machine learning model of this specification, in addition to the above-mentioned server training the student network through knowledge distillation, this operation can also be performed by the provider of the target sample data. Please refer to FIG. 3, which is a flowchart of another method for knowledge transfer based on a machine learning model provided by an exemplary embodiment. As shown in Figure 3, the method is applied to the server and may include steps 304-306.
步骤302,获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到。Step 302: Obtain teacher networks in multiple source fields and obtain target sample data in the target field, and read the obtained teacher networks into a trusted execution environment for decryption. Each teacher network obtains the results by training the sample data in their respective source fields. .
步骤304,在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值,并对所述软标签值进行加密。Step 304: Input the target sample data into each teacher network in the trusted execution environment to obtain a prediction result of each teacher network for the target sample data, and integrate the obtained prediction results to obtain a result corresponding to the target The soft label value of the sample data is encrypted, and the soft label value is encrypted.
在本实施例中,针对教师网络和/或目标样本数据,可采用数字信封的方式进行加密,该数字信封加密结合对称加密算法和非对称加密算法。以教师网络为例(目标样本数据与此类似),教师网络的提供方可采用对称加密算法加密教师网络(即采用自身使用的对称密钥对教师网络进行加密),再采用非对称加密算法的公钥(即数字信封公钥)对该对称密钥进行加密。比如,提供方可采用服务端公钥(即数字信封公钥)对用于加密教师网络的对称密钥进行加密。其中,对于提供方获取服务端公钥的过程,将在下文进行详述。In this embodiment, for the teacher network and/or the target sample data, the encryption can be performed in the form of a digital envelope, which combines a symmetric encryption algorithm and an asymmetric encryption algorithm. Take the teacher network as an example (the target sample data is similar), the provider of the teacher network can use the symmetric encryption algorithm to encrypt the teacher network (that is, use the symmetric key used by itself to encrypt the teacher network), and then use the asymmetric encryption algorithm The public key (that is, the digital envelope public key) encrypts the symmetric key. For example, the provider can use the server public key (ie, the digital envelope public key) to encrypt the symmetric key used to encrypt the teacher network. Among them, the process for the provider to obtain the server public key will be described in detail below.
由上述针对教师网络和/或目标样本数据加密的方式可知,待解密数据被相应的提供方通过自身的对称密钥进行加密。因此,服务端可先获取对应于提供方的对称密钥,再在TEE内通过获取到的对称密钥对待解密数据进行解密。而对于获取对应于提供方的对称密钥的方式,由于用于加密待解密数据的对称密钥被采用服务端公钥加密,可在TEE内通过服务端私钥(即数字信封私钥),对用于加密待解密数据的对称密钥进行解密以得到解密后的对称密钥。From the above method of encrypting the teacher network and/or target sample data, it can be seen that the data to be decrypted is encrypted by the corresponding provider using its own symmetric key. Therefore, the server can first obtain the symmetric key corresponding to the provider, and then use the obtained symmetric key to decrypt the data to be decrypted in the TEE. As for the method of obtaining the symmetric key corresponding to the provider, since the symmetric key used to encrypt the data to be decrypted is encrypted by the server public key, the server private key (ie, the digital envelope private key) can be used in the TEE, Decrypt the symmetric key used to encrypt the data to be decrypted to obtain the decrypted symmetric key.
TEE是基于CPU硬件的安全扩展,且与外部完全隔离的可信执行环境。TEE最早是由Global Platform提出的概念,用于解决移动设备上资源的安全隔离,平行于操作系统为应用程序提供可信安全的执行环境。ARM的Trust Zone技术最早实现了真正商用的TEE技术。伴随着互联网的高速发展,安全的需求越来越高,不仅限于移动设备,云端设备,数据中心都对TEE提出了更多的需求。TEE的概念也得到了高速的发展和扩充。现在所说的TEE相比与最初提出的概念已经是更加广义的TEE。例如,服务器芯片厂商Intel,AMD等都先后推出了硬件辅助的TEE并丰富了TEE的概念和特性,在工业界得到了广泛的认可。现在提起的TEE通常更多指这类硬件辅助的TEE技术。不同于移动端,云端访问需要远程访问,终端用户对硬件平台不可见,因此使用TEE 的第一步就是要确认TEE的真实可信。因此可针对TEE技术引入远程证明机制,由硬件厂商(主要是CPU厂商)背书并通过数字签名技术确保用户对TEE状态可验证。同时仅仅是安全的资源隔离也无法满足的安全需求,进一步的数据隐私保护也被提出。包括Intel SGX,AMD SEV在内的商用TEE也都提供了内存加密技术,将可信硬件限定在CPU内部,总线和内存的数据均是密文防止恶意用户进行窥探。例如,英特尔的软件保护扩展(SGX)等TEE技术隔离了代码执行、远程证明、安全配置、数据的安全存储以及用于执行代码的可信路径。在TEE中运行的应用程序受到安全保护,几乎不可能被第三方访问。TEE is a secure extension based on CPU hardware and a trusted execution environment that is completely isolated from the outside. TEE was first proposed by Global Platform to solve the security isolation of resources on mobile devices, and parallel to the operating system to provide a trusted and secure execution environment for applications. ARM's Trust Zone technology is the first to realize the real commercial TEE technology. With the rapid development of the Internet, security requirements are getting higher and higher. Not only mobile devices, cloud devices, and data centers have put forward more demands on TEE. The concept of TEE has also been rapidly developed and expanded. Compared with the original concept, the TEE referred to now is a broader TEE. For example, server chip manufacturers Intel, AMD, etc. have successively introduced hardware-assisted TEE and enriched the concept and characteristics of TEE, which has been widely recognized in the industry. The TEE mentioned now usually refers more to this kind of hardware-assisted TEE technology. Unlike the mobile terminal, cloud access requires remote access, and the end user is invisible to the hardware platform. Therefore, the first step in using TEE is to confirm the authenticity of TEE. Therefore, a remote certification mechanism can be introduced for the TEE technology, endorsed by hardware vendors (mainly CPU vendors) and digital signature technology to ensure that users can verify the state of the TEE. At the same time, security needs that cannot be met by only secure resource isolation, further data privacy protection has also been proposed. Commercial TEEs including Intel SGX and AMD SEV also provide memory encryption technology to limit the trusted hardware to the CPU, and the data on the bus and memory are ciphertexts to prevent malicious users from snooping. For example, TEE technologies such as Intel’s Software Protection Extensions (SGX) isolate code execution, remote attestation, secure configuration, secure storage of data, and trusted paths for code execution. The applications running in the TEE are protected by security and are almost impossible to be accessed by third parties.
以Intel SGX技术为例,SGX提供了围圈,即内存中一个加密的可信执行区域,由CPU保护数据不被窃取。以服务端采用支持SGX的CPU为例,利用新增的处理器指令,在内存中可以分配一部分区域EPC(Enclave Page Cache,围圈页面缓存或飞地页面缓存),通过CPU内的加密引擎MEE(Memory Encryption Engine)对其中的数据进行加密。EPC中加密的内容只有进入CPU后才会被解密成明文。因此,在SGX中,用户可以不信任操作系统、VMM(Virtual Machine Monitor,虚拟机监控器)、甚至BIOS(Basic Input Output System,基本输入输出系统),只需要信任CPU便能确保隐私数据不会泄漏。Taking Intel SGX technology as an example, SGX provides a circle, that is, an encrypted trusted execution area in the memory, and the CPU protects data from being stolen. Taking the CPU that supports SGX on the server side as an example, using the newly added processor instructions, a part of the area EPC (Enclave Page Cache, Enclave Page Cache, Enclave Page Cache) can be allocated in the memory, through the encryption engine MEE in the CPU (Memory Encryption Engine) encrypts the data in it. The encrypted content in the EPC will only be decrypted into plaintext after entering the CPU. Therefore, in SGX, users can distrust the operating system, VMM (Virtual Machine Monitor), and even BIOS (Basic Input Output System). They only need to trust the CPU to ensure that private data will not leakage.
因此,服务端的TEE可通过SGX架构建立。其中,在TEE通过密钥管理服务器发起的远程证明后,数字信封公钥由密钥管理服务器发送至待解密数据的提供方,数字信封私钥由密钥管理服务器发送至TEE的围圈。Therefore, the TEE on the server side can be established through the SGX architecture. Among them, after the remote certification initiated by the TEE through the key management server, the digital envelope public key is sent by the key management server to the provider of the data to be decrypted, and the digital envelope private key is sent by the key management server to the TEE circle.
步骤306,向所述目标样本数据的提供方返回加密后的所述软标签值,以使得所述提供方对接收到的软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。Step 306: Return the encrypted soft label value to the provider of the target sample data, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the value of the soft label. The target sample data is originally marked with a hard label value, and knowledge distillation is performed on the target sample data to obtain a student network in the target field.
相应的,图4是一示例性实施例提供的另一种基于机器学习模型的知识迁移方法的流程图。如图4所示,该方法应用于目标样本数据的提供方,可以包括步骤402~406。Correspondingly, FIG. 4 is a flowchart of another method for knowledge transfer based on a machine learning model provided by an exemplary embodiment. As shown in FIG. 4, the method is applied to the provider of target sample data, and may include steps 402-406.
步骤402,向可信执行环境的维护方发送加密后的所述目标样本数据,以使得所述维护方在所述可信执行环境内分别将所述目标样本数据输入多个源领域的教师网络以得到各个教师网络针对所述目标样本数据的预测结果,以及对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;各个教师网络通过对各自源领域的样本数据进行训练得到,且在所述可信执行环境内被解密。Step 402: Send the encrypted target sample data to the maintainer of the trusted execution environment, so that the maintainer can input the target sample data into teacher networks in multiple source fields in the trusted execution environment. In order to obtain the prediction results of each teacher network for the target sample data, and integrate the obtained prediction results to obtain the soft label value corresponding to the target sample data; each teacher network is obtained by training the sample data of their respective source fields , And is decrypted in the trusted execution environment.
步骤404,接收所述维护方返回的加密后的所述软标签值,对接收到的所述软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。Step 404: Receive the encrypted soft label value returned by the maintainer, decrypt the received soft label value, and mark the original value based on the decrypted soft label value and the target sample data The hard label value of, the knowledge distillation is performed on the target sample data to obtain the student network in the target field.
需要说明的是,上述图3-4中训练学生网络的具体过程,可参考上述图2所示实施例的相应内容,在此不再赘述。It should be noted that, for the specific process of training the student network in the foregoing Figures 3-4, reference may be made to the corresponding content of the embodiment shown in Figure 2 above, which will not be repeated here.
在本说明书一个或多个实施例的技术方案中,样本数据的具体内容可根据实际应用场景灵活设定。比如,样本数据的数据类型可以包含图像、文本、语音等。同样的,对样本数据的标注也可以根据实际应用场景灵活设定,下面举例进行说明。In the technical solutions of one or more embodiments of this specification, the specific content of the sample data can be flexibly set according to actual application scenarios. For example, the data type of the sample data can include image, text, voice, and so on. Similarly, the labeling of sample data can also be flexibly set according to actual application scenarios, as described below with examples.
在对实体对象进行风控的场景中,可对用户或商户潜在的风险进行预测,比如预测借贷、实时交易的风险。以实时交易为例,合作平台与商户对接合作,各个商户在营业过程中已积累有大量的样本数据。其中,样本数据(以文本形式,或者为其他数据类型)包括用户的基本信息、行为信息、交易信息等。并且,商户可在交易风险维度上对样本数据进行标注。当合作平台新接入一家新开业的商户a时,由于自身掌握的样本数据有限,导致无法训练得到较为准确全面的风控模型。那么,该新接入的商户a可联合合作平台上其他同类型的商户进行联合建模。在该情况下,新接入的商户a属于目标领域,自身掌握的少量样本数据为目标样本数据,待训练的风控模型为学生网络;合作平台上其他与该新接入的商户为同一行业(比如同属于基金、保险公司等)的商户1-n属于源领域,商户1-n可利用各自积累的大量样本数据训练得到教师网络以指导学生网络的训练。而在完成对学生网络的联合建模后,商户a便可将获取到的用户的基本信息、行为信息、交易信息等数据输入该学生网络,从而预测当前与该用户进行的交易的风险评分。In the scenario of performing risk control on physical objects, the potential risks of users or merchants can be predicted, such as the risks of predicting loans and real-time transactions. Taking real-time transactions as an example, the cooperation platform has docked and cooperated with merchants, and each merchant has accumulated a large amount of sample data during the business process. Among them, the sample data (in text form, or other data types) includes the user's basic information, behavior information, transaction information, and so on. In addition, merchants can label sample data in the transaction risk dimension. When the cooperation platform is newly connected to a newly opened merchant a, due to the limited sample data at its disposal, it is impossible to train and obtain a more accurate and comprehensive risk control model. Then, the newly accessed merchant a can cooperate with other merchants of the same type on the cooperation platform to perform joint modeling. In this case, the newly-accessed merchant a belongs to the target field, a small amount of sample data it owns is the target sample data, and the risk control model to be trained is the student network; the other merchants on the cooperation platform are in the same industry as the newly-accessed merchant (For example, the merchants 1-n belonging to the same fund, insurance company, etc.) belong to the source field, and the merchants 1-n can use the large amount of sample data they have accumulated to train the teacher network to guide the training of the student network. After completing the joint modeling of the student network, the merchant a can input the acquired user's basic information, behavior information, transaction information and other data into the student network, thereby predicting the risk score of the current transaction with the user.
在智能推荐的场景中,可对用户潜在的需求进行预测,比如预测用户想买的商品、感兴趣的新闻、喜欢看的书籍等。以卖家向用户推荐商品为例,合作平台与多个卖家对接合作,各个卖家在营业过程中已积累有大量的用户购买记录。其中,样本数据(以文本形式,或者为其他数据类型)为职业、收入、年龄、性别等用户信息,商户可根据用户购买记录中用户购买的商品对样本数据进行标注。当合作平台新接入一卖家a时,由于自身的历史用户有限,导致无法向用户推荐商品。那么,该新接入的卖家a可联合合作平台上其他同类型的卖家进行联合建模。在该情况下,新接入的商户a属于目标领域,自身掌握的少量用户购买记录作为目标样本数据,待训练的商品推荐模型为学生网络;合作平台上其他与该新接入的卖家为同一行业(比如同属于餐饮、服装等)的卖家1-n 属于源领域,卖家1-n可利用各自积累的大量用户购买记录训练得到教师网络以指导学生网络的训练。而在完成对学生网络的联合建模后,卖家a便可将获取到的用户的用户信息输入该学生网络,从而预测该用户可能存在购买需求的商品,进而根据预测结果向该用户推荐相应的商品。In the intelligent recommendation scenario, the potential needs of users can be predicted, such as predicting the products the user wants to buy, news of interest, books that they like to read, and so on. Taking sellers recommending products to users as an example, the cooperation platform has docked and cooperated with multiple sellers, and each seller has accumulated a large number of user purchase records in the course of business. Among them, the sample data (in text form, or other data types) is user information such as occupation, income, age, gender, etc. The merchant can mark the sample data according to the products purchased by the user in the user purchase record. When the cooperative platform newly accesses a seller a, due to its limited historical users, it is impossible to recommend products to users. Then, the newly connected seller a can cooperate with other sellers of the same type on the cooperation platform to perform joint modeling. In this case, the newly accessed merchant a belongs to the target field, a small number of user purchase records in its own hands are used as the target sample data, and the product recommendation model to be trained is the student network; other sellers on the cooperation platform are the same as the newly accessed seller Sellers 1-n in the industry (for example, catering, clothing, etc.) belong to the source field, and sellers 1-n can use their accumulated large number of user purchase records training to obtain a teacher network to guide the training of the student network. After completing the joint modeling of the student network, seller a can enter the user information of the acquired user into the student network, thereby predicting that the user may have a purchase demand product, and then recommending the corresponding product to the user based on the prediction result commodity.
在智能客服的场景中,可实时与用户进行语音对话,解答用户疑问或者与用户聊天。例如,合作平台与多家企业合作,各个企业在向用户提供客服服务的过程中已积累有大量的对话数据。其中,样本数据可以为用户输入的文本、图像、用户的语音等,针对样本数据的标注为对话数据中客服向用户回复的内容。当另外一家企业a新接入合作平台,并希望向用户提供智能客服的服务时,若自身掌握的用户与客服之间的对话数据有限,则可联合合作平台中其他企业进行联合建模。比如,可由提供语音助手、聊天工具、解答疑问等客服服务的企业1-n通过各自积累的对话数据进行联合建模。其中,企业1-n的客服与用户的对话场景存在一定的相似度。在该情况下,新接入的企业a属于目标领域,自身掌握的少量对话数据为目标样本数据,待训练的客服模型为学生网络;企业1-n属于源领域,企业1-n可利用各自积累的大量对话数据训练得到教师网络以指导学生网络的训练。而在完成对学生网络的联合建模后,企业a(或者企业1-n)便可利用该学生网络向用户提供智能客服的服务,即将用户发起的对话内容(文本、图像、语音等)作为该学生网络的输入,从而将输出结果作为本次对话的回复。In the scenario of intelligent customer service, you can have real-time voice conversations with users, answer user questions or chat with users. For example, the cooperation platform cooperates with many companies, and each company has accumulated a large amount of dialogue data in the process of providing customer service to users. Among them, the sample data can be text, image, user's voice, etc. input by the user, and the annotation for the sample data is the content of the customer service's reply to the user in the conversation data. When another company a newly accesses the cooperation platform and hopes to provide users with intelligent customer service, if the conversation data between the user and the customer service is limited, it can work with other companies in the cooperation platform to conduct joint modeling. For example, companies 1-n that provide customer service services such as voice assistants, chat tools, and answering questions can conduct joint modeling through their own accumulated conversation data. Among them, there is a certain degree of similarity between the customer service of enterprise 1-n and the dialogue scene of the user. In this case, the newly-connected company a belongs to the target field, the small amount of dialogue data it owns is the target sample data, and the customer service model to be trained is the student network; the company 1-n belongs to the source field, and the company 1-n can use each The accumulated large amount of dialogue data is trained by the teacher network to guide the training of the student network. After completing the joint modeling of the student network, enterprise a (or enterprise 1-n) can use the student network to provide users with intelligent customer service, that is, the conversation content (text, image, voice, etc.) initiated by the user as The input of the student network, and the output result as a reply to this conversation.
下面以风控的应用场景为例,对上述实施例训练得到的学生网络的应用过程进行说明。请参见图5,图5是一示例性实施例提供的一种用户风险评估方法的流程图。如图5所示,该评估方法可以包括以下步骤:The following uses the application scenario of risk control as an example to describe the application process of the student network trained in the foregoing embodiment. Please refer to FIG. 5, which is a flowchart of a user risk assessment method provided by an exemplary embodiment. As shown in Figure 5, the evaluation method may include the following steps:
步骤502,将目标合作方的用户的行为信息输入对应于所述目标合作方的学生风控模型;所述学生风控模型通过基于所述目标合作方的目标样本数据的软标签值和所述目标样本数据原本被标注的被作为硬标签值的风险标签值,对所述目标样本数据进行知识蒸馏得到,所述软标签值通过在可信执行环境内对多个教师风控模型针对所述目标样本数据的预测结果进行集成得到,各个教师风控模型和所述目标样本数据在所述可信执行环境内被解密,各个教师风控模型通过对相应的其他合作方的样本数据进行训练得到;其中,任一样本数据包含被标注有风险标签值的行为信息。Step 502: Input the behavior information of the user of the target partner into the student risk control model corresponding to the target partner; the student risk control model uses the soft label value based on the target sample data of the target partner and the The target sample data is originally marked as the hard label value of the risk label value, which is obtained by knowledge distillation of the target sample data, and the soft label value is calculated against the risk control model of multiple teachers in a trusted execution environment. The prediction results of the target sample data are integrated, each teacher risk control model and the target sample data are decrypted in the trusted execution environment, and each teacher risk control model is obtained by training the corresponding sample data of other partners ; Among them, any sample data contains behavioral information marked with a risk label value.
步骤504,根据所述学生风控模型的输出结果确定所述用户的风险评分。Step 504: Determine the risk score of the user according to the output result of the student risk control model.
在本实施例中,在风控的应用场景下,学生风控模型与上述图2-4实施例中的学生网络相对应,而教师风控模型与上述图2-4实施例中的教师网络相对应。训练各个模型 的样本数据的具体内容为用户的行为信息,标注内容为用户的风险评分;换言之,各个模型的输入是用户的行为信息,输出为用户的风险评分(包括概率分布)。多方在同一平台合作,目标合作方属于目标领域,为目标样本数据的提供方,待训练模型为学生风控模型,那么可通过其他合作方的教师风控模型来指导学生风控模型的训练。其中,训练的具体过程可参考上述图2-4所示的实施例,在此不再赘述。In this embodiment, in the application scenario of risk control, the student risk control model corresponds to the student network in the above embodiment in Figures 2-4, and the teacher risk control model corresponds to the teacher network in the above embodiment in Figures 2-4 Corresponding. The specific content of the sample data for training each model is the user's behavior information, and the marked content is the user's risk score; in other words, the input of each model is the user's behavior information, and the output is the user's risk score (including probability distribution). Multiple parties cooperate on the same platform. The target partner belongs to the target field and is the provider of the target sample data. The model to be trained is the student risk control model. Then the teacher risk control model of other partners can be used to guide the training of the student risk control model. For the specific process of training, refer to the embodiments shown in FIGS. 2-4, which will not be repeated here.
而在训练得到对应于目标合作方的学生风控模型后,在一种情况下,可在目标合作方的客户端侧配置该学生风控模型,那么目标合作方在获取用户的行为信息后,可通过客户端向学生风控模型输入行为信息,以根据输出结果确定该用户的风险评分,进而决定后续针对该用户的处理方式。例如,当风险评分较低时(说明该用户较为安全),可向该用户发放消费权益;当风险评分较高时(说明该用户存在潜在风险),可拦截该用户的注册请求。在另一种情况下,可将学生风控模型配置于与目标合作方对接的服务端侧,那么目标合作方在获取用户的行为信息后,可通过客户端向服务端发送该行为信息,以由服务端利用学生风控模型来确定该用户的风险评分并返回至客户端进行展示。After training the student risk control model corresponding to the target partner, in one case, the student risk control model can be configured on the client side of the target partner. Then, after the target partner obtains the user's behavior information, The client can input behavior information into the student's risk control model to determine the user's risk score based on the output result, and then determine the subsequent processing method for the user. For example, when the risk score is low (indicating that the user is safer), consumer rights can be issued to the user; when the risk score is high (indicating that the user has potential risks), the user's registration request can be intercepted. In another case, the student risk control model can be configured on the server side that is docked with the target partner. After obtaining the user's behavior information, the target partner can send the behavior information to the server through the client. The server uses the student risk control model to determine the user's risk score and returns to the client for display.
在本实施例中,为了提高学生风控模型的泛化能力和性能(即能够将教师风控模型的泛化能力和性能较好地迁移至学生风控模型),可选取与目标合作方相似度较高的其他合作方的教师风控模型来指导学生风控模型的训练。作为一示例性实施例,可设定为目标合作方和该其他合作方属于同一类型的合作方。例如,均属于餐饮类,均属于金融类等。In this embodiment, in order to improve the generalization ability and performance of the student's risk control model (that is, the generalization ability and performance of the teacher's risk control model can be better transferred to the student's risk control model), the target partner can be selected similar to the target partner Teacher risk control models of other partners with higher degrees to guide students' risk control model training. As an exemplary embodiment, it can be set that the target partner and the other partner belong to the same type of partner. For example, all belong to the catering category, and all belong to the financial category.
在本实施例中,为了保护各个其他合作方的隐私安全,各个教师风控模型通过相应的其他合作方对自身的样本数据进行训练得到。换言之,其他合作方作为训练教师风控模型的执行主体,分别利用自身标注的样本数据来训练得到教师风控模型。由此可见,一方面,各个合作方协同合作训练各自的教师风控模型,可提高后续训练学生风控模型的效率;另一方面,各个教师风控模型的训练过程都不用出域,可以保证各个源领域的样本数据的隐私。In this embodiment, in order to protect the privacy and security of each other partner, each teacher risk control model is obtained through training on its own sample data by the corresponding other partner. In other words, as the executive body of training the teacher's risk control model, other partners use their own labeled sample data to train the teacher's risk control model. It can be seen that, on the one hand, the cooperation of various partners to train their own teacher risk control models can improve the efficiency of subsequent training of student risk control models; on the other hand, the training process of each teacher risk control model does not need to be out of the domain, which can ensure The privacy of sample data in each source field.
为了便于理解,下面结合应用场景和附图对本说明书的技术方案进行详细说明。For ease of understanding, the technical solutions of this specification will be described in detail below in conjunction with application scenarios and drawings.
请参见图6,图6是一示例性实施例提供的发放数字信封的公私钥的流程图。如图6所示,该过程可以包括步骤602~步骤616B。Please refer to FIG. 6, which is a flowchart of issuing public and private keys of digital envelopes according to an exemplary embodiment. As shown in FIG. 6, the process may include steps 602 to 616B.
步骤602,密钥管理服务器61向服务端62发送针对SGX的验证请求。In step 602, the key management server 61 sends a verification request for SGX to the server 62.
在本实施例中,数字信封的公钥(即服务端公钥)和私钥(即服务端私钥)可由 密钥管理服务器生成,并在服务端的SGX通过远程证明后,由密钥管理服务器将私钥发送至服务端中SGX的围圈,以及将公钥发送至与该服务端对接的客户端。In this embodiment, the public key (that is, the server public key) and the private key (that is, the server private key) of the digital envelope can be generated by the key management server, and after the SGX on the server has passed the remote certification, the key management server Send the private key to the SGX circle on the server, and send the public key to the client docking with the server.
在远程证明的过程中,由颁布SGX的EVM代码的密钥管理服务器61作为挑战方向服务端62发起挑战,要求服务端62出示验证报告以证明服务端62的SGX中运行的EVM代码由密钥管理服务器61颁布,或者与密钥管理服务器61中存储的EVM代码一致。In the process of remote certification, the key management server 61, which issued the EVM code of SGX, initiates a challenge to the server 62, requiring the server 62 to present a verification report to prove that the EVM code running in the SGX of the server 62 is owned by the key. The management server 61 issues, or is consistent with the EVM code stored in the key management server 61.
步骤604,服务端62生成验证报告并采用SGX的CPU的私钥签名。In step 604, the server 62 generates a verification report and signs it with the private key of the SGX CPU.
步骤606,服务端62向密钥管理服务器61返回验证报告。In step 606, the server 62 returns a verification report to the key management server 61.
步骤608,密钥管理服务器61向IAS63转发验证报告。In step 608, the key management server 61 forwards the verification report to the IAS 63.
以Intel SGX技术为例,服务端62在接收到验证请求后,导出SGX的EVM代码以基于该EVM代码生成验证报告。比如,可对EVM代码进行hash计算得到相应的hash值,并将该hash值存储在quote(引用结构体)中,并且采用SGX的CPU的私钥对quote(作为验证报告)签名。Taking Intel SGX technology as an example, after receiving the verification request, the server 62 exports the EVM code of the SGX to generate a verification report based on the EVM code. For example, the EVM code can be hashed to obtain the corresponding hash value, and the hash value can be stored in the quote (quote structure), and the private key of the SGX CPU can be used to sign the quote (as a verification report).
Intel在CPU出厂时向该CPU配置了私钥,但是并未公开与该私钥对应的公钥,而是配置在Intel的IAS(Intel Attestation Server,英特尔认证服务器)中。那么,在采用该CPU的私钥对验证报告签名后,由于没有相应的公钥,密钥管理服务器61在获取到服务端62返回的quote后,需要转发给IAS,以由IAS验证签名。Intel configures a private key for the CPU when the CPU leaves the factory, but does not disclose the public key corresponding to the private key, but configures it in Intel's IAS (Intel Attestation Server). Then, after using the CPU's private key to sign the verification report, since there is no corresponding public key, the key management server 61 needs to forward the quote returned by the server 62 to the IAS for the IAS to verify the signature.
步骤610,IAS63采用SGX的CPU的公钥验证签名。In step 610, the IAS63 uses the public key of the CPU of the SGX to verify the signature.
在本实施例中,若验证通过,则向密钥管理服务器61返回验证结果。例如,可生成AVR报告,该AVR报告中采用“YES”表示验证签名通过,采用“NO”表示验证签名未通过。其中,为了防止AVR报告在传输过程中被截获或修改,除了针对传输的链路采用SSL(Secure Sockets Layer,安全套接层)加密之外,IAS还可采用自身的证书对AVR报告进行签名。In this embodiment, if the verification is passed, the verification result is returned to the key management server 61. For example, an AVR report can be generated. In the AVR report, "YES" is used to indicate that the verification signature is passed, and "NO" is used to indicate that the verification signature is not passed. Among them, in order to prevent the AVR report from being intercepted or modified during transmission, in addition to using SSL (Secure Sockets Layer) encryption for the transmission link, IAS can also use its own certificate to sign the AVR report.
步骤612,IAS63向密钥管理服务器61返回验证结果。In step 612, the IAS 63 returns the verification result to the key management server 61.
步骤614,密钥管理服务器61验证SGX。In step 614, the key management server 61 verifies the SGX.
在本实施例中,密钥管理服务器61在接收到验证结果后,先验证IAS的签名,验证通过后再获取AVR报告中记录的验证结果。若为YES,则将quote中的hash值与本地的hash值(对本地维护的SGX的EVM代码进行hash计算得到)进行比较。当比较 结果一致时,判定远程证明通过。In this embodiment, after receiving the verification result, the key management server 61 first verifies the signature of the IAS, and then obtains the verification result recorded in the AVR report after the verification is passed. If it is YES, compare the hash value in the quote with the local hash value (obtained by hash calculation of the locally maintained SGX EVM code). When the comparison results are consistent, it is determined that the remote attestation is passed.
步骤616A,密钥管理服务器61向与服务端对接的客户端64发送数字信封的公钥。In step 616A, the key management server 61 sends the public key of the digital envelope to the client 64 docking with the server.
在本实施例中,密钥管理服务器61可对数字信封的公钥进行签名,以使得客户端64可验证公钥的真实性。客户段64为教师网络的提供方使用的客户端,或者,为目标样本数据的提供方使用的客户端。换言之,目标样本数据和教师网络的提供方均可通过上述方式获取数字信封的公钥。In this embodiment, the key management server 61 can sign the public key of the digital envelope, so that the client 64 can verify the authenticity of the public key. The client segment 64 is a client used by a provider of the teacher network, or a client used by a provider of target sample data. In other words, both the target sample data and the provider of the teacher network can obtain the public key of the digital envelope in the above-mentioned manner.
步骤616B,密钥管理服务器61向服务端62加密传输数字信封的私钥。In step 616B, the key management server 61 encrypts and transmits the private key of the digital envelope to the server 62.
在本实施例中,密钥管理服务器61和服务端62可在步骤602和步骤606的交互过程中协商加密数字信封的私钥的密钥。那么,密钥管理服务器61可通过协商得到的密钥对数字信封的私钥进行加密,以向服务端62加密传输数字信封的私钥。In this embodiment, the key management server 61 and the server 62 may negotiate a key for encrypting the private key of the digital envelope in the interaction process of step 602 and step 606. Then, the key management server 61 may encrypt the private key of the digital envelope through the key obtained through negotiation, so as to encrypt and transmit the private key of the digital envelope to the server 62.
在本实施例中,可将数字信封的私钥传入服务端的围圈中。服务端可以包含多个围圈,而上述私钥可以被传入这些围圈中的安全围圈;例如,该安全围圈可以为QE(Quoting Enclave)围圈,而非AE(Application Enclave)围圈。In this embodiment, the private key of the digital envelope can be passed into the circle of the server. The server can contain multiple enclosures, and the above private key can be passed into the security enclosures in these enclosures; for example, the security enclosure can be a QE (Quoting Enclave) enclosure instead of an AE (Application Enclave) enclosure. ring.
承接于图6所示实施例,请参见图7,图7是一示例性实施例提供的一种基于机器学习模型的知识迁移方案的交互图。如图7所示,该交互过程可以包括以下步骤:Following the embodiment shown in FIG. 6, please refer to FIG. 7. FIG. 7 is an interaction diagram of a knowledge transfer solution based on a machine learning model provided by an exemplary embodiment. As shown in Figure 7, the interaction process may include the following steps:
步骤702A,合作方1通过自身标注的隐私数据训练得到教师网络1。In step 702A, the partner 1 obtains the teacher network 1 through the training of the private data marked by itself.
步骤702B,合作方2通过自身标注的隐私数据训练得到教师网络2。In step 702B, the partner 2 obtains the teacher network 2 through the training of the private data marked by itself.
步骤702C,合作方n通过自身标注的隐私数据训练得到教师网络n。In step 702C, the partner n obtains the teacher network n through the training of the private data marked by itself.
需要说明的是,步骤702A-702C之间为互相并列的步骤,在时间上的先后顺序并无要求。It should be noted that steps 702A-702C are mutually parallel steps, and there is no requirement on the time sequence.
在本实施例中,以风控场景为例,“商户健康分”是服务端作为商家合作平台向ISV(Independent Software Vendors,独立软件开发商)渠道商针对渠道商下的商家一种风险评估的指标,通过对渠道商下的商家的“商户健康分”进行评估,可帮助合作伙伴(ISV渠道商)提升风控能力。在ISV渠道商对用于评估商户健康分的模型进行建模的过程中,由于掌握的商户行为数据有限(即样本数据有限),可借助于商家合作平台从其他合作方(其他ISV渠道商)积累的商户行为数据进行联合建模。其中,联合建模的其他合作方应与该ISV渠道商存在一定的关联,例如属于同一行业。以下以ISV渠道商与合作方1-n联合建模为例进行说明。In this embodiment, taking the risk control scenario as an example, "Merchant Health Score" is a risk assessment conducted by the server as a merchant cooperation platform to ISV (Independent Software Vendors) channel providers for merchants under the channel. Indicators, through the evaluation of the "merchant health score" of the merchants under the channel, can help partners (ISV channel providers) to improve their risk control capabilities. In the process of ISV channel providers modeling the models used to evaluate merchants’ health scores, due to limited merchant behavior data (ie limited sample data), merchant cooperation platforms can be used to obtain information from other partners (other ISV channel providers). The accumulated business behavior data is jointly modeled. Among them, the other partners of the joint modeling should have a certain relationship with the ISV channel provider, for example, belong to the same industry. The following takes the ISV channel provider and partner 1-n joint modeling as an example for illustration.
其中,合作方1-n对在历史营业过程中商户的行为信息进行在风险维度上的标注,进而得到用于训练教师网络的样本数据(属于自身的隐私数据),也即训练得到的教师网络的输入为商户的行为信息,输出为相应的风险评分。而针对训练所采用的监督式机器学习算法,可根据实际情况灵活选取,本说明书一个或多个实施例并不对此进行限制。以下以分类器为例进行说明。Among them, the partner 1-n labels the behavior information of the merchants in the historical business process in the risk dimension, and then obtains the sample data (private data belonging to itself) used to train the teacher network, that is, the trained teacher network The input of is the behavior information of the merchant, and the output is the corresponding risk score. The supervised machine learning algorithm used for training can be flexibly selected according to actual conditions, and one or more embodiments of this specification do not limit this. The following takes the classifier as an example for description.
步骤704A,合作方1对教师网络1进行加密。In step 704A, the partner 1 encrypts the teacher network 1.
步骤704B,合作方2对教师网络2进行加密。In step 704B, the partner 2 encrypts the teacher network 2.
步骤704C,合作方n对教师网络n进行加密。In step 704C, the partner n encrypts the teacher network n.
在本实施例中,合作方1-n可生成自身使用的对称密钥。在训练得到教师网络后,可先采用自身使用的对称密钥对教师网络进行加密,再使用数字信封的公钥对该对称密钥进行加密。In this embodiment, the partner 1-n can generate a symmetric key used by itself. After the teacher network is trained, the teacher network can be encrypted with the symmetric key used by itself, and then the symmetric key can be encrypted with the public key of the digital envelope.
在本实施例中,可由ISV渠道商向合作平台发送目标样本数据(即自身掌握的商户行为信息),以由合作平台基于目标样本数据与合作方1-n进行联合建模。In this embodiment, the ISV channel provider may send the target sample data (ie, the merchant behavior information it owns) to the cooperation platform, so that the cooperation platform can perform joint modeling with the partner 1-n based on the target sample data.
步骤706A,合作方1向合作平台发送加密后的教师网络1。In step 706A, the partner 1 sends the encrypted teacher network 1 to the cooperation platform.
步骤706B,合作方2向合作平台发送加密后的教师网络2。In step 706B, the partner 2 sends the encrypted teacher network 2 to the cooperation platform.
步骤706C,合作方n向合作平台发送加密后的教师网络n。In step 706C, the partner n sends the encrypted teacher network n to the cooperation platform.
类似的,本说明书不对步骤704A-704C和步骤706A-706C中并列的步骤之间设定时间先后顺序的要求。同时,合作方1-n向合作平台发送教师网络的方式存在多种可能,可根据实际情况灵活设定,上述步骤706A-706C仅作为一示例性举例,本说明书一个或多个实施例并不对此进行限制。比如,还可由合作方1接收合作方2-n发送的教师网络,再由合作方1将加密后的教师网络1-n发送至合作平台。Similarly, this specification does not require the time sequence between steps 704A-704C and steps 706A-706C to be set in parallel. At the same time, there are many possibilities for the partner 1-n to send the teacher network to the cooperation platform, which can be flexibly set according to the actual situation. The above steps 706A-706C are only an illustrative example, and one or more embodiments of this specification are not correct. This is limited. For example, the partner 1 can also receive the teacher network sent by the partner 2-n, and then the partner 1 can send the encrypted teacher network 1-n to the cooperation platform.
步骤708,合作平台将教师网络1-n读入TEE内进行解密。Step 708, the cooperation platform reads the teacher network 1-n into the TEE for decryption.
步骤710,当接收到目标样本数据时,合作平台将目标样本数据读入TEE内进行解密。Step 710: When the target sample data is received, the cooperation platform reads the target sample data into the TEE for decryption.
在本实施例中,以教师网络1为例,先采用数字信封的私钥对合作方1的对称密钥进行解密,再采用解密后的对称密钥对教师网络1进行解密。其他教师网络和目标样本数据的解密方式与此类似,不再赘述。In this embodiment, taking the teacher network 1 as an example, the private key of the digital envelope is first used to decrypt the symmetric key of the partner 1, and then the decrypted symmetric key is used to decrypt the teacher network 1. The decryption methods of other teacher networks and target sample data are similar to this, so I won’t repeat them here.
步骤712,合作平台分别将目标样本数据输入教师网络1-n得到预测结果1-n。In step 712, the cooperation platform inputs the target sample data into the teacher network 1-n to obtain prediction results 1-n.
以分类器为例进行说明,假设教师网络和学生网络解决的是一个有M个类别(classes)的多分类问题,给定一个目标样本数据xi,每个分类器fk(教师网络)都能预测出一个概率分布fk(xi),那么可以通过集成学习技术来对每个fk(xi)进行集成以得到最终分数。Take the classifier as an example to illustrate. Suppose that the teacher network and the student network solve a multi-classification problem with M classes (classes). Given a target sample data xi, each classifier fk (teacher network) can predict A probability distribution fk(xi) is obtained, then each fk(xi) can be integrated through integrated learning technology to obtain the final score.
步骤714,合作平台对预测结果1-n进行集成得到对应于目标样本数据的软标签值。Step 714: The cooperation platform integrates the prediction results 1-n to obtain the soft label value corresponding to the target sample data.
在本实施例中,为了提高训练出的学生网络为多样性(全面性)的强监督模型,使得学生网络稳定且在各个方面表现都较好,而非存在偏好(弱监督模型,在某些方面表现的比较好),可对获取到的预测结果1-n进行集成学习从而得到对应于目标样本数据的软标签值。例如,将集成学习的结果作为对应于目标样本数据的软标签值。通过对获取到的多个预测结果进行集成学习,可在某一教师网络针对目标样本数据存在错误预测的情况下,通过其他的教师网络将该错误预测纠正,从而减小方差(bagging)、偏差(boosting)和改进预测(stacking)的效果。其中,集成学习的具体实现方式可根据实际情况灵活选取,本说明书一个或多个实施例并不对此进行限制。例如,可采取投票、求平均等方式。又如,可采用Bagging(bootstrap aggregating,装袋;例如随机森林)、Boosting和Stacking等算法。In this embodiment, in order to improve the trained student network to be a diverse (comprehensive) strong supervision model, so that the student network is stable and performs well in all aspects, instead of preference (weak supervision model, in some The performance is relatively good), the obtained prediction results 1-n can be integrated learning to obtain the soft label value corresponding to the target sample data. For example, the result of ensemble learning is used as the soft label value corresponding to the target sample data. Through the integrated learning of the obtained multiple prediction results, when a certain teacher network has an error prediction for the target sample data, the error prediction can be corrected by other teacher networks, thereby reducing bagging and bias (boosting) and improving the effect of prediction (stacking). Among them, the specific implementation manner of the integrated learning can be flexibly selected according to the actual situation, and one or more embodiments of this specification do not limit this. For example, voting, averaging, etc. can be adopted. For another example, algorithms such as Bagging (bootstrap aggregating, bagging; such as random forest), Boosting, and Stacking can be used.
步骤716,合作平台基于软标签值和目标样本数据原本被标注的硬标签值,对目标样本数据进行知识蒸馏得到学生网络。In step 716, the cooperation platform performs knowledge distillation on the target sample data to obtain a student network based on the soft label value and the original hard label value of the target sample data.
以采用求平均的方式进行集成学习为例,针对所有分类器进行差分隐私处理后的概率分布输出取平均,并将取平均得到的最终概率输出作为一个soft target来指导学生网络学习。而目标样本数据原本被标注(比如,由目标域的ISV渠道商对自身积累的商户行为信息进行标注)的标签值定义为hard target(硬标签值),那么最终的标签值Target=a*hard target+b*soft target(a+b=1),Target则作为训练学生网络的最终标签值。其中,参数a,b是用于控制标签融合权重,比如,a=0.1,b=0.9。Taking the method of averaging for ensemble learning as an example, the probability distribution output of all classifiers after differential privacy processing is averaged, and the final probability output obtained by averaging is used as a soft target to guide students' network learning. The label value of the target sample data originally marked (for example, the ISV channel provider in the target domain labels the merchant behavior information accumulated by itself) is defined as hard target (hard label value), then the final label value Target=a*hard target+b*soft target(a+b=1), Target is used as the final label value for training the student network. Among them, the parameters a and b are used to control the tag fusion weight, for example, a=0.1, b=0.9.
通过上述训练的过程,可以得到一输入为商户的行为信息,输出为相应风险评分的学生网络。在一种情况下,可在ISV渠道商的客户端侧配置该学生网络,那么该ISV渠道商在获取到商户的行为信息后,可通过客户端向学生网络输入行为信息,以根据输出结果确定该商户的风险评分,进而决定后续针对该商户的处理方式。例如,当风险评分较低时(说明该商户较为安全),可向该商户发放消费权益;当风险评分较高时(说明该商户存在潜在风险),可拦截该商户的注册请求。在另一种情况下,可将学生网络配置于合作平台,那么ISV渠道商在获取到商户的行为信息后,可通过客户端向合作平台发送该行为信息,以由合作平台利用学生网络来确定该商户的风险评分并返回至客户 端进行展示。Through the above training process, a network of students whose input is the behavior information of the merchant and the output is the corresponding risk score can be obtained. In one case, the student network can be configured on the client side of the ISV channel provider. After obtaining the behavior information of the merchant, the ISV channel provider can input the behavior information to the student network through the client to determine according to the output result The risk score of the merchant determines the subsequent processing method for the merchant. For example, when the risk score is low (indicating that the merchant is safer), consumer rights can be issued to the merchant; when the risk score is high (indicating that the merchant has potential risks), the merchant's registration request can be intercepted. In another case, the student network can be configured on the cooperation platform, then the ISV channel provider can send the behavior information to the cooperation platform through the client after obtaining the behavior information of the merchant, so that the cooperation platform can use the student network to determine The risk score of the merchant is returned to the client for display.
与上述方法实施例相对应,本说明书还提供了装置实施例。Corresponding to the above method embodiments, this specification also provides device embodiments.
本说明书的用户风险评估装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。The embodiments of the user risk assessment device in this specification can be applied to electronic equipment. The device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
从硬件层面而言,图8是一示例性实施例提供的一种设备的示意结构图。请参考图8,在硬件层面,该设备包括处理器802、内部总线804、网络接口806、内存808以及非易失性存储器810,当然还可能包括其他业务所需要的硬件。处理器802从非易失性存储器810中读取对应的计算机程序到内存808中然后运行,在逻辑层面上形成用户风险评估装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。From a hardware perspective, FIG. 8 is a schematic structural diagram of a device provided by an exemplary embodiment. Please refer to FIG. 8. At the hardware level, the device includes a processor 802, an internal bus 804, a network interface 806, a memory 808, and a non-volatile memory 810. Of course, it may also include hardware required for other services. The processor 802 reads the corresponding computer program from the non-volatile memory 810 to the memory 808 and then runs it to form a user risk assessment device on a logical level. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, and so on. That is to say, the execution subject of the following processing flow is not limited to each The logic unit can also be a hardware or a logic device.
请参考图9,在软件实施方式中,该用户风险评估装置可以包括:信息输入单元91,将目标合作方的用户的行为信息输入对应于所述目标合作方的学生风控模型;所述学生风控模型通过基于所述目标合作方的目标样本数据的软标签值和所述目标样本数据原本被标注的被作为硬标签值的风险标签值,对所述目标样本数据进行知识蒸馏得到,所述软标签值通过在可信执行环境内对多个教师风控模型针对所述目标样本数据的预测结果进行集成得到,各个教师风控模型在所述可信执行环境内被解密,各个教师风控模型通过对相应的其他合作方的样本数据进行训练得到;其中,任一样本数据包含被标注有风险标签值的行为信息;风险评估单元92,根据所述学生风控模型的输出结果确定所述用户的风险评分。Please refer to FIG. 9, in the software implementation, the user risk assessment device may include: an information input unit 91, which inputs the behavior information of the user of the target partner into the student risk control model corresponding to the target partner; the student The risk control model is obtained by performing knowledge distillation on the target sample data based on the soft label value of the target sample data of the target partner and the risk label value originally marked as the hard label value of the target sample data. The soft label value is obtained by integrating the prediction results of multiple teacher risk control models for the target sample data in a trusted execution environment. Each teacher risk control model is decrypted in the trusted execution environment, and each teacher's risk control model is decrypted in the trusted execution environment. The control model is obtained by training the corresponding sample data of other partners; wherein any sample data contains behavior information marked with a risk label value; the risk assessment unit 92 determines the risk control model according to the output result of the student risk control model. State the user’s risk score.
可选的,所述目标合作方和所述其他合作方属于同一类型的合作方。Optionally, the target partner and the other partners belong to the same type of partner.
可选的,各个教师风控模型由相应的其他合作方对自身的样本数据进行训练得到。Optionally, each teacher's risk control model is obtained by training on its own sample data by corresponding other partners.
本说明书的基于机器学习模型的知识迁移装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。The embodiment of the knowledge transfer device based on the machine learning model of this specification can be applied to electronic equipment. The device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
从硬件层面而言,图10是一示例性实施例提供的一种设备的示意结构图。请参考图10,在硬件层面,该设备包括处理器1002、内部总线1004、网络接口1006、内存1008以及非易失性存储器1010,当然还可能包括其他业务所需要的硬件。处理器1002从非 易失性存储器1010中读取对应的计算机程序到内存10010中然后运行,在逻辑层面上形成基于机器学习模型的知识迁移装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。From a hardware perspective, FIG. 10 is a schematic structural diagram of a device provided by an exemplary embodiment. Please refer to FIG. 10. At the hardware level, the device includes a processor 1002, an internal bus 1004, a network interface 1006, a memory 1008, and a non-volatile memory 1010. Of course, it may also include hardware required for other services. The processor 1002 reads the corresponding computer program from the non-volatile memory 1010 to the memory 10010 and then runs it to form a knowledge transfer device based on the machine learning model at the logical level. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, and so on. That is to say, the execution subject of the following processing flow is not limited to each The logic unit can also be a hardware or a logic device.
请参考图11,在软件实施方式中,该基于机器学习模型的知识迁移装置可以包括:获取单元1101,获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到;集成单元1102,在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,并对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;训练单元1103,基于所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。Please refer to FIG. 11, in the software implementation, the knowledge transfer device based on the machine learning model may include: an acquiring unit 1101, acquiring a network of teachers in multiple source fields and acquiring target sample data in a target field, and combining the acquired teachers The network is read into the trusted execution environment for decryption, and each teacher network is obtained by training sample data in their respective source fields; the integration unit 1102, in the trusted execution environment, respectively input the target sample data into each teacher network to obtain Each teacher network predicts the result of the target sample data, and integrates the obtained prediction results to obtain the soft label value corresponding to the target sample data; the training unit 1103 is based on the soft label value and the target sample data For the originally marked hard label value, knowledge distillation is performed on the target sample data to obtain a student network in the target field.
可选的,各个源领域与所述目标领域属于同一类型。Optionally, each source domain and the target domain are of the same type.
可选的,各个教师网络由各自源领域的数据提供方将自身的隐私数据作为样本数据进行训练得到。Optionally, each teacher network is obtained by training the data providers in their respective source fields with their own private data as sample data.
可选的,所述目标样本数据和各个源领域的样本数据的数据类型包含以下至少之一:图像、文本、语音。Optionally, the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
本说明书的用户风险评估装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。The embodiments of the user risk assessment device in this specification can be applied to electronic equipment. The device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
从硬件层面而言,图12是一示例性实施例提供的一种设备的示意结构图。请参考图12,在硬件层面,该设备包括处理器1202、内部总线1204、网络接口1206、内存1208以及非易失性存储器1210,当然还可能包括其他业务所需要的硬件。处理器1202从非易失性存储器1210中读取对应的计算机程序到内存1208中然后运行,在逻辑层面上形成基于机器学习模型的知识迁移装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。From a hardware perspective, FIG. 12 is a schematic structural diagram of a device provided by an exemplary embodiment. Referring to FIG. 12, at the hardware level, the device includes a processor 1202, an internal bus 1204, a network interface 1206, a memory 1208, and a non-volatile memory 1210. Of course, it may also include hardware required for other services. The processor 1202 reads the corresponding computer program from the non-volatile memory 1210 to the memory 1208 and then runs it to form a knowledge transfer device based on a machine learning model on a logical level. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, and so on. That is to say, the execution subject of the following processing flow is not limited to each The logic unit can also be a hardware or a logic device.
请参考图13,在软件实施方式中,该基于机器学习模型的知识迁移装置可以包括:获取单元1301,获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数 据进行训练得到;集成单元1302,在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值,并对所述软标签值进行加密;返回单元1303,向所述目标样本数据的提供方返回加密后的所述软标签值,以使得所述提供方对接收到的软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。Please refer to FIG. 13, in the software implementation, the knowledge transfer device based on the machine learning model may include: an acquisition unit 1301, which acquires teacher networks in multiple source fields and acquires target sample data in the target field, and combines the acquired teachers The network is read into the trusted execution environment for decryption, and each teacher network is obtained by training the sample data of their respective source fields; the integration unit 1302, in the trusted execution environment, respectively input the target sample data into each teacher network to obtain For the prediction results of the target sample data, each teacher network integrates the obtained prediction results to obtain the soft label value corresponding to the target sample data, and encrypts the soft label value; the returning unit 1303 sends the The provider of the target sample data returns the encrypted soft label value, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the original target sample data The marked hard label value is used to perform knowledge distillation on the target sample data to obtain a student network in the target field.
可选的,所述可信执行环境中的待解密数据被相应的提供方通过自身的对称密钥进行加密,所述待解密数据包括任一教师网络和/或所述目标样本数据;所述获取单元1301具体用于:获取所述待解密数据的提供方的对称密钥;在所述可信执行环境内通过获取到的对称密钥对所述待解密数据进行解密。Optionally, the data to be decrypted in the trusted execution environment is encrypted by the corresponding provider using its own symmetric key, and the data to be decrypted includes any teacher network and/or the target sample data; The obtaining unit 1301 is specifically configured to: obtain the symmetric key of the provider of the data to be decrypted; and decrypt the data to be decrypted by using the obtained symmetric key in the trusted execution environment.
可选的,用于加密所述待解密数据的对称密钥被采用数字信封公钥加密;所述获取单元1301进一步用于:在所述可信执行环境内通过数字信封私钥,对用于加密所述待解密数据的对称密钥进行解密以得到解密后的对称密钥。Optionally, the symmetric key used to encrypt the data to be decrypted is encrypted with a digital envelope public key; the obtaining unit 1301 is further configured to: pass the digital envelope private key in the trusted execution environment to The symmetric key for encrypting the data to be decrypted is decrypted to obtain the decrypted symmetric key.
可选的,所述可信执行环境通过SGX架构建立,在所述可信执行环境通过密钥管理服务器发起的远程证明后,所述数字信封公钥由所述密钥管理服务器发送至所述待解密数据的提供方,所述数字信封私钥由所述密钥管理服务器发送至所述可信执行环境的围圈。Optionally, the trusted execution environment is established through an SGX architecture, and after the trusted execution environment is remotely certified by a key management server, the digital envelope public key is sent by the key management server to the For the provider of the data to be decrypted, the digital envelope private key is sent by the key management server to the circle of the trusted execution environment.
可选的,所述目标样本数据和各个源领域的样本数据的数据类型包含以下至少之一:图像、文本、语音。Optionally, the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
本说明书的用户风险评估装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。The embodiments of the user risk assessment device in this specification can be applied to electronic equipment. The device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
从硬件层面而言,图14是一示例性实施例提供的一种设备的示意结构图。请参考图14,在硬件层面,该设备包括处理器1402、内部总线1404、网络接口1406、内存1408以及非易失性存储器1410,当然还可能包括其他业务所需要的硬件。处理器1402从非易失性存储器1410中读取对应的计算机程序到内存1408中然后运行,在逻辑层面上形成基于机器学习模型的知识迁移装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。From a hardware perspective, FIG. 14 is a schematic structural diagram of a device provided by an exemplary embodiment. Please refer to FIG. 14. At the hardware level, the device includes a processor 1402, an internal bus 1404, a network interface 1406, a memory 1408, and a non-volatile memory 1410. Of course, it may also include hardware required for other services. The processor 1402 reads the corresponding computer program from the non-volatile memory 1410 to the memory 1408 and then runs it to form a knowledge transfer device based on a machine learning model at the logical level. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, and so on. That is to say, the execution subject of the following processing flow is not limited to each The logic unit can also be a hardware or a logic device.
请参考图15,在软件实施方式中,该基于机器学习模型的知识迁移装置可以包括:发送单元1501,向可信执行环境的维护方发送目标样本数据,以使得所述维护方在所述可信执行环境内分别将所述目标样本数据输入多个源领域的教师网络以得到各个教师网络针对所述目标样本数据的预测结果,以及对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;各个教师网络通过对各自源领域的样本数据进行训练得到,且在所述可信执行环境内被解密;训练单元1502,接收所述维护方返回的加密后的所述软标签值,对接收到的所述软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。Please refer to FIG. 15, in the software implementation, the machine learning model-based knowledge transfer device may include: a sending unit 1501, which sends target sample data to the maintainer of the trusted execution environment, so that the maintainer is in the available In the letter execution environment, the target sample data is input into teacher networks in multiple source fields to obtain the prediction results of each teacher network for the target sample data, and the obtained prediction results are integrated to obtain the target sample data corresponding to the target sample data. The soft label value of each teacher network is obtained by training the sample data of their respective source fields and is decrypted in the trusted execution environment; the training unit 1502 receives the encrypted soft label returned by the maintainer Value, decrypt the received soft label value, and perform knowledge distillation on the target sample data based on the decrypted soft label value and the original hard label value of the target sample data to obtain the Describe the student network in the target field.
可选的,所述目标样本数据和各个源领域的样本数据的数据类型包含以下至少之一:图像、文本、语音。Optionally, the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The systems, devices, modules, or units illustrated in the above embodiments may be specifically implemented by computer chips or entities, or implemented by products with certain functions. A typical implementation device is a computer. The specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
在一个典型的配置中,计算机包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, the computer includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. 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, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media, can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他 性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or equipment including a series of elements not only includes those elements, but also includes Other elements that are not explicitly listed, or also include elements inherent to such processes, methods, commodities, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than in the embodiments and still achieve desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown in order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
在本说明书一个或多个实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and/or" as used herein refers to and includes any or all possible combinations of one or more associated listed items.
应当理解,尽管在本说明书一个或多个实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determination".
以上所述仅为本说明书一个或多个实施例的较佳实施例而已,并不用以限制本说明书一个或多个实施例,凡在本说明书一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例保护的范围之内。The above descriptions are only preferred embodiments of one or more embodiments of this specification, and are not intended to limit one or more embodiments of this specification. All within the spirit and principle of one or more embodiments of this specification, Any modification, equivalent replacement, improvement, etc. made should be included in the protection scope of one or more embodiments of this specification.

Claims (32)

  1. 一种用户风险评估方法,包括:A user risk assessment method, including:
    将目标合作方的用户的行为信息输入对应于所述目标合作方的学生风控模型;所述学生风控模型通过基于所述目标合作方的目标样本数据的软标签值和所述目标样本数据原本被标注的被作为硬标签值的风险标签值,对所述目标样本数据进行知识蒸馏得到,所述软标签值通过在可信执行环境内对多个教师风控模型针对所述目标样本数据的预测结果进行集成得到,各个教师风控模型在所述可信执行环境内被解密,各个教师风控模型通过对相应的其他合作方的样本数据进行训练得到;其中,任一样本数据包含被标注有风险标签值的行为信息;The behavior information of the user of the target partner is input into the student risk control model corresponding to the target partner; the student risk control model uses the soft label value based on the target sample data of the target partner and the target sample data The risk label value originally marked as the hard label value is obtained by knowledge distillation of the target sample data. The soft label value is based on the target sample data by using multiple teacher risk control models in a trusted execution environment The prediction results of, each teacher’s risk control model is decrypted in the trusted execution environment, and each teacher’s risk control model is obtained by training the corresponding sample data of other partners; among them, any sample data contains the Behavior information marked with risk tag value;
    根据所述学生风控模型的输出结果确定所述用户的风险评分。The risk score of the user is determined according to the output result of the student risk control model.
  2. 根据权利要求1所述的方法,各个教师风控模型由相应的其他合作方对自身的样本数据进行训练得到。According to the method of claim 1, each teacher's risk control model is obtained by training on its own sample data by corresponding other partners.
  3. 一种基于机器学习模型的知识迁移方法,包括:A method of knowledge transfer based on machine learning model, including:
    获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到;Obtain teacher networks in multiple source fields and obtain target sample data in the target field, and read the obtained teacher networks into a trusted execution environment for decryption. Each teacher network is obtained by training the sample data in their respective source fields;
    在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,并对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;In the trusted execution environment, the target sample data is input into each teacher network to obtain the prediction result of each teacher network for the target sample data, and the obtained prediction results are integrated to obtain the target sample data corresponding to the target sample data. The value of the soft label;
    基于所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。Based on the soft label value and the hard label value originally marked on the target sample data, knowledge distillation is performed on the target sample data to obtain a student network in the target field.
  4. 根据权利要求3所述的方法,各个教师网络由各自源领域的数据提供方将自身的隐私数据作为样本数据进行训练得到。According to the method of claim 3, each teacher network is obtained by training the data provider in the respective source field using its own private data as sample data.
  5. 根据权利要求3所述的方法,所述目标样本数据和各个源领域的样本数据的数据类型包含以下至少之一:图像、文本、语音。The method according to claim 3, wherein the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
  6. 一种基于机器学习模型的知识迁移方法,包括:A method of knowledge transfer based on machine learning model, including:
    获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到;Obtain teacher networks in multiple source fields and obtain target sample data in the target field, and read the obtained teacher networks into a trusted execution environment for decryption. Each teacher network is obtained by training the sample data in their respective source fields;
    在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,对得到的预测结果进行集成得到对应于所述 目标样本数据的软标签值,并对所述软标签值进行加密;In the trusted execution environment, the target sample data is input into each teacher network to obtain the prediction result of each teacher network for the target sample data, and the obtained prediction results are integrated to obtain the corresponding target sample data. Soft label value, and encrypt the soft label value;
    向所述目标样本数据的提供方返回加密后的所述软标签值,以使得所述提供方对接收到的软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。Return the encrypted soft label value to the provider of the target sample data, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the target sample The data is originally marked with hard label values, and knowledge distillation is performed on the target sample data to obtain a student network in the target field.
  7. 根据权利要求6所述的方法,所述可信执行环境中的待解密数据被相应的提供方通过自身的对称密钥进行加密,所述待解密数据包括任一教师网络和/或所述目标样本数据;在所述可信执行环境内解密所述待解密数据的操作包括:The method according to claim 6, wherein the data to be decrypted in the trusted execution environment is encrypted by the corresponding provider using its own symmetric key, and the data to be decrypted includes any teacher network and/or the target Sample data; the operation of decrypting the data to be decrypted in the trusted execution environment includes:
    获取所述待解密数据的提供方的对称密钥;Obtaining the symmetric key of the provider of the data to be decrypted;
    在所述可信执行环境内通过获取到的对称密钥对所述待解密数据进行解密。The data to be decrypted is decrypted in the trusted execution environment using the acquired symmetric key.
  8. 根据权利要求7所述的方法,用于加密所述待解密数据的对称密钥被采用数字信封公钥加密;所述获取所述待解密数据的提供方的对称密钥,包括:The method according to claim 7, wherein the symmetric key used to encrypt the data to be decrypted is encrypted with a digital envelope public key; said obtaining the symmetric key of the provider of the data to be decrypted includes:
    在所述可信执行环境内通过数字信封私钥,对用于加密所述待解密数据的对称密钥进行解密以得到解密后的对称密钥。In the trusted execution environment, the symmetric key used to encrypt the data to be decrypted is decrypted through the digital envelope private key to obtain the decrypted symmetric key.
  9. 根据权利要求8所述的方法,所述可信执行环境通过SGX架构建立,在所述可信执行环境通过密钥管理服务器发起的远程证明后,所述数字信封公钥由所述密钥管理服务器发送至所述待解密数据的提供方,所述数字信封私钥由所述密钥管理服务器发送至所述可信执行环境的围圈。According to the method of claim 8, the trusted execution environment is established through an SGX architecture, and after the trusted execution environment is remotely certified by a key management server, the digital envelope public key is managed by the key The server sends to the provider of the data to be decrypted, and the digital envelope private key is sent to the circle of the trusted execution environment by the key management server.
  10. 根据权利要求6所述的方法,所述目标样本数据和各个源领域的样本数据的数据类型包含以下至少之一:图像、文本、语音。The method according to claim 6, wherein the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
  11. 一种基于机器学习模型的知识迁移方法,包括:A method of knowledge transfer based on machine learning model, including:
    向可信执行环境的维护方发送目标样本数据,以使得所述维护方在所述可信执行环境内分别将所述目标样本数据输入多个源领域的教师网络以得到各个教师网络针对所述目标样本数据的预测结果,以及对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;各个教师网络通过对各自源领域的样本数据进行训练得到,且在所述可信执行环境内被解密;Send target sample data to the maintainer of the trusted execution environment, so that the maintainer can input the target sample data into teacher networks in multiple source fields in the trusted execution environment to obtain each teacher network’s response to the The prediction result of the target sample data, and the integration of the obtained prediction results to obtain the soft label value corresponding to the target sample data; each teacher network is obtained by training the sample data of their respective source fields, and is executed in the trusted execution The environment is decrypted;
    接收所述维护方返回的加密后的所述软标签值,对接收到的所述软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。Receive the encrypted soft label value returned by the maintainer, decrypt the received soft label value, and based on the decrypted soft label value and the hard label originally marked with the target sample data Value, perform knowledge distillation on the target sample data to obtain a student network in the target field.
  12. 根据权利要求11所述的方法,所述目标样本数据和各个源领域的样本数据的数据类型包含以下至少之一:图像、文本、语音。The method according to claim 11, wherein the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
  13. 一种用户风险评估装置,包括:A user risk assessment device, including:
    信息输入单元,将目标合作方的用户的行为信息输入对应于所述目标合作方的学生风控模型;所述学生风控模型通过基于所述目标合作方的目标样本数据的软标签值和所述目标样本数据原本被标注的被作为硬标签值的风险标签值,对所述目标样本数据进行知识蒸馏得到,所述软标签值通过在可信执行环境内对多个教师风控模型针对所述目标样本数据的预测结果进行集成得到,各个教师风控模型在所述可信执行环境内被解密,各个教师风控模型通过对相应的其他合作方的样本数据进行训练得到;其中,任一样本数据包含被标注有风险标签值的行为信息;The information input unit inputs the behavior information of the user of the target partner into the student risk control model corresponding to the target partner; the student risk control model adopts the soft label value and the total value based on the target sample data of the target partner. The target sample data is originally annotated as the hard label value of the risk label value, which is obtained by knowledge distillation of the target sample data, and the soft label value is obtained by conducting multiple teacher risk control models in a trusted execution environment. The prediction results of the target sample data are integrated, and each teacher's risk control model is decrypted in the trusted execution environment, and each teacher's risk control model is obtained by training the corresponding sample data of other partners; where any is the same This data contains behavioral information marked with risk label values;
    风险评估单元,根据所述学生风控模型的输出结果确定所述用户的风险评分。The risk assessment unit determines the risk score of the user according to the output result of the student risk control model.
  14. 根据权利要求13所述的装置,各个教师风控模型由相应的其他合作方对自身的样本数据进行训练得到。According to the device of claim 13, each teacher's risk control model is obtained by training on its own sample data by corresponding other partners.
  15. 一种基于机器学习模型的知识迁移装置,包括:A knowledge transfer device based on a machine learning model, including:
    获取单元,获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到;The acquisition unit acquires teacher networks in multiple source fields and acquires target sample data in the target field, and reads the acquired teacher networks into a trusted execution environment for decryption. Each teacher network is obtained by training the sample data in their respective source fields ;
    集成单元,在所述可信执行环境内分别所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,并对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;An integration unit, which inputs the target sample data into each teacher network in the trusted execution environment to obtain a prediction result of each teacher network for the target sample data, and integrates the obtained prediction results to obtain a result corresponding to the target The soft label value of the sample data;
    训练单元,基于所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。The training unit performs knowledge distillation on the target sample data based on the soft label value and the original hard label value of the target sample data to obtain a student network in the target field.
  16. 根据权利要求15所述的装置,各个教师网络由各自源领域的数据提供方将自身的隐私数据作为样本数据进行训练得到。According to the device according to claim 15, each teacher network is obtained by training the data providers in their respective source fields with their own private data as sample data.
  17. 根据权利要求15所述的装置,所述目标样本数据和各个源领域的样本数据的数据类型包含以下至少之一:图像、文本、语音。The device according to claim 15, wherein the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
  18. 一种基于机器学习模型的知识迁移装置,包括:A knowledge transfer device based on a machine learning model, including:
    获取单元,获取多个源领域的教师网络以及获取目标领域的目标样本数据,并将获取到的教师网络读入可信执行环境进行解密,各个教师网络通过对各自源领域的样本数据进行训练得到;The acquisition unit acquires teacher networks in multiple source fields and acquires target sample data in the target field, and reads the acquired teacher networks into a trusted execution environment for decryption. Each teacher network is obtained by training the sample data in their respective source fields ;
    集成单元,在所述可信执行环境内分别将所述目标样本数据输入各个教师网络以得到各个教师网络针对所述目标样本数据的预测结果,对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值,并对所述软标签值进行加密;The integration unit inputs the target sample data into each teacher network in the trusted execution environment to obtain a prediction result of each teacher network for the target sample data, and integrates the obtained prediction results to obtain a result corresponding to the target The soft label value of the sample data, and encrypt the soft label value;
    返回单元,向所述目标样本数据的提供方返回加密后的所述软标签值,以使得所述 提供方对接收到的软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。The return unit returns the encrypted soft label value to the provider of the target sample data, so that the provider decrypts the received soft label value, and based on the decrypted soft label value and the decrypted soft label value. The target sample data is originally marked with a hard label value, and knowledge distillation is performed on the target sample data to obtain a student network in the target field.
  19. 根据权利要求18所述的装置,所述可信执行环境中的待解密数据被相应的提供方通过自身的对称密钥进行加密,所述待解密数据包括任一教师网络和/或所述目标样本数据;所述获取单元具体用于:The device according to claim 18, wherein the data to be decrypted in the trusted execution environment is encrypted by the corresponding provider with its own symmetric key, and the data to be decrypted includes any teacher network and/or the target Sample data; the acquiring unit is specifically used for:
    获取所述待解密数据的提供方的对称密钥;Obtaining the symmetric key of the provider of the data to be decrypted;
    在所述可信执行环境内通过获取到的对称密钥对所述待解密数据进行解密。The data to be decrypted is decrypted in the trusted execution environment using the acquired symmetric key.
  20. 根据权利要求19所述的装置,用于加密所述待解密数据的对称密钥被采用数字信封公钥加密;所述获取单元进一步用于:The device according to claim 19, wherein the symmetric key used to encrypt the data to be decrypted is encrypted with a digital envelope public key; the obtaining unit is further configured to:
    在所述可信执行环境内通过数字信封私钥,对用于加密所述待解密数据的对称密钥进行解密以得到解密后的对称密钥。In the trusted execution environment, the symmetric key used to encrypt the data to be decrypted is decrypted through the digital envelope private key to obtain the decrypted symmetric key.
  21. 根据权利要求20所述的装置,所述可信执行环境通过SGX架构建立,在所述可信执行环境通过密钥管理服务器发起的远程证明后,所述数字信封公钥由所述密钥管理服务器发送至所述待解密数据的提供方,所述数字信封私钥由所述密钥管理服务器发送至所述可信执行环境的围圈。The apparatus according to claim 20, wherein the trusted execution environment is established through an SGX architecture, and after the trusted execution environment is remotely certified by a key management server, the digital envelope public key is managed by the key The server sends to the provider of the data to be decrypted, and the digital envelope private key is sent to the circle of the trusted execution environment by the key management server.
  22. 根据权利要求18所述的装置,所述目标样本数据和各个源领域的样本数据的数据类型包含以下至少之一:图像、文本、语音。The device according to claim 18, wherein the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
  23. 一种基于机器学习模型的知识迁移装置,包括:A knowledge transfer device based on a machine learning model, including:
    发送单元,向可信执行环境的维护方发送目标样本数据,以使得所述维护方在所述可信执行环境内分别将所述目标样本数据输入多个源领域的教师网络以得到各个教师网络针对所述目标样本数据的预测结果,以及对得到的预测结果进行集成得到对应于所述目标样本数据的软标签值;各个教师网络通过对各自源领域的样本数据进行训练得到,且在所述可信执行环境内被解密;The sending unit sends target sample data to the maintainer of the trusted execution environment, so that the maintainer separately inputs the target sample data into teacher networks in multiple source fields in the trusted execution environment to obtain each teacher network For the prediction results of the target sample data, and the integration of the obtained prediction results to obtain the soft label value corresponding to the target sample data; each teacher network is obtained by training the sample data of their respective source fields, and in the Decrypted in the trusted execution environment;
    训练单元,接收所述维护方返回的加密后的所述软标签值,对接收到的所述软标签值进行解密,并基于解密后的所述软标签值和所述目标样本数据原本被标注的硬标签值,对所述目标样本数据进行知识蒸馏以得到所述目标领域的学生网络。The training unit receives the encrypted soft label value returned by the maintainer, decrypts the received soft label value, and is originally annotated based on the decrypted soft label value and the target sample data The hard label value of, the knowledge distillation is performed on the target sample data to obtain the student network in the target field.
  24. 根据权利要求23所述的装置,所述目标样本数据和各个源领域的样本数据的数据类型包含以下至少之一:图像、文本、语音。The device according to claim 23, wherein the data types of the target sample data and the sample data of each source field include at least one of the following: image, text, and voice.
  25. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    用于存储处理器可执行指令的存储器;A memory for storing processor executable instructions;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求1或2所述的方法。Wherein, the processor implements the method according to claim 1 or 2 by running the executable instruction.
  26. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    用于存储处理器可执行指令的存储器;A memory for storing processor executable instructions;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求3-5中任一项所述的方法。Wherein, the processor implements the method according to any one of claims 3-5 by running the executable instruction.
  27. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    用于存储处理器可执行指令的存储器;A memory for storing processor executable instructions;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求6-10中任一项所述的方法。Wherein, the processor executes the executable instruction to implement the method according to any one of claims 6-10.
  28. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    用于存储处理器可执行指令的存储器;A memory for storing processor executable instructions;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求11或12所述的方法。Wherein, the processor implements the method according to claim 11 or 12 by running the executable instruction.
  29. 一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如权利要求1或2所述方法的步骤。A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implements the steps of the method according to claim 1 or 2.
  30. 一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如权利要求3-5中任一项所述方法的步骤。A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implements the steps of the method according to any one of claims 3-5.
  31. 一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如权利要求6-10中任一项所述方法的步骤。A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implements the steps of the method according to any one of claims 6-10.
  32. 一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如权利要求11或12所述方法的步骤。A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implements the steps of the method according to claim 11 or 12.
PCT/CN2020/124013 2019-12-14 2020-10-27 User risk assessment method and apparatus, electronic device, and storage medium WO2021114911A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911287610.3 2019-12-14
CN201911287610.3A CN111027870A (en) 2019-12-14 2019-12-14 User risk assessment method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021114911A1 true WO2021114911A1 (en) 2021-06-17

Family

ID=70210835

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124013 WO2021114911A1 (en) 2019-12-14 2020-10-27 User risk assessment method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN111027870A (en)
WO (1) WO2021114911A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113988483A (en) * 2021-12-23 2022-01-28 支付宝(杭州)信息技术有限公司 Risk operation behavior control method, risk operation behavior model training method and electronic equipment

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111027870A (en) * 2019-12-14 2020-04-17 支付宝(杭州)信息技术有限公司 User risk assessment method and device, electronic equipment and storage medium
CN111832291B (en) * 2020-06-02 2024-01-09 北京百度网讯科技有限公司 Entity recognition model generation method and device, electronic equipment and storage medium
CN112200402B (en) * 2020-08-19 2022-10-18 支付宝(杭州)信息技术有限公司 Risk quantification method, device and equipment based on risk portrait
CN112149541A (en) * 2020-09-14 2020-12-29 清华大学 Model training method and device for sleep staging
CN112149404A (en) * 2020-09-18 2020-12-29 支付宝(杭州)信息技术有限公司 Method, device and system for identifying risk content of user privacy data
CN112149179B (en) * 2020-09-18 2022-09-02 支付宝(杭州)信息技术有限公司 Risk identification method and device based on privacy protection
CN112308236A (en) * 2020-10-30 2021-02-02 北京百度网讯科技有限公司 Method, device, electronic equipment and storage medium for processing user request
CN112738061B (en) * 2020-12-24 2022-06-21 四川虹微技术有限公司 Information processing method, device, management platform, electronic equipment and storage medium
CN112734046A (en) * 2021-01-07 2021-04-30 支付宝(杭州)信息技术有限公司 Model training and data detection method, device, equipment and medium
CN112801718B (en) * 2021-02-22 2021-10-01 平安科技(深圳)有限公司 User behavior prediction method, device, equipment and medium
CN113538127B (en) * 2021-07-16 2023-06-23 四川新网银行股份有限公司 Method, system, equipment and medium for supporting simultaneous combined wind control test of multiple partners
CN113569263A (en) * 2021-07-30 2021-10-29 拉扎斯网络科技(上海)有限公司 Secure processing method and device for cross-private-domain data and electronic equipment
CN114049054B (en) * 2022-01-13 2022-04-19 江苏通付盾科技有限公司 Decision method and system applied to risk management and control
CN115099988A (en) * 2022-06-28 2022-09-23 腾讯科技(深圳)有限公司 Model training method, data processing method, device and computer medium
CN116340852B (en) * 2023-05-30 2023-09-15 支付宝(杭州)信息技术有限公司 Model training and business wind control method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308418A (en) * 2017-07-28 2019-02-05 阿里巴巴集团控股有限公司 A kind of model training method and device based on shared data
CN109344871A (en) * 2018-08-30 2019-02-15 西北工业大学 A kind of target classification identification method based on multi-source field fusion transfer learning
CN109685644A (en) * 2018-12-17 2019-04-26 深圳市数丰科技有限公司 A kind of customers' credit methods of marking and device based on transfer learning
CN110097178A (en) * 2019-05-15 2019-08-06 电科瑞达(成都)科技有限公司 It is a kind of paid attention to based on entropy neural network model compression and accelerated method
CA3056098A1 (en) * 2019-06-07 2019-11-22 Tata Consultancy Services Limited Sparsity constraints and knowledge distillation based learning of sparser and compressed neural networks
CN110555148A (en) * 2018-05-14 2019-12-10 腾讯科技(深圳)有限公司 user behavior evaluation method, computing device and storage medium
CN111027870A (en) * 2019-12-14 2020-04-17 支付宝(杭州)信息技术有限公司 User risk assessment method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308418A (en) * 2017-07-28 2019-02-05 阿里巴巴集团控股有限公司 A kind of model training method and device based on shared data
CN110555148A (en) * 2018-05-14 2019-12-10 腾讯科技(深圳)有限公司 user behavior evaluation method, computing device and storage medium
CN109344871A (en) * 2018-08-30 2019-02-15 西北工业大学 A kind of target classification identification method based on multi-source field fusion transfer learning
CN109685644A (en) * 2018-12-17 2019-04-26 深圳市数丰科技有限公司 A kind of customers' credit methods of marking and device based on transfer learning
CN110097178A (en) * 2019-05-15 2019-08-06 电科瑞达(成都)科技有限公司 It is a kind of paid attention to based on entropy neural network model compression and accelerated method
CA3056098A1 (en) * 2019-06-07 2019-11-22 Tata Consultancy Services Limited Sparsity constraints and knowledge distillation based learning of sparser and compressed neural networks
CN111027870A (en) * 2019-12-14 2020-04-17 支付宝(杭州)信息技术有限公司 User risk assessment method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TAIYANG 625: "Deep learning-knowledge distillation network compression training method-turn", XP055820562, Retrieved from the Internet <URL:https://blog.csdn.net/Taiyang625/article/details/81672717> [retrieved on 20210702] *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113988483A (en) * 2021-12-23 2022-01-28 支付宝(杭州)信息技术有限公司 Risk operation behavior control method, risk operation behavior model training method and electronic equipment
CN113988483B (en) * 2021-12-23 2022-04-29 支付宝(杭州)信息技术有限公司 Risk operation behavior control method, risk operation behavior model training method and electronic equipment

Also Published As

Publication number Publication date
CN111027870A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
WO2021114911A1 (en) User risk assessment method and apparatus, electronic device, and storage medium
WO2021114974A1 (en) User risk assessment method and apparatus, electronic device, and storage medium
US11556846B2 (en) Collaborative multi-parties/multi-sources machine learning for affinity assessment, performance scoring, and recommendation making
US11468448B2 (en) Systems and methods of providing security in an electronic network
CN112085159B (en) User tag data prediction system, method and device and electronic equipment
US11893493B2 (en) Clustering techniques for machine learning models
CN111428887B (en) Model training control method, device and system based on multiple computing nodes
US20190163790A1 (en) System and method for generating aggregated statistics over sets of user data while enforcing data governance policy
US11907403B2 (en) Dynamic differential privacy to federated learning systems
US10726501B1 (en) Method to use transaction, account, and company similarity clusters derived from the historic transaction data to match new transactions to accounts
WO2020035075A1 (en) Method and system for carrying out maching learning under data privacy protection
WO2023216494A1 (en) Federated learning-based user service strategy determination method and apparatus
WO2021189926A1 (en) Service model training method, apparatus and system, and electronic device
US20230093540A1 (en) System and Method for Detecting Anomalous Activity Based on a Data Distribution
CN110858253A (en) Method and system for executing machine learning under data privacy protection
WO2022237175A1 (en) Graph data processing method and apparatus, device, storage medium, and program product
US20230104176A1 (en) Using a Machine Learning System to Process a Corpus of Documents Associated With a User to Determine a User-Specific and/or Process-Specific Consequence Index
Zheng et al. A matrix factorization recommendation system-based local differential privacy for protecting users’ sensitive data
Upreti et al. Enhanced algorithmic modelling and architecture in deep reinforcement learning based on wireless communication Fintech technology
US11164245B1 (en) Method and system for identifying characteristics of transaction strings with an attention based recurrent neural network
Kou et al. Trust‐Based Missing Link Prediction in Signed Social Networks with Privacy Preservation
WO2023060150A1 (en) Data compression techniques for machine learning models
CA3131616A1 (en) System and method for detecting anomalous activity based on a data distribution
Sumathi et al. Scale-based secured sensitive data storage for banking services in cloud
US20230419344A1 (en) Attribute selection for matchmaking

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20900569

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20900569

Country of ref document: EP

Kind code of ref document: A1