File saving method and electronic device
AssigneeHuawei Technologies Co., Ltd.
InventorsYuanli Gan, Huaqi Hao
Life of this patent
Estimating the term…
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.
Claims13
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.
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.
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.
Dependencies are inferred from the claim text.