IP Library Granted Patent US 12664128
Granted Patent B2
US 12664128 · App. 18/973,073 · Granted Jun 23, 2026

Data processing method and electronic device

Inventors: Jie Qiu (Hangzhou, CN); Wei Fang (Hangzhou, CN); Xie Miao (Hangzhou, CN); Jing Qian (Shanghai, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F16/1748
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12664128
App. No.
18/973,073
Granted
Jun 23, 2026
Kind
B2
Abstract

In a data processing method, an electronic device detects that a first file and a second file are duplicate files, with a first index node of the first file pointing to file data of the first file, and a second index node of the second file pointing to file data of the second file. The electronic device generates a target index node and configures the target index node to point to the file data of the first file. The electronic device associates the first index node with the target index node, and separately associates the second index node with the target index node. The electronic device then deletes the file data of the second file.

Claims (68)

1 . A data processing method, comprising:

detecting, by an electronic device, that a first file and a second file are duplicate files, wherein a first index node of the first file points to file data of the first file, and a second index node of the second file points to file data of the second file;

generating, by the electronic device, a target index node;

configuring, by the electronic device, the target index node to point to the file data of the first file;

associating, by the electronic device, the first index node with the target index node without changing information stored in the first index node;

associating, by the electronic device, the second index node with the target index node without changing information stored in the second index node; and

deleting, by the electronic device, the file data of the second file.

2 . The method according to claim 1 , wherein the step of associating the first index node with the target index node comprises:

associating identification information of the first index node with identification information of the target index node,

and wherein the step of associating the second index node with the target index node comprises:

associating identification information of the second index node with the identification information of the target index node.

3 . The method according to claim 2 , wherein the identification information of each of the first index node, the second index node, and the target index node comprises identity ID information or address information of said each of the first index node, the second index node, and the target index node.

4 . The method according to claim 1 , wherein the file data of the first file is partially identical to the file data of the second file, and wherein after the step of associating the second index node with the target index node, the second index node points to a portion of the file data of the second file that is different from the file data of the first file.

5 . The method according to claim 1 , wherein the first index node comprises a first key, the target index node comprises the first key, the second index node comprises a second key, the file data of the first file is generated through encryption based on the first key, and the file data of the second file is generated based on the second key.

6 . The method according to claim 1 , further comprising:

in response to first indication information from a target application, determining to read the second file; and

detecting that the second index node is associated with the target index node; and

reading the file data of the first file based on the target index node.

7 . The method according to claim 1 , further comprising:

in response to second indication information from a target application, writing new data into the file data of the second file, wherein the new data is different from the file data of the first file; and

configuring the second index node to point to the new data, wherein the second index node is still associated with the target index node.

8 . The method according to claim 1 , wherein before the step of configuring the target index node to point to the file data of the first file, the first index node comprises first index information, the first index information indicates a storage location of the file data of the first file, the second index node comprises second index information, and the second index information indicates a storage location of the file data of the second file.

9 . The method according to claim 1 , further comprising:

detecting that a third file and the first file are duplicate files;

associating a third index node of the third file with the target index node; and

deleting file data of the third file.

10 . A data processing method, comprising:

obtaining, by an electronic device, first indication information from a first application, wherein the first indication information indicates to read data that is pointed to by a second index node of a second file;

in response to the first indication information, detecting, by the electronic device, that the second index node is associated with a target index node without changing information stored in the second index node; and

reading, by the electronic device, first target data that is pointed to by the target index node, wherein the first target data is file data of a first file, the first file and the second file are duplicate files, and a first index node of the first file is associated with the target index node without changing information stored in the first index node.

11 . The method according to claim 10 , further comprising:

receiving second indication information from a second application, wherein the second indication information indicates to read data that is pointed to by the first index node of the first file;

in response to the second indication information, detecting that the first index node is associated with the target index node; and

reading the first target data that is pointed to by the target index node.

12 . The method according to claim 10 , wherein the first indication information indicates to read data that is pointed to by the first index information in the second index node of the second file,

and wherein the step of reading the first target data comprises:

detecting, based on the first indication information, that the first index information is null;

obtaining target index information in the target index node that corresponds to the first index information; and

reading the first target data that is pointed to by the target index information.

13 . The method according to claim 10 , further comprising:

obtaining third indication information from the first application, wherein the third indication information indicates to read data to which second index information in the second index node of the second file points;

in response to the third indication information, detecting that the second index node is associated with the target index node;

detecting whether the second index information is null; and

when the second index information is detected to be not null, reading second target data that is pointed by the second index information, wherein the second target data is file data of the second file, and the second target data is different from the file data of the first file.

14 . The method according to claim 13 , wherein the first index node comprises a first key, the target index node comprises the first key, the second index node comprises a second key, the file data of the first file is generated through encryption based on the first key, and the file data of the second file is generated based on the second key.

15 . The method according to claim 10 , further comprising:

receiving fourth indication information from the first application, wherein the fourth indication information indicates to write new data into the second file; and

in response to the fourth indication information, writing the new data into the file data of the second file, wherein the second index node points to the new data and remains being associated with the target index node.

16 . The method according to claim 10 , wherein before the step of obtaining the first indication information from the first application, the method further comprises:

detecting that the first file and the second file are duplicate files;

generating the target index node, wherein the first index node of the first file points to the file data of the first file, and the second index node of the second file points to the file data of the second file;

configuring the target index node to point to the file data of the first file;

associating the first index node with the target index node;

associating the second index node with the target index node; and

deleting the file data of the second file.

17 . An electronic device, comprising:

a memory storing executable instructions; and

one or more processors configured to execute the executable instructions to cause the electronic device to perform operations of:

detecting that a first file and a second file are duplicate files, wherein a first index node of the first file points to file data of the first file, and a second index node of the second file points to file data of the second file;

generating a target index node;

configuring the target index node to point to the file data of the first file;

associating the first index node with the target index node without changing information stored in the first index node;

associating the second index node with the target index node without changing information stored in the second index node; and

deleting the file data of the second file.

18 . The electronic device according to claim 17 , wherein the operation of associating the first index node with the target index node comprises:

associating identification information of the first index node with identification information of the target index node,

and wherein the operation of associating the second index node with the target index node comprises:

associating identification information of the second index node with the identification information of the target index node.