CN118035177A - File management method, device, computer equipment and storage medium - Google Patents

File management method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN118035177A
CN118035177A CN202410173777.1A CN202410173777A CN118035177A CN 118035177 A CN118035177 A CN 118035177A CN 202410173777 A CN202410173777 A CN 202410173777A CN 118035177 A CN118035177 A CN 118035177A
Authority
CN
China
Prior art keywords
file
files
storage
directory
stored
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202410173777.1A
Other languages
Chinese (zh)
Inventor
夏秀权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Comen Medical Instruments Co Ltd
Original Assignee
Shenzhen Comen Medical Instruments Co Ltd
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 Shenzhen Comen Medical Instruments Co Ltd filed Critical Shenzhen Comen Medical Instruments Co Ltd
Priority to CN202410173777.1A priority Critical patent/CN118035177A/en
Publication of CN118035177A publication Critical patent/CN118035177A/en
Pending legal-status Critical Current

Links

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/14Details of searching files based on file metadata
    • G06F16/156Query results presentation
    • 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/13File access structures, e.g. distributed indices
    • 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
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/74Browsing; Visualisation therefor
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Primary Health Care (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Epidemiology (AREA)
  • Radiology & Medical Imaging (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Human Computer Interaction (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of file management, and discloses a file management method, a device, computer equipment and a storage medium, wherein when the pre-acquired storage space and a storage directory structure are determined to be free from abnormality, all files under the storage directory structure and attribute information of each file are acquired, and when the storage space and the storage directory structure are determined to be free from abnormality, the subsequent file management can be continued; on the basis, all files are ordered according to the attribute information of each file to obtain a file list, wherein the file list comprises directory information corresponding to each file, and all files are ordered, so that the stored file data in the storage space can be accurately mastered; and finally, storing the pre-acquired files to be stored according to the directory information corresponding to the files in the file list, thereby improving the efficiency of file storage.

Description

File management method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of file management technologies, and in particular, to a file management method, a device, a computer device, and a storage medium.
Background
The video laryngoscope mainly collects image data of a patient through a camera, and records the data of the patient in a photographing or video recording mode. In the subsequent operations of playing back, searching and the like on the acquired image data, as the chip carried by the video laryngoscope device has lower calculation force, and when the picture capacity is overlarge, and the operations of storing, playing back and searching are carried out, the problems of slow loading and blocking exist, so that a file management method under the condition of limited calculation force needs to be provided so as to accelerate the loading and displaying of files.
Disclosure of Invention
In view of the above, the present invention provides a file management method, apparatus, computer device and storage medium, so as to solve the problem of low file loading processing efficiency caused by low computing power.
In a first aspect, the present invention provides a file management method, including: when the pre-acquired storage space and the storage directory structure are determined to be abnormal, acquiring all files of a preset type under the storage directory structure and attribute information of each file;
Sorting all files according to the attribute information of each file to obtain a file list, wherein the file list comprises directory information corresponding to each file;
And storing the pre-acquired files to be stored according to the corresponding directory information of the files in the file list.
The method has the advantages that when the fact that the pre-acquired storage space and the storage directory structure are not abnormal is determined, all files under the storage directory structure and attribute information of each file are acquired, and when the fact that the storage space and the storage directory structure are not abnormal is determined, the follow-up file management can be continued; on the basis, all files are ordered according to the attribute information of each file to obtain a file list, wherein the file list comprises directory information corresponding to each file, and all files are ordered, so that the stored file data in the storage space can be accurately mastered; and finally, storing the pre-acquired files to be stored according to the directory information corresponding to the files in the file list, thereby improving the file storage efficiency, acquiring the information of all the corresponding files under the corresponding directory structure in the storage space in advance, reducing the requirement on calculation force when the files are stored later, and further improving the file management efficiency.
In an alternative embodiment, determining that the pre-acquired storage space and the storage directory structure are not abnormal specifically includes:
when the pre-acquired storage space is determined to be readable, acquiring a storage directory structure in the storage space;
Traversing each piece of corresponding directory information in the storage directory structure and the number of files under each piece of directory information;
when the number of files is smaller than a preset threshold, the storage directory structure is not abnormal.
The method has the advantages that when the pre-acquired storage space is determined to be readable, the storage directory structure in the storage space is acquired, and the corresponding storage directory structure can be acquired only when the storage space is readable; further, all directory information included in the storage directory structure and the number of files under each directory information are traversed, and when the number of files is smaller than a preset threshold value, the storage directory structure is free of abnormality, so that a feasible foundation is provided for subsequent file management.
In an alternative embodiment, when the number of files is greater than a preset threshold, the method further includes:
Acquiring information of each directory under a storage directory structure;
and acquiring the file under the corresponding directory information according to each directory information.
The method has the beneficial effects that when the number of the files is larger than the preset threshold value, the calculation force required by directly managing the files at the moment is higher, under the condition, each piece of directory information under the storage directory structure is acquired, and the files under the corresponding directory information can be acquired respectively according to the directory information.
In an optional implementation manner, the directory information further includes an establishment time, and the storing of the pre-acquired file to be stored according to the directory information corresponding to the file in the file list specifically includes:
Determining a first storage directory of a file to be stored according to the establishment time of directory information corresponding to the file in the file list;
And storing the file to be stored to a position corresponding to the first storage catalog.
The method has the advantages that when the file to be stored is stored, the file to be stored is required to be determined according to the establishment time of the directory information corresponding to the file in the file list, the file to be stored can be stored in the position corresponding to the directory information closest to the establishment time by default, and when the file is stored, the position where the file is stored is planned, so that the computational effort occupation during file management is reduced later.
In an alternative embodiment, when the number of files included in the first storage directory is greater than a preset threshold, the method further includes:
Establishing a second storage catalog;
And storing the file to be stored to a position corresponding to the second storage catalog.
The method has the beneficial effects that when the number of the files included in the first storage directory is larger than the preset threshold value, the number of the files in the first storage directory is too large, and if the files are stored in the first storage directory continuously, more calculation resources are occupied when the subsequent files are managed, so that a second storage directory can be established after the first storage directory for storing the files to be stored, and the file loading speed is improved.
In an alternative embodiment, the file list further includes flag information corresponding to each file, where the flag information is used to identify a loading mode of the corresponding file.
The method has the advantages that according to the mark information, when the files are loaded, the loading mode corresponding to the files can be directly determined according to the mark information, each file is prevented from being identified, and the calculation force requirement is reduced.
In an alternative embodiment, after storing the file to be stored to the corresponding location, the method further comprises:
The file list is updated for subsequent management of the file according to the updated file list.
The file management method has the beneficial effects that the file list is updated in real time, so that when files are required to be loaded and managed, the file storage condition in the storage space can be mastered in time, the file management time is shortened, and the management efficiency is improved.
In a second aspect, the present invention provides a file management apparatus, the apparatus comprising:
The file acquisition module is used for acquiring all files of a preset type under the storage directory structure and attribute information of each file when the pre-acquired storage space and the storage directory structure are determined to be abnormal;
The ordering module is used for ordering all the files according to the attribute information of each file to obtain a file list, wherein the file list comprises directory information corresponding to each file;
and the storage module is used for storing the pre-acquired files to be stored according to the corresponding directory information of the files in the file list.
In a third aspect, the present invention provides a computer device comprising: the file management system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the file management method of the first aspect or any corresponding implementation mode is executed.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the file management method of the first aspect or any of the embodiments corresponding thereto.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a file management method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a file management method suitable for use in an embodiment of the present invention;
FIG. 3 is a schematic diagram of a file management method according to an embodiment of the present invention;
FIG. 4 is a flow chart of yet another file management method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a file management method according to an embodiment of the present invention;
FIG. 6 is a flow chart of another file management method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a file management method according to an embodiment of the present invention;
FIG. 8 is a block diagram of a file management apparatus according to an embodiment of the present invention;
Fig. 9 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
According to an embodiment of the present invention, there is provided a file management method embodiment, it being noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in an order other than that shown or described herein.
In this embodiment, a file management method is provided, and fig. 1 is a flowchart of a file management method according to an embodiment of the present invention. The file management method in the embodiment of the invention can be applied to the conditions of triggering photographing, video recording, playback and the like of video/image data of patients in a video laryngoscope. The video laryngoscope mainly collects image data of a patient through the camera, adopts a photographing or video recording mode to record the data of the patient, and because the chip carried by the video laryngoscope has lower calculation power, when the picture capacity is overlarge, the video laryngoscope stores or plays back the operation, the instrument is blocked, and the function is invalid.
As shown in fig. 1, the flow of the file management method includes the following steps:
in step S101, when it is determined that the pre-acquired storage space and the storage directory structure are not abnormal, all files of a preset type under the storage directory structure and attribute information of each file are acquired.
Illustratively, before managing the file, it is first determined whether there is an abnormality in the storage space of the file, and when there is an abnormality, the file in the storage space cannot be managed. Determining whether an exception is made may determine whether the storage space and the storage directory structure are abnormal by a decision function.
Under the condition that the storage space and the storage directory structure are not abnormal, acquiring the file of the preset type under the storage module structure, and determining the preset type of the file according to the file type in the management file. For example, in a video laryngoscope, where it is desired to manage picture files, the file may be a file that obtains all picture types under a storage directory structure.
The file attribute information is a directory name and a storage time of the corresponding file, and the specific obtaining method may be obtained according to the name of the file, for example, high-speed loading of a large number of files may be realized, a directory structure may be involved, and the file is named and stored according to the directory structure, as shown in fig. 2, a naming format of the directory storing the file in the folder is: 01,02 …, 99; the named structure of the file is "(directory name) - ((year)) (month) ((day) ((time division)) (second)") (flag bit, including picture flag bit and status flag bit) ", for example: 01-20221010101020 ~ 1, in particular, the directory of photos can be managed by GetPhotoMenu function. This function may include the following function 1. Manage picture catalogs; 2. recording directory names and picture quantity information, acquiring the currently used directory names, and generating photo names according to naming rules.
Step S102, according to the attribute information of each file, all the files are ordered to obtain a file list, wherein the file list comprises directory information corresponding to each file.
For example, after all the files of the preset type under the storage directory structure are obtained, all the files may be sorted to obtain a corresponding file list. Here, when sorting, the sorting may be performed according to the file names in the attribute information, for example, as shown in fig. 2, the file names include directory names, and when sorting, firstly, sorting is performed by directory names, and secondly, when there are a plurality of files in one directory, sorting is performed according to the creation time of the files, thereby obtaining a file list. The file information in the file list obtained in this way is clear at a glance, so that the management of the files is facilitated.
Step S103, storing the pre-acquired files to be stored according to the corresponding directory information of the files in the file list.
For example, after the file list is obtained, when there is a file to be stored, the file to be stored may be stored with a directory time for which the setup time is latest, whereby the time for loading the file when storing the file may be reduced. Furthermore, on the basis of the file list, all information of the files of the preset type is acquired under the condition of smaller calculation power, so that the files can be quickly positioned in any management operation on the files in the follow-up process.
The implementation of the above embodiments is further explained in a specific embodiment.
And after each startup, a background thread is created to initialize the SD card, a picture file linked list is created, a photo name is created according to GetPhotoMenu functions during photographing, and the photo name is stored in the linked list, and the whole flow is shown in figure 3.
Step 1: creating SD card initialization threads
Step 2: judging whether the SD card state and the directory structure are normal or not, and if not, entering the step 3; if the step is normal, the step 4 is carried out;
Step 3: reinitializing the SD card catalog, if successful, entering the step 2, and if failed, exiting and prompting the user;
Step 4: traversing all picture files under a directory structure in the SD, arranging the picture files to a linked list current_file_list according to the sequence of file names from large to small, and recording directory names and picture quantity information by GetPhotoMenu functions;
Step 5: after the initialization of the SD card is completed, the photographing button enters an enabling state;
step 6: acquiring the name of the currently used directory through GetPhotoMenu functions during photographing, and generating a photo name according to a naming rule;
Step 7: and determining the position of the photo in the linked list current_file_list according to the photo names from big to small, and recording the photo names as NUM, thereby facilitating the quick insertion of the newly shot photo.
All photos of the SD card can be managed, a basis is provided for accelerating photo loading, and because the new directory structure combines the photo names with the positions of the directories, the position storage information is omitted, the new addition and deletion are convenient, the upper limit of the file storage of each directory is set to be 1 ten thousand, the photo loading time and resources are shortened, and the use experience of a user is not influenced.
According to the file management method provided by the embodiment, when the fact that the pre-acquired storage space and the storage directory structure are not abnormal is determined, all files under the storage directory structure and attribute information of each file are acquired, and when the fact that the storage space and the storage directory structure are not abnormal is determined, subsequent file management can be continued; on the basis, all files are ordered according to the attribute information of each file to obtain a file list, wherein the file list comprises directory information corresponding to each file, and all files are ordered, so that the stored file data in the storage space can be accurately mastered; and finally, storing the pre-acquired files to be stored according to the directory information corresponding to the files in the file list, thereby improving the file storage efficiency, acquiring the information of all the corresponding files under the corresponding directory structure in the storage space in advance, reducing the requirement on calculation force when the files are stored later, and further improving the file management efficiency.
In this embodiment, a file management method is provided, and fig. 4 is a flowchart of the file management method according to an embodiment of the present invention, as shown in fig. 4, the flowchart includes the following steps:
in step S401, when it is determined that the pre-acquired storage space and the storage directory structure are not abnormal, all files of the preset type under the storage directory structure and attribute information of each file are acquired.
Specifically, the implementation step of determining that the pre-acquired storage space and the storage directory structure are not abnormal in the step S401 includes:
in step S4011, when it is determined that the pre-acquired storage space is readable, a storage directory structure in the storage space is acquired.
Step S4012, traversing each piece of directory information corresponding to the stored directory structure, and the number of files under each piece of directory information.
In step S4013, when the number of files is smaller than a preset threshold, the storage directory structure is not abnormal.
Illustratively, in determining whether the storage space and the storage directory structure are abnormal or not, it may be implemented by the manner in this embodiment, in addition to the implementation by the judgment function.
As described below, it is first required to determine whether the corresponding hardware device in the storage space is readable, and if so, the storage space is not abnormal, for example, the corresponding hardware device may be a memory card or the like. Under the readable condition, the corresponding storage directory structure in the storage card is read, each directory information in the storage directory structure and the number of files under each directory information are traversed, and when the number of files under each file directory is smaller than a preset threshold value, the storage directory structure is free from abnormality.
In a specific embodiment, when the number of files is greater than a preset threshold, the method further includes:
Acquiring information of each directory under a storage directory structure;
and acquiring the file under the corresponding directory information according to each directory information.
When the number of files is greater than a preset threshold, the number of files is more, and a long time is required for loading the files, in this case, all the files are not required to be loaded, and only the files included under the directory where the files are located need to be loaded.
Taking the loading of pictures in a video laryngoscope as an example, the above embodiment will be described, as shown in fig. 5.
Step a: entering a picture browsing interface
Step b: judging whether the state of the SD card and the picture capacity are more than 1 ten thousand, if so, entering the step c; if not, entering the step d;
Step c: initializing a picture catalog (firstly loading a corresponding catalog, then loading pictures in the corresponding catalog according to clicking the catalog), clicking the catalog, and then entering a step d to initialize a picture file under the catalog;
Step d: initializing window drawing resources and creating a background thread to copy a linked list initialized by starting up into a picture information display linked list.
Step e: after the initialization of the picture display chain table is completed, initializing a picture zone bit itemTop and a state zone bit paintBMP;
Step f: and creating a virtual memory DC, and loading the picture according to the picture flag bits itemTop and the state flag bits paintBMP.
Step S402, according to the attribute information of each file, all the files are ordered to obtain a file list, wherein the file list comprises directory information corresponding to each file. Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S403, storing the pre-acquired files to be stored according to the corresponding directory information of the files in the file list. Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
In this embodiment, a file management method is provided, and fig. 6 is a flowchart of the file management method according to an embodiment of the present invention, as shown in fig. 6, the flowchart includes the following steps:
In step S601, when it is determined that the pre-acquired storage space and the storage directory structure are not abnormal, all files of a preset type under the storage directory structure and attribute information of each file are acquired. Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S602, according to the attribute information of each file, all the files are ordered to obtain a file list, wherein the file list comprises directory information corresponding to each file. Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S603, storing the pre-acquired files to be stored according to the corresponding directory information of the files in the file list.
Specifically, the directory information further includes an establishment time, and the step S603 includes:
In step S6031, the first storage directory of the file to be stored is determined according to the set-up time of the directory information corresponding to the file in the file list.
Step S6032, storing the file to be stored in the position corresponding to the first storage catalog.
For example, when storing files, the latest stored files are stored under the latest new directory, so that the files to be stored can be classified into a file list later.
In some embodiments, when the number of files included in the first storage directory is greater than a preset threshold, the method further comprises:
Establishing a second storage catalog;
And storing the file to be stored to a position corresponding to the second storage catalog.
For example, when the number of files in the first storage directory is too many, for example, more than ten thousand files, the files need to be loaded later when the files are stored, so that the files under the directory of the corresponding files can be loaded without loading too many files, and the calculation force requirement is reduced. It will be appreciated that this example of more than ten thousand documents is not meant to be limiting for this case only, as other cases requiring greater computing power may also apply.
On the basis of the above embodiment, the file list further includes flag information corresponding to each file, where the flag information is used to identify a loading mode of the corresponding file.
For example, when loading or displaying the files, the display modes of different files are different, some files are directly displayed, and some files are not allowed to be displayed, so that the identification information of each file can be included in the file list, and when loading or displaying, the files can be loaded and displayed directly according to the identification information, and the calculation force requirement is reduced.
For example, after loading the file list is completed, initializing a picture flag bit itemTop and a status flag bit paintBMP; and creating a virtual memory DC, and loading the picture according to the picture flag bits itemTop and the state flag bits paintBMP.
When loading the picture, the sliding display process of the file is involved, so that the interface is quickly refreshed and displayed through the picture zone bit itemTop and the state zone bit paintBMP. The display file can be refreshed by changing the picture flag bits itemTop, refreshing in the moving process is accelerated by the state flag bits paintBMP, the thumbnail is not refreshed in the moving process, whether the thumbnail is still in the moving state is judged in time by a timer, and the latest position thumbnail is refreshed in time as shown in fig. 7. The corresponding implementation in fig. 7 is the prior art and will not be described here again.
In some embodiments, after storing the file to be stored to the corresponding location, the method further comprises:
The file list is updated for subsequent management of the file according to the updated file list.
The file list is updated in real time after any file of a preset type under the directory structure is operated, so that the real-time property of the file list is maintained, and file loading can be realized under the condition of low calculation power at any time.
In this embodiment, a file management apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and will not be described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a file management apparatus, as shown in fig. 8, including:
The file obtaining module 801 is configured to obtain all files of a preset type under the storage directory structure and attribute information of each file when it is determined that the pre-obtained storage space and the storage directory structure are not abnormal;
the sorting module 802 is configured to sort all the files according to attribute information of each file, so as to obtain a file list, where the file list includes directory information corresponding to each file;
The storage module 803 is configured to store the pre-acquired file to be stored according to the directory information corresponding to the file in the file list.
In some embodiments, in the file obtaining module, determining that the pre-obtained storage space and the storage directory structure are not abnormal specifically includes:
The storage directory structure obtaining unit is used for obtaining a storage directory structure in the storage space when the pre-obtained storage space is determined to be readable;
The traversing file unit is used for traversing each piece of corresponding directory information in the storage directory structure and the number of files under each piece of directory information;
And the judging unit is used for storing the directory structure without abnormality when the number of the files is smaller than a preset threshold value.
In some embodiments, in the judging unit, when the number of files is greater than a preset threshold, the device is configured to:
acquiring information of each directory under a storage directory structure; and acquiring the file under the corresponding directory information according to each directory information.
In some embodiments, the directory information further includes a setup time, and the storage module specifically includes:
The directory determining unit is used for determining a first storage directory of the file to be stored according to the establishment time of directory information corresponding to the file in the file list;
and the storage unit is used for storing the file to be stored to the position corresponding to the first storage catalog.
In some embodiments, when the number of files included in the first storage directory is greater than a preset threshold, the method further comprises:
establishing a second storage catalog; and storing the file to be stored to a position corresponding to the second storage catalog.
In some embodiments, the file list further includes flag information corresponding to each file, where the flag information is used to identify a loading mode of the corresponding file.
In some embodiments, after storing the file to be stored to the corresponding location, the apparatus is further configured to:
The file list is updated for subsequent management of the file according to the updated file list.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The file management apparatus in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application SPECIFIC INTEGRATED Circuit) Circuit, a processor and a memory that execute one or more software or firmware programs, and/or other devices that can provide the above functions.
The embodiment of the invention also provides computer equipment, which is provided with the file management device shown in the figure 8.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 9, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some implementations, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 9.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. A method of file management, the method comprising:
when the pre-acquired storage space and the storage directory structure are determined to be abnormal, acquiring all files of a preset type under the storage directory structure and attribute information of each file;
Sorting all the files according to the attribute information of each file to obtain a file list, wherein the file list comprises directory information corresponding to each file;
and storing the pre-acquired files to be stored according to the corresponding directory information of the files in the file list.
2. The method of claim 1, wherein determining that the pre-fetched storage space and the storage directory structure are free of anomalies comprises:
when the pre-acquired storage space is determined to be readable, acquiring a storage directory structure in the storage space;
Traversing each corresponding directory information in the storage directory structure and the number of files under each directory information;
and when the number of the files is smaller than a preset threshold value, the storage directory structure is not abnormal.
3. The file management method according to claim 2, wherein when the number of files is greater than a preset threshold, the file management method further comprises:
acquiring each piece of directory information under the storage directory structure;
and acquiring the files under the corresponding directory information according to each directory information.
4. The method according to claim 3, wherein the directory information further includes an establishment time, and the storing the pre-acquired file to be stored according to the directory information corresponding to the file in the file list includes:
determining a first storage directory of the file to be stored according to the establishment time of directory information corresponding to the file in the file list;
And storing the file to be stored to a position corresponding to the first storage catalog.
5. The file management method according to claim 4, wherein when the number of files included in said first storage directory is greater than a preset threshold, said file management method further comprises:
Establishing a second storage catalog;
And storing the file to be stored to a position corresponding to the second storage catalog.
6. The method according to any one of claims 1 to 5, wherein the file list further includes flag information corresponding to each file, the flag information being used to identify a loading manner of the corresponding file.
7. The file management method according to any one of claims 1 to 5, wherein after storing the file to be stored to a corresponding location, the file management method further comprises:
And updating the file list so as to manage the files according to the updated file list.
8. A file management apparatus, characterized in that the file management apparatus comprises:
The file acquisition module is used for acquiring all files of a preset type under the storage directory structure and attribute information of each file when the pre-acquired storage space and the storage directory structure are determined to be abnormal;
the ordering module is used for ordering all the files according to the attribute information of each file to obtain a file list, wherein the file list comprises directory information corresponding to each file;
And the storage module is used for storing the pre-acquired files to be stored according to the corresponding directory information of the files in the file list.
9. A computer device, comprising:
A memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the file management method of any of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the file management method of any one of claims 1 to 7.
CN202410173777.1A 2024-02-06 2024-02-06 File management method, device, computer equipment and storage medium Pending CN118035177A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410173777.1A CN118035177A (en) 2024-02-06 2024-02-06 File management method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410173777.1A CN118035177A (en) 2024-02-06 2024-02-06 File management method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118035177A true CN118035177A (en) 2024-05-14

Family

ID=90988578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410173777.1A Pending CN118035177A (en) 2024-02-06 2024-02-06 File management method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118035177A (en)

Similar Documents

Publication Publication Date Title
KR100760227B1 (en) Image file management apparatus and method and storage medium
KR100653872B1 (en) Moving image management method and apparatus
US20150177938A1 (en) Providing access to a cloud based content management system on a mobile device
US20150156247A1 (en) Client-Side Bulk Uploader
US10455110B2 (en) Suggesting image files for deletion based on image file parameters
US20050091270A1 (en) Digital negatives
JP2010134920A (en) Image storage apparatus and program
US20170364303A1 (en) Suggesting image files for deletion based on image file parameters
CN110188216B (en) Photo live broadcasting system with character recognition and method thereof
CN111538719A (en) Data migration method, device, equipment and computer storage medium
CN111399753B (en) Method and device for writing pictures
CN113448946B (en) Data migration method and device and electronic equipment
CN114116611A (en) File scanning method and related device
CN110166790B (en) Live photo broadcasting system with face recognition function and method thereof
CN112433669A (en) Method, system, equipment and medium for online migration of distributed storage volume
CN118035177A (en) File management method, device, computer equipment and storage medium
CN111966533B (en) Electronic file management method, electronic file management device, computer equipment and storage medium
CN105808586A (en) Picture data processing method and apparatus
CN117215477A (en) Data object storage method, device, computer equipment and storage medium
CN113918519A (en) Folder loading method and device and terminal equipment
CN110765290A (en) Picture storage method, reading method, device and access system
CN116991815B (en) Log collection method, device, equipment and medium of distributed storage system
US8176285B2 (en) Importing media content items
KR101961547B1 (en) Apparatus for processing virtual file system and method thereof
CN115526161A (en) Document version management method, system and device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination