[go: up one dir, main page]

CN114385548A - A file storage management method and system - Google Patents

A file storage management method and system Download PDF

Info

Publication number
CN114385548A
CN114385548A CN202111520550.2A CN202111520550A CN114385548A CN 114385548 A CN114385548 A CN 114385548A CN 202111520550 A CN202111520550 A CN 202111520550A CN 114385548 A CN114385548 A CN 114385548A
Authority
CN
China
Prior art keywords
file
storage
directory
instruction
management method
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
CN202111520550.2A
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.)
Bnc Technologies Co ltd
Original Assignee
Bnc Technologies 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 Bnc Technologies Co ltd filed Critical Bnc Technologies Co ltd
Priority to CN202111520550.2A priority Critical patent/CN114385548A/en
Publication of CN114385548A publication Critical patent/CN114385548A/en
Pending legal-status Critical Current

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/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • 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
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices

Landscapes

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

Abstract

本发明涉及一种文件存储管理方法及系统,所述方法包括:预设多个用于进行文件管理的操作指令,并根据用户从多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。本发明的技术方案主要针对小型系统应用场景,通过采用类数据库方式对文件进行远程管理服务,在方便快捷的同时,也保证了文件管理的可靠性。

Figure 202111520550

The invention relates to a file storage management method and system. The method includes: presetting a plurality of operation instructions for file management, and storing in a storage medium according to a target operation instruction selected by a user from the plurality of operation instructions. file management. The technical scheme of the present invention is mainly aimed at small system application scenarios, and by using a database-like manner to perform remote management services for files, the reliability of file management is also ensured while being convenient and fast.

Figure 202111520550

Description

一种文件存储管理方法及系统A file storage management method and system

技术领域technical field

本发明涉及文件管理技术领域,尤其涉及一种文件存储管理方法及系统。The invention relates to the technical field of file management, in particular to a file storage management method and system.

背景技术Background technique

随着社会的进步与发展,各行各业需要监测、存储数据的应用场景越来越多。智慧化城市,需要采集大量摄像机视频数据;行车记录仪,需要采集车内外摄像机视频、语音数据;智能化监测设备,采集存储各种传感器数据,例如监测汽车发动机的转速、温度、油压等等数据;船载、机载、车载的“黑匣子”,实时记录内部视频、通话语音、传感器等数据。各种数据存储时要形成文件,并且需要对文件进行管理。With the progress and development of society, there are more and more application scenarios that need to monitor and store data in all walks of life. A smart city needs to collect a large amount of video data from cameras; a driving recorder needs to collect video and voice data from cameras inside and outside the car; intelligent monitoring equipment collects and stores various sensor data, such as monitoring the speed, temperature, oil pressure of the car engine, etc. Data; shipboard, airborne, and vehicle-mounted "black boxes" record data such as internal video, voice calls, and sensors in real time. When various data are stored, files need to be formed, and files need to be managed.

当前文件存储管理存在以下不足:很多数据存储应用场景,例如嵌入式的数据记录设备,数据量不大,功能要求简单,具备简单的添加、删除、查找文件功能就满足要求,使用数据库是“大材小用”;使用数据库需要学习数据库语言,需要花费学习成本;嵌入式设备的应用环境,多数没有掉电保护功能,断电时可能会出现数据库内信息与硬盘的实际文件不一致现象。The current file storage management has the following deficiencies: Many data storage application scenarios, such as embedded data recording devices, have a small amount of data and simple function requirements. Simple functions of adding, deleting, and searching files can meet the requirements. Using a database is "overkilled" ”; to use the database, it is necessary to learn the database language, and the cost of learning is required; most of the application environments of embedded devices do not have power-off protection functions, and there may be inconsistencies between the information in the database and the actual files on the hard disk when the power is off.

发明内容SUMMARY OF THE INVENTION

为解决上述技术问题,本发明提供了一种文件存储管理方法及系统。In order to solve the above technical problems, the present invention provides a file storage management method and system.

本发明的一种文件存储管理方法的技术方案如下:The technical scheme of a file storage management method of the present invention is as follows:

S1、预设多个用于进行文件管理的操作指令;S1, preset multiple operation instructions for file management;

S2、接收并根据用户从所述多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。S2. Receive and manage the files stored in the storage medium according to the target operation instructions selected by the user from the plurality of operation instructions.

本发明的一种文件存储管理方法的有益效果如下:The beneficial effects of a file storage management method of the present invention are as follows:

