WO2023015830A1 - 一种文件处理方法、装置、设备及可读存储介质 - Google Patents

一种文件处理方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2023015830A1
WO2023015830A1 PCT/CN2021/142854 CN2021142854W WO2023015830A1 WO 2023015830 A1 WO2023015830 A1 WO 2023015830A1 CN 2021142854 W CN2021142854 W CN 2021142854W WO 2023015830 A1 WO2023015830 A1 WO 2023015830A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
folder
stream
memory
size
Prior art date
Application number
PCT/CN2021/142854
Other languages
English (en)
French (fr)
Inventor
徐如庆
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Priority to US18/261,060 priority Critical patent/US20240168921A1/en
Publication of WO2023015830A1 publication Critical patent/WO2023015830A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources

Definitions

  • the present application relates to the technical field of file processing, and more specifically, to a file processing method, device, device, and readable storage medium.
  • a file processing method comprising:
  • before generating the folder flow according to the folder further include:
  • the folder rotation is generated according to the folder, and the folder flow is traversed, including:
  • the stream of folders is traversed, and after the stream of folders is traversed, the stream of subfolders is traversed.
  • the folder flow after the folder flow is generated according to the folder, it further includes:
  • the folder stream is traversed, including:
  • the file access path when determining that the file access path corresponds to accessing the file, it also includes:
  • a file object corresponding to the accessed file is generated, and the file object corresponding to the accessed file is stored in memory, and the size of the accessed file is obtained according to the file object corresponding to the accessed file.
  • the folder stream is traversed, including:
  • the file access path after determining that the file access path does not exist, it also includes:
  • the folder stream is generated by queuing the files contained in the folder.
  • generating a file object corresponding to a folder stream includes:
  • the files contained in the folder are read sequentially, and each time a file is read, a file object corresponding to the file is generated.
  • a file processing device comprising:
  • the receiving module is used to receive the file access path
  • the first generating module is configured to generate a folder flow according to the folder when the file access path exists and the file access path corresponds to a folder, traverse the folder flow, and generate a file corresponding to the folder flow object;
  • the delete module is used to store the file object in the memory, obtain the size of the corresponding file according to the file object, and detect that there are files of known size that have been traversed and used up in the folder, and delete the file object corresponding to the file from the memory delete from ;
  • the obtaining module is used to obtain the total file size of the folder according to the size of each file in the folder.
  • it also includes:
  • a filter module used to filter out subfolders from the folder when there are subfolders in the folder
  • the first generation module includes:
  • a first generating unit configured to generate a folder stream according to files in the folder at the same level as the subfolder
  • a second generation unit for generating a subfolder stream from files contained in the subfolder
  • the traversal unit is used for traversing the folder stream, and traversing the sub-folder stream after completing the traversal of the folder stream.
  • the embodiment of the present application also provides a file processing device, including a memory and one or more processors, where computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the one or more processors, The one or more processors are made to execute the steps of any one of the above-mentioned file processing methods.
  • the embodiment of the present application also provides one or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more A plurality of processors execute the steps of any one of the file processing methods described above.
  • FIG. 1 is an application scenario diagram of a file processing method provided in the present application according to one or more embodiments
  • FIG. 2 is a flowchart of a file processing method provided by the present application according to one or more embodiments
  • FIG. 3 is a schematic diagram of existing file traversal
  • FIG. 4 is a schematic diagram of file traversal provided by the present application according to one or more embodiments.
  • FIG. 5 is a schematic diagram of folder hierarchy provided by the present application according to one or more embodiments.
  • Fig. 6 is a schematic structural diagram of a file processing device provided by the present application according to one or more embodiments.
  • Fig. 7 is a schematic structural diagram of a file processing device provided by the present application according to one or more embodiments.
  • the core of the present application is to provide a file processing method, device, equipment and readable storage medium for avoiding memory overflow.
  • the file processing method provided in this application can be applied to the application environment shown in FIG. 1 .
  • the terminal 102a communicates with the server 104a through a network.
  • the terminal 102a can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server 104a can be realized by an independent server or a server cluster composed of multiple servers.
  • the terminal 102a can send the file access path to the server 104a, and the server 104a receives the file access path.
  • a folder flow is generated according to the folder. And traverse the folder stream, and generate a file object corresponding to the folder stream, store the file object in the memory, obtain the size of the corresponding file according to the file object, and detect that there are files in the folder that have been traversed and used up If the size of the file is known, the file object corresponding to the file is deleted from the memory; and according to the size of each file in the folder, the total file size of the folder is obtained.
  • the terminal 102a may receive the file access path, and when the file access path exists and the file access path corresponds to a folder, a folder flow is generated according to the folder, and the folder flow is traversed , and generate a file object corresponding to the folder stream, store the file object in the memory, obtain the size of the corresponding file according to the file object, and detect that there are files of known size that have been traversed and used up in the folder, then Delete the file object corresponding to the file from memory; and obtain the total file size of the folder according to the size of each file in the folder.
  • FIG. 2 shows a flow chart of a file processing method provided by the embodiment of the present application.
  • the method is applied to the terminal or server in FIG. 1 as an example for illustration.
  • a file processing method provided by the embodiment of the present application methods which can include:
  • step S12 can be performed, that is, file size statistics can be performed according to the file access path.
  • access can be performed according to the file access path, and it can be determined whether the file access path corresponds to a folder or a file through the access. If it is determined that the file access path corresponds to a file, the size of the file can be obtained.
  • step S13 can be performed, that is, the size of the files under the folder can be acquired and counted.
  • S13 Generate a folder stream according to the folders, traverse the folder stream, and generate a file object corresponding to the folder stream.
  • Fig. 3 shows a schematic diagram of existing file traversal
  • Fig. 4 shows a schematic diagram of file traversal provided by the embodiment of the present application. It can be seen from the figure that the present application is When traversing folders, only one folder is read at a time, while in the prior art, all files in the folder are read at one time.
  • a file object corresponding to the folder stream can be generated. Specifically, each time a file is read, a file object corresponding to the file is generated instead of generating a file object corresponding to all files at once. The file object, so as to avoid filling up the JVM memory at one time, causing memory overflow.
  • the file object includes file attributes (such as file size, etc.).
  • S14 Store the file object in the memory, obtain the size of the corresponding file according to the file object, and detect whether there is a file of known size that has been traversed and used up in the folder, and if there is, the file object corresponding to the file is removed from the memory Deleted in .
  • the file object After the file object is generated, the file object can be stored in the memory, so that the file attributes can be obtained by viewing the file object when the file is utilized later.
  • the size of the file corresponding to the file object can be obtained according to the file object stored in the memory, and the size of the file can be recorded and stored. Moreover, it can also detect in real time whether there is a file of known size that has been traversed and used up in the folder. If there is a file of known size that has been traversed and used up, delete the file object corresponding to the file from the memory. , so as to clean up the memory in time, so as to avoid the file object of the file occupying the memory all the time, causing the memory usage to increase, and eventually memory overflow.
  • the above-mentioned being utilized refers to the state after being called by the corresponding program and the utilization is completed, and the known size is specifically obtained according to the corresponding file object.
  • the sizes of the files in the folder can be added to obtain the total size of the files plus the files in the folder.
  • the application adopts the method of streaming to traverse the files sequentially, and cleans the memory in time, so as to avoid the situation that the JVM memory is full due to the large amount of files as much as possible, thereby trying to Avoid memory overflow situations.
  • folder streams are generated according to the folders corresponding to the file access paths, and the folder streams are traversed to realize the traversal of files one by one in the form of streams, To avoid traversing all files at one time and generate a large number of file objects at one time, so as to avoid the memory being full, and by detecting whether there are files of known size that have been traversed and used up in the folder, and complete when the existence is determined
  • the file object corresponding to the file of known size that has been traversed and used up is deleted from the memory, so as to clean up the memory in time and avoid memory occupation as much as possible full, thereby avoiding memory overflow.
  • the terminal or the server judges whether there are subfolders in the folder, determines that there are subfolders in the folder, and filters out the subfolders from the folder based on the judgment result.
  • generating a folder rotation based on folders and traversing the folder flow may include:
  • the stream of folders is traversed, and after the stream of folders is traversed, the stream of subfolders is traversed.
  • subfolder streams can be generated from the files contained in the subfolders. It should be noted that if the subfolder also includes the first subfolder, the first subfolder can be filtered out from the subfolders first, and the files in the subfolder at the same level as the first subfolder can be Generate a subfolder flow, and generate the first subfolder flow according to the files contained in the first subfolder...
  • folder A contains subfolder a
  • subfolder also includes subfolder a1.
  • a schematic diagram of the folder hierarchy provided by the embodiment of the present application is shown, in which the first row corresponds to folder A, the second row corresponds to subfolder a contained in the folder, and the third row corresponds to subfile files contained in folder a.
  • the folder stream when performing comparison traversal, can be traversed first, and then the sub-file stream can be traversed after completing the traversal with the folder stream, wherein, if the first sub-file contained in the sub-folder folder, the first subfolder stream can be traversed at the end.
  • the situation of missing files can be avoided, and it can avoid traversing multiple folder streams at a time, thereby avoiding the situation of storing multiple file objects in the memory at the same time, so as to leave a buffer time for deletion and cleaning in the memory. Then try to avoid memory overflow.
  • a file processing method provided in an embodiment of the present application may further include, after the folder stream is generated:
  • traversing the folder stream may include:
  • an iterator can be generated according to the folder stream, so that the iterator can be used to traverse the folder stream, thereby improving the traversal efficiency.
  • the generated iterator can specifically be Iterable (an interface in Java), wherein, the Iterable interface is a member of the Java collection family, which is convenient for traversing all elements in the collection, and is used for iteratively accessing the elements in the collection .
  • a file processing method provided in an embodiment of the present application if it is determined that the file access path corresponds to an access file, may also include:
  • a file object corresponding to the accessed file is generated, and the file object corresponding to the accessed file is stored in memory, and the size of the accessed file is obtained according to the file object corresponding to the accessed file.
  • the file object corresponding to the access file can be directly generated, and the file object is stored in the memory, and obtained according to the file object corresponding to the access file The size of the accessed file. Afterwards, the size of the accessed file can be output, so that relevant personnel can obtain the file size corresponding to the file access path.
  • a file processing method provided in an embodiment of the present application may further include: when traversing the folder stream:
  • the step of generating a file object corresponding to the folder stream during traversal is executed based on the determination result.
  • the valid file mentioned here specifically refers to a file that is not a shortcut connection (that is, it is not a shortcut)
  • the step of generating a file object corresponding to the folder stream during traversal that is, generate the corresponding file object
  • a file processing method provided by an embodiment of the present application may further include:
  • a prompt that the file access path is wrong can be issued, so that relevant personnel can check and check the file access path according to the prompt, so as to facilitate relevant Personnel are able to provide valid file access paths as quickly as possible.
  • FIG. 6 shows a schematic structural diagram of a file processing device provided in the embodiment of the present application, which may include:
  • the receiving module 51 is used to receive the file access path, and judge whether the file access path exists;
  • the first judging module 52 is used to judge whether the corresponding file access path is a folder if it exists;
  • the first generating module 53 is configured to generate a folder stream according to the folder if it is a folder, traverse the folder stream, and generate a file object corresponding to the folder stream;
  • the deletion module 55 is used to store the file object in the internal memory, obtain the size of the corresponding file according to the file object, and detect whether there is a file of known size that has been traversed and utilized in the folder, and if it exists, the file corresponding to the file will be deleted.
  • the file object is removed from memory;
  • the acquiring module 55 is configured to acquire the total file size of the folder according to the size of each file in the folder.
  • the second judging module is used to judge whether there are subfolders in the folder
  • a filtering module configured to filter out subfolders from the folder if there are subfolders in the folder
  • the first generating module 53 may include:
  • a first generating unit configured to generate a folder stream according to files in the folder at the same level as the subfolder
  • a second generating unit configured to generate a subfolder stream according to files contained in the subfolder
  • the first traversal unit is configured to traverse the folder flow, and traverse the subfolder flow after completing the traversal of the folder flow.
  • the second generating module is used to generate an iterator according to the folder stream after the folder stream is generated;
  • the first generating module 53 may include:
  • the second traversal unit is configured to use an iterator to traverse the folder stream.
  • the third generation module is used to generate a file object corresponding to the access file if it is determined that the file access path corresponds to the access file, and store the file object corresponding to the access file in the memory, and obtain the file object according to the file object corresponding to the access file The size of the access file.
  • the third judging module is used for judging whether the files in the folder stream are valid files when traversing the folder stream;
  • the execution module is used to execute the step of generating a file object corresponding to the folder stream when traversing if the file is a valid file.
  • the prompting module is used to issue a prompt that the file access path is wrong if it is determined that the file access path does not exist.
  • the embodiment of the present application also provides a file processing device, see FIG. 7, which shows a schematic structural diagram of a file processing device provided in the embodiment of the present application
  • the file processing device may be a computer device, and the computer device may be Terminal or server
  • the file processing equipment may include:
  • Memory 61 configured to store computer-readable instructions
  • One or more processors 62 are configured to execute the computer-readable instructions stored in the memory 61, and when the computer-readable instructions are executed by the processors 62, the steps of the file processing method in any one of the above-mentioned embodiments are implemented.
  • the embodiment of the present application also provides a non-volatile readable storage medium, where computer-readable instructions are stored in the non-volatile readable storage medium, and when the computer-readable instructions are executed by one or more processors, the Implement the steps of the file processing method in any one of the above embodiments.
  • the readable storage medium may include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc., which can store computer-readable medium of instruction.
  • Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种文件处理方法、装置、设备及可读存储介质,方法包括:判断接收到的文件访问路径是否存在;若存在则判断文件访问路径对应的是否为文件夹;若是则生成文件夹流,对文件夹流进行遍历,生成与文件夹流对应的文件对象;将文件对象存储到内存中,根据文件对象获取对应文件的大小,检测文件夹中是否存在完成遍历且被利用完的已知大小的文件,若存在则将文件对应的文件对象从内存中删除;根据文件夹中各文件的大小获取文件夹文件总大小。

Description

一种文件处理方法、装置、设备及可读存储介质
相关申请的交叉引用
本申请要求于2021年08月10日提交中国专利局,申请号为202110911019.1,申请名称为“一种文件处理方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及文件处理技术领域,更具体地说,涉及一种文件处理方法、装置、设备及可读存储介质。
背景技术
在AI(Artificial Intelligence,人工智能)、磁盘大小统计等场景中,需要获取文件大小,以便于给文件预设置一些空间等,以使得有足够的空间进行文件的存储等。
目前,在对海量小文件进行统计时,一般是一次性遍历所有文件,并对每个文件均生成一个文件对象,且把文件对象加载到内存中,以在内存中获取海量小文件的总大小,但是,发明人意识到,由于文件量比较大,采用上述方式进行文件大小的统计会把JVM(Java Virtual Machine,内存虚拟机)内存占满,从而产生内存溢出,最终造成文件系统不可用。
综上所述,如何避免产生内存溢出,是目前本领域技术人员亟待解决的技术问题。
发明内容
一种文件处理方法,包括:
接收文件访问路径;在文件访问路径存在,且文件访问路径对应的是文件夹时,根据文件夹生成文件夹流,并对文件夹流进行遍历,且生成与文件夹流对应的文件对象;
将文件对象存储到内存中,根据文件对象获取对应文件的大小,并检测到文件夹中存在完成遍历且被利用完的已知大小的文件,将文件对应的文件对象从内存中删除;和
根据文件夹中各文件的大小,获取文件夹文件总大小。
在其中一个实施例中,根据文件夹生成文件夹流之前,还包括:
在文件夹中存在子文件夹时,从文件夹中筛选出子文件夹。
在其中一个实施例中,根据文件夹生成文件夹轮流,并对文件夹流进行遍历,包括:
根据文件夹中与子文件夹位于同一层级的文件生成文件夹流;
根据子文件夹中包含的文件生成子文件夹流;和
对文件夹流进行遍历,且在完成对文件夹流的遍历后对子文件夹流进行遍历。
在其中一个实施例中,根据文件夹生成文件夹流之后,还包括:
根据文件夹流生成迭代器;
在其中一个实施例中,对文件夹流进行遍历,包括:
利用迭代器对文件夹流进行遍历。
在其中一个实施例中,在确定文件访问路径对应是访问文件,还包括:
生成与访问文件对应的文件对象,并将与访问文件对应的文件对象存储到内存中,且根据与访问文件对应的文件对象获取访问文件的大小。
在其中一个实施例中,对文件夹流进行遍历,包括:
在文件夹流中的文件为有效文件时,执行对文件夹流进行遍历,且生成与文件夹流对应的文件对象的步骤。
在其中一个实施例中,在确定文件访问路径不存在,还包括:
发出文件访问路径错误的提示。
在其中一个实施例中,文件夹流为对文件夹中包含的文件进行排队生成的。
在其中一个实施例中,生成与文件夹流对应的文件对象,包括:
对文件夹中包含的文件依次进行读取,每读取一个文件,则生成与文件对应的文件对象。
一种文件处理装置,包括:
接收模块,用于接收文件访问路径;
第一生成模块,用于在文件访问路径存在时,且文件访问路径对应的是文件夹时,根据文件夹生成文件夹流,并对文件夹流进行遍历,且生成与文件夹流对应的文件对象;
删除模块,用于将文件对象存储到内存中,根据文件对象获取对应文件的大小,并检测到文件夹中存在完成遍历且被利用完的已知大小的文件,将文件对应的文件对象从内存中删除;和
获取模块,用于根据文件夹中各文件的大小,获取文件夹文件总大小。
在其中一个实施例中,还包括:
筛选模块,用于在文件夹中存在子文件夹时,从文件夹中筛选出子文件夹;
在其中一个实施例中,第一生成模块包括:
第一生成单元,用于根据文件夹中与子文件夹位于同一层级的文件生成文件夹流;
第二生成单元,用于根据子文件夹中包含的文件生成子文件夹流;和
遍历单元,用于对文件夹流进行遍历,且在完成对文件夹流的遍历后对子文件夹流进行遍历。
本申请实施例还提供了一种文件处理设备,包括存储器及一个或多个处理器,存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行上述任一项文件处理方法的步骤。
本申请实施例最后还提供了一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行上述任一项文件处理方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请根据一个或多个实施例中提供的一种文件处理方法的应用场景图;
图2为本申请根据一个或多个实施例提供的一种文件处理方法的流程图;
图3为现有进行文件遍历的示意图;
图4为本申请根据一个或多个实施例提供的文件遍历示意图;
图5为本申请根据一个或多个实施例提供的文件夹层级关系示意图;
图6为本申请根据一个或多个实施例提供的一种文件处理装置的结构示意图;
图7为本申请根据一个或多个实施例提供的一种文件处理设备的结构示意图。
具体实施方式
本申请的核心是提供的一种文件处理方法、装置、设备及可读存储介质,用于避免产生内存溢出。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的文件处理方法,可以应用于如图1所示的应用环境中。其中,终端102a与服务器104a通过网络进行通信。终端102a可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104a可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
具体地,终端102a可以将文件访问路径发送至服务器104a,服务器104a接收到文件访问路径,在文件访问路径存在时,且文件访问路径对应的是文件夹时,则根据文件夹生成文件夹流,并对文件夹流进行遍历,且生成与文件夹流对应的文件对象,将文件对象存储到内存中,根据文件对象获取对应文件的大小,并检测到文件夹中存在完成遍历且被利用完的已知大小的文件,则将文件对应的文件对象从内存中删除;和根据文件夹中各文件的大小,获取文件夹文件总大小。
在另一个实施例中,终端102a可以接收到文件访问路径,在文件访问路径存在时,且文件访问路径对应的是文件夹时,则根据文件夹生成文件夹流,并对文件夹流进行遍历,且生成与文件夹流对应的文件对象,将文件对象存储到内存中,根据文件对象获取对应文件的大小,并检测到文件夹中存在完成遍历且被利用完的已知大小的文件,则将文件对应的文件对象从内存中删除;和根据文件夹中各文件的大小,获取文件夹文件总大小。
参见图2,其示出了本申请实施例提供的一种文件处理方法的流程图,以该方法应用于图1中的终端或服务器为例进行说明,本申请实施例提供的一种文件处理方法,可以包括:
S11:接收文件访问路径,判断文件访问路径是否存在;若是,则执行步骤S12。
在需要获取海量小文件的大小时,则可以接收用户上传的文件访问路径,并在接收到文件访问路径后,通过按照文件访问路径进行访问等方式判断文件访问路径是否存 在,若确定文件访问路径不存在,则可以发出提示等;若确定文件访问路径存在,则可以执行步骤S12,即可以根据文件访问路径进行文件大小的统计。
S12:判断文件访问路径对应的是否为文件夹;若是,则执行步骤S13。
在确定文件访问路径存在时,则可以根据文件访问路径进行访问,并通过访问判断文件访问路径对应的是文件夹还是文件,若确定文件访问路径对应的是文件,则可以获取该文件的大小。
若确定文件访问路径对应的是文件夹,则可以执行步骤S13,即可以对该文件夹下的文件进行大小的获取和统计。
S13:根据文件夹生成文件夹流,并对文件夹流进行遍历,且生成与文件夹流对应的文件对象。
在确定文件访问路径对应的是文件夹后,则可以在文件夹不为空的情况下根据文件夹生成文件夹流,并对文件夹流进行遍历,其中,文件夹流在此是Java中的一个接口,且文件夹流即为文件夹的流,即对文件夹中所包含的文件进行排队,且在对文件夹流进行遍历时具体是以流的形式对文件夹中所包含的文件依次进行读取,慢慢遍历文件夹中的文件,而并非是一次性读取所有文件。具体可以参见图3和图4,其中,图3示出了现有进行文件遍历的示意图,图4示出了本申请实施例提供的文件遍历示意图,从图中可以看出,本申请在对文件夹进行遍历时是每次仅读取一个文件夹,而现有技术则是一次性把文件夹中的所有文件均读取完。
另外,在对文件夹流进行遍历时,可以生成与文件夹流对应的文件对象,具体地,每读取到一个文件即生成与该文件的文件对象,而非是一次性生成与所有文件对应的文件对象,从而避免一次性把JVM内存吃满,造成内存溢出。其中,需要说明的是,文件对象中包含有文件属性(例如文件大小等)。
需要说明的是,若确定文件夹为空(也即文件夹中并不包含文件时),则直接输出0或者返回文件夹为空的提示。
S14:将文件对象存储到内存中,根据文件对象获取对应文件的大小,并检测文件夹中是否存在完成遍历且被利用完的已知大小的文件,若存在则将文件对应的文件对象从内存中删除。
在生成文件对象之后,可以将文件对象存储到内存中,以便于后续在进行文件利用时可以通过查看文件对象获取文件属性。
另外,可以根据存储到内存中的文件对象获取与该文件对象对应的文件的大小,并对该文件的大小进行记录和存储。而且还可以实时检测文件夹中是否存在完成遍历且被 利用完的已知大小的文件,若存在完成遍历且被利用完的已知大小的文件,则将该文件对应的文件对象从内存中删除,以便于实现对内存的及时清理,从而避免该文件的文件对象一直占用内存而导致内存占用量越来越大,最终出现内存溢出的情况。其中,需要说明的是,前述提及的被利用完指的是被相应程序调用且完成利用后的状态,已知大小具体是根据对应的文件对象进行获取的。
S15:根据文件夹中各文件的大小,获取文件夹文件总大小。
在完成对文件夹流的遍历且根据所有的文件对象获取所有文件的大小之后,可以将文件夹中各文件的大小进行相加,以获取文件加中文件的总大小。
通过上述过程可知,相比于现有技术,本申请采用流的方式依次对文件进行遍历,并及时对内存进行清理,以尽量避免因文件量大而导致JVM内存吃满的情况出现,从而尽量避免产生内存溢出的情况。
本申请公开的上述技术方案,在文件总大小的统计过程中,通过根据文件访问路径对应的文件夹生成文件夹流,并对文件夹流进行遍历而实现采用流的方式对文件逐个进行遍历,以避免一次性遍历所有文件而导致一次性生成大量的文件对象,从而避免内存被占满,且通过检测文件夹中是否存在完成遍历且被利用完的已知大小的文件,并在确定存在完成遍历且被利用完的已知大小的文件时,将完成遍历且被利用完的已知大小的文件对应的文件对象从内存中删除,以实现对内存的及时清理,从而尽量避免出现内存被占满的情况,进而避免产生内存溢出。
本申请实施例提供的一种文件处理方法,在生成文件夹流之前,还可以包括:
判断文件夹中是否存在子文件夹.若是,则从文件夹中筛选出子文件夹。
具体地,终端或服务器判断文件夹中是否存在子文件夹,判定文件夹中存在子文件夹,基于该判定结果从文件夹中筛选出子文件夹。
相应地,根据文件夹生成文件夹轮流,并对文件夹流进行遍历,可以包括:
根据文件夹中与子文件夹位于同一层级的文件生成文件夹流;
根据子文件夹中包含的文件生成子文件夹流;
对文件夹流进行遍历,且在完成对文件夹流的遍历后对子文件夹流进行遍历。
在本申请中,在生成文件夹流之前,可以判断文件夹流中是否存在子文件夹,若存在子文件夹,则从文件夹中筛选出子文件夹中,以减少子文件夹对文件夹流生成带来的影响。
在上述基础上,在生成文件夹流时,可以先根据文件夹中与子文件夹位于同一层级的文件生成文件夹流,其中,这里提及的同一层级具体指的是包含在同一文件夹中的子文件夹和文件。另外,还可以根据子文件夹中所包含的文件生成子文件夹流。需要说明的是,若子文件夹中还包括第一子文件夹,则可以先从子文件夹中筛选出第一子文件夹,并根据子文件夹中与第一子文件夹位于同一层级的文件生成子文件夹流,并根据第一子文件夹中包含的文件中生成第一子文件夹流……直至最后的子文件夹仅剩下文件为止且根据所剩余的文件生成对应的子文件夹流。例如:文件夹A中包含子文件夹a,子文件夹中还包括子文件夹a1,此时,则可以先根据与子文件夹a同属于文件夹这一层级的文件生成文件夹流,然后,可以根据与子文件夹a1同属于子文件夹a的文件生成子文件夹流,之后,可以根据子文件夹a1中包含的文件生成第一子文件夹流,具体可以参见图5,其示出了本申请实施例提供的文件夹层级关系示意图,其中,第一行对应的是文件夹A,第二行对应的文件夹中所包含的子文件夹a,第三行对应的是子文件夹a中所包含的文件。
在上述基础上,在进行比遍历时,可以先对文件夹流进行遍历,在完成与文件夹流的遍历后可以再对子文件流进行遍历,其中,若子文件夹中包含的第一子文件夹,则可以最后再对第一子文件夹流进行遍历。
通过上述过程可以避免出现文件遗漏的情况,且可以避免一次遍历多个文件夹流,从而避免同时将多个文件对象存储到内存中的情况出现,以给内存留出删除和清理的缓冲时间,进而尽量避免出现内存溢出的情况。
本申请实施例提供的一种文件处理方法,在生成文件夹流之后,还可以包括:
根据文件夹流生成迭代器;
相应地,对文件夹流进行遍历,可以包括:
利用迭代器对文件夹流进行遍历。
在生成文件夹流之后,可以根据文件夹流生成迭代器,以利用迭代器对文件夹流进行遍历,从而提高遍历效率。其中,所生成的迭代器具体可为Iterable(是Java中的一个接口),其中,Iterable接口是Java集合大家庭中的一员,便于遍历集合中的所有元素,用于迭代访问集合中的元素。
本申请实施例提供的一种文件处理方法,若确定文件访问路径对应是访问文件,则还可以包括:
生成与访问文件对应的文件对象,并将与访问文件对应的文件对象存储到内存中,且根据与访问文件对应的文件对象获取访问文件的大小。
在本申请中,当确定文件访问路径对应是访问文件而非是文件夹时,则可以直接生成访问文件对应的文件对象,并将文件对象存储到内存中,且根据访问文件对应的文件对象获取访问文件的大小,之后,可以输出访问文件的大小,以便于相关人员可以获取文件访问路径对应的文件大小。
本申请实施例提供的一种文件处理方法,在对文件夹流进行遍历时,还可以包括:
判断文件夹流中的文件是否为有效文件;
若是,则执行在遍历时生成与文件夹流对应的文件对象的步骤。
具体地,判定所述文件夹流中的文件为有效文件,基于该判定结果执行在遍历时生成与文件夹流对应的文件对象的步骤。
在对文件夹流进行遍历时,还可以判断文件夹流中的文件是否为有效文件,其中,这里提及的有效文件具体指的是非快捷连接的文件(也即并非是快捷方式),若确定是有效文件,则执行在遍历时生成与文件夹流对应的文件对象的步骤,即生成对应的文件对象,若确定不是有效文件(也即确定是快捷连接),则可以直接输出0或者可以不对其进行处理而跳过该文件继续对后续文件进行处理。
通过上述过程可以实现仅对有效文件进行处理,以减少时间浪费,提高文件处理效率。
本申请实施例提供的一种文件处理方法,若确定文件访问路径不存在,则还可以包括:
发出文件访问路径错误的提示。
在本申请中,在判断文件访问路径是否存在时,若确定文件访问路径不存在,则可以发出文件访问路径错误的提示,以便于相关人员可以根据提示进行文件访问路径查看和核对,从而便于相关人员能够尽快提供有效的文件访问路径。
本申请实施例还提供了一种文件处理装置,参见图6,其示出了本申请实施例提供的一种文件处理装置的结构示意图,可以包括:
接收模块51,用于接收文件访问路径,判断文件访问路径是否存在;
第一判断模块52,用于若存在,则判断文件访问路径对应的是否为文件夹;
第一生成模块53,用于若是文件夹,则根据文件夹生成文件夹流,并对文件夹流进行遍历,且生成与文件夹流对应的文件对象;
删除模块55,用于将文件对象存储到内存中,根据文件对象获取对应文件的大小,并检测文件夹中是否存在完成遍历且被利用完的已知大小的文件,若存在则将文件对应的文件对象从内存中删除;
获取模块55,用于根据文件夹中各文件的大小,获取文件夹文件总大小。
本申请实施例提供的一种文件处理装置,还可以包括:
第二判断模块,用于判断文件夹中是否存在子文件夹;
筛选模块,用于若文件夹中存在子文件夹,则从文件夹中筛选出子文件夹;
相应地,第一生成模块53可以包括:
第一生成单元,用于根据文件夹中与子文件夹位于同一层级的文件生成文件夹流;
第二生成单元,用于根据子文件夹中包含的文件生成子文件夹流;
第一遍历单元,用于对文件夹流进行遍历,且在完成对文件夹流的遍历后对子文件夹流进行遍历。
本申请实施例提供的一种文件处理装置,还可以包括:
第二生成模块,用于在生成文件夹流之后,根据文件夹流生成迭代器;
相应地,第一生成模块53可以包括:
第二遍历单元,用于利用迭代器对文件夹流进行遍历。
本申请实施例提供的一种文件处理装置,还可以包括:
第三生成模块,用于若确定文件访问路径对应是访问文件,生成与访问文件对应的文件对象,并将与访问文件对应的文件对象存储到内存中,且根据与访问文件对应的文件对象获取访问文件的大小。
本申请实施例提供的一种文件处理装置,还可以包括:
第三判断模块,用于在对文件夹流进行遍历时,判断文件夹流中的文件是否为有效文件;
执行模块,用于若文件是有效文件,则执行在遍历时生成与文件夹流对应的文件对象的步骤。
本申请实施例提供的一种文件处理装置,还可以包括:
发出提示模块,用于若确定文件访问路径不存在,发出文件访问路径错误的提示。
本申请实施例还提供了一种文件处理设备,参见图7,其示出了本申请实施例提供的一种文件处理设备的结构示意图,该文件处理设备可以为计算机设备,该计算机设备可以为终端或者服务器,该文件处理设备可以包括:
存储器61,用于存储有计算机可读指令;
一个或者多个处理器62,用于执行存储器61存储的计算机可读指令,该计算机可读指令被处理器62执行时实现上述任意一个实施例的文件处理方法的步骤。
本申请实施例还提供了一种非易失性可读存储介质,该非易失性可读存储介质中存储有计算机可读指令,该计算机可读指令被一个或多个处理器执行时可实现上述任意一个实施例的文件处理方法的步骤。
该可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储计算机可读指令的介质。
本申请实施例提供的一种文件处理装置、设备及可读存储介质中相关部分的说明可以参见本申请实施例提供的一种文件处理方法中对应部分的详细说明,在此不再赘述。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。另外,本申请实施例提供的上述技术方案中与现有技术中对应技术方案实现原理一致的部分并未详细说明,以免过多赘述。
对所公开的实施例的上述说明,使本领域技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (12)

  1. 一种文件处理方法,其特征在于,包括:
    接收文件访问路径;
    在所述文件访问路径存在,且所述文件访问路径对应的是文件夹时,根据所述文件夹生成文件夹流,并对所述文件夹流进行遍历,且生成与所述文件夹流对应的文件对象;
    将所述文件对象存储到内存中,根据所述文件对象获取对应文件的大小,并检测到所述文件夹中存在完成遍历且被利用完的已知大小的文件,将所述文件对应的文件对象从所述内存中删除;和
    根据所述文件夹中各文件的大小,获取所述文件夹文件总大小。
  2. 根据权利要求1所述的文件处理方法,其特征在于,所述根据所述文件夹生成文件夹流之前,还包括:
    在所述文件夹中存在子文件夹时,从所述文件夹中筛选出所述子文件夹;
    所述根据所述文件夹生成文件夹轮流,并对所述文件夹流进行遍历,包括:
    根据所述文件夹中与所述子文件夹位于同一层级的文件生成文件夹流;
    根据所述子文件夹中包含的文件生成子文件夹流;和
    对所述文件夹流进行遍历,且在完成对所述文件夹流的遍历后对所述子文件夹流进行遍历。
  3. 根据权利要求1所述的文件处理方法,其特征在于,所述根据所述文件夹生成文件夹流之后,还包括:
    根据所述文件夹流生成迭代器;
    所述对所述文件夹流进行遍历,包括:
    利用所述迭代器对所述文件夹流进行遍历。
  4. 根据权利要求1所述的文件处理方法,其特征在于,在确定所述文件访问路径对应是访问文件,所述方法还包括:
    生成与所述访问文件对应的文件对象,并将与所述访问文件对应的文件对象存储到所述内存中,且根据与所述访问文件对应的文件对象获取所述访问文件的大小。
  5. 根据权利要求1所述的文件处理方法,其特征在于,所述对所述文件夹流进行遍历,包括:
    在所述文件夹流中的文件为有效文件时,执行所述对所述文件夹流进行遍历,且生成与所述文件夹流对应的文件对象的步骤。
  6. 根据权利要求1所述的文件处理方法,其特征在于,在确定所述文件访问路径不存在时,所述方法还包括:
    发出文件访问路径错误的提示。
  7. 根据权利要求1所述的文件处理方法,其特征在于,所述文件夹流为对所述文件夹中包含的文件进行排队生成的。
  8. 根据权利要求1所述的文件处理方法,其特征在于,所述生成与所述文件夹流对应的文件对象,包括:
    对所述文件夹中包含的文件依次进行读取,每读取一个文件,则生成与所述文件对应的文件对象。
  9. 一种文件处理装置,其特征在于,包括:
    接收模块,用于接收文件访问路径;
    第一生成模块,用于在所述文件访问路径存在,且所述文件访问路径对应的是文件夹时,根据所述文件夹生成文件夹流,并对所述文件夹流进行遍历,且生成与所述文件夹流对应的文件对象;
    删除模块,用于将所述文件对象存储到内存中,根据所述文件对象获取对应文件的大小,并检测到所述文件夹中存在完成遍历且被利用完的已知大小的文件,则将所述文件对应的文件对象从所述内存中删除;和
    获取模块,用于根据所述文件夹中各文件的大小,获取所述文件夹文件总大小。
  10. 根据权利要求7所述的文件处理装置,其特征在于,还包括:
    筛选模块,用于在所述文件夹中存在子文件夹时,从所述文件夹中筛选出所述子文件夹;
    所述第一生成模块包括:
    第一生成单元,用于根据所述文件夹中与所述子文件夹位于同一层级的文件生成文件夹流;
    第二生成单元,用于根据所述子文件夹中包含的文件生成子文件夹流;和
    遍历单元,用于对所述文件夹流进行遍历,且在完成对所述文件夹流的遍历后对所述子文件夹流进行遍历。
  11. 一种文件处理设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-8任意一项所述的方法的步骤。
  12. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-8任意一项所述的方法的步骤。
