# US 2019/0318245 A1 · Method, terminal-side device, and cloud-side device for data processing and terminal-cloud collaboration system

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

- Number: US 2019/0318245 A1
- Document ID: US20190318245A1
- Status: Published application
- Kind: A1
- Application number: 16/452,290
- Filed: 2019-06-25
- Published: 2019-10-17
- Earliest claimed: 2016-12-26
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Fenglong SONG; Wulong LIU; Xijun XUE; Huimin ZHANG
- Web page: https://patentgrep.com/patent/US20190318245A1

## CPC

- G06N 3/063: using electronic means
- G06F 9/5011: {the resources being hardware resources other than CPUs, Servers and Terminals}
- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 9/5061: {Partitioning or combining of resources}
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

This application provides a method, a terminal-side device, and a cloud-side device for data processing and a terminal-cloud collaboration system. The method includes: sending, by the terminal-side device, a request message to the cloud-side device; receiving, by the terminal-side device, a second neural network model that is obtained by compressing a first neural network model and that is sent by the cloud-side device, where the first neural network model is a neural network model on the cloud-side device that is used to process the cognitive computing task, and a hardware resource required when the second neural network model runs on the terminal-side device is within an available hardware resource capability range of the terminal-side device; and processing, by the terminal-side device, the cognitive computing task based on the second neural network model.

## Claims

### Claim 1

A method for data processing, comprising:
sending, by a terminal-side device, a request message to a cloud-side device, wherein the request message is used to request a neural network model to process a cognitive computing task;
receiving, by the terminal-side device, a second neural network model obtained by trimming a first neural network model sent by the cloud-side device, wherein the first neural network model is on the cloud-side device that is used to process the cognitive computing task, and a hardware resource required to execute the second neural network model is within an available hardware resource capability range of the terminal-side device; and
processing, by the terminal-side device, the cognitive computing task using the second neural network model.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the terminal-side device comprises a neural network basic platform, the neural network basic platform comprises a neural network architecture component and a neural network parameter component, and the neural network architecture component is decoupled from the neural network parameter component; and
wherein processing the cognitive computing task using the second neural network model comprises:
when the second neural network model comprises an architecture update component, updating the neural network architecture component based on the architecture update component;
when the second neural network model comprises a parameter update component, updating the neural network parameter component based on the parameter update component; and
processing the cognitive computing task using the neural network basic platform with the updated neural network architecture component and the updated neural network parameter component.

### Claim 3 (depends on 1)

The method according to claim 1, wherein sending a request message to a cloud-side device comprises:
sending, by the terminal-side device, the request message to the cloud-side device in response to determining that:
the terminal-side device lacks a neural network model used to process the cognitive computing task; or
an accuracy of processing the cognitive computing task using a neural network model on the terminal-side device does not meet a cognitive accuracy tolerance, wherein the cognitive accuracy tolerance represents an expected accuracy of processing the cognitive computing task by the terminal-side device; or
a hardware resource required to execute a neural network model on the terminal-side device to process the cognitive computing task exceeds the available hardware resource capability of the terminal-side device.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the request message includes indication information used to indicate a cognitive accuracy tolerance, so that the cloud-side device trims the first neural network model to obtain the second neural network model that meets the cognitive accuracy tolerance, wherein the cognitive accuracy tolerance represents an expected accuracy of processing the cognitive computing task by the terminal-side device.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the request message includes indication information used to indicate the available hardware resource capability of the terminal-side device.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the request message further includes an identifier identifying the first neural network model, so that the cloud-side device determines the first neural network model based on the identifier; or
the request message further includes function information to describe a function of processing the cognitive computing task, so that the cloud-side device determines the first neural network model based on the function information.

### Claim 7 (depends on 1)

The method according to claim 1, wherein a computation amount and a required storage capacity of the second neural network model are respectively less than a computation amount and a required storage capacity of the first neural network model.

### Claim 8