本发明的方法通过预设多个用于进行文件管理的操作指令,并根据用户从多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。因此,本发明的方法针对小型系统应用场景,采用类数据库方式对文件进行远程管理服务,在方便快捷的同时,也保证了文件管理的可靠性。The method of the present invention manages the files stored in the storage medium by presetting a plurality of operation instructions for file management, and according to the target operation instructions selected by the user from the plurality of operation instructions. Therefore, the method of the present invention adopts a database-like manner to perform remote management services for files for small system application scenarios, which is convenient and quick, and also ensures the reliability of file management.

在上述方案的基础上,本发明的一种文件存储管理方法还可以做如下改进。On the basis of the above solution, a file storage management method of the present invention can be further improved as follows.

进一步,在所述步骤S2之前,还包括:Further, before the step S2, it also includes:

S02、按照存储时间的先后顺序,对所述存储介质中的所有存储文件进行排列,得到第一目录文件列表;S02, according to the order of storage time, arrange all the storage files in the storage medium to obtain a first directory file list;

在所述步骤S2之后,还包括:After the step S2, it also includes:

S3、判断执行所述目标操作指令后的所述第一目录文件列表是否发生变化,若是,更新所述第一目录文件列表。S3. Determine whether the first directory file list changes after the target operation instruction is executed, and if so, update the first directory file list.

采用上述进一步方案的有益效果是:能够保证存储介质中的所有存储文件按时间由最新到最早排序方式同步到目录文件列表中。The beneficial effect of adopting the above-mentioned further solution is that it can ensure that all the stored files in the storage medium are synchronized to the directory file list in a time sequence from the latest to the earliest.

进一步,所述步骤S2具体包括:Further, the step S2 specifically includes:

当所述目标操作指令为添加指令时,获取添加文件的日期属性和数据类型,并将所述添加文件存入至所述日期属性对应的日期目录的所述数据类型对应的通道目录中。When the target operation instruction is an add instruction, the date attribute and data type of the added file are acquired, and the added file is stored in the channel directory corresponding to the data type of the date directory corresponding to the date attribute.

进一步,所述步骤S2还包括:Further, the step S2 also includes:

判断所述添加文件的文件时长是否大于预设时长,若是,则将所述添加文件拆分为多个子添加文件,并按照添加时间的先后顺序对所述多个子添加文件进行命名。It is judged whether the file duration of the added file is greater than the preset duration, and if so, the added file is divided into multiple sub-added files, and the multiple sub-added files are named according to the order of adding time.

采用上述进一步方案的有益效果是:将添加文件进行拆分,避免文件数据过大造成丢失。The beneficial effect of adopting the above-mentioned further scheme is: splitting the added file to avoid loss caused by excessively large file data.

进一步,所述步骤S2具体包括:Further, the step S2 specifically includes:

当所述目标操作指令为查找指令时,遍历所述第一目录文件列表,返回所述查找指令对应的存储文件的文件信息。When the target operation instruction is a search instruction, the first directory file list is traversed, and the file information of the storage file corresponding to the search instruction is returned.

进一步,所述步骤S2具体包括:Further, the step S2 specifically includes:

当所述目标操作指令为删除指令时,将所述删除指令对应的存储文件从所述第一目录文件列表中删除。When the target operation instruction is a deletion instruction, the storage file corresponding to the deletion instruction is deleted from the first directory file list.

进一步,所述步骤S2具体包括:Further, the step S2 specifically includes:

当所述目标操作指令为下载指令时,遍历所述第一目录文件列表,根据预设通信协议向所述用户发送所述下载指令对应的存储文件。When the target operation instruction is a download instruction, the first directory file list is traversed, and a storage file corresponding to the download instruction is sent to the user according to a preset communication protocol.

进一步,还包括:判断所述存储介质的存储容量是否达到第一阈值,若是,则将所述第一目录文件列表中的后n个存储文件删除,直至所述存储介质的存储容量小于所述第一阈值,其中,n为正整数。Further, it also includes: judging whether the storage capacity of the storage medium reaches a first threshold, and if so, deleting the last n storage files in the first directory file list until the storage capacity of the storage medium is less than the The first threshold, where n is a positive integer.

采用上述进一步方案的有益效果是:当存储介质中的存储文件存储满后,不必人工干预进行删除文件,减少维护操作。The beneficial effect of adopting the above-mentioned further scheme is: when the storage files in the storage medium are full, there is no need for manual intervention to delete files, and maintenance operations are reduced.

进一步,还包括:判断所述存储介质的使用寿命是否达到第二阈值,若是,则向所述用户发送预警信息。Further, it also includes: judging whether the service life of the storage medium reaches a second threshold, and if so, sending early warning information to the user.

采用上述进一步方案的有益效果是:实时监测存储介质的工作状态,保证文件存储的可靠性。The beneficial effect of adopting the above-mentioned further scheme is that the working state of the storage medium is monitored in real time, so as to ensure the reliability of file storage.

本发明的一种文件存储管理系统的技术方案如下:The technical scheme of a file storage management system of the present invention is as follows:

包括:预配置模块和运行模块;Including: pre-configured modules and running modules;

所述预配置模块用于:预设多个用于进行文件管理的操作指令;The pre-configuration module is used for: pre-setting a plurality of operation instructions for file management;

所述运行模块用于:接收并根据用户从所述多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。The operation module is used for: receiving and managing the files stored in the storage medium according to the target operation instructions selected by the user from the plurality of operation instructions.

本发明的一种文件存储管理系统的有益效果如下:The beneficial effects of a file storage management system of the present invention are as follows:

本发明的系统通过预设多个用于进行文件管理的操作指令,并根据用户从多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。因此,本发明的系统针对小型系统应用场景,采用类数据库方式对文件进行远程管理服务,在方便快捷的同时,也保证了文件管理的可靠性。The system of the present invention manages the files stored in the storage medium by presetting multiple operation instructions for file management, and according to the target operation instructions selected by the user from the multiple operation instructions. Therefore, the system of the present invention adopts a database-like manner to perform remote management services for files for small system application scenarios, which is convenient and quick, and also ensures the reliability of file management.

本发明的一种存储介质的技术方案如下:A technical solution of a storage medium of the present invention is as follows:

存储介质中存储有指令,当计算机读取所述指令时,使所述计算机执行如本发明的一种文件存储管理方法的步骤。Instructions are stored in the storage medium, and when the computer reads the instructions, the computer is made to execute the steps of a file storage management method according to the present invention.

本发明的一种电子设备的技术方案如下:The technical scheme of a kind of electronic equipment of the present invention is as follows:

包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时,使所述计算机执行如本发明的一种文件存储管理方法的步骤。It includes a memory, a processor and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the computer program, the computer is made to execute a file storage management method according to the present invention. steps of the method.

附图说明Description of drawings

图1为本发明实施例的一种文件存储管理方法的流程示意图;1 is a schematic flowchart of a file storage management method according to an embodiment of the present invention;

图2为本发明实施例的一种文件存储管理方法中的创建第一目录文件列表的流程示意图;2 is a schematic flowchart of creating a first directory file list in a file storage management method according to an embodiment of the present invention;

图3本发明实施例的一种文件存储管理方法中的添加文件的流程示意图;3 is a schematic flowchart of adding a file in a file storage management method according to an embodiment of the present invention;

图4为本发明实施例的一种文件存储管理系统的结构示意图。FIG. 4 is a schematic structural diagram of a file storage management system according to an embodiment of the present invention.

具体实施方式Detailed ways

如图1所示,本发明实施例的一种文件存储管理方法,包括如下步骤:As shown in FIG. 1, a file storage management method according to an embodiment of the present invention includes the following steps:

S1、预设多个用于进行文件管理的操作指令;S1, preset multiple operation instructions for file management;

其中,在用户进行文件管理之前,预设多个操作指令;多个操作指令包括但不限于:添加、删除、查找、下载和标记等操作指令。Wherein, before the user performs file management, multiple operation instructions are preset; the multiple operation instructions include, but are not limited to, operation instructions such as adding, deleting, searching, downloading, and marking.

S2、接收并根据用户从所述多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。S2. Receive and manage the files stored in the storage medium according to the target operation instructions selected by the user from the plurality of operation instructions.

其中,接收用户通过远程访问的方式(以太网方式或者按照约定的通信协议的方式),从多个操作指令中选取任一指令对存储在存储介质中的文件进行管理。Wherein, the receiving user selects any instruction from a plurality of operation instructions to manage the files stored in the storage medium by means of remote access (Ethernet or according to the agreed communication protocol).

其中,目标操作指令为:预设的多个操作指令中的至少一个操作指令。Wherein, the target operation instruction is: at least one operation instruction among the preset multiple operation instructions.

其中,存储介质为市面上常见的用于存储文件的介质,包括不但不限于:磁盘和内存条等。Among them, the storage medium is a medium commonly used in the market for storing files, including but not limited to: a magnetic disk, a memory stick, and the like.

较优地,在所述步骤S2之前,还包括:Preferably, before the step S2, it also includes:

S02、按照存储时间的先后顺序,对所述存储介质中的所有存储文件进行排列,得到第一目录文件列表;S02, according to the order of storage time, arrange all the storage files in the storage medium to obtain a first directory file list;

其中,通过遍历存储介质中的所有存储文件,将存储介质中的所有存储文件按时间由最新到最早排序方式,得到第一目录文件列表。The first directory file list is obtained by traversing all the storage files in the storage medium, and sorting all the storage files in the storage medium by time from the latest to the earliest.

其中,第一目录文件列表的创建过程如图2所示,首先判断存储介质中的根目录下是否有日期目录,若是,则继续判断该日期目录下是否有通道目录,若是,则继续判断该通道目录下是否有文件,若是,则将该通道目录下的文件信息进行读取,并进行排序,并依次遍历该存储介质中根目录下的所有日期目录中的通道目录下的存储文件,最终将该存储介质中的所有存储文件按照时间顺序进行降序排列,得到第一目录文件列表。Among them, the creation process of the first directory file list is shown in Figure 2. First, it is judged whether there is a date directory under the root directory in the storage medium. If so, then continue to judge whether there is a channel directory under the date directory, and if so, continue to judge the date directory. Whether there is a file in the channel directory, if so, read the file information in the channel directory, sort it, and traverse the storage files in the channel directory in all date directories in the root directory of the storage medium in turn, and finally All the stored files in the storage medium are arranged in descending order according to the time sequence to obtain the first directory file list.

其中,通道目录是指对应日期目录下的不同数据类型文件的目录。The channel directory refers to a directory of files of different data types under the corresponding date directory.

在所述步骤S2之后,还包括:After the step S2, it also includes:

S3、判断执行所述目标操作指令后的所述第一目录文件列表是否发生变化,若是,更新所述第一目录文件列表。S3. Determine whether the first directory file list changes after the target operation instruction is executed, and if so, update the first directory file list.

其中,当用户执行了对应的目标操作指令后,判断第一目录文件列表是否发生变化,当发生变化时,按照将存储介质中的现有的所有存储文件按时间由最新到最早排序方式,对第一目录文件列表进行更新。例如,用户的操作指令为添加或删除指令时,对应的存储文件已经存储或删除,此时第一目录文件列表发送了变化,因此,将更新第一目录文件列表;又如用户的操作指令为下载或者查找指令时,此时存储文件并未发送变动,因此,不更新第一目录文件列表。Wherein, after the user executes the corresponding target operation instruction, it is determined whether the first directory file list has changed. The first directory file listing is updated. For example, when the user's operation instruction is an add or delete instruction, the corresponding storage file has been stored or deleted. At this time, the first directory file list is changed. Therefore, the first directory file list will be updated; for another example, the user's operation instruction is: When downloading or searching for an instruction, no changes are sent to the storage file at this time, and therefore, the file list of the first directory is not updated.

较优地,所述步骤S2具体包括:Preferably, the step S2 specifically includes:

当所述目标操作指令为添加指令时,获取添加文件的日期属性和数据类型,并将所述添加文件存入至所述日期属性对应的日期目录的所述数据类型对应的通道目录中。When the target operation instruction is an add instruction, the date attribute and data type of the added file are acquired, and the added file is stored in the channel directory corresponding to the data type of the date directory corresponding to the date attribute.

其中,添加文件的过程如图3所示。首先判断存储介质的根目录下是否有日期目录,若否,则按照当前时间创建日期目录,若是,则在该日期目录下判断是否有对应的通道目录,若否,则创建该添加文件所对应的通道目录,并将该添加文件存储至该通道目录中;若是,则直接将该添加文件存储至该通道目录中。The process of adding files is shown in Figure 3. First, determine whether there is a date directory in the root directory of the storage medium. If not, create a date directory according to the current time. If so, determine whether there is a corresponding channel directory in the date directory. If not, create the corresponding channel directory of the added file. and store the added file in the channel directory; if so, directly store the added file in the channel directory.

较优地,所述步骤S2还包括:Preferably, the step S2 further includes:

判断所述添加文件的文件时长是否大于预设时长,若是,则将所述添加文件拆分为多个子添加文件,并按照添加时间的先后顺序对所述多个子添加文件进行命名。It is judged whether the file duration of the added file is greater than the preset duration, and if so, the added file is divided into multiple sub-added files, and the multiple sub-added files are named according to the order of adding time.

其中,如图3所示,采用30分钟作为预设时长,若任一添加文件的文件时长大于预设时长,则重新创建新的子添加文件,以实现控制单个添加文件的大小;并且将新的子添加文件按照创建时间进行命名,便于后续进行排序。Among them, as shown in Figure 3, 30 minutes are used as the preset duration. If the duration of any added file is greater than the preset duration, a new sub-added file will be recreated to control the size of a single added file; The sub-added files are named according to the creation time, which is convenient for subsequent sorting.

较优地,所述步骤S2具体包括:Preferably, the step S2 specifically includes:

当所述目标操作指令为查找指令时,遍历所述第一目录文件列表,返回所述查找指令对应的存储文件的文件信息。When the target operation instruction is a search instruction, the first directory file list is traversed, and the file information of the storage file corresponding to the search instruction is returned.

其中,当用户需要查找需要的存储文件时,遍历所述第一目录文件列表,得到该存储文件,并向用户返回该存储文件的文件信息。Wherein, when the user needs to find the required storage file, the user traverses the first directory file list to obtain the storage file, and returns the file information of the storage file to the user.

较优地,所述步骤S2具体包括:Preferably, the step S2 specifically includes:

当所述目标操作指令为删除指令时,将所述删除指令对应的存储文件从所述第一目录文件列表中删除。When the target operation instruction is a deletion instruction, the storage file corresponding to the deletion instruction is deleted from the first directory file list.

其中,当用户需要删除对应的存储文件时,遍历所述第一目录文件列表,找出该存储文件,并将该存储文件从存储介质中删除。Wherein, when the user needs to delete the corresponding storage file, the user traverses the first directory file list, finds the storage file, and deletes the storage file from the storage medium.

较优地,所述步骤S2具体包括:Preferably, the step S2 specifically includes:

当所述目标操作指令为下载指令时,遍历所述第一目录文件列表,根据预设通信协议向所述用户发送所述下载指令对应的存储文件。When the target operation instruction is a download instruction, the first directory file list is traversed, and a storage file corresponding to the download instruction is sent to the user according to a preset communication protocol.

其中,当用户需要下载所需要的存储文件时,遍历所述第一目录文件列表,得到该存储文件,根据预设通信协议向所述用户发送所述下载指令对应的存储文件。预设通信协议为本领域常用于下载的通信协议,在此不过多赘述。Wherein, when the user needs to download the required storage file, traverse the first directory file list to obtain the storage file, and send the storage file corresponding to the download instruction to the user according to a preset communication protocol. The preset communication protocol is a communication protocol commonly used for downloading in the art, and details are not described here.

其中,除上述添加、删除、查找和下载指令外,还可包括:标记指令。Wherein, in addition to the above-mentioned adding, deleting, searching and downloading instructions, it may also include: marking instructions.

当用户的指令为标记指令时,查找第一目录文件列表,更新标记指令对应的存储文件的标签属性,将该存储文件备份至存储介质中的独立存储区域,避免被自动删除。When the user's instruction is a marking instruction, the first directory file list is searched, the tag attribute of the storage file corresponding to the marking instruction is updated, and the storage file is backed up to an independent storage area in the storage medium to avoid automatic deletion.

较优地,还包括:判断所述存储介质的存储容量是否达到第一阈值,若是,则将所述第一目录文件列表中的后n个存储文件删除,直至所述存储介质的存储容量小于所述第一阈值,其中,n为正整数。Preferably, it also includes: judging whether the storage capacity of the storage medium reaches a first threshold, and if so, deleting the last n storage files in the first directory file list until the storage capacity of the storage medium is less than The first threshold, where n is a positive integer.

其中,第一阈值是指存储介质的存储容量达到预设值,例如,第一阈值可以为90%,此时当存储介质的存储容量占用率达到90%,则对第一目录文件列表中的存储时间排列在最后的一个或多个存储文件进行删除,直到存储容量占用率低于90%。The first threshold means that the storage capacity of the storage medium reaches a preset value. For example, the first threshold may be 90%. At this time, when the storage capacity occupancy rate of the storage medium reaches 90%, the first directory file list will be Storage time ranks at the end of one or more storage files for deletion until storage capacity occupancy falls below 90%.

需要说明的是,第一阈值可根据需求进行更改,不限于本发明实施例中提到的数值。It should be noted that, the first threshold value can be changed according to requirements, and is not limited to the value mentioned in the embodiment of the present invention.

