A file processing method, terminal device and computer readable storage medium

By identifying and removing duplicate files in the terminal device, the problem of waste of storage space is solved, and the storage space saving and user experience are improved.

CN117725028BActive Publication Date: 2025-02-07HONOR DEVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310762606.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2025-02-07
Estimated Expiration
2043-06-26

AI Technical Summary

Technical Problem

Terminal devices may generate duplicate files when processing files, resulting in wasted storage space and reducing user experience.

Method used

By implementing a file processing method in a terminal device, duplicate files are identified and removed. The method includes determining a target file node, deleting the file contents of other duplicate file nodes, and adding path information to the target file nodes to the remaining file nodes so that the target file contents can still be accessed.

Benefits of technology

It effectively reduces the number of duplicate files, saves the share of storage space, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117725028B_ABST
    Figure CN117725028B_ABST
Patent Text Reader

Abstract

The present application discloses a file processing method, a terminal device, and a computer-readable storage medium, and relates to the field of data processing technology. In response to a first deduplication operation, the terminal device displays a first interface including at least one group of duplicate files; for a group of duplicate files, a file node is determined as the first target file node from the N file nodes corresponding to the N duplicate files included in the group of duplicate files; the first path information pointing to the first target file node is added to the N‑1 file nodes of the non-target file nodes, and the N‑1 file contents of the N‑1 file nodes are deleted from the storage space; and the file processing results of the successful deduplication of the N duplicate files are displayed. In this way, under the premise that the terminal device can obtain files normally, the number of duplicate files can be reduced, thereby reducing the storage space occupied by duplicate files, saving the storage space occupancy rate, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a file processing method, a terminal device, and a computer-readable storage medium. Background Art

[0002] When processing files, the terminal device may generate duplicate files. Duplicate files refer to files with the same content, but other attribute information of the files may be different. For example, two pictures with the same content in the terminal device are duplicate pictures, and two documents with the same content in the terminal device are duplicate documents.

[0003] Duplicate files will take up storage space on the terminal device, resulting in less available storage space, wasting storage space and reducing the user experience. Summary of the invention

[0004] The embodiments of the present application provide a file processing method, a terminal device, and a computer-readable storage medium, which can reduce the number of duplicate files and thereby reduce the storage space occupied by duplicate files, thereby saving storage space occupancy and improving the user experience, under the premise that the terminal device can normally obtain files.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a file processing method is provided, which is applied to a terminal device, and the method includes: in response to a first deduplication operation, displaying a first interface, the first interface including at least one group of duplicate files, and the deduplication operation is used to instruct the terminal device to remove duplicate files; for a group of duplicate files, determining a file node as a first target file node from N file nodes corresponding to N duplicate files included in the group of duplicate files; wherein the file node includes file content and file path information, the file path information is used to instruct the terminal device to find the corresponding file content from a storage space, and the first target file node includes the first target file content and the first target file path information; adding first path information to N-1 file nodes; wherein the N-1 file nodes are file nodes other than the first target file node among the N file nodes, and the first path information includes path information pointing to the first target file node; deleting the N-1 file contents of the N-1 file nodes from the storage space; and displaying the file processing results of the N duplicate files, the file processing results are used to indicate that the N duplicate files are successfully deduplicated.

[0007] In this application, even if there is no file content under the non-target file node (other file nodes except the target file node), when the terminal device obtains the file content corresponding to the non-target file node, it can find the file content of the target file node through the path information pointing to the target file node. In this way, under the premise that the terminal device normally obtains files, the number of duplicate files can be reduced, thereby reducing the storage space occupied by duplicate files, saving the storage space occupancy rate, and improving the user experience.

[0008] In another possible implementation of the first aspect, at least one group of duplicate files includes files of the same type, and the N duplicate files are a group of duplicate files of the same file type; or; at least one group of duplicate files includes files of multiple types, and the N duplicate files are a group of duplicate files of multiple file types.

[0009] In the present application, the terminal device can determine multiple types of duplicate files and one type of duplicate files based on the user's selection, thereby improving the user experience.

[0010] In another possible implementation of the first aspect, after displaying the file processing results of N duplicate files, the method further includes: in response to a second deduplication operation, displaying a second interface, the second interface including M duplicate files and files corresponding to the first target file node, the M duplicate files are different from the N duplicate files, and the M duplicate files correspond to M file nodes; determining a file node from the M file nodes and the first target file node as the second target file node, wherein the second target file node includes the target file and the second target file path information; if the first target file node and the second target file node are different, adding the second path information to the N+M-1 file nodes; wherein the N+M-1 file nodes are file nodes other than the second target file node among the N+M file nodes, and the second path information includes path information pointing to the second target file path information; deleting M-1 file contents of the M-1 file nodes from the storage space, the M-1 file nodes are file nodes other than the second target node among the M file nodes; and displaying the file processing results of the N+M duplicate files, the file processing results being used to indicate that the N+M duplicate files are successfully deduplicated.

[0011] In this application, after a deduplication operation, if duplicate files are generated again, a second deduplication operation can be performed. In this way, duplicate files can be cleaned up immediately according to the user's wishes, the number of duplicate files can be reduced, and the storage space occupied by duplicate files can be reduced, thus saving the storage space occupancy rate and improving the user experience.

[0012] In another possible implementation of the first aspect, before displaying the file processing results of N+M duplicate files, the method also includes: if the first target file node and the second target file node are the same, adding first path information in N+M-1 file nodes; wherein the N+M-1 file nodes are file nodes other than the first target file node among the N+M file nodes.

[0013] In another possible implementation of the first aspect, after displaying the file processing results of N duplicate files, the method also includes: in response to a second deduplication operation, displaying a second interface, the second interface including M duplicate files and files corresponding to the second target file node, the M duplicate files corresponding to M file nodes; adding first path information to N+M-1 file nodes; wherein the N+M-1 file nodes are file nodes other than the first target file node among the N+M file nodes.

[0014] In another possible implementation manner of the first aspect, the first path information includes path information of the first target file path information pointing to the first target file node.

[0015] In another possible implementation of the first aspect, the file path information includes an index node; adding first path information in N-1 file nodes includes: adding first path information in an index node in the N-1 file nodes, wherein the first path information includes path information of a first index node pointing to a first target file node.

[0016] The index node needs to store the attribute information of the file, so the index node has a size. Some are 128 bytes, and some are 256 bytes. The amount of data in the path information is small compared to the amount of data in the index node. The terminal device adds the path information of the first index node pointing to the first target file node in the index node among the N-1 file nodes, instead of mounting the first index node of the first target file node in the N-1 file nodes. This saves storage space in the process of file deduplication and improves the user experience.

[0017] In another possible implementation manner of the first aspect, the number of N-1 file nodes pointing to the first target file node is added to the first target file node.

[0018] In another possible implementation of the first aspect, after displaying the file processing results of N duplicate files, the method also includes: in response to a read operation, finding first target file path information according to the first path information; wherein the read operation is used to trigger the terminal device to read the file content corresponding to the first file node, and the first file node is any one of the N-1 file nodes; and reading the file content corresponding to the first file node from the storage space according to the first target file path information.

[0019] In this application, under the premise that the terminal device accesses files normally, the number of duplicate files can be reduced, thereby reducing the storage space occupied by duplicate files, saving storage space occupancy and improving the user experience.

[0020] In another possible implementation of the first aspect, after displaying the file processing results of N duplicate files, the method further includes: in response to a modification operation, if the file to be modified is a first target file node, selecting a third target file node from N-1 file nodes; wherein the modification operation is used to trigger the terminal device to modify the file to be modified, and the N-1 file nodes are file nodes other than the first target file node among the N file nodes; restoring the target file of the first target file node to the third target file node; deleting the first path information of the third target file node and the N-2 file nodes, and adding the second path information to the N-2 file nodes; wherein the second path information includes path information pointing to the file path information of the third target file node, and the N-2 file nodes are file nodes other than the first target file node and the third target file node among the N file nodes; and modifying the file to be modified.

[0021] In another possible implementation of the first aspect, before modifying the file to be modified, the method also includes: if the file to be modified is not the first target file node, finding the first target file path information according to the first path information; finding the file content of the first target file node according to the first target file path information; restoring the file content of the first target file node to the file node to be modified, and deleting the first path information in the file node to be modified.

[0022] In another possible implementation manner of the first aspect, the number of N-1 file nodes pointing to the first target file node in the first target file node is deleted, and the number of N-2 file nodes is added to the first target file node.

[0023] The number of N-2 file nodes is added to the first target file node. The number of N-2 file nodes can be used as a basis for verifying whether the non-target file node and the target file node correspond to each other, which can improve the accuracy of file deduplication to a certain extent.

[0024] In another possible implementation manner of the first aspect, the number of N-1 file nodes pointing to the first target file node in the first target file node is deleted, and the number of N-2 file nodes is added to the third target file node.

[0025] In another possible implementation of the first aspect, determining a file node from N file nodes as a target file node includes: determining the target file node based on N access times of the N file nodes and / or modification times of the N file nodes within a preset time period.

[0026] If a file is frequently accessed, it is more likely to be modified. If a file is accessed less frequently, it is less likely to be modified. Determining the target file based on the frequency of file access and / or whether it has been modified within a certain period of time can more accurately determine files with higher stability and improve the success rate of terminal devices obtaining related files after deduplication operations.

[0027] In another possible implementation of the first aspect, a target file node is determined based on the number of access times of N file nodes and / or the modification time of the N file nodes within a preset time period, including: obtaining N number of access times of N file nodes, where the access number is the number of accesses of each file node within the preset time period; if the N number of access times is the same, and the modification time of the N file nodes within the preset time period is consistent, selecting any one of the N file nodes as the target file node; if the N number of access times is the same, and the modification time of the N file nodes within the preset time period is inconsistent, selecting a file node with the earliest modification time as the target file node.

[0028] In another possible implementation of the first aspect, a target file node is determined based on the number of access times of N file nodes and / or the modification time of the N file nodes within a preset time period, including: obtaining N number of access times of N file nodes, where the access number is the number of accesses of each file node within the preset time period; if the N access times are different, determining that the number of file nodes with the smallest value among the N access times is K; if K is 1, determining a file node with the smallest value among the access times as the target file node; if K is greater than 1, and the modification times of the K file nodes within the preset time period are consistent, selecting any one of the K file nodes as the target file node; if K is greater than 1, and the modification times of the K file nodes within the preset time period are inconsistent, selecting a file node with the earliest modification time as the target file node.

[0029] In a second aspect, an electronic device is provided, which includes a processor and a memory; the memory is used to store code instructions; the processor is used to run the code instructions to execute a method for adjusting an audio signal in any possible design manner as in the first aspect.

[0030] In a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes a method for adjusting an audio signal in any possible design manner as in the first aspect.

[0031] In a fourth aspect, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the method in any possible design manner in the first aspect.

[0032] Among them, the technical effects brought about by any design method in the second aspect, the third aspect and the fourth aspect can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of the structure of a memory is shown;

[0034] Figure 2 A schematic structural diagram of a mobile phone 100 is shown;

[0035] Figure 3 A schematic diagram of a process of a file deduplication method is shown;

[0036] Figure 4 A schematic diagram showing changes in the user interface (UserInterface) of a mobile phone in response to user operations to display files to be cleaned up is shown;

[0037] Figure 5 A schematic diagram showing a change in the user interface of a mobile phone in response to a user operation to display files to be cleaned up;

[0038] Figure 6 A schematic diagram showing a user interface change of a mobile phone in response to a user operation to determine duplicate files to be cleaned up;

[0039] Figure 7 A schematic diagram showing a user interface change of the mobile phone 100 in response to a user operation to send a picture in my photo album to a friend;

[0040] Figure 8 A schematic flow chart of a method for determining a target file node is shown;

[0041] Fig. 9 A schematic diagram of deduplication of two duplicate files is shown;

[0042] Fig.10 A schematic diagram of deduplication of two duplicate files is shown;

[0043] Fig.11 A schematic diagram of file deduplication is shown;

[0044] Fig.12 A schematic diagram of a user interface showing a deduplication result is shown;

[0045] Fig.13 A schematic diagram of a user interface showing a deduplication result is shown;

[0046] Fig.14 A schematic diagram of a process of a file deduplication method is shown;

[0047] Fig.15 A schematic diagram of a process of a file deduplication method is shown;

[0048] Fig.16 A schematic diagram of a process of accessing a deduplicated file is shown;

[0049] Fig.17 A schematic flow chart of a method for processing a deduplicated file during modification is shown. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The following terms "first", "second", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features.

[0051] In the embodiments of the present application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0052] In the embodiments of the present application, "and / or" is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0053] In the description of the present application, it can be understood that, unless otherwise clearly specified and limited, the terms "set", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection. For ordinary technicians in this field, the specific meanings of the above terms in the present application can be understood according to specific circumstances.

[0054] In order to better illustrate the technical solution of the present application, the following is a brief overview of the terms involved in the present application.

[0055] (1) Files: A file is a collection of information stored on a terminal device using the terminal device's hard disk as a carrier. Files can be text documents, pictures, videos, programs, and so on. Files usually have a three-letter file extension to indicate the file type. For example, picture files are often saved in JPEG format, with a file extension of .jpg; exe represents an executable file, mp3 represents an audio file, and mp4 represents a video file.

[0056] (2) Storage includes internal memory and hard disk. Data input, reading and storage are all carried out back and forth between them. Memory can include random access memory (RAM), read-only memory (ROM), and cache (CACHE). Memory is the workplace of terminal devices. Its task is to provide operating space for terminal devices and temporarily store data generated when programs are running. However, since memory generally uses semiconductor storage units, data will be lost after power failure. In order to save data, a storage device that will not disappear after power failure is required - hard disk. For example, Figure 1 FIG. 1 shows a schematic diagram of the structure of a memory. Figure 1 As shown, the storage includes a memory and a hard disk.

[0057] (3) Metadata, also known as intermediate data or relay data, is data about data. It is mainly information describing data properties and is used to support functions such as indicating storage location, historical data, resource search, and file records. Metadata is a kind of electronic catalog. In order to achieve the purpose of cataloging, it can describe and collect the content or characteristics of data, thereby achieving the purpose of assisting data retrieval.

[0058] (4) The hard disk is divided into two areas. One is the index node (inode) area, which stores the file attribute information contained in the inode. The other is the data area, which stores the file data, that is, the actual content of the file. For example, Figure 1 As shown, the hard disk includes an inode area and a data area.

[0059] The file attribute information stored in the inode area includes directory entries and index nodes. Figure 1 As shown, the hard disk includes an inode area and a data area.

[0060] Among them, the directory entry is used to record the file name (i.e. file name), the index node pointer and the relationship with other directory entries. Multiple associated directory entries constitute the directory structure of the file system. The index node is used to record the metadata of the file. The index node corresponds to the file one by one and will be persistently stored on the disk.