A method for data processing, comprising:
receiving, by a cloud-side device, a request message from a terminal-side device, to request a neural network model to process a cognitive computing task;
determining, by the cloud-side device based on the request message, a first neural network model to process the cognitive computing task;
trimming, by the cloud-side device, the first neural network model to obtain a second neural network model, wherein a hardware resource required to execute the second neural network model is within an available hardware resource capability range of the terminal-side device; and
sending, by the cloud-side device, the second neural network model to the terminal-side device, so that the terminal-side device processes the cognitive computing task using the second neural network model.

### Claim 9 (depends on 8)

The method according to claim 8, wherein the trimming the first neural network model to obtain a second neural network model comprises:
trimming, by the cloud-side device, a parameter component of the first neural network model to obtain the second neural network model, wherein a required storage capacity of a parameter component of the second neural network model is less than a required storage capacity of the parameter component of the first neural network model.

### Claim 10 (depends on 8)

The method according to claim 8, wherein the trimming the first neural network model to obtain a second neural network model comprises:
trimming, by the cloud-side device, an architecture component of the first neural network model to obtain a third neural network model, wherein a computation amount of a computation kernel of the third neural network model is less than a computation amount of a computation kernel of the first neural network model; and
trimming, by the cloud-side device, a parameter component of the third neural network model to obtain the second neural network model, wherein a required storage capacity of a parameter component of the second neural network model is less than a required storage capacity of the parameter component of the third neural network model.

### Claim 11 (depends on 8)

The method according to claim 8, wherein the request message includes indication information to indicate a cognitive accuracy tolerance, and the cognitive accuracy tolerance represents an expected accuracy of processing the cognitive computing task by the terminal-side device; and
trimming the first neural network model to obtain a second neural network model comprises:
trimming, by the cloud-side device based on the cognitive accuracy tolerance, the first neural network model to obtain the second neural network model, wherein an accuracy of processing the cognitive computing task using the second neural network model meets the cognitive accuracy tolerance.

### Claim 12 (depends on 8)

The method according to claim 8, wherein the request message includes indication information to indicate an available hardware resource capability of the terminal-side device.

### Claim 13 (depends on 8)

The method according to claim 8, wherein the request message further includes an identifier identifying the first neural network model; and
determining, by the cloud-side device based on the request message, a first neural network model used to process the cognitive computing task comprises:
determining, by the cloud-side device, the first neural network model based on the identifier.

### Claim 14 (depends on 8)

The method according to claim 8, wherein the request message further includes function information to describe a function of processing the cognitive computing task; and
determining, by the cloud-side device based on the request message, a first neural network model used to process the cognitive computing task comprises:
determining, by the cloud-side device, the first neural network model based on the function information.

### Claim 15 (depends on 8)

The method according to claim 8, wherein a computation amount and a required storage capacity of the second neural network model are respectively less than a computation amount and a required storage capacity of the first neural network model.

### Claim 16

A terminal-side device for data processing, comprising:
a sending module to send a request message to a cloud-side device to request a neural network model used to process a cognitive computing task;
a receiving module to receive a second neural network model that is obtained by trimming a first neural network model from the cloud-side device, wherein the first neural network model is on the cloud-side device used to process the cognitive computing task, and a hardware resource required to execute the second neural network model is within an available hardware resource capability range of the terminal-side device; and
a processing module to process the cognitive computing task using the second neural network model.

### Claim 17 (depends on 16)

The terminal-side device according to claim 16, wherein the terminal-side device comprises a neural network basic platform, the neural network basic platform comprises a neural network architecture component and a neural network parameter component, and the neural network architecture component is decoupled from the neural network parameter component; and
wherein the processing module is configured to:
when the second neural network model comprises an architecture update component, update the neural network architecture component based on the architecture update component;
when the second neural network model comprises a parameter update component, update the neural network parameter component based on the parameter update component; and
process the cognitive computing task using the neural network basic platform with the updated neural network architecture component and the updated neural network parameter component.

### Claim 18 (depends on 16)

The terminal-side device according to claim 16, wherein the sending module is configured to send the request message to the cloud-side device in response to determining that:
the terminal-side device lacks a neural network model used to process the cognitive computing task;
an accuracy of processing the cognitive computing task using a neural network model on the terminal-side device does not meet a cognitive accuracy tolerance; and
a hardware resource required to execute a neural network model on the terminal-side device to process the cognitive computing task exceeds the available hardware resource capability of the terminal-side device, wherein the cognitive accuracy tolerance represents an expected accuracy of processing the cognitive computing task by the terminal-side device.

### Claim 19 (depends on 16)

The terminal-side device according to claim 16, wherein the request message includes indication information to indicate the cognitive accuracy tolerance, so that the cloud-side device trims the first neural network model to obtain the second neural network model that meets the cognitive accuracy tolerance, wherein the cognitive accuracy tolerance represents the expected accuracy of processing the cognitive computing task by the terminal-side device.

### Claim 20 (depends on 16)

The terminal-side device according to claim 16, wherein the request message includes indication information to indicate the available hardware resource capability of the terminal-side device.

### Claim 21 (depends on 16)

The terminal-side device according to claim 16, wherein the request message further includes an identifier identifying the first neural network model, so that the cloud-side device determines the first neural network model based on the identifier; or
the request message further includes function information to describe a function of processing the cognitive computing task, so that the cloud-side device determines the first neural network model based on the function information.

### Claim 22 (depends on 16)

The terminal-side device according to claim 16, wherein a computation amount and a required storage capacity of the second neural network model are respectively less than a computation amount and a required storage capacity of the first neural network model.

### Claim 23

A cloud-side device for data processing, comprising:
a receiving module to receive a request message from a terminal-side device to request a neural network model used to process a cognitive computing task;
a determining module to determine, based on the request message, a first neural network model to process the cognitive computing task;
a trimming module to trim the first neural network model to obtain a second neural network model, wherein a hardware resource required to execute the second neural network model is within an available hardware resource capability range of the terminal-side device; and
a sending module to send the second neural network model to the terminal-side device, so that the terminal-side device processes the cognitive computing task based on the second neural network model.

### Claim 24 (depends on 23)

The cloud-side device according to claim 23, wherein the trimming module is configured to trim a parameter component of the first neural network model to obtain the second neural network model, wherein a required storage capacity of a parameter component of the second neural network model is less than a required storage capacity of the parameter component of the first neural network model.

### Claim 25 (depends on 23)

The cloud-side device according to claim 23, wherein the trimming module is configured to:
trim an architecture component of the first neural network model to obtain a third neural network model, wherein a computation amount of a computation kernel of the third neural network model is less than a computation amount of a computation kernel of the first neural network model; and
trim a parameter component of the third neural network model to obtain the second neural network model, wherein a required storage capacity of a parameter component of the second neural network model is less than a required storage capacity of the parameter component of the third neural network model.

### Claim 26 (depends on 23)

The cloud-side device according to claim 23, wherein the request message includes indication information to indicate a cognitive accuracy tolerance representing an expected accuracy of processing the cognitive computing task by the terminal-side device; and
wherein the trimming module is configured to trim, based on the cognitive accuracy tolerance, the first neural network model to obtain the second neural network model, wherein an accuracy of processing the cognitive computing task using the second neural network model meets the cognitive accuracy tolerance.

### Claim 27 (depends on 23)

The cloud-side device according to claim 23, wherein the request message includes indication information to indicate an available hardware resource capability of the terminal-side device.

### Claim 28 (depends on 23)

The cloud-side device according claim 23, wherein the request message further includes an identifier identifying the first neural network model; and
the determining module is configured to determine the first neural network model based on the identifier.

### Claim 29 (depends on 23)

The cloud-side device according to claim 23, wherein the request message further includes function information to describe a function of processing the cognitive computing task; and
the determining module is configured to determine the first neural network model based on the function information.

### Claim 30 (depends on 23)

The cloud-side device according to claim 23, wherein a computation amount and a required storage capacity of the second neural network model are respectively less than a computation amount and a required storage capacity of the first neural network model.

### Claim 31 (depends on 16)

A terminal-cloud collaboration system, comprising the terminal-side device according to claim 16.