PCT/CN2021/142854 2021-08-10 2021-12-30 一种文件处理方法、装置、设备及可读存储介质 WO2023015830A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/261,060 US20240168921A1 (en) 2021-08-10 2021-12-30 File processing method, apparatus and device, and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110911019.1 2021-08-10
CN202110911019.1A CN113360462B (zh) 2021-08-10 2021-08-10 一种文件处理方法、装置、设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2023015830A1 true WO2023015830A1 (zh) 2023-02-16

Family

ID=77540860

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/142854 WO2023015830A1 (zh) 2021-08-10 2021-12-30 一种文件处理方法、装置、设备及可读存储介质

Country Status (3)

Country Link
US (1) US20240168921A1 (zh)
CN (1) CN113360462B (zh)
WO (1) WO2023015830A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360462B (zh) * 2021-08-10 2021-11-09 苏州浪潮智能科技有限公司 一种文件处理方法、装置、设备及可读存储介质
CN113836093B (zh) * 2021-09-29 2024-04-12 深圳万兴软件有限公司 一种网盘文件清理方法、系统、计算机设备及其存储介质
CN114443581B (zh) * 2022-04-11 2022-06-17 苏州浪潮智能科技有限公司 一种下载控制方法、装置、设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1947599A1 (en) * 2002-12-03 2008-07-23 Research In Motion Limited Method, system and computer software product for pre-selecting a folder for a message
CN101547161A (zh) * 2008-03-28 2009-09-30 阿里巴巴集团控股有限公司 文件夹传输系统、文件夹传输装置及文件夹传输方法
CN104731921A (zh) * 2015-03-26 2015-06-24 江苏物联网研究发展中心 Hadoop分布式文件系统针对日志型小文件的存储和处理方法
CN105306531A (zh) * 2015-09-17 2016-02-03 浪潮集团有限公司 一种基于Zip压缩方式的打包下载方法
CN110995830A (zh) * 2019-11-29 2020-04-10 武汉卓讯互动信息科技有限公司 一种网络资源处理方法和装置
CN112511633A (zh) * 2020-12-03 2021-03-16 苏州浪潮智能科技有限公司 一种海量小文件分块传输的方法、系统、设备及介质
CN113360462A (zh) * 2021-08-10 2021-09-07 苏州浪潮智能科技有限公司 一种文件处理方法、装置、设备及可读存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1947599A1 (en) * 2002-12-03 2008-07-23 Research In Motion Limited Method, system and computer software product for pre-selecting a folder for a message
CN101547161A (zh) * 2008-03-28 2009-09-30 阿里巴巴集团控股有限公司 文件夹传输系统、文件夹传输装置及文件夹传输方法
CN104731921A (zh) * 2015-03-26 2015-06-24 江苏物联网研究发展中心 Hadoop分布式文件系统针对日志型小文件的存储和处理方法
CN105306531A (zh) * 2015-09-17 2016-02-03 浪潮集团有限公司 一种基于Zip压缩方式的打包下载方法
CN110995830A (zh) * 2019-11-29 2020-04-10 武汉卓讯互动信息科技有限公司 一种网络资源处理方法和装置
CN112511633A (zh) * 2020-12-03 2021-03-16 苏州浪潮智能科技有限公司 一种海量小文件分块传输的方法、系统、设备及介质
CN113360462A (zh) * 2021-08-10 2021-09-07 苏州浪潮智能科技有限公司 一种文件处理方法、装置、设备及可读存储介质