[0061] The index node includes the inode number, file size, user ID number (identity document, id), read and write permissions, file type, modification time, access time, and pointer to the file entity, but does not include the file name. This is because each index node has an inode number. After the terminal device opens a file, it uses the inode number to identify different files and no longer considers the file name.

[0062] The data area includes the index node area and the data block area.

[0063] The index node area is used to store index nodes. The data block area is used to store the actual content of the file.

[0064] Specifically, for example, Figure 1 As shown in the figure, the process of the terminal device finding the file is:

[0065] Step 1: First, the terminal device finds the inode number corresponding to the file name in the directory entry through the file name. Then, the terminal device finds the index node pointer corresponding to the inode number in the directory entry through the inode number.

[0066] Step 2: Then, the index node corresponding to the inode number is found through the index node pointer corresponding to the inode number in the directory entry. Then, the terminal device finds the index node pointer of the index node area in the index node corresponding to the inode number.

[0067] Step 3: Then, the terminal device finds the index node in the index node area through the index node pointer in the index node area. Then, the terminal device finds the data block pointer in the index node in the index node area.

[0068] Step 4: Then, the terminal device finds the file corresponding to the inode number in the data area through the data block pointer.

[0069] (5) File path information, which is used to indicate the storage address of the file in the storage space of the terminal device. The file path information can be directory entries, index nodes, and other information. The terminal device can find the file content through directory entries, index nodes, and other information. The file path information and the file as a whole can be called a file node.

[0070] (6) File node: a file that has file path information and file content.

[0071] As described in the background art above, when a terminal device processes files, duplicate files may be generated, which will occupy the storage space of the terminal device, resulting in less available storage space, causing storage space waste and reducing the user experience.

[0072] There are many scenarios where duplicate files are generated. One scenario where duplicate files are generated may be that with the development of Internet technology, terminal devices can use the network to forward files, and the flow of files on terminal devices has become more convenient and faster. If a terminal device forwards a file, the terminal device will store duplicate files due to the flow of files.

[0073] For example, a 1GB video file is forwarded once in social software A and then forwarded once in the mailbox, resulting in multiple duplicate files on the terminal device, occupying 2GB of storage space. The storage space is occupied by 1GB more, resulting in a waste of device storage space. For another example, a terminal device stores a 4MB picture. The 4MB picture is forwarded once in social software A, resulting in multiple duplicate files on the terminal device, occupying 8MB of storage space. The storage space is occupied by 4MB more, resulting in a waste of device storage space.

[0074] Another scenario where duplicate files are generated may be when a terminal device copies files. For example, a terminal device stores a 4MB picture, and the terminal device copies the 4MB picture, resulting in multiple duplicate files on the terminal device, which occupies 8MB of storage space. The storage space is occupied by 4MB more, resulting in a waste of device storage space.

[0075] Moreover, as the terminal device is used for a long time, more duplicate files may be stored in the terminal device. More duplicate files will occupy more storage space, leaving less available storage space, resulting in a waste of storage space and reducing the user experience.

[0076] In order to solve the technical problems in the background technology, an embodiment of the present application proposes a file processing method.

[0077] It can be understood that a file node is a file having file path information and file content, and the file path information is used to instruct a terminal device to find corresponding file content from a storage space of the terminal device.

[0078] If the N files corresponding to the N file nodes stored in the terminal device are duplicate files, the terminal device can determine a file node from the N file nodes as the target file node, delete N-1 file contents other than the target file content from the storage space, and add first path information in the non-target file node (N-1 file nodes among the N file nodes other than the target file node), and the first path information includes path information pointing to the target file node.

[0079] In this way, even if there is no file content under the non-target file node (other file nodes except the target file node), when the terminal device obtains the file content corresponding to the non-target file node, it can find the file content under the target file node through the path information pointing to the target file node to find the file content corresponding to the non-target file node. In this way, under the premise that the terminal device normally obtains files, the number of duplicate files can be reduced, thereby reducing the storage space occupied by duplicate files, saving the storage space occupancy rate, and improving the user experience.

[0080] Exemplarily, the terminal device in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, a vehicle-mounted device, or the like, which may execute the file deduplication method provided in the embodiments of the present application. The embodiments of the present application do not impose any special restrictions on the specific form of the terminal device.

[0081] The present application embodiment is described by taking a mobile phone as an example of a terminal device. Figure 2 FIG. 1 shows a schematic diagram of the structure of a mobile phone 100. Figure 2As shown, the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0082] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0083] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. It can be understood that a file node is a file with file path information. The file node includes a file and file path information, and the file path information is used to instruct the processor 110 to find the corresponding file from the storage space of the processor 110.

[0084] If the N files corresponding to the N file nodes stored in the memory are duplicate files, the processor 110 can determine a file node from the N file nodes as the target file node, delete N-1 files other than the target file from the storage space, and add file path information pointing to the target file based on the N-1 file path information other than the target file path information in the N file path information.

[0085] In this way, even if there is no file under the non-target file node (other file nodes except the target file node), when the processor 110 obtains the file corresponding to the non-target file node, it can find the file path information of the target file through the information pointing to the file path information of the target file, and obtain the file under the target file node based on the file path information of the target file to find the file corresponding to the non-target file node. In this way, under the premise that the processor 110 normally obtains files, it can reduce duplicate files, thereby reducing the storage space occupied by duplicate files, saving the storage space occupancy rate, and improving the user experience.

[0086] The controller may be the nerve center and command center of the mobile phone 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0087] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0088] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0089] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0090] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the mobile phone 100. While the charging management module 140 is charging the battery 142, it may also power the mobile phone 100 through the power management module 141.

[0091] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.

[0092] The wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0093] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0094] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0095] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0096] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0097] In some embodiments, the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0098] The mobile phone 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0099] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0100] The mobile phone 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0101] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0102] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0103] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0104] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the mobile phone 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0105] The mobile phone 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0106] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0107] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The mobile phone 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the mobile phone 100 detects the touch operation intensity according to the pressure sensor 180A. The mobile phone 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0108] The key 190 includes a power key, a volume key, etc. The key 190 can be a mechanical key or a touch key. The mobile phone 100 can receive key input and generate key signal input related to the user settings and function control of the mobile phone 100.

[0109] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0110] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0111] The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the mobile phone 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The mobile phone 100 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the mobile phone 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.

[0112] File processing includes file deduplication, access to deduplicated files, and modification of deduplicated files. The following will introduce the above three stages in stages.

[0113] File deduplication stage - one-time deduplication

[0114] Figure 3 A flowchart of a method for deduplication of files is shown. Figure 3 As shown, the process includes the following steps:

[0115] Step 301: In response to a file cleaning operation, the mobile phone 100 displays a file to be cleaned interface, where the file to be cleaned interface includes a duplicate file cleaning control.

[0116] In response to the file cleaning operation, the mobile phone 100 displays a file to be cleaned interface including a duplicate file cleaning control. In this way, the mobile phone 100 can display duplicate files to be deduplicated in response to the user's operation on the duplicate file cleaning control in subsequent steps.

[0117] The file cleaning operation is used to trigger the mobile phone 100 to scan the files to be cleaned in the storage space and display the classification and sorting results of the files to be cleaned on the file to be cleaned interface. The files to be cleaned include duplicate file scanning, uninstall residual data, etc.

[0118] For example, Figure 4 The figure shows a schematic diagram of the change of the user interface (UserInterface) of a mobile phone in response to a user operation to display files to be cleaned. The user interface of files to be cleaned can be referred to as the file to be cleaned interface.