较优地,还包括:判断所述存储介质的使用寿命是否达到第二阈值,若是,则向所述用户发送预警信息。Preferably, the method further includes: judging whether the service life of the storage medium reaches a second threshold, and if so, sending early warning information to the user.

其中,第二阈值是指存储介质(可以是但不限于:磁盘)的使用寿命,例如,第二阈值可以为10%,此时当存储介质的可使用寿命小于10%时,向用户发送预警信息。The second threshold refers to the service life of the storage medium (which may be, but is not limited to, a magnetic disk). For example, the second threshold may be 10%. At this time, when the service life of the storage medium is less than 10%, an early warning is sent to the user. information.

需要说明的是,第二阈值可根据需求进行更改,不限于本发明实施例中提到的数值。It should be noted that, the second threshold can be changed according to requirements, and is not limited to the values mentioned in the embodiments of the present invention.

本实施例的方法通过预设多个用于进行文件管理的操作指令,并根据用户从多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。因此,本实施例的方法针对小型系统应用场景,采用类数据库方式对文件进行远程管理服务,在方便快捷的同时,也保证了文件管理的可靠性。The method of this embodiment manages the files stored in the storage medium by presetting multiple operation instructions for file management, and according to the target operation instruction selected by the user from the multiple operation instructions. Therefore, the method of this embodiment adopts a database-like manner to perform remote management services for files for a small system application scenario, which is convenient and quick, and also ensures the reliability of file management.

如图4所示,本发明实施例的一种文件存储管理系统200,包括:预配置模块210和运行模块220;As shown in FIG. 4 , a file storage management system 200 according to an embodiment of the present invention includes: a preconfiguration module 210 and an operation module 220;

所述预配置模块210用于:预设多个用于进行文件管理的操作指令;The pre-configuration module 210 is used to: preset a plurality of operation instructions for file management;

所述运行模块220用于:接收并根据用户从所述多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。The operation module 220 is configured to: receive and manage the files stored in the storage medium according to the target operation instruction selected by the user from the plurality of operation instructions.

本实施例的系统通过预设多个用于进行文件管理的操作指令,并根据用户从多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。因此,本实施例的系统针对小型系统应用场景,采用类数据库方式对文件进行远程管理服务,在方便快捷的同时,也保证了文件管理的可靠性。The system of this embodiment manages the files stored in the storage medium by presetting multiple operation instructions for file management, and according to the target operation instruction selected by the user from the multiple operation instructions. Therefore, the system of this embodiment adopts a database-like manner to perform remote management services for files for a small system application scenario, which is convenient and quick, and also ensures the reliability of file management.

上述关于本发明的一种文件存储管理系统200中的各参数和各个模块实现相应功能的步骤,可参考上文中关于一种文件存储管理方法的实施例中的各参数和步骤,在此不做赘述。For the above-mentioned steps for each parameter and each module in the file storage management system 200 of the present invention to implement corresponding functions, reference may be made to the parameters and steps in the above-mentioned embodiments of a file storage management method, which are not described here. Repeat.

本发明实施例提供的一种存储介质,包括:存储介质中存储有指令,当计算机读取所述指令时,使所述计算机执行如一种文件存储管理方法的步骤,具体可参考上文中一种文件存储管理方法的实施例中的各参数和步骤,在此不做赘述。A storage medium provided by an embodiment of the present invention includes: an instruction is stored in the storage medium, and when a computer reads the instruction, the computer is made to execute steps such as a file storage management method. For details, refer to one of the above The parameters and steps in the embodiments of the file storage management method will not be repeated here.

计算机存储介质例如:优盘、移动硬盘等。Computer storage media such as: USB flash drive, mobile hard disk, etc.

本发明实施例提供的一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时,使所述计算机执行如一种文件存储管理方法的步骤,具体可参考上文中一种文件存储管理方法的实施例中的各参数和步骤,在此不做赘述。An electronic device provided by an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the computer program, the processor causes the For a computer to execute the steps of a file storage management method, for details, reference may be made to the parameters and steps in the embodiments of the file storage management method above, which will not be repeated here.

所属技术领域的技术人员知道,本发明可以实现为方法、系统、存储介质和电子设备。Those skilled in the art know that the present invention can be implemented as a method, a system, a storage medium and an electronic device.

因此,本发明可以具体实现为以下形式,即:可以是完全的硬件、也可以是完全的软件(包括固件、驻留软件、微代码等),还可以是硬件和软件结合的形式,本文一般称为“电路”、“模块”或“系统”。此外,在一些实施例中,本发明还可以实现为在一个或多个计算机可读介质中的计算机程序产品的形式,该计算机可读介质中包含计算机可读的程序代码。可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM),只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。Therefore, the present invention can be embodied in the following forms, that is, it can be complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software. Called a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention may also be implemented in the form of a computer program product on one or more computer-readable media having computer-readable program code embodied thereon. Any combination of one or more computer-readable media may be employed. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. Although the embodiments of the present invention have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present invention. Embodiments are subject to variations, modifications, substitutions and variations.

Claims (10)

1.一种文件存储管理方法,其特征在于,包括:1. a file storage management method, is characterized in that, comprises: S1、预设多个用于进行文件管理的操作指令;S1, preset multiple operation instructions for file management; S2、接收并根据用户从所述多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。S2. Receive and manage the files stored in the storage medium according to the target operation instructions selected by the user from the plurality of operation instructions. 2.根据权利要求1所述的一种文件存储管理方法,其特征在于,在所述步骤S2之前,还包括:2. A kind of file storage management method according to claim 1, is characterized in that, before described step S2, also comprises: S02、按照存储时间的先后顺序,对所述存储介质中的所有存储文件进行排列,得到第一目录文件列表;S02, according to the order of storage time, arrange all the storage files in the storage medium to obtain a first directory file list; 在所述步骤S2之后,还包括:After the step S2, it also includes: S3、判断执行所述目标操作指令后的所述第一目录文件列表是否发生变化,若是,更新所述第一目录文件列表。S3. Determine whether the first directory file list changes after the target operation instruction is executed, and if so, update the first directory file list. 3.根据权利要求2所述的一种文件存储管理方法,其特征在于,所述步骤S2具体包括:3. A kind of file storage management method according to claim 2, is characterized in that, described step S2 specifically comprises: 当所述目标操作指令为添加指令时,获取添加文件的日期属性和数据类型,并将所述添加文件存入至所述日期属性对应的日期目录的所述数据类型对应的通道目录中。When the target operation instruction is an add instruction, the date attribute and data type of the added file are acquired, and the added file is stored in the channel directory corresponding to the data type of the date directory corresponding to the date attribute. 4.根据权利要求3所述的一种文件存储管理方法,其特征在于,所述步骤S2还包括:4. A kind of file storage management method according to claim 3, is characterized in that, described step S2 also comprises: 判断所述添加文件的文件时长是否大于预设时长,若是,则将所述添加文件拆分为多个子添加文件,并按照添加时间的先后顺序对所述多个子添加文件进行命名。It is judged whether the file duration of the added file is greater than the preset duration, and if so, the added file is divided into multiple sub-added files, and the multiple sub-added files are named according to the order of adding time. 5.根据权利要求2所述的一种文件存储管理方法,其特征在于,所述步骤S2具体包括:5. A kind of file storage management method according to claim 2, is characterized in that, described step S2 specifically comprises: 当所述目标操作指令为查找指令时,遍历所述第一目录文件列表,返回所述查找指令对应的存储文件的文件信息。When the target operation instruction is a search instruction, the first directory file list is traversed, and the file information of the storage file corresponding to the search instruction is returned. 6.根据权利要求2所述的一种文件存储管理方法,其特征在于,所述步骤S2具体包括:6. A kind of file storage management method according to claim 2, is characterized in that, described step S2 specifically comprises: 当所述目标操作指令为删除指令时,将所述删除指令对应的存储文件从所述第一目录文件列表中删除。When the target operation instruction is a deletion instruction, the storage file corresponding to the deletion instruction is deleted from the first directory file list. 7.根据权利要求2所述的一种文件存储管理方法,其特征在于,所述步骤S2具体包括:7. A file storage management method according to claim 2, wherein the step S2 specifically comprises: 当所述目标操作指令为下载指令时,遍历所述第一目录文件列表,根据预设通信协议向所述用户发送所述下载指令对应的存储文件。When the target operation instruction is a download instruction, the first directory file list is traversed, and a storage file corresponding to the download instruction is sent to the user according to a preset communication protocol. 8.根据权利要求2-7任一项所述的一种文件存储管理方法,其特征在于,还包括:判断所述存储介质的存储容量是否达到第一阈值,若是,则将所述第一目录文件列表中的后n个存储文件删除,直至所述存储介质的存储容量小于所述第一阈值,其中,n为正整数。8. A file storage management method according to any one of claims 2-7, further comprising: judging whether the storage capacity of the storage medium reaches a first threshold, and if so, storing the first The last n storage files in the directory file list are deleted until the storage capacity of the storage medium is less than the first threshold, where n is a positive integer. 9.根据权利要求1所述的一种文件存储管理方法,其特征在于,还包括:判断所述存储介质的使用寿命是否达到第二阈值,若是,则向所述用户发送预警信息。9 . The file storage management method according to claim 1 , further comprising: judging whether the service life of the storage medium reaches a second threshold, and if so, sending early warning information to the user. 10 . 10.一种文件存储管理系统,其特征在于,包括:预配置模块和运行模块;10. A file storage management system, comprising: a preconfigured module and a running module; 所述预配置模块用于:预设多个用于进行文件管理的操作指令;The pre-configuration module is used for: pre-setting a plurality of operation instructions for file management; 所述运行模块用于:接收并根据用户从所述多个操作指令选取的目标操作指令,对存储在存储介质中的文件进行管理。The operation module is used for: receiving and managing the files stored in the storage medium according to the target operation instructions selected by the user from the plurality of operation instructions.
CN202111520550.2A 2021-12-13 2021-12-13 A file storage management method and system Pending CN114385548A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111520550.2A CN114385548A (en) 2021-12-13 2021-12-13 A file storage management method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111520550.2A CN114385548A (en) 2021-12-13 2021-12-13 A file storage management method and system

Publications (1)

Publication Number Publication Date
CN114385548A true CN114385548A (en) 2022-04-22

Family

ID=81196044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111520550.2A Pending CN114385548A (en) 2021-12-13 2021-12-13 A file storage management method and system

Country Status (1)

Country Link
CN (1) CN114385548A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109359091A (en) * 2018-09-26 2019-02-19 Oppo广东移动通信有限公司 File management method, device, terminal and computer-readable storage medium
CN110069454A (en) * 2017-09-11 2019-07-30 中兴通讯股份有限公司 A kind of network file management method, terminal and computer readable storage medium
CN110086850A (en) * 2019-03-19 2019-08-02 视联动力信息技术股份有限公司 A kind of processing method of file and view networking Dropbox system
CN110597773A (en) * 2019-08-28 2019-12-20 重庆爱奇艺智能科技有限公司 Method and apparatus for sharing files between computer device and virtual reality device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069454A (en) * 2017-09-11 2019-07-30 中兴通讯股份有限公司 A kind of network file management method, terminal and computer readable storage medium
CN109359091A (en) * 2018-09-26 2019-02-19 Oppo广东移动通信有限公司 File management method, device, terminal and computer-readable storage medium
CN110086850A (en) * 2019-03-19 2019-08-02 视联动力信息技术股份有限公司 A kind of processing method of file and view networking Dropbox system
CN110597773A (en) * 2019-08-28 2019-12-20 重庆爱奇艺智能科技有限公司 Method and apparatus for sharing files between computer device and virtual reality device

Similar Documents

Publication Publication Date Title
CN103167026B (en) A kind of cloud store environmental data processing method, system and equipment
CN111176549B (en) Data storage method and device based on cloud storage and storage medium
US11579777B2 (en) Data writing method, client server, and system
CN111198856B (en) File management method, device, computer equipment and storage medium
CN105279163A (en) Buffer memory data update and storage method and system
CN109165152B (en) Method, system and storage medium for monitoring performance of WEB system
CN108989724B (en) Embedded video camera video storage method and file search method
CN103226965A (en) Time-bitmap-based audio/video data access method
CN105101165A (en) eUICC contract data management method and management platform
WO2024139810A1 (en) Network fault analysis method and system
CN104899249A (en) Reliable index update system and method under mass data
CN109189724B (en) Method and device for improving audio and video data storage efficiency of video monitoring system
CN115964224A (en) Index metadata backup method and device and electronic equipment
CN108228476B (en) Data acquisition method and device
CN112925759A (en) Data file processing method and device, storage medium and electronic device
CN107562568B (en) File backup method and device
CN110088745B (en) Data processing system and data processing method
CN114385548A (en) A file storage management method and system
JP5956064B2 (en) Computer system, data management method, and computer
JP7642686B2 (en) Vehicle-mounted data storage method and system
CN113468274A (en) Data storage method and device, storage medium and electronic equipment
CN112685329B (en) Method for processing data and related device
CN113596019A (en) High-performance network traffic data representation and extraction method and system
CN117270793A (en) Method and device for archiving data
CN111240579B (en) Method and device for data storage

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