# US 11,308,029 B2 · File saving method and electronic device

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

- Number: US 11,308,029 B2
- Document ID: US11308029B2
- Status: Granted
- Kind: B2
- Application number: 16/097,040
- Filed: 2016-04-28
- Published: 2019-03-21
- Granted: 2022-04-19
- Earliest claimed: 2016-04-28
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Yuanli Gan; Huaqi Hao
- Web page: https://patentgrep.com/patent/US11308029B2

## CPC

- G06F 16/13: File access structures, e.g. distributed indices (arrangements of input from, or output to, record carriers G06F3/06)
- G06F 16/00: Information retrieval; Database structures therefor; File system structures therefor
- G06F 16/148: {File search processing}
- G06F 16/41: Indexing; Data structures therefor; Storage structures
- G06F 16/58: Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F 16/95: Retrieval from the web
- G06F 16/9535: Search customisation based on user profiles and personalisation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A file saving method and an electronic device are provided. The file saving method includes: obtaining at least one to-be-processed file in a social circle, where the to-be-processed file is a file uploaded by another user in the social circle other than a user of the electronic device; filtering the at least one to-be-processed file according to a preset rule, to obtain a target file that complies with the preset rule; and saving the target file.

## Claims

### Claim 1

A method, comprising:
obtaining, by an electronic device, a to-be-processed file shared by a second user, wherein a first user is a user of the electronic device, and the first user and the second user are different users;
parsing the to-be-processed file, to obtain a feature library corresponding to the to-be-processed file, wherein the feature library comprises a plurality of elements that represent features of the to-be-processed file, and wherein when a plurality of to-be-processed files are shared by one or more users a plurality of feature libraries correspond to the plurality of to-be-processed files, wherein each of the plurality of feature libraries corresponds to one of the plurality of to-be-processed files in a one to one manner, and wherein the one or more users includes the second user;
filtering, by the electronic device, the feature library corresponding to the to-be-processed file according to a preset rule to obtain a target file that complies with the preset rule, wherein the preset rule is set by the first user for the to-be-processed file, and the preset rule comprises: a preset keyword matching rule, an image matching rule, or a comment keyword matching rule; and
in response to obtaining the target file that complies with the preset rule, saving, by the electronic device, the target file.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the preset rule comprises the preset keyword matching rule, and a preset keyword of the preset keyword matching rule comprises a keyword specified by the first user or a default keyword in the electronic device; and
wherein filtering, according to the preset rule, the feature library corresponding to the to-be-processed file comprises:
performing matching between the preset keyword and elements of the plurality of elements comprised in the feature library corresponding to the to-be-processed file, and determining the to-be-processed file is the target file when the preset keyword matches an element of the feature library corresponding to the to-be-processed file.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the preset rule comprises the comment keyword matching rule of the first user for the to-be-processed file; and
wherein filtering, according to the preset rule, the feature library corresponding to the to-be-processed file comprises:
obtaining comment content of the first user of the electronic device on the to-be-processed file, and extracting, from the comment content, a target keyword that meets a preset condition; and
performing matching between the target keyword and elements of the plurality of elements in the feature library corresponding to the to-be-processed file, and determining the to-be-processed file is the target file when the target keyword matches an element of the feature library corresponding to the to-be-processed file.

### Claim 4 (depends on 1)

The method according to claim 1, wherein before saving the target file, the method further comprises:
determining whether a file that is the same as the target file exists in the electronic device; and
wherein in response to obtaining the target file that complies with the preset rule, saving the target file comprises:
in response to obtaining the target file that complies with the preset rule, and in response to determining that no file that is the same as the target file exists in the electronic device, saving the target file to the electronic device.

### Claim 5 (depends on 1)

The method according to claim 1, wherein before saving the target file, the method further comprises:
determining whether a file that is the same as the target file exists in a preset cloud; and
wherein in response to obtaining the target file that complies with the preset rule, saving the target file comprises:
in response to obtaining the target file that complies with the preset rule, and in response to determining that no file that is the same as the target file exists in the preset cloud, saving the target file to the preset cloud.

### Claim 6

An electronic device, comprising:
a processor;
a non-transitory memory; and
a bus;
wherein the memory is configured to store one or more execution instructions, the processor and the memory are connected using the bus, and when the electronic device runs, the processor executes the one or more execution instructions stored in the memory, causing the electronic device to:
obtain a to-be-processed file, wherein a first user is a user of the electronic device, the to-be-processed file is shared by a second user, and the first user and the second user are different users;
parse the to-be-processed file, to obtain a feature library corresponding to the to-be-processed file, wherein the feature library comprises a plurality of elements that represent features of the to-be-processed file, and wherein when a plurality of to-be-processed files are shared by one or more users a plurality of feature libraries correspond to the plurality of to-be-processed files, wherein each of the plurality of feature libraries corresponds to one of the plurality of to-be-processed files in a one to one manner, and wherein the one or more users includes the second user;
filter the feature library corresponding to the to-be-processed file according to a preset rule to obtain a target file that complies with the preset rule, wherein the preset rule is set by the first user for the to-be-processed file, and the preset rule comprises: a preset keyword matching rule, an image matching rule, or a comment keyword matching rule; and
in response to obtaining the target file that complies with the preset rule, save the target file.

### Claim 7 (depends on 6)

The electronic device according to claim 6, wherein the preset rule comprises the preset keyword matching rule, and a preset keyword of the preset keyword matching rule comprises a keyword specified by the first user or a default keyword in the electronic device; and
wherein filtering, according to the preset rule, the feature library corresponding to the to-be-processed file comprises:
performing matching between the preset keyword and elements of the plurality of elements comprised in the feature library corresponding to the to-be-processed file, and determining the to-be-processed file is the target file when the preset keyword matches an element of the feature library corresponding to the to-be-processed file.

### Claim 8 (depends on 6)

The electronic device according to claim 6, wherein the preset rule comprises the comment keyword matching rule of the first user for the to-be-processed file; and
wherein filtering, according to the preset rule, the feature library corresponding to the to-be-processed file comprises:
obtaining comment content of the first user of the electronic device on the to-be-processed file, and extracting, from the comment content, a target keyword that meets a preset condition; and
performing matching between the target keyword and elements of the plurality of elements in the feature library corresponding to the to-be-processed file, and determining the to-be-processed file is the target file when the target keyword matches an element of the feature library corresponding to the to-be-processed file.

### Claim 9 (depends on 6)

The electronic device according to claim 6, wherein the execution of the execution instruction stored in the memory further causes the electronic device to:
determine whether a file that is the same as the target file exists in the electronic device; and
wherein in response to obtaining the target file that complies with the preset rule, saving the target file comprises:
in response to obtaining the target file that complies with the preset rule, and in response to determining that no file that is the same as the target file exists in the electronic device, saving the target file to the electronic device.

### Claim 10 (depends on 6)

The electronic device according to claim 6, wherein the execution of the execution instruction stored in the memory further causes the electronic device to:
determine whether a file that is the same as the target file exists in a preset cloud; and
wherein in response to obtaining the target file that complies with the preset rule, saving the target file comprises:
in response to obtaining the target file that complies with the preset rule, and in response to determining that no file that is the same as the target file exists in the preset cloud, saving the target file to the preset cloud.

### Claim 11

A non-transitory computer readable storage medium, wherein the non-transitory computer readable storage medium stores a program, and when the program is executed, the following is performed:
obtaining a to-be-processed file, wherein a first user is a user of an electronic device, the to-be-processed file is shared by a second user, and the first user and the second user are different users;
parse the to-be-processed file, to obtain a feature library corresponding to the to-be-processed file, wherein the feature library comprises a plurality of elements that represent features of the to-be-processed file, and wherein when a plurality of to-be-processed files are shared by one or more users a plurality of feature libraries correspond to the plurality of to-be-processed files, wherein each of the plurality of feature libraries corresponds to one of the plurality of to-be-processed files in a one to one manner, and wherein the one or more users includes the second user;
filtering the feature library corresponding to the to-be-processed file according to a preset rule to obtain a target file that complies with the preset rule, wherein the preset rule is set by the first user for the to-be-processed file, and the preset rule comprises: a preset keyword matching rule, an image matching rule, or a comment keyword matching rule; and
in response to obtaining the target file that complies with the preset rule, saving the target file.

### Claim 12 (depends on 11)

The non-transitory computer readable storage medium according to claim 11, wherein the preset rule comprises the preset keyword matching rule, and a preset keyword of the preset keyword matching rule comprises a keyword specified by the first user or a default keyword in the electronic device; and
wherein filtering, according to the preset rule, the feature library corresponding to the to-be-processed file comprises:
performing matching between the preset keyword and elements of the plurality of elements comprised in the feature library corresponding to the to-be-processed file, and determining the to-be-processed file is the target file when the preset keyword matches an element of the feature library corresponding to the to-be-processed file.

### Claim 13 (depends on 11)

The non-transitory computer readable storage medium according to claim 11, wherein the preset rule comprises the comment keyword matching rule of the first user for the to-be-processed file; and
wherein filtering, according to the preset rule, the feature library corresponding to the to-be-processed file comprises:
obtaining comment content of the first user of the electronic device on the to-be-processed file, and extracting, from the comment content, a target keyword that meets a preset condition; and
performing matching between the target keyword and elements of the plurality of elements in the feature library corresponding to the to-be-processed file, and determining the to-be-processed file is the target file when the target keyword matches an element of the feature library corresponding to the to-be-processed file.
