# US 2025/0148111 A1 · Method and apparatus for protecting data, and device and medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0148111 A1
- Document ID: US20250148111A1
- Status: Published application
- Kind: A1
- Application number: 18/837,078
- Filed: 2023-02-02
- Published: 2025-05-08
- Earliest claimed: 2022-02-08
- Assignees: Lemon Inc.
- Applicants: Lemon Inc.
- Inventors: Jiankai SUN; Xin YANG; Yuanshun YAO; Junyuan XIE; Chong WANG
- Web page: https://patentgrep.com/patent/US20250148111A1

## CPC

- G06F 21/6218: {to a system of files or objects, e.g. local or distributed file system or database}
- G06F 21/6245: {Protecting personal data, e.g. for financial or medical purposes}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and apparatus for protecting data, and a device and a medium are provided. The method comprises acquiring, by a first device, a feature representation generated by a second device on the basis of sample data and according to a second model, wherein the first device has label information for the sample data; and the first device and the second device are used for jointly training a first model at the first device and the second model at the second device. The method further comprises generating, by the first device, a prediction label for the sample data on the basis of the feature representation and according to the first model. The method further comprises determining, by the first device and on the basis of the feature representation, the label information and the predicted label, a total loss value used for training the first model and the second model.

## Claims

### Claim 1

A method for protecting data, comprising:
acquiring, by a first device, a feature representation generated by a second device based on sample data and according to a second model, the first device having label information for the sample data, and the first device and the second device being configured to jointly train a first model at the first device and the second model at the second device;
generating, by the first device based on the feature representation and according to the first model, a predicted label for the sample data; and
determining, by the first device based on the feature representation, the label information and the predicted label, a total loss value for training the first model and the second model.

### Claim 2 (depends on 1)

The method according to claim 1, wherein determining the total loss value comprises:
determining a first loss based on the label information and the predicted label, wherein the first loss denotes a degree of difference between the predicted label and the label information;
determining a second loss based on the feature representation and the label information, wherein the second loss denotes a degree of correlation between the feature representation and the label information; and
determining the total loss value based on the first loss and the second loss.

### Claim 3 (depends on 2)

The method according to claim 2, wherein determining the total loss value comprises:
determining a weighted sum of the first loss and the second loss as the total loss value.

### Claim 4 (depends on 2)

The method according to claim 2, wherein determining the second loss comprises:
determining a distance correlation coefficient of the feature representation and the label information as the second loss.

### Claim 5 (depends on 1)

The method according to claim 1, further comprising:
determining a parameter of the first model by determining a minimum total loss value from the total loss value and at least one other total loss value, wherein the at least one other total loss value is previously or subsequently determined by the first device.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
determining, by the first device, a gradient of the total loss value with respect to the feature representation; and
transmitting the gradient to the second device, to cause the second device to determine a parameter of the second model according to the gradient.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the label information comprises sensitive data of a processing process of the sample data by a user.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the second device has no label information.

### Claim 9

An electronic device, comprising:
at least one processing unit; and
at least one memory, wherein the at least one memory is coupled to the at least one processing unit and stores an instruction for execution by the at least one processing unit, and the instruction, when executed by the at least one processing unit, causes the electronic device to execute actions comprising:
acquiring, by the electronic device, a feature representation generated by a second device based on sample data and according to a second model, the electronic device having label information for the sample data, and the electronic device and the second device being configured to jointly train a first model at the electronic device and the second model at the second device;
generating, based on the feature representation and according to the first model, a predicted label for the sample data; and
determining, based on the feature representation, the label information and the predicted label, a total loss value for training the first model and the second model.

### Claim 10 (depends on 9)

The electronic device according to claim 9, wherein determining the total loss value comprises:
determining a first loss based on the label information and the predicted label, wherein the first loss denotes a degree of difference between the predicted label and the label information;
determining a second loss based on the feature representation and the label information, wherein the second loss denotes a degree of correlation between the feature representation and the label information; and
determining the total loss value based on the first loss and the second loss.

### Claim 11 (depends on 10)

The electronic device according to claim 10, wherein determining the total loss value comprises:
determining a weighted sum of the first loss and the second loss as the total loss value.

### Claim 12 (depends on 10)

The electronic device according to claim 10, wherein determining the second loss comprises:
determining a distance correlation coefficient of the feature representation and the label information as the second loss.

### Claim 13 (depends on 9)

The electronic device according to claim 9, wherein the actions further comprise:
determining a parameter of the first model by determining a minimum total loss value from the total loss value and at least one other total loss value, wherein the at least one other total loss value is previously or subsequently determined by the electronic device.

### Claim 14 (depends on 9)

The electronic device according to claim 9, wherein the actions further comprise:
determining, by a first device, a gradient of the total loss value with respect to the feature representation; and
transmitting the gradient to the second device, to cause the second device to determine a parameter of the second model according to the gradient.

### Claim 15 (depends on 9)

The electronic device according to claim 9, wherein the label information comprises sensitive data of a processing process of the sample data by a user.

### Claim 16 (depends on 9)

The electronic device according to claim 9, wherein the second device has no label information.

### Claim 17

(canceled)

### Claim 18

A non-transitory computer-readable storage medium, having a computer program stored thereon, wherein the program, when executed by a processor, implements a method comprising:
acquiring, by a first device, a feature representation generated by a second device based on sample data and according to a second model, the first device having label information for the sample data, and the first device and the second device being configured to jointly train a first model at the first device and the second model at the second device;
generating, by the first device based on the feature representation and according to the first model, a predicted label for the sample data; and
determining, by the first device based on the feature representation, the label information and the predicted label, a total loss value for training the first model and the second model.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium according to claim 18, wherein determining the total loss value comprises:
determining a first loss based on the label information and the predicted label, wherein the first loss denotes a degree of difference between the predicted label and the label information;
determining a second loss based on the feature representation and the label information, wherein the second loss denotes a degree of correlation between the feature representation and the label information; and
determining the total loss value based on the first loss and the second loss.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium according to claim 19, wherein determining the total loss value comprises:
determining a weighted sum of the first loss and the second loss as the total loss value.

### Claim 21 (depends on 19)

The non-transitory computer-readable storage medium according to claim 19, wherein determining the second loss comprises:
determining a distance correlation coefficient of the feature representation and the label information as the second loss.