[0119] like Figure 4 As shown in FIG. 1 (a), the mobile phone 100 displays a setting interface in response to the user clicking the setting icon. Figure 4As shown in FIG. 1( b), the setting interface includes a storage item. In response to the user clicking on the storage item, the mobile phone 100 displays the storage interface. For example, Figure 4 The storage interface shown in FIG. (c) includes a cleaning acceleration button. In response to the user clicking the cleaning acceleration button, the mobile phone 100 displays the cleaning acceleration interface. The cleaning acceleration interface includes various files to be cleaned. If there are duplicate files in the files to be cleaned, a duplicate file cleaning control is displayed. For example, Figure 4 The cleaning acceleration interface (file to be cleaned interface) shown in Figure (d) includes a duplicate file entry, and the duplicate file entry includes a de-cleaning control (duplicate file cleaning control).

[0120] It is understandable that the file cleaning operation may be an operation in which the user clicks a cleaning acceleration button, or may be a series of operations in which the user clicks a setting icon, the user clicks a storage item in the setting interface, and the user clicks a cleaning acceleration button in the storage interface.

[0121] In addition to responding to the user's file cleaning operation in the settings, the mobile phone 100 can also respond to the user's file cleaning operation in the mobile phone manager. For example, Figure 5 A schematic diagram of a user interface change of a mobile phone in response to a user operation to display files to be cleaned is shown. Figure 5 As shown in FIG. 1 (a), the mobile phone 100 displays the mobile phone manager interface in response to the user clicking the mobile phone manager icon. Figure 5 As shown in FIG. (b) of FIG. 1 , the mobile phone manager interface includes a cleaning acceleration control. In response to the user clicking the cleaning acceleration control, the mobile phone 100 displays a cleaning acceleration interface, which includes various files to be cleaned. If there are duplicate files in the files to be cleaned, the duplicate file cleaning control is displayed. For example, Figure 5 The cleaning acceleration interface shown in Figure (c) includes a duplicate file entry, and the duplicate file entry includes a cleaning control.

[0122] It is understandable that the file cleaning operation may be an operation in which the user clicks on a cleaning acceleration control, or may be a series of operations in which the user clicks on a mobile phone manager icon and the user clicks on a cleaning acceleration control in a mobile phone manager interface.

[0123] The files to be cleaned may be all files scanned by the mobile phone 100 , including files visible to the user and files invisible to the user in the prior art.

[0124] Step 302: In response to the operation of clicking the duplicate file cleaning control, the mobile phone 100 displays a duplicate file cleaning interface, where the duplicate file cleaning interface includes duplicate files.

[0125] In response to clicking the duplicate file cleaning control, the mobile phone 100 displays a duplicate file cleaning interface including duplicate files. In this way, the mobile phone 100 can select and delete corresponding duplicate files in subsequent steps, reduce the number of duplicate files, and further reduce the storage space occupied by duplicate files, saving storage space occupancy and improving user experience.

[0126] For example, Figure 4 Figure (d) and Figure 5 The cleaning acceleration interface shown in Figure (c) includes a duplicate file entry, and the duplicate file entry includes a cleaning control (duplicate file cleaning control). After the mobile phone 100 responds to the user clicking the cleaning control, the duplicate file interface to be cleaned (duplicate file cleaning interface) is displayed.

[0127] It is understandable that the types of duplicate files may be one or more. For example, the types of duplicate files may all be pictures or documents. The types of duplicate files may also be pictures and documents.

[0128] For example, Figure 6 A schematic diagram of a user interface change of a mobile phone in response to a user operation to determine duplicate files to be cleaned up is shown. Figure 6 As shown in Figure (a) in the figure, the duplicate file interface to be cleaned includes various types of duplicate file entries, such as picture entries, document entries and other entries.

[0129] Step 303: The mobile phone 100 responds to the first deduplication operation in the duplicate file cleaning interface and displays a first interface, where the first interface includes at least one group of duplicate files. The deduplication operation is used to instruct the mobile phone 100 to remove duplicate files.

[0130] The deduplication operation is used to instruct the mobile phone 100 to remove duplicate files. The mobile phone 100 responds to the first deduplication operation in the duplicate file cleaning interface and can execute the step of removing duplicate files.

[0131] After the mobile phone 100 determines the duplicate files in the storage space, which duplicate files to be deduplicated needs to be determined according to the user's selection. The deduplication operation can be used to trigger the mobile phone 100 to determine the files to be deduplicated and instruct the mobile phone 100 to remove the duplicate files to be deduplicated, or the deduplication operation is used to instruct the mobile phone 100 to remove duplicate files. The mobile phone 100 can determine the N files corresponding to the N file nodes to be deduplicated in response to the user's deduplication operation. In this way, the mobile phone 100 can determine the files to be deduplicated according to the user's selection.

[0132] At least one group of duplicate files may include files of the same type, and the N duplicate files are a group of duplicate files of the same file type; at least one group of duplicate files may include files of multiple types, and the N duplicate files are a group of duplicate files of multiple file types.

[0133] The following is an example of a situation where at least one set of duplicate files is not a picture, and N duplicate files are a set of duplicate files of the same file type. For example, two duplicate pictures are stored in my photo album and the folder corresponding to social software A. Figure 6 As shown in Figure (b) in the figure, the duplicate file interface includes a photo in my photo album and a photo in social software A. Figure 6 As shown in FIG. 1 (c), the mobile phone 100 displays a delete control in response to the user selecting a photo in my photo album and a photo in social software A. Figure 6 As shown in FIG. 5(d), in response to the user clicking the delete control, the mobile phone 100 displays a prompt message of whether to delete all files, as well as cancel and delete options. After the mobile phone 100 responds to the user clicking the delete option, a file deduplication operation is performed on a photo in my photo album and a photo in social software A.

[0134] The process of generating two duplicate pictures in the above example is that the mobile phone 100 takes a picture and stores it in the "My Album". When the user chats with a friend through social software A, the user sends the previously taken picture to the other party. In this way, the picture stored in the "My Album" by the mobile phone 100 will also be stored in the corresponding file of social software A.

[0135] Figure 7 FIG. 1 shows a schematic diagram of a user interface change of the mobile phone 100 in response to a user operation to send a picture in my photo album to a friend. Figure 7 As shown in FIG. (a), the mobile phone 100 responds to the user selecting a picture in my photo album and clicking the share button. Figure 7 As shown in FIG. (b), in response to the user clicking the share button, the mobile phone 100 displays the software selection interface to be shared, and the software selection interface to be shared includes social software A. In response to the user clicking the icon of social software A, the mobile phone 100 displays the window selection interface to be sent of social software A. Figure 7 As shown in Figure (c) of FIG. 1 , the window selection interface to be sent includes a chat window of XXX. When the user clicks XXX, the chat window of XXX is displayed. Figure 7 As shown in (d) of FIG. 1 , the mobile phone 100 sends the selected picture in the chat window of XXX. In this way, the picture stored in my album by the mobile phone 100 will also be stored in the file corresponding to the social software A.

[0136] It is understandable that the deduplication operation can be used to trigger the mobile phone 100 to determine the files to be deduplicated and instruct the mobile phone 100 to remove the duplicate files to be deduplicated. The deduplication operation can be a series of operations including the user clicking the cleanup control, the user clicking the picture item, the user selecting a photo in my album and a photo in social software A, and the user clicking the delete control. Alternatively, the deduplication operation is used to instruct the mobile phone 100 to remove duplicate files, and the deduplication operation can be the user clicking the delete control.

[0137] In some embodiments, the mobile phone 100 can respond to the first deduplication operation by periodically performing deduplication operations on N duplicate files and subsequently generated files. It can be understood that the second and more deduplication operations can refer to the secondary deduplication operation scheme below.

[0138] Step 304: The mobile phone 100 determines, for a group of duplicate files, a file node as a first target file node from N file nodes corresponding to the N duplicate files included in the group of duplicate files; wherein the file node includes file content and file path information, the file path information is used to instruct the mobile phone 100 to find the corresponding file content from the storage space, and the first target file node includes the first target file content and the first target file path information.

[0139] It can be understood that this step only lists the deduplication operations of N duplicate files corresponding to N file nodes, but the file nodes to be deduplicated may be multiple groups of duplicate files, and the deduplication operations of each group of duplicate files in the multiple groups of duplicate files have the same technical means as the deduplication operations of N duplicate files corresponding to N file nodes, which will not be repeated here.

[0140] The mobile phone 100 determines a file node from N file nodes as a target file node. Thus, after the mobile phone 100 deletes N-1 files except the target file from N files, the target file in the target file node can be used as file data called by other file nodes.

[0141] Since the target file node is the basis for other file nodes to call files, the target file under the target file node needs to be guaranteed to have a low probability of being modified to a certain extent. When the mobile phone 100 needs to access the target file, it cannot access the wrong file due to the modification of the target file node.

[0142] If a file is frequently accessed, it is more likely to be modified. If a file is accessed less frequently, it is less likely to be modified. Determining the target file based on the frequency of file access and / or whether it has been modified within a certain period of time can more accurately determine files with higher stability and improve the success rate of terminal devices obtaining related files after deduplication operations.

[0143] The following is a method for determining the target file based on the frequency of file access and whether it has been modified within a certain period of time. For example, Figure 8 FIG. 1 shows a flow chart of a method for determining a target file node. Figure 8 As shown, the process includes the following steps:

[0144] Step 801: The mobile phone 100 obtains N access counts of N file nodes, where the access count is the number of accesses to each file node within a preset time period.

[0145] A relatively stable file can reduce the probability of file access errors due to modification of the target file node. The number of file accesses can indicate the stability of the file to a certain extent. Therefore, the mobile phone 100 can obtain the N number of accesses of N file nodes, which facilitates the determination of the stability of the subsequent N file nodes.

[0146] Step 802: The mobile phone 100 determines whether the N access times are consistent.

[0147] The mobile phone 100 determines whether the N access times are consistent. If the N access times are consistent, it means that the stability of the N file nodes is basically consistent. The mobile phone 100 can then use other standards to determine the stability of the file nodes. Specifically, the mobile phone 100 determines whether the modification time of the N file nodes within the preset time period is consistent, that is, executes step 803. If the N access times are inconsistent, it means that the stability of the N file nodes is inconsistent. The mobile phone 100 can determine the stability of the file nodes according to the size of the access times. Specifically, the mobile phone 100 determines that the number of file nodes with the smallest value among the N access times is K, that is, executes step 806.

[0148] Step 803: The mobile phone 100 determines whether the modification times of the N file nodes are consistent within a preset time period.

[0149] A relatively stable file can reduce the probability of access errors due to modification of the target file node. The distance between the modification time and the current time can, to a certain extent, indicate the stability of the file in the recent period. Therefore, the mobile phone 100 can use the modification time of the file as the basis for judging the stability, which facilitates further judgment of the stability of the subsequent N file nodes.

[0150] The mobile phone 100 determines whether the modification times of the N file nodes are consistent within the preset time period. If the modification times of the N file nodes are consistent within the preset time period, it means that the stability of the N file nodes is basically consistent, and the mobile phone 100 selects any one of the N file nodes as the target file node, that is, executes step 804. If the modification times of the N file nodes are inconsistent within the preset time period, it means that the stability of the N file nodes is inconsistent, and the mobile phone 100 selects a file node whose modification time is farthest from the current time as the target file node, that is, executes step 805.

[0151] Step 804: The mobile phone 100 selects any one of the N file nodes as the target file node.

[0152] Step 805: The mobile phone 100 selects a file node with the earliest modification time as the target file node.

[0153] Step 806: The mobile phone 100 determines that the number of file nodes with the smallest access times among the N file nodes is K.

[0154] Step 807: The mobile phone 100 determines whether K is 1 or greater than 1.

[0155] The mobile phone 100 determines whether K is 1 or greater than 1. If K is 1, the mobile phone 100 may determine a file node with the smallest access count as the target file node, ie, execute step 808 .

[0156] If K is greater than 1, it means that there are a large number of file nodes with the smallest access times. The file modification time can be further used as a basis for judging stability. Specifically, mobile phone 100 determines whether the modification time of K file nodes is consistent within a preset time period, that is, executes step 809.

[0157] Step 808: The mobile phone 100 determines a file node with the smallest access count as a target file node.

[0158] Step 809: The mobile phone 100 determines whether the modification times of the K file nodes are consistent within a preset time period, and the K file nodes have the smallest access times among the N file nodes.

[0159] The mobile phone 100 determines whether the modification times of the K file nodes are consistent within the preset time period. If the modification times of the K file nodes are consistent within the preset time period, it means that the stability of the K file nodes is basically consistent, and the mobile phone 100 selects any one of the K file nodes as the target file node, that is, executes step 810. If the modification times of the K file nodes are inconsistent within the preset time period, it means that the stability of the K file nodes is inconsistent, and the mobile phone 100 selects a file node whose modification time is farthest from the current time as the target file node, that is, executes step 811.

[0160] Step 810: The mobile phone 100 selects any one of the K file nodes as the target file node.

[0161] Step 811: The mobile phone 100 selects a file node whose modification time is closest to the current time as the target file node.

[0162] Step 305: the mobile phone 100 adds first path information in N-1 file nodes; wherein the N-1 file nodes are file nodes other than the first target file node among the N file nodes, and the first path information includes path information pointing to the first target file node.

[0163] The mobile phone 100 adds the first path information pointing to the first target file node in the N-1 file nodes. In this way, when the mobile phone 100 needs to call files of other file nodes, it can also call the corresponding file content according to the first path information pointing to the first target file node.

[0164] It is understandable that the file node includes file content and file path information, and the N file contents correspond to the N file path information one by one. In some embodiments, the first path information may include first path information pointing to the first target file path information of the first target file node. In this way, the mobile phone 100 can find the first target file path information according to the first path information, and then find the corresponding file from the storage space of the mobile phone 100 based on the first target file path information.

[0165] For example, Fig. 9 A schematic diagram of deduplication of two duplicate files is shown. Fig. 9As shown, file node A and file node A' are two duplicate file nodes. The right triangle represents the file path information, and the shape of the cylinder nested in the octagon represents the storage space for storing files. The cylinder represents the file content. The prior art is that file node A includes file path information A and a storage space for storing file content A, and file path information A is used to instruct mobile phone 100 to find the corresponding file content A from the storage space of mobile phone 100; file node A' includes file path information A' and a storage space for storing file content A, and file path information A is used to instruct mobile phone 100 to find the corresponding file content A from the storage space of mobile phone 100. File path information A and file path information A' are different.

[0166] Using the file deduplication method provided by the embodiment of the present application, assuming that file node A' is the target file node, the mobile phone 100 can modify the file path information A to file path information B. File path information B is information that adds file path information A' pointing to file node A' on the basis of file path information A of file node A. Then delete the file content A in file node A. In this way, even if the file content A stored in the storage space under file node A is deleted, when the mobile phone 100 needs to access file node A, the file path information A' can be found based on the information of file path information A' pointing to file node A', and then the file content A under file node A' can be called based on the file path information A'.

[0167] It can be understood that the file system in the mobile phone 100 allocates two data structures for each file: a directory entry (dentry) and an index node (inode). The directory entry contains a file name and an index node pointer. The index node pointer is used to instruct the terminal device to find the index node corresponding to the file name from the storage space. The index node is used to store file attribute information, and the file attribute information includes a pointer to the file entity. The pointer to the file entity is used to instruct the terminal device to find the file corresponding to the file name from the storage space.

[0168] If there are multiple duplicate files in the mobile phone 100, the mobile phone 100 can select a target file from the multiple duplicate files, and add new file attribute information to the index nodes of other identical files except the target file. The newly added file attribute information is used to record the relationship between each other file and the target file. Delete the files under the other identical files except the target file. In this way, even if there is no file under the index node corresponding to the other files except the target file, when the mobile phone 100 accesses the index node of the other files except the target file, it can find the files under the target file through the newly added file attribute information. The files under the target file are the files under the other files except the target file. In this way, under the premise that the mobile phone 100 accesses the files normally, the duplicate files can be reduced, and then the storage space occupied by the duplicate files can be reduced, which saves the occupancy rate of the storage space and improves the user experience.

[0169] Specifically, the mobile phone 100 adds first path information in an index node among the N-1 file nodes, wherein the first path information includes path information of a first index node pointing to a first target file node.

[0170] For example, Fig.10 A schematic diagram of deduplication of two duplicate files is shown. Fig.10 As shown, file node A and file node A' are two duplicate file nodes. A five-pointed star represents a directory entry. An isosceles triangle represents the file path information in an index node. A circle represents a file content storage address or an address of a file content storage address, and a storage address or an address of a file storage address represents a storage location of a file in a storage space. A square represents file content.

[0171] In the prior art, file node A includes directory entry A, index node A, file content A, and address A related to the storage location of file content A in storage space, address A includes the storage address of file content A or the address of the storage address of file content A, and file path information A in index node A is used to instruct mobile phone 100 to find corresponding file content A from the storage space of mobile phone 100. File node A' includes directory entry A', index node A', file content A', and address A' related to the storage location of file content A' in storage space, address A' includes the storage address of file content A' or the address of the storage address of file content A', and file path information A' in index node A' is used to instruct mobile phone 100 to find corresponding file content A from the storage space of mobile phone 100. The storage locations of file content A under file node A and file node A' in storage space are different, and address A and address A' are different.

[0172] Using the file deduplication method provided by the embodiment of the present application, assuming that file node A' is the target file node, the mobile phone 100 can modify the index node A of the file node A to the index node B. The specific modification content is: the mobile phone 100 can add the information of the file node A' pointing to the file node A' based on the index node A of the file node A. Then delete the file content A in the file node A. In this way, even if the file content A stored in the storage space under the file node A is deleted, when the mobile phone 100 needs to access the file node A, the file node A' can be found according to the information of the file node A' pointing to the file node A', and the file content A under the file node A' can be called based on the file node A'.

[0173] The index node needs to store the attribute information of the file, so the index node has a size. Some are 128 bytes, and some are 256 bytes. The data volume of the path information is smaller than the data volume of the index node. Based on the index node A of the file node A, the mobile phone 100 adds the information of the file node A' pointing to the file node A', instead of mounting the information of the file node A' in the file node A. The information of the file node A' pointing to the file node A' has a smaller data volume than the information of the file node A', which saves storage space in the process of file deduplication and improves the user experience.

[0174] For example, Fig.11 A schematic diagram of file deduplication is shown. Fig.11 As shown, Fig.11 Five duplicate files are shown.

[0175] The four non-target file nodes (non-target file node 1, non-target file node 2, non-target file node 3, and non-target file node 4) are newly added with address information of the inode pointing to the target file node on the basis of the original inode. In this way, even if the file content A stored in the storage space under the four non-target file nodes is deleted, when the mobile phone 100 needs the non-target file node, the inode of the target file node can be found according to the address information of the inode pointing to the target file node, and then the target file can be found based on the inode of the target file node.

[0176] In some other embodiments, the number of N-1 file nodes pointing to the first target file node is added to the first target file node as a basis for verifying whether the non-target file node and the target file node correspond to each other, which can improve the accuracy of file deduplication to a certain extent.

[0177] Specifically, in the inode, the number of non-target file nodes can be increased based on the target file node and the original inode.

[0178] Step 306: The mobile phone 100 deletes the N-1 file contents of the N-1 file nodes from the storage space.

[0179] The mobile phone 100 adds information of the file path information pointing to the target file based on the N-1 file path information except the target file path information in the N file path information, and deletes the N-1 files except the target file from the N files. In this way, even if duplicate files stored in the storage space under the file nodes other than the target file node are deleted, when the mobile phone 100 needs to call files of other file nodes, the corresponding file content can be called according to the first path information pointing to the target file.

[0180] Step 307: the mobile phone 100 displays the file processing results of the N duplicate files, where the file processing results are used to indicate that the N duplicate files are successfully deduplicated.

[0181] The mobile phone 100 can display the deduplication results of N files. For example, Fig.12 A schematic diagram of a user interface for deduplication results is shown. Figure 6 After selecting the Delete option in Figure (d) in the figure, the above file deduplication steps will be performed on the file, and the following will be displayed: Fig.12 The prompt message that there is no duplicate file is shown.

[0182] After successful deduplication, Figure 4 Figure (d) or Figure 5 In the figure (c) in the figure, the data size of the duplicate file under the duplicate file entry will become 0B, or the duplicate file entry will not be displayed. For example, Fig.13 A schematic diagram of a user interface for deduplication results is shown. Fig.13 As shown in Figure (a) in the figure, the data size of the duplicate file under the duplicate file entry becomes 0B. Fig.13 As shown in Figure (b) in the figure, duplicate file entries are not displayed under duplicate file entries.

[0183] In this solution, the file content of the target file node is deleted in the storage space, and the content of the non-target file node is retained to achieve the purpose of deduplication. This deduplication operation is simpler, the deduplication operation takes less time, and the power consumption of the deduplication operation is saved.

[0184] The above describes the execution process of the first deduplication operation of duplicate files. If some files are generated in the storage space of the mobile phone 100, and these files are also duplicate files of the duplicate files after the deduplication operation, then the process of deduplicating the above duplicate files again can refer to the secondary deduplication process described below.

[0185] File deduplication stage - secondary deduplication

[0186] Fig.14 A flowchart of a method for deduplication of files is shown. Fig.14 As shown, the process includes the following steps:

[0187] Step 1401: In response to the second deduplication operation, the mobile phone 100 displays a second interface including M duplicate files and files corresponding to the first target file node, the M duplicate files are different from the N duplicate files, and the M duplicate files correspond to M file nodes.

[0188] Step 1402: The mobile phone 100 determines a file node from the M file nodes and the first target file node as the second target file node, wherein the second target file node includes the target file and the second target file path information, and the first target file node is different from the second target file node.

[0189] The selection rule of the second target file node in this step is the same as the selection rule of the first target file node, which will not be repeated here.

[0190] Step 1403: The mobile phone 100 determines whether the first target file node and the second target file node are the same.

[0191] If the first target file node and the second target file node are different, it means that the mobile phone 100 has reselected a target file node after the first deduplication operation, and it is necessary to layout the relationship between other file nodes and the new target file node according to the new target file node, that is, execute steps 1404 to 1406 below.

[0192] If the first target file node and the second target file node are the same, it means that the mobile phone 100 did not reselect the target file node after the first deduplication operation, and the original first target file node is still used as the target file node in the second deduplication operation. In this case, it is necessary to layout the relationship between the new duplicate file node and the first target file node according to the first target file node, and specifically execute steps 1407 and 1406 below.

[0193] Step 1404: the mobile phone 100 adds second path information in N+M-1 file nodes; wherein the N+M-1 file nodes are file nodes other than the second target file node among the N+M file nodes, and the second path information includes path information pointing to the second target file path information.

[0194] Step 1405: the mobile phone 100 deletes the M-1 file contents of the M-1 file nodes from the storage space, where the M-1 file nodes are the file nodes other than the second target node among the M file nodes.

[0195] Step 1406: the mobile phone 100 displays the file processing results of the N+M duplicate files, where the file processing results are used to indicate that the N+M duplicate files are successfully deduplicated.

[0196] Step 1407: the mobile phone 100 adds the first path information in N+M-1 file nodes; wherein the N+M-1 file nodes are the file nodes among the N+M file nodes except the first target file node.

[0197] The mobile phone 100 adds the first path information to the N+M-1 file nodes, so that the mobile phone 100 can find the file contents of the N+M-1 file nodes according to the first path information.

[0198] The above describes the case of selecting a target file node from a file after deduplication and a newly generated file. In some other embodiments, if a file that is duplicated with a file after deduplication is generated, the already determined target file node can be directly used as the target file node of the newly generated file. This saves the amount of calculation for the mobile phone 100 to re-determine the target file node and saves computing power.

[0199] Fig.15 A flowchart of a method for deduplication of files is shown. Fig.15 As shown, the process includes the following steps:

[0200] Step 1501: In response to the second deduplication operation, the mobile phone 100 displays a second interface, which includes M duplicate files and files corresponding to the second target file node, and the M duplicate files correspond to M file nodes.

[0201] Step 1502: the mobile phone 100 adds the first path information in N+M-1 file nodes; wherein the N+M-1 file nodes are the file nodes among the N+M file nodes except the first target file node.

[0202] If the mobile phone 100 does not reselect the target file node after the first deduplication operation, and still uses the original first target file node as the target file node in the second deduplication operation, it is necessary to lay out the relationship between the new duplicate file node and the first target file node according to the first target file node. Specifically, the mobile phone 100 adds the first path information in the N+M-1 file nodes.

[0203] In this application, after a deduplication operation, if duplicate files are generated again, a second deduplication operation can be performed. In this way, duplicate files can be cleaned up immediately according to the user's wishes, the number of duplicate files can be reduced, and the storage space occupied by duplicate files can be reduced, thus saving the storage space occupancy rate and improving the user experience.

[0204] Only the second deduplication operation is introduced above. It can be understood that the third and more deduplication operations can refer to the last second operation.

[0205] Access phase of deduplicated files

[0206] Fig.16 A schematic diagram of the access process of a deduplicated file is shown. Fig.16 As shown, the process includes the following steps:

[0207] Step 1601: the mobile phone 100 finds the first target file path information according to the first path information in response to the read operation; wherein the read operation is used to trigger the mobile phone 100 to read the file content corresponding to the first file node, and the first file node is any one of the N-1 file nodes;

[0208] Step 1602: The mobile phone 100 reads the file content corresponding to the first file node from the storage space according to the first target file path information.

[0209] In some embodiments, the first path information may include first path information pointing to the first target file path information of the first target file node. In this way, the mobile phone 100 can find the first target file path information according to the first path information, and then find the corresponding file from the storage space of the mobile phone 100 based on the first target file path information.

[0210] Under the premise that the mobile phone 100 can access files normally, the number of duplicate files can be reduced, thereby reducing the storage space occupied by the duplicate files, saving storage space occupancy and improving the user experience.

[0211] Modification stage of deduplicated files

[0212] Fig.17 A flowchart of a method for processing a deduplicated file during modification is shown. Fig.17 As shown, the process includes the following steps:

[0213] Step 1701: In response to the modification operation, the mobile phone 100 determines whether the file to be modified is the first target file node.

[0214] In some embodiments, the third operation may be an operation in which the user clicks a modification button corresponding to the file so that the file processes the operation to be modified.

[0215] If the file to be modified is the first target file node, this indicates that the file corresponding to the first target file node will be modified, and the modified file content is different from the original file content, which will cause the file content of the target file node to change, and it is not suitable as the target file of other duplicate files, and a new first target file node needs to be selected. Specifically, the mobile phone 100 selects the third target file node from the N-1 file nodes, that is, executes step 1702.

[0216] If the file to be modified is not the first target file node, the modification operation does not need to change the file content of the target file node, and the first target file node can still be used as the target file of other duplicate files. However, since only the target file node has corresponding file content, in order to avoid the file content of the target file node being modified, the mobile phone 100 can restore the file content of the file node to be modified, and then modify the file content of the non-target file node, that is, execute steps 1706 to 1708.

[0217] Step 1702: the mobile phone 100 selects a third target file node from N-1 file nodes; wherein the modification operation is used to trigger the mobile phone 100 to modify the file to be modified, and the N-1 file nodes are the file nodes other than the first target file node among the N file nodes.

[0218] In some embodiments, the mobile phone 100 may delete the number of N-1 file nodes pointing to the first target file node in the first target file node, and add the number of N-2 file nodes to the third target file node.

[0219] Step 1703: The mobile phone 100 restores the target file of the first target file node to the third target file node.

[0220] Step 1704: The mobile phone 100 deletes the first path information of the third target file node and N-2 file nodes, and adds the second path information in the N-2 file nodes; wherein the second path information includes path information pointing to the file path information of the third target file node, and the N-2 file nodes are the file nodes other than the first target file node and the third target file node among the N file nodes.

[0221] It can be understood that restoring a file under a file node means restoring the file to a storage space corresponding to the file path information of the file node before the deduplication operation.

[0222] Step 1705: The mobile phone 100 modifies the file to be modified.

[0223] Step 1706: the mobile phone 100 finds the first target file path information according to the first path information, and finds the file content of the first target file node according to the first target file path information.

[0224] In some embodiments, the mobile phone 100 may delete the number of N-1 file nodes pointing to the first target file node in the first target file node, and add the number of N-2 file nodes to the first target file node.

[0225] Step 1707: the mobile phone 100 restores the file content of the first target file node to the file node to be modified, and deletes the first path information in the file node to be modified.

[0226] In some embodiments, the mobile phone 100 can display the files under the file node to be modified after restoring the files under the file node to be modified. The mobile phone 100 restores the files under the file node to be modified and displays the files under the file node to be modified. In this way, the files under the file node to be modified can be used as the files to be modified, avoiding the problem of the target file changing if the files to be modified are modified.

[0227] The embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned mobile terminal, the mobile terminal executes each function or step executed by the mobile phone 100 in the above-mentioned method embodiment.

[0228] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the mobile phone 100 in the above method embodiment. The computer may be the above mobile terminal (such as the mobile phone 100).

[0229] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.

[0230] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0231] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0232] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable storage media. Therefore, a machine-readable storage medium may include any mechanism for storing or disseminating information in a machine (e.g., computer) readable form, including but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROM), random access memories (RAM), erasable programmable read-only memories (EPROM), electrically erasable programmable read-only memories (EEPROM), magnetic cards or optical cards, flash memory, or a tangible machine-readable memory for disseminating information (e.g., carrier waves, infrared signal digital signals, etc.) based on the Internet in electrical, optical, acoustic, or other forms of propagation signals. Accordingly, machine-readable storage media include any type of machine-readable storage media suitable for storing or propagating electronic instructions or information in a form readable by a machine (eg, a computer).

[0233] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0234] It can be understood that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0235] It is understood that in the examples and descriptions of this patent, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises", or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article, or device. In the absence of further restrictions, an element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.

[0236] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.

Claims

1. A file processing method, characterized in that: The method is applied to a terminal device, comprising: In response to a first deduplication operation, a first interface is displayed, the first interface includes at least one group of duplicate files, the deduplication operation is used to instruct the terminal device to remove duplicate files; wherein any group of duplicate files includes N duplicate files; the N duplicate files correspond to N file nodes; the file nodes include file content and file path information, the file path information is used to instruct the terminal device to find the corresponding file content from the storage space; the storage space includes a first index node area and a data area, the first index node area is used to store directory entries and index nodes, the data area includes a second index node area and a data block area, the second index node area is used to store index nodes, and the data block area is used to store file content; For a group of duplicate files, first path information is added to an index node in N-1 file nodes; wherein the N-1 file nodes are file nodes other than a first target file node in the N file nodes; the first target file node includes first target file content and first target file path information; the first path information includes path information of a first index node pointing to the first target file node; the first path information is used to search for the first target file path information in the first target file node; Deleting N-1 file contents of the N-1 file nodes from the storage space; The file processing results of the N duplicate files are displayed, and the file processing results are used to indicate that the N duplicate files are successfully deduplicated.

2. The method according to claim 1, characterized in that The at least one group of duplicate files includes files of the same type, and the N duplicate files are a group of duplicate files of the same file type; or; The at least one group of duplicate files includes files of multiple types, and the N duplicate files are a group of duplicate files of multiple file types.

3. The method according to claim 1 or 2, characterized in that: After displaying the file processing results of the N duplicate files, the method further includes: In response to the second deduplication operation, a second interface is displayed, the second interface including M duplicate files and files corresponding to the first target file node, the M duplicate files are different from the N duplicate files, and the M duplicate files correspond to M file nodes; Determine a file node from the M file nodes and the first target file node as a second target file node, wherein the second target file node includes target file and second target file path information; If the first target file node and the second target file node are different, adding second path information to N+M-1 file nodes; wherein the N+M-1 file nodes are file nodes other than the second target file node among the N+M file nodes, and the second path information includes path information pointing to the second target file path information; Deleting M-1 file contents of the M-1 file nodes from the storage space, the M-1 file nodes being file nodes other than the second target node among the M file nodes; The file processing results of the N+M duplicate files are displayed, and the file processing results are used to indicate that the N+M duplicate files are successfully deduplicated.

4. The method according to claim 3, characterized in that Before displaying the file processing results of the N+M duplicate files, the method further includes: If the first target file node is the same as the second target file node, first path information is added to N+M-1 file nodes; wherein the N+M-1 file nodes are file nodes other than the first target file node among the N+M file nodes.

5. The method according to claim 1 or 2, characterized in that After displaying the file processing results of the N duplicate files, the method further includes: In response to the second deduplication operation, a second interface is displayed, wherein the second interface includes M duplicate files and files corresponding to the second target file node, and the M duplicate files correspond to the M file nodes; Adding first path information to N+M-1 file nodes; wherein the N+M-1 file nodes are file nodes other than the first target file node among the N+M file nodes.

6. The method according to any one of claims 1 to 5, characterized in that The first path information includes path information of the first target file path information pointing to the first target file node.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The number of the N-1 file nodes pointing to the first target file node is added to the first target file node.

8. The method according to claim 1 or 2, characterized in that: After displaying the file processing results of the N duplicate files, the method further includes: In response to a read operation, the first target file path information is found according to the first path information; wherein the read operation is used to trigger the terminal device to read the file content corresponding to the first file node, and the first file node is any one of the N-1 file nodes; The file content corresponding to the first file node is read from the storage space according to the first target file path information.

9. The method according to any one of claims 1 to 7, characterized in that: After displaying the file processing results of the N duplicate files, the method further includes: In response to a modification operation, if the file to be modified is the first target file node, a third target file node is selected from the N-1 file nodes; wherein the modification operation is used to trigger the terminal device to modify the file to be modified, and the N-1 file nodes are file nodes other than the first target file node among the N file nodes; Restoring the target file of the first target file node to the third target file node; Delete the first path information of the third target file node and N-2 file nodes, and add second path information to the N-2 file nodes; wherein the second path information includes path information pointing to the file path information of the third target file node, and the N-2 file nodes are file nodes other than the first target file node and the third target file node among the N file nodes; Modify the file to be modified.

10. The method according to claim 9, characterized in that Before modifying the file to be modified, the method further includes: If the file to be modified is not the first target file node, finding the first target file path information according to the first path information; Find the file content of the first target file node according to the first target file path information; The file content of the first target file node is restored to the file node to be modified, and the first path information in the file node to be modified is deleted.

11. The method according to claim 9, characterized in that The method further comprises: The number of the N-1 file nodes pointing to the first target file node in the first target file node is deleted, and the number of the N-2 file nodes is added to the first target file node.

12. The method according to claim 10, characterized in that The method further comprises: The number of the N-1 file nodes pointing to the first target file node in the first target file node is deleted, and the number of the N-2 file nodes is added to the third target file node.

13. The method according to any one of claims 1 to 11, characterized in that Determining a file node from the N file nodes as a target file node includes: The target file node is determined based on the N access times of the N file nodes and / or the modification times of the N file nodes within a preset time period.

14. The method according to claim 13, characterized in that The determining the target file node based on the number of accesses to the N file nodes and / or the modification time of the N file nodes within a preset time period includes: Obtaining N access counts of the N file nodes, where the access count is the number of accesses to each file node within a preset time period; If the N access times are the same, and the modification times of the N file nodes within the preset time period are consistent, then any one of the N file nodes is selected as the target file node; If the N access times are the same, and the modification times of the N file nodes within the preset time period are inconsistent, a file node with the earliest modification time is selected as the target file node.

15. The method according to claim 13, characterized in that The determining the target file node based on the number of accesses to the N file nodes and / or the modification time of the N file nodes within a preset time period includes: Obtaining N access counts of the N file nodes, where the access count is the number of accesses to each file node within a preset time period; If the N access times are different, determine that the number of file nodes with the smallest value among the N access times is K; If K is 1, the file node with the smallest access count is determined as the target file node; If K is greater than 1, and the modification times of the K file nodes within the preset time period are consistent, then any one of the K file nodes is selected as the target file node; If K is greater than 1, and the modification times of the K file nodes within the preset time period are inconsistent, a file node with the earliest modification time is selected as the target file node.

16. An electronic device, characterized in that: The electronic device comprises a processor and a memory; the memory is used to store code instructions; the processor is used to run the code instructions, so that the electronic device executes the method as described in any one of claims 1-15.

17. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 15.

Citation Information

Patent Citations

  • Managing redundant immutable files using deduplication in storage clouds

    CN103959264A

  • File storage method and device and electronic equipment thereof

    CN106844431A

  • Deleted file management method and device, equipment and storage medium

    CN115328864A

  • Deduplicating similar image objects in a document

    US20130339848A1