Also Published As

Publication number Publication date
CN113360462A (zh) 2021-09-07
US20240168921A1 (en) 2024-05-23
CN113360462B (zh) 2021-11-09

Similar Documents

Publication Publication Date Title
WO2023015830A1 (zh) 一种文件处理方法、装置、设备及可读存储介质
CN102629247B (zh) 一种数据处理方法、装置和系统
US20140136575A1 (en) Log-structured garbage collection
US10298649B2 (en) Guaranteeing stream exclusivity in a multi-tenant environment
US11494403B2 (en) Method and apparatus for storing off-chain data
CN107590144A (zh) 一种文件存储方法和终端
CN108573019B (zh) 一种数据迁移方法、装置、电子设备及可读存储介质
US20140244582A1 (en) Apparatus and Methods for Selective Location and Duplication of Relevant Data
US11182378B2 (en) System and method for committing and rolling back database requests
WO2019076102A1 (zh) 一种数据回滚方法、系统、设备及计算机可读存储介质
CN107977296A (zh) 一种nas存储系统性能测试的方法、装置和介质
CN109040191A (zh) 文件下载方法、装置、计算机设备和存储介质
US20170199889A1 (en) Method and device for identifying junk picture files
CN113448946B (zh) 数据迁移方法及装置、电子设备
CN109947712A (zh) 计算框架内自动合并文件的方法、系统、设备及介质
WO2022037016A1 (zh) 一种树结构数据的存储方法、系统及相关装置
CN110069466B (zh) 一种面向分布式文件系统的小文件存储方法及装置
US7386692B1 (en) Method and apparatus for quantized deadline I/O scheduling
WO2024082525A1 (zh) 一种文件快照方法、系统、电子设备及存储介质
US20080222221A1 (en) Reducing database fragmentation
WO2019109538A1 (zh) 一种分布式数据存储方法及装置
CN110515861A (zh) 处理刷写命令的存储设备及其方法
TWI528190B (zh) 異質性儲存伺服器及其檔案儲存方法
CN107547607A (zh) 一种集群迁移方法及装置
CN112269763A (zh) 一种文件聚合方法及相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21953431

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18261060

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE