# US 2021/0279613 A1 · Model selection method and terminal

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

- Number: US 2021/0279613 A1
- Document ID: US20210279613A1
- Status: Published application
- Kind: A1
- Application number: 17/329,414
- Filed: 2021-05-25
- Published: 2021-09-09
- Earliest claimed: 2018-11-26
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Chao YU; Xinyu ZHOU
- Web page: https://patentgrep.com/patent/US20210279613A1

## CPC

- G06N 5/04: Inference or reasoning models
- G06Q 10/04: Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem" (market predictions or forecasting for commercial activities G06Q30/0202)
- G06F 3/0482: Interaction with lists of selectable items, e.g. menus
- G06F 3/04842: Selection of displayed objects or displayed text elements (G06F3/0482 takes precedence)
- G06F 3/0488: using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06N 20/00: Machine learning
- G06Q 30/0631: {Recommending goods or services}
- G06F 9/445: Program loading or initiating (bootstrapping G06F9/4401; security arrangements for program loading or initiating G06F21/57)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06Q: INFORMATION 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
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A model selection method and a terminal are provided. The method includes: A terminal obtains first behavior data generated when a user operates the terminal. The terminal selects a first model from a plurality of stored models. The terminal runs the first model by using the first behavior data as an input parameter of the first model, to obtain a first output result. The terminal provides a first artificial intelligence AI service based on the first output result. When the first model does not meet a condition, the terminal selects a second model from the plurality of models. The terminal runs the second model by using second behavior data as an input parameter of the second model, to obtain a second output result. The terminal continues to provide the first AI service based on the second output result.

## Claims

### Claim 1

A model selection method, wherein the method comprises:
obtaining, by a terminal, first behavior data generated when a user operates the terminal;
selecting, by the terminal according to a preset policy, a first model from a plurality of models stored on the terminal;
running, by the terminal, the first model by using the first behavior data as an input parameter of the first model, to obtain a first output result;
providing, by the terminal, a first artificial intelligence (AI) service based on the first output result;
selecting, by the terminal, a second model from the plurality of models when the first model does not meet a condition;
running, by the terminal, the second model by using second behavior data as an input parameter of the second model, to obtain a second output result, wherein the second behavior data is generated after the first behavior data, and is generated when the user operates the terminal; and
continuing to provide, by the terminal, the first AI service based on the second output result.

### Claim 2 (depends on 1)

The method according to claim 1, wherein before the running, by the terminal, the first model by using the first behavior data as an input parameter of the first model, the method further comprises:
evaluating, by the terminal, the first model; and
the running, by the terminal, the first model by using the first behavior data as an input parameter of the first model comprises:
when a result of evaluating the first model meets the condition, running, by the terminal, the first model by using the first behavior data as the input parameter of the first model, to obtain the first output result.

### Claim 3 (depends on 2)

The method according to claim 2, wherein before the evaluating, by the terminal, the first model, the method further comprises:
determining, by the terminal, a value of the input parameter and a value of an output parameter; and
substituting, by the terminal, the determined value of the input parameter and the determined value of the output parameter into a formula of the first model, and determining a value of a model parameter of the first model, wherein the model parameter is a value of a parameter of the first model other than the input parameter and the output parameter;
or
determining, by the terminal based on a correspondence between a model and a value of a model parameter, a value that is of a model parameter and that is corresponding to the first model.

### Claim 4 (depends on 2)

The method according to claim 2, wherein the evaluating, by the terminal, the first model comprises:
obtaining, by the terminal, third behavior data generated when the user operates the terminal, wherein the third behavior data is generated before the first behavior data;
running, by the terminal, the first model by using the third behavior data as the input parameter of the first model, to obtain a test result; and
comparing, by the terminal, the test result with an actual result, wherein the actual result is an actual operation of the user performed after the third behavior data is obtained, wherein
if the test result is consistent with the actual result, the result of evaluating the first model meets the condition; or
if the test result is inconsistent with the actual result, the result of evaluating the first model does not meet the condition.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the selecting, by the terminal according to a preset policy, a first model from a plurality of models comprises:
randomly selecting, by the terminal, the first model from the plurality of models;
selecting, by the terminal, a model with a largest Q value according to a Q-table, wherein the Q-table comprises a Q value corresponding to each model, and the Q value is related to a result of evaluating each model; or
selecting, by the terminal based on a current service, the first model corresponding to the current service.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the first output result is a next possible behavior of the user predicted after the first behavior data is obtained, and the selecting, by the terminal, a second model from the plurality of models when the first model does not meet a condition comprises:
when the next possible behavior of the user predicted by using the first model is different from a next actual behavior of the user, selecting, by the terminal, the second model; or
when duration of using the first model reaches preset duration, selecting, by the terminal, the second model.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the first behavior data or the second behavior data comprises an application that the user taps last three times; and
the first output result or the second output result is an application that the user may tap next time.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the third behavior data comprises applications tapped three consecutive times before an application tapped last time, and the actual result is an application tapped immediately before the applications tapped three consecutive times.

### Claim 9 (depends on 6)

The method according to claim 6, wherein that the next possible behavior of the user predicted by using the model is different from a next actual behavior of the user comprises:
an application that the user may tap next time and that is predicted by using the model is different from an application that the user actually taps next time.

### Claim 10 (depends on 7)

The method according to claim 7, wherein the providing, by the terminal, an AI-related service based on the first output result or the second output result comprises:
preloading, by the terminal, the application that the user may tap next time;
shutting down, by the terminal, another application that is running in the background and that is not the application that the user may tap next time; or
outputting, by the terminal, prompt information, wherein the prompt information is used to prompt the application that the user may tap next time, and when detecting that the user determines the prompt information, loading, by the terminal, the application that the user may tap next time.

### Claim 11 (depends on 1)

The method according to claim 1, wherein the first behavior data or the second behavior data comprises categories of commodities that the user taps last three times; and
the first output result or the second output result is a category of a commodity that the user may tap next time.

### Claim 12 (depends on 11)

The method according to claim 11, wherein the third behavior data comprises a category of a commodity tapped three consecutive times before a category of a commodity tapped last time, and the actual result is a category of a commodity tapped immediately before the category of the commodity tapped three consecutive times.

### Claim 13 (depends on 10)

The method according to claim 10, wherein that the next possible behavior of the user predicted by using the model is different from a next actual behavior of the user comprises:
a category that is of a commodity that the user may tap next time and that is predicted by using the model is different from a category of a commodity that the user actually taps next time.

### Claim 14 (depends on 11)

The method according to claim 11, wherein the providing, by the terminal, an AI-related service based on the first output result or the second output result comprises:
preloading, by the terminal, a commodity that belongs to the category of the commodity that the user may tap next time;
outputting, by the terminal, prompt information, wherein the prompt information is used to prompt the category of the commodity that the user may tap next time, and when detecting that the user determines the prompt information, loading, by the terminal, a commodity that belongs to the category of the commodity that the user may tap next time; or
outputting, by the terminal, prompt information, wherein the prompt information is used to recommend a category of a commodity of interest to the user, and the category of the commodity of interest is the same as the category of the commodity that the user may tap next time.

### Claim 15 (depends on 1)

The method according to claim 1, wherein the first model or the second model is one of a decision tree, a neural unit, a logistic regression LR algorithm LR, a naive Bayesian NB classification algorithm, a random forest RF algorithm, or a support vector machine SVM algorithm.

### Claim 16

A terminal, comprising a memory and a processor, wherein
the memory is configured to store one or more computer programs, and when the one or more computer programs stored in the memory are executed by the processor, the terminal is enabled to implement the following steps:
obtaining first behavior data generated when a user operates the terminal;
selecting, according to a preset policy, a first model from a plurality of models stored on the terminal;
running the first model by using the first behavior data as an input parameter of the first model, to obtain a first output result;
providing a first artificial intelligence (AI) service based on the first output result;
selecting a second model from the plurality of models when the first model does not meet a condition;
running the second model by using second behavior data as an input parameter of the second model, to obtain a second output result, wherein the second behavior data is generated after the first behavior data, and is generated when the user operates the terminal; and
continuing to provide the first AI service based on the second output result.

### Claim 17 (depends on 16)

The method according to claim 16, wherein before the running the first model by using the first behavior data as an input parameter of the first model, the method further comprises:
evaluating the first model; and
the running the first model by using the first behavior data as an input parameter of the first model comprises:
when a result of evaluating the first model meets the condition, running the first model by using the first behavior data as the input parameter of the first model, to obtain the first output result.

### Claim 18 (depends on 17)

The method according to claim 17, wherein before the evaluating the first model, the method further comprises:
determining a value of the input parameter and a value of an output parameter; and
substituting the determined value of the input parameter and the determined value of the output parameter into a formula of the first model, and determining a value of a model parameter of the first model, wherein the model parameter is a value of a parameter of the first model other than the input parameter and the output parameter;
or
determining, based on a correspondence between a model and a value of a model parameter, a value that is of a model parameter and that is corresponding to the first model.

### Claim 19 (depends on 17)

The method according to claim 17, wherein the evaluating the first model comprises:
obtaining third behavior data generated when the user operates the terminal, wherein the third behavior data is generated before the first behavior data;
running the first model by using the third behavior data as the input parameter of the first model, to obtain a test result; and
comparing the test result with an actual result, wherein the actual result is an actual operation of the user performed after the third behavior data is obtained, wherein
if the test result is consistent with the actual result, the result of evaluating the first model meets the condition; or
if the test result is inconsistent with the actual result, the result of evaluating the first model does not meet the condition.

### Claim 20 (depends on 16)

The method according to claim 16, wherein the selecting, according to a preset policy, a first model from a plurality of models comprises:
randomly selecting the first model from the plurality of models;
selecting a model with a largest Q value according to a Q-table, wherein the Q-table comprises a Q value corresponding to each model, and the Q value is related to a result of evaluating each model; or
selecting, based on a current service, the first model corresponding to the current service.
