[go: up one dir, main page]

CN107832470A - A kind of object storage method and device based on storage system - Google Patents

A kind of object storage method and device based on storage system Download PDF

Info

Publication number
CN107832470A
CN107832470A CN201711228768.4A CN201711228768A CN107832470A CN 107832470 A CN107832470 A CN 107832470A CN 201711228768 A CN201711228768 A CN 201711228768A CN 107832470 A CN107832470 A CN 107832470A
Authority
CN
China
Prior art keywords
version
storage
original
version number
original object
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
CN201711228768.4A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201711228768.4A priority Critical patent/CN107832470A/en
Publication of CN107832470A publication Critical patent/CN107832470A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F16/125File system administration, e.g. details of archiving or snapshots using management policies characterised by the use of retention policies
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/113Details of archiving

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种基于存储系统的对象存储方法,包括:接收目标对象存储指令;检测存储系统中是否存在与目标对象同名的原始对象;若存在,则为所述原始对象分配版本号,并将分配了版本号的原始对象存储至版本数据库;响应所述目标对象存储指令。可见,这种方式下,原有的原始对象不会被覆盖,而是作为一个历史版本保存在版本库中,从而保存了对象的修改历史,避免误操作带来的数据丢失,有效保证数据安全性,进而为使用对象存储系统的用户提供数据安全;本发明还公开了一种基于存储系统的对象存储装置、设备及计算机可读存储介质,同样能实现上述技术效果。

The invention discloses an object storage method based on a storage system, which includes: receiving a target object storage instruction; detecting whether there is an original object with the same name as the target object in the storage system; if there is, assigning a version number to the original object, and storing the original object assigned a version number in a version database; and responding to said target object storage instruction. It can be seen that in this way, the original original object will not be overwritten, but will be stored in the version library as a historical version, thereby saving the modification history of the object, avoiding data loss caused by misoperation, and effectively ensuring data security performance, thereby providing data security for users using the object storage system; the present invention also discloses an object storage device, equipment, and computer-readable storage medium based on the storage system, which can also achieve the above-mentioned technical effects.

Description

一种基于存储系统的对象存储方法及装置Object storage method and device based on storage system

技术领域technical field

本发明涉及存储系统对象存储技术领域,更具体地说,涉及一种基于存储系统的对象存储方法、装置、设备及计算机可读存储介质。The present invention relates to the technical field of storage system object storage, and more specifically, relates to a storage system-based object storage method, device, device, and computer-readable storage medium.

背景技术Background technique

目前,随着互联网的快速发展、数据量的急剧增多,海量存储系统的应用变得越来越普及,用户需求也越来越多样化,针对不同的用户需求,海量存储系统提供了对象存储服务,将对象存储的对象存储在文件系统中,使用对象存储客户端访问对象存储服务,向文件系统上传或下载对象。当前传统的对象存储功能是,当用户上传一个文件对象后,修改部分内容后再次上传,会覆盖第一次上传的对象,无法保存未修改前的对象,就导致在用户误操作后无法返回之前的状态,无法保证数据的安全性。At present, with the rapid development of the Internet and the sharp increase in data volume, the application of mass storage systems has become more and more popular, and user needs have become more and more diverse. According to different user needs, mass storage systems provide object storage services , store the objects of the object storage in the file system, use the object storage client to access the object storage service, and upload or download objects to the file system. The current traditional object storage function is that when a user uploads a file object, uploads again after modifying part of the content, the object uploaded for the first time will be overwritten, and the unmodified object cannot be saved, resulting in the user being unable to return to the previous one after misoperation status, data security cannot be guaranteed.

因此,如何对存储对象进行存储,保证数据的安全性,是本领域技术人员需要解决的问题。Therefore, how to store storage objects and ensure data security is a problem to be solved by those skilled in the art.

发明内容Contents of the invention

本发明的目的在于提供一种基于存储系统的对象存储方法、装置、设备及计算机可读存储介质,以保证数据的安全性。The purpose of the present invention is to provide a storage system-based object storage method, device, equipment and computer-readable storage medium to ensure data security.

为实现上述目的,本发明实施例提供了如下技术方案:In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:

一种基于存储系统的对象存储方法,包括:An object storage method based on a storage system, comprising:

接收目标对象存储指令;receiving a target object store instruction;

检测存储系统中是否存在与目标对象同名的原始对象;Detect whether there is an original object with the same name as the target object in the storage system;

若存在,则为所述原始对象分配版本号,并将分配了版本号的原始对象存储至版本数据库;If it exists, assigning a version number to the original object, and storing the original object assigned the version number in a version database;

响应所述目标对象存储指令。Responsive to the target object store command.

其中,为所述原始对象分配版本号包括:Wherein, assigning a version number to the original object includes:

检测版本数据库中是否存在与所述原始对象对应的历史版本对象;Detecting whether there is a historical version object corresponding to the original object in the version database;

若存在,则根据所述历史版本对象的版本号及版本号确定规则,确定所述原始对象的版本号;If it exists, then determine the version number of the original object according to the version number of the historical version object and the version number determination rule;

若不存在,则根据版本号确定规则确定所述原始对象的初始版本号。If not, determine the initial version number of the original object according to the version number determination rule.

其中,将分配了版本号的原始对象存储至版本数据库之后,还包括:Among them, after storing the original object assigned the version number in the version database, it also includes:

记录所述原始对象存储至版本数据库的存储时间信息。Record the storage time information of the original object stored in the version database.

其中,本方案还包括:Among them, this program also includes:

利用版本数据库中每个历史版本对象的存储时间信息,判断所述版本数据库中是否存在超期历史版本对象;Using the storage time information of each historical version object in the version database to determine whether there is an overdue historical version object in the version database;

若存在,则将超期的历史版本对象删除。If it exists, delete the expired historical version object.

一种基于存储系统的对象存储装置,包括:An object storage device based on a storage system, comprising:

接收模块,用于接收目标对象存储指令;A receiving module, configured to receive a target object storage instruction;

检测模块,用于检测存储系统中是否存在与目标对象同名的原始对象;A detection module, configured to detect whether there is an original object with the same name as the target object in the storage system;

原始对象存储模块,用于在所述存储系统中存在与目标对象同名的原始对象时,为所述原始对象分配版本号,并将分配了版本号的原始对象存储至版本数据库;An original object storage module, configured to assign a version number to the original object when there is an original object with the same name as the target object in the storage system, and store the original object with the assigned version number in the version database;

响应模块,用于响应所述目标对象存储指令。A response module, configured to respond to the target object storage instruction.

其中,所述原始对象存储模块包括:Wherein, the original object storage module includes:

检测单元,用于检测版本数据库中是否存在与所述原始对象对应的历史版本对象;a detection unit, configured to detect whether there is a historical version object corresponding to the original object in the version database;

第一版本号确定单元,用于在版本数据库中存在与所述原始对象对应的历史版本对象时,根据所述历史版本对象的版本号及版本号确定规则,确定所述原始对象的版本号;The first version number determination unit is configured to determine the version number of the original object according to the version number of the historical version object and the version number determination rule when there is a historical version object corresponding to the original object in the version database;

第二版本号确定单元,用于在版本数据库中不存在与所述原始对象对应的历史版本对象时,根据版本号确定规则确定所述原始对象的初始版本号。The second version number determination unit is configured to determine the initial version number of the original object according to a version number determination rule when there is no historical version object corresponding to the original object in the version database.

其中,本方案还包括:Among them, this program also includes:

记录模块,用于记录所述原始对象存储至版本数据库的存储时间信息。A recording module, configured to record the storage time information of the original object stored in the version database.

其中,本方案还包括:Among them, this program also includes:

判断模块,用于利用版本数据库中每个历史版本对象的存储时间信息,判断所述版本数据库中是否存在超期历史版本对象;A judging module, configured to use the storage time information of each historical version object in the version database to judge whether there is an overdue historical version object in the version database;

删除模块,用于将超期的历史版本对象删除。The delete module is used to delete the expired historical version objects.

一种基于存储系统的对象存储设备,包括:An object storage device based on a storage system, including:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序时实现上述对象存储方法的步骤。A processor, configured to implement the steps of the above object storage method when executing the computer program.

一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述对象存储方法的步骤。A computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above object storage method are implemented.

通过以上方案可知,本发明实施例提供的一种基于存储系统的对象存储方法,包括:接收目标对象存储指令;检测存储系统中是否存在与目标对象同名的原始对象;若存在,则为所述原始对象分配版本号,并将分配了版本号的原始对象存储至版本数据库;响应所述目标对象存储指令。From the above solutions, it can be seen that the storage system-based object storage method provided by the embodiment of the present invention includes: receiving a target object storage instruction; detecting whether there is an original object with the same name as the target object in the storage system; The original object is assigned a version number, and the original object assigned the version number is stored in a version database; responding to the target object storage instruction.

可见,在本方案中,通过在文件系统中设置版本库,用户上传对象后,每次对该对象进行修改保存操作时,都会给原有的原始对象分配一个版本号,并将原始对象上传至版本库中,这种方式下,原有的原始对象不会被覆盖,而是作为一个历史版本保存在版本库中,从而保存了对象的修改历史,避免误操作带来的数据丢失,有效保证数据安全性,进而为使用对象存储系统的用户提供数据安全;本发明还公开了一种基于存储系统的对象存储装置、设备及计算机可读存储介质,同样能实现上述技术效果。It can be seen that in this solution, by setting the version library in the file system, after the user uploads the object, each time the object is modified and saved, a version number will be assigned to the original original object, and the original object will be uploaded to In the version library, in this way, the original original object will not be overwritten, but saved in the version library as a historical version, thus saving the modification history of the object, avoiding data loss caused by misoperation, and effectively ensuring Data security, and then provide data security for users using the object storage system; the invention also discloses an object storage device, equipment and computer-readable storage medium based on the storage system, which can also achieve the above technical effects.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例公开的一种基于存储系统的对象存储方法流程示意图;FIG. 1 is a schematic flowchart of a storage system-based object storage method disclosed in an embodiment of the present invention;

图2为本发明实施例公开的一种具体的保存对象历史版本流程图;FIG. 2 is a specific flow chart of saving object historical versions disclosed in the embodiment of the present invention;

图3为本发明实施例公开的一种具体的保存对象历史版本流程图;FIG. 3 is a specific flow chart of saving object historical versions disclosed by an embodiment of the present invention;

图4为本发明实施例公开的一种基于存储系统的对象存储装置结构示意图。FIG. 4 is a schematic structural diagram of an object storage device based on a storage system disclosed in an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例公开了一种基于存储系统的对象存储方法、装置、设备及计算机可读存储介质,以保证数据的安全性。The embodiment of the invention discloses a storage system-based object storage method, device, equipment and computer-readable storage medium to ensure data security.

参见图1,本发明实施例提供的一种基于存储系统的对象存储方法,包括:Referring to Figure 1, an object storage method based on a storage system provided by an embodiment of the present invention includes:

S101、接收目标对象存储指令;S101. Receive a target object storage instruction;

具体的,本实施例中的目标对象存储指令为对该目标对象对象进行存储的指令,只要检测接收到存储指令后,便会执行S102-S103,来查询存储系统中是否存在原始对象;如果该存储系统中不存储在同名的原始对象,则继续响应该目标对象存储指令,实现对目标对象的存储;如果存在通名的原始对象,则执行S103。Specifically, the target object storage instruction in this embodiment is an instruction to store the target object object. As long as the storage instruction is detected, S102-S103 will be executed to query whether the original object exists in the storage system; if the If no original object with the same name is stored in the storage system, continue to respond to the target object storage instruction to implement storage of the target object; if there is an original object with the same name, execute S103.

S102、检测存储系统中是否存在与目标对象同名的原始对象;S102. Detect whether there is an original object with the same name as the target object in the storage system;

具体的,本实施例中的原始对象为:存储在系统中,与目标对象同名的对象,该原始对象可以是初次存储的对象,也可以是经过修改后存在存储系统中的,在此并不具体限定。Specifically, the original object in this embodiment is: an object stored in the system with the same name as the target object. Specific limits.

S103、若存在,则为所述原始对象分配版本号,并将分配了版本号的原始对象存储至版本数据库;S103. If it exists, assign a version number to the original object, and store the original object with the assigned version number in a version database;

其中,为所述原始对象分配版本号包括:Wherein, assigning a version number to the original object includes:

检测版本数据库中是否存在与所述原始对象对应的历史版本对象;Detecting whether there is a historical version object corresponding to the original object in the version database;

若存在,则根据所述历史版本对象的版本号及版本号确定规则,确定所述原始对象的版本号;If it exists, then determine the version number of the original object according to the version number of the historical version object and the version number determination rule;

若不存在,则根据版本号确定规则确定所述原始对象的初始版本号。If not, determine the initial version number of the original object according to the version number determination rule.

可以理解的是,由于原始对象可以是初次存储的对象,也可以是经过修改后保存至存储系统的,因此在确定原始对象的版本号时,需要检测版本数据库中是否存在原始对象的历史版本文件,也就是说,检测版本数据库中是否存在与原始对象对应的原始的对象;如果存在,则分配版本号时,就要考虑历史版本文件的版本号;如果不存在,则可以直接分配初始版本号;在本实施例中,可以有包括数字及字母的11位字符组成。It can be understood that since the original object can be the object stored for the first time, it can also be saved to the storage system after modification, so when determining the version number of the original object, it is necessary to detect whether there is a historical version file of the original object in the version database , that is to say, detect whether there is an original object corresponding to the original object in the version database; if it exists, the version number of the historical version file must be considered when assigning the version number; if it does not exist, the initial version number can be directly assigned ; In this embodiment, there may be 11 characters including numbers and letters.

例如:历史版本对象的版本号为A2017080803,那么原始对象的版本号为A2017080804;如果不存在历史版本文件,则原始对象的版本号为A2017080800;进一步的,本方案中的版本号确定规则中记录了不同类型的版本号的确定规则,具体来说可以通过字母递增的方式体现历史版本的增加,也可以通过数字递增的方式体现历史版本的增加,在此并不具体限定。For example: the version number of the historical version object is A2017080803, then the version number of the original object is A2017080804; if there is no historical version file, the version number of the original object is A2017080800; further, the version number determination rule in this solution records The rules for determining different types of version numbers, specifically, can reflect the increase of historical versions by increasing letters, or can reflect the increase of historical versions by increasing numbers, which are not specifically limited here.

S104、响应所述目标对象存储指令。S104. Respond to the target object storage instruction.

具体的,将原始对象存储至版本数据库后,便可响应该目标对象存储指令,以便对目标对象进行存储,存储时,目标对象的存储位置与原始对象的存储位置相同。Specifically, after the original object is stored in the version database, the target object storage instruction can be responded to so as to store the target object. When storing, the storage location of the target object is the same as the storage location of the original object.

可见,本方案通过在文件系统中设置版本库,用户上传对象后,每次对该对象进行修改保存操作时,都会给原有的原始对象分配一个版本号,并将原始对象上传至版本库中,这种方式下,原有的原始对象不会被覆盖,而是作为一个历史版本保存在版本库中,从而保存了对象的修改历史,避免误操作带来的数据丢失,有效保证数据安全性,进而为使用对象存储系统的用户提供数据安全。It can be seen that this solution sets the version library in the file system. After the user uploads the object, each time the object is modified and saved, a version number will be assigned to the original original object, and the original object will be uploaded to the version library. , in this way, the original original object will not be overwritten, but will be saved as a historical version in the version library, thereby saving the modification history of the object, avoiding data loss caused by misoperation, and effectively ensuring data security , thereby providing data security for users using the object storage system.

基于上述实施例,在本实施例中,将分配了版本号的原始对象存储至版本数据库之后,还包括:Based on the above embodiment, in this embodiment, after storing the original object assigned the version number in the version database, further include:

记录所述原始对象存储至版本数据库的存储时间信息;Recording the storage time information of the original object stored in the version database;

利用版本数据库中每个历史版本对象的存储时间信息,判断所述版本数据库中是否存在超期历史版本对象;Using the storage time information of each historical version object in the version database to determine whether there is an overdue historical version object in the version database;

若存在,则将超期的历史版本对象删除。If it exists, delete the expired historical version object.

可以理解的是,本方案在文件系统中设置版本库,用户上传对象后,每对对象进行一次修改保存操作,都会给原有对象分配一个版本号并上传至版本库中,在上传至版本数据可时,同时可以记录上传时的时间。进而,存储在版本数据库中的历史版本对象,用户可以对其进行管理,例如:对历史版本对象的查看、对历史版本对象的下载或对历史版本对象的删除。It is understandable that this solution sets the version library in the file system. After the user uploads the object, each time the object is modified and saved, a version number will be assigned to the original object and uploaded to the version library. After uploading to the version data When available, the upload time can be recorded at the same time. Furthermore, the user can manage the historical version objects stored in the version database, for example: view the historical version objects, download the historical version objects or delete the historical version objects.

具体的,由于版本数据库中会保存较多的历史版本对象,当保存的历史版本较多时会造成占用存储空间过多的情况,因此在本方案中,可以根据历史版本数据的存储时间信息对历史版本对象进行过期删除操作,以避免空间浪费。在删除过期历史版本对象时,用户可自主设定超时时间,并进行周期性检测,如果检测到具有过期删除属性的对象,则执行自动删除,实现在保证数据安全的前提下节省存储空间,达到系统的高安全性。Specifically, since many historical version objects are saved in the version database, when there are many historical versions saved, it will cause too much storage space. Therefore, in this solution, the historical Version objects are expired and deleted to avoid space waste. When deleting objects with expired historical versions, users can set the timeout period independently and perform periodic detection. If an object with an expired deletion attribute is detected, it will be automatically deleted to save storage space while ensuring data security. High security of the system.

参见图2,为本实施例提供的一种具体的保存对象历史版本流程,具体包括以下步骤:Referring to FIG. 2, a specific process for saving object historical versions provided by this embodiment specifically includes the following steps:

①用户上传对象;① The user uploads the object;

②对对象内容进行修改后再次上传,表现为上传同名对象;② After modifying the content of the object and uploading it again, it is shown as uploading an object with the same name;

③将原有对象分配一个特定的版本号,上传至文档库中,记录上传至文档库的时间,备后续过期扫描使用,用户可以通过版本号手动删除或下载对象;③Assign a specific version number to the original object, upload it to the document library, record the time of uploading to the document library, and prepare for subsequent expired scanning. Users can manually delete or download the object through the version number;

④将新上传的对象放在原有对象位置,作为最新版本对象使用。④ Place the newly uploaded object in the original object position and use it as the latest version object.

参见图3,为本实施例提供的一种删除过期对象流程,具体包括以下步骤:Referring to Figure 3, a process for deleting expired objects provided by this embodiment specifically includes the following steps:

①用户自主设置历史版本对象保存时限;① The user independently sets the storage time limit for historical version objects;

②系统扫描版本库中对象,根据记录的上传至版本库中的时间判断对象是否过期;②The system scans the objects in the version library, and judges whether the objects have expired according to the recorded upload time to the version library;

③系统自动将超出时限的对象删除。③The system automatically deletes objects beyond the time limit.

综上可以看出,本方案能够使用在对象存储系统中,为使用对象存储系统的用户提供数据安全;其次,本方案能够保存对象修改历史,避免误操作带来的数据丢失,有效保证数据安全性;而且,本方案可设定保存时限,用户自主决定可以保存历史版本的时间,增强了自主性,从而在保证数据安全的前提下避免过多的空间浪费。In summary, it can be seen that this solution can be used in the object storage system to provide data security for users who use the object storage system; secondly, this solution can save the object modification history, avoid data loss caused by misoperation, and effectively ensure data security Moreover, this solution can set the storage time limit, and the user can independently decide the time to save the historical version, which enhances autonomy and avoids excessive space waste on the premise of ensuring data security.

下面对本发明实施例提供的对象存储装置进行介绍,下文描述的对象存储装置与上文描述的对象存储方法可以相互参照。The object storage device provided by the embodiment of the present invention is introduced below, and the object storage device described below and the object storage method described above may refer to each other.

参见图4,本发明实施例提供的一种基于存储系统的对象存储装置,包括:Referring to Fig. 4, an object storage device based on a storage system provided by an embodiment of the present invention includes:

接收模块100,用于接收目标对象存储指令;A receiving module 100, configured to receive a target object storage instruction;

检测模块200,用于检测存储系统中是否存在与目标对象同名的原始对象;A detection module 200, configured to detect whether there is an original object with the same name as the target object in the storage system;

原始对象存储模块300,用于在所述存储系统中存在与目标对象同名的原始对象时,为所述原始对象分配版本号,并将分配了版本号的原始对象存储至版本数据库;The original object storage module 300 is configured to assign a version number to the original object when there is an original object with the same name as the target object in the storage system, and store the original object with the assigned version number in the version database;

响应模块400,用于响应所述目标对象存储指令。A response module 400, configured to respond to the target object storage instruction.

其中,所述原始对象存储模块包括:Wherein, the original object storage module includes:

检测单元,用于检测版本数据库中是否存在与所述原始对象对应的历史版本对象;a detection unit, configured to detect whether there is a historical version object corresponding to the original object in the version database;

第一版本号确定单元,用于在版本数据库中存在与所述原始对象对应的历史版本对象时,根据所述历史版本对象的版本号及版本号确定规则,确定所述原始对象的版本号;The first version number determination unit is configured to determine the version number of the original object according to the version number of the historical version object and the version number determination rule when there is a historical version object corresponding to the original object in the version database;

第二版本号确定单元,用于在版本数据库中不存在与所述原始对象对应的历史版本对象时,根据版本号确定规则确定所述原始对象的初始版本号。The second version number determination unit is configured to determine the initial version number of the original object according to a version number determination rule when there is no historical version object corresponding to the original object in the version database.

其中,本方案还包括:Among them, this program also includes:

记录模块,用于记录所述原始对象存储至版本数据库的存储时间信息。A recording module, configured to record the storage time information of the original object stored in the version database.

其中,本方案还包括:Among them, this program also includes:

判断模块,用于利用版本数据库中每个历史版本对象的存储时间信息,判断所述版本数据库中是否存在超期历史版本对象;A judging module, configured to use the storage time information of each historical version object in the version database to judge whether there is an overdue historical version object in the version database;

删除模块,用于将超期的历史版本对象删除。The delete module is used to delete the expired historical version objects.

本发明实施例还公开了一种基于存储系统的对象存储设备,包括:The embodiment of the present invention also discloses an object storage device based on a storage system, including:

存储器,用于存储计算机程序;处理器,用于执行所述计算机程序时实现上述对象存储方法的步骤。The memory is used to store the computer program; the processor is used to implement the steps of the above object storage method when executing the computer program.

本发明实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述对象存储方法的步骤。The embodiment of the present invention also discloses a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above object storage method are realized.

具体的,该存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Specifically, the storage medium may include: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc., which can store program codes. medium.

综上,本发明实施例提供的一种基于存储系统的对象存储方法,包括:接收目标对象存储指令;检测存储系统中是否存在与目标对象同名的原始对象;若存在,则为所述原始对象分配版本号,并将分配了版本号的原始对象存储至版本数据库;响应所述目标对象存储指令。To sum up, an object storage method based on a storage system provided by an embodiment of the present invention includes: receiving a target object storage instruction; detecting whether there is an original object with the same name as the target object in the storage system; assigning a version number, and storing the original object assigned the version number in a version database; responding to the target object storage instruction.

可见,在本方案中,通过在文件系统中设置版本库,用户上传对象后,每次对该对象进行修改保存操作时,都会给原有的原始对象分配一个版本号,并将原始对象上传至版本库中,这种方式下,原有的原始对象不会被覆盖,而是作为一个历史版本保存在版本库中,从而保存了对象的修改历史,避免误操作带来的数据丢失,有效保证数据安全性,进而为使用对象存储系统的用户提供数据安全;本发明还公开了一种基于存储系统的对象存储装置、设备及计算机可读存储介质,同样能实现上述技术效果。It can be seen that in this solution, by setting the version library in the file system, after the user uploads the object, each time the object is modified and saved, a version number will be assigned to the original original object, and the original object will be uploaded to In the version library, in this way, the original original object will not be overwritten, but saved in the version library as a historical version, thus saving the modification history of the object, avoiding data loss caused by misoperation, and effectively ensuring Data security, and then provide data security for users using the object storage system; the invention also discloses an object storage device, equipment and computer-readable storage medium based on the storage system, which can also achieve the above technical effects.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1.一种基于存储系统的对象存储方法,其特征在于,包括:1. An object storage method based on a storage system, comprising: 接收目标对象存储指令;receiving a target object store instruction; 检测存储系统中是否存在与目标对象同名的原始对象;Detect whether there is an original object with the same name as the target object in the storage system; 若存在,则为所述原始对象分配版本号,并将分配了版本号的原始对象存储至版本数据库;If it exists, assigning a version number to the original object, and storing the original object assigned the version number in a version database; 响应所述目标对象存储指令。Responsive to the target object store command. 2.根据权利要求1所述的对象存储方法,其特征在于,为所述原始对象分配版本号包括:2. The object storage method according to claim 1, wherein assigning a version number to the original object comprises: 检测版本数据库中是否存在与所述原始对象对应的历史版本对象;Detecting whether there is a historical version object corresponding to the original object in the version database; 若存在,则根据所述历史版本对象的版本号及版本号确定规则,确定所述原始对象的版本号;If it exists, then determine the version number of the original object according to the version number of the historical version object and the version number determination rule; 若不存在,则根据版本号确定规则确定所述原始对象的初始版本号。If not, determine the initial version number of the original object according to the version number determination rule. 3.根据权利要求1或2所述的对象存储方法,其特征在于,将分配了版本号的原始对象存储至版本数据库之后,还包括:3. The object storage method according to claim 1 or 2, wherein after storing the original object assigned a version number in the version database, further comprising: 记录所述原始对象存储至版本数据库的存储时间信息。Record the storage time information of the original object stored in the version database. 4.根据权利要求3所述的对象存储方法,其特征在于,还包括:4. The object storage method according to claim 3, further comprising: 利用版本数据库中每个历史版本对象的存储时间信息,判断所述版本数据库中是否存在超期历史版本对象;Using the storage time information of each historical version object in the version database to determine whether there is an overdue historical version object in the version database; 若存在,则将超期的历史版本对象删除。If it exists, delete the expired historical version object. 5.一种基于存储系统的对象存储装置,其特征在于,包括:5. An object storage device based on a storage system, comprising: 接收模块,用于接收目标对象存储指令;A receiving module, configured to receive a target object storage instruction; 检测模块,用于检测存储系统中是否存在与目标对象同名的原始对象;A detection module, configured to detect whether there is an original object with the same name as the target object in the storage system; 原始对象存储模块,用于在所述存储系统中存在与目标对象同名的原始对象时,为所述原始对象分配版本号,并将分配了版本号的原始对象存储至版本数据库;An original object storage module, configured to assign a version number to the original object when there is an original object with the same name as the target object in the storage system, and store the original object with the assigned version number in the version database; 响应模块,用于响应所述目标对象存储指令。A response module, configured to respond to the target object storage instruction. 6.根据权利要求5所述的对象存储装置,其特征在于,所述原始对象存储模块包括:6. The object storage device according to claim 5, wherein the original object storage module comprises: 检测单元,用于检测版本数据库中是否存在与所述原始对象对应的历史版本对象;a detection unit, configured to detect whether there is a historical version object corresponding to the original object in the version database; 第一版本号确定单元,用于在版本数据库中存在与所述原始对象对应的历史版本对象时,根据所述历史版本对象的版本号及版本号确定规则,确定所述原始对象的版本号;The first version number determination unit is configured to determine the version number of the original object according to the version number of the historical version object and the version number determination rule when there is a historical version object corresponding to the original object in the version database; 第二版本号确定单元,用于在版本数据库中不存在与所述原始对象对应的历史版本对象时,根据版本号确定规则确定所述原始对象的初始版本号。The second version number determination unit is configured to determine the initial version number of the original object according to a version number determination rule when there is no historical version object corresponding to the original object in the version database. 7.根据权利要求5或6所述的对象存储装置,其特征在于,还包括:7. The object storage device according to claim 5 or 6, further comprising: 记录模块,用于记录所述原始对象存储至版本数据库的存储时间信息。A recording module, configured to record the storage time information of the original object stored in the version database. 8.根据权利要求7所述的对象存储装置,其特征在于,还包括:8. The object storage device according to claim 7, further comprising: 判断模块,用于利用版本数据库中每个历史版本对象的存储时间信息,判断所述版本数据库中是否存在超期历史版本对象;A judging module, configured to use the storage time information of each historical version object in the version database to judge whether there is an overdue historical version object in the version database; 删除模块,用于将超期的历史版本对象删除。The delete module is used to delete the expired historical version objects. 9.一种基于存储系统的对象存储设备,其特征在于,包括:9. An object storage device based on a storage system, comprising: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1至4任一项所述对象存储方法的步骤。A processor, configured to implement the steps of the object storage method according to any one of claims 1 to 4 when executing the computer program. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至4任一项所述对象存储方法的步骤。10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the object storage according to any one of claims 1 to 4 is implemented. method steps.
CN201711228768.4A 2017-11-29 2017-11-29 A kind of object storage method and device based on storage system Pending CN107832470A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711228768.4A CN107832470A (en) 2017-11-29 2017-11-29 A kind of object storage method and device based on storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711228768.4A CN107832470A (en) 2017-11-29 2017-11-29 A kind of object storage method and device based on storage system

Publications (1)

Publication Number Publication Date
CN107832470A true CN107832470A (en) 2018-03-23

Family

ID=61646676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711228768.4A Pending CN107832470A (en) 2017-11-29 2017-11-29 A kind of object storage method and device based on storage system

Country Status (1)

Country Link
CN (1) CN107832470A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108646987A (en) * 2018-05-21 2018-10-12 北京五八信息技术有限公司 A kind of management method of file volume, device, storage medium and terminal
CN109144426A (en) * 2018-09-07 2019-01-04 郑州云海信息技术有限公司 A kind of memory space management of object storage system, system and associated component
CN109711732A (en) * 2018-12-27 2019-05-03 税友软件集团股份有限公司 A kind of storage method, device, equipment and the storage medium of index integral
CN110134670A (en) * 2019-05-16 2019-08-16 拉扎斯网络科技(上海)有限公司 Data storage method and device, electronic equipment and computer readable storage medium
CN110781131A (en) * 2018-09-04 2020-02-11 哈尔滨安天科技集团股份有限公司 Mobile storage method, device and storage medium with version control function
CN110795408A (en) * 2019-10-28 2020-02-14 柏科数据技术(深圳)股份有限公司 Data processing method and device based on object storage, server and storage medium
CN113138769A (en) * 2021-05-17 2021-07-20 上海交通大学 Biological analysis code storage method and device based on cloud storage
CN115114232A (en) * 2022-07-15 2022-09-27 济南浪潮数据技术有限公司 Method, device and medium for enumerating historical version objects
CN115905156A (en) * 2021-09-30 2023-04-04 伊姆西Ip控股有限责任公司 Data transfer method, device and computer program product for object storage

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455543A (en) * 2012-05-31 2013-12-18 佳能株式会社 Document management server, document management method, and storage medium
US20140156714A1 (en) * 2012-11-30 2014-06-05 Lg Cns Co., Ltd. Distributed file system processing apparatus and method, and storage media storing the same
CN104156278A (en) * 2014-08-01 2014-11-19 江苏大学 File version control system and file version control method
CN106484906A (en) * 2016-10-21 2017-03-08 焦点科技股份有限公司 A kind of distributed objects storage system flash back method and device
CN107391669A (en) * 2017-07-20 2017-11-24 郑州云海信息技术有限公司 A kind of multi version file management method and device based on file system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455543A (en) * 2012-05-31 2013-12-18 佳能株式会社 Document management server, document management method, and storage medium
US20140156714A1 (en) * 2012-11-30 2014-06-05 Lg Cns Co., Ltd. Distributed file system processing apparatus and method, and storage media storing the same
CN104156278A (en) * 2014-08-01 2014-11-19 江苏大学 File version control system and file version control method
CN106484906A (en) * 2016-10-21 2017-03-08 焦点科技股份有限公司 A kind of distributed objects storage system flash back method and device
CN107391669A (en) * 2017-07-20 2017-11-24 郑州云海信息技术有限公司 A kind of multi version file management method and device based on file system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108646987A (en) * 2018-05-21 2018-10-12 北京五八信息技术有限公司 A kind of management method of file volume, device, storage medium and terminal
CN110781131A (en) * 2018-09-04 2020-02-11 哈尔滨安天科技集团股份有限公司 Mobile storage method, device and storage medium with version control function
CN109144426A (en) * 2018-09-07 2019-01-04 郑州云海信息技术有限公司 A kind of memory space management of object storage system, system and associated component
CN109711732A (en) * 2018-12-27 2019-05-03 税友软件集团股份有限公司 A kind of storage method, device, equipment and the storage medium of index integral
CN110134670A (en) * 2019-05-16 2019-08-16 拉扎斯网络科技(上海)有限公司 Data storage method and device, electronic equipment and computer readable storage medium
CN110795408A (en) * 2019-10-28 2020-02-14 柏科数据技术(深圳)股份有限公司 Data processing method and device based on object storage, server and storage medium
CN113138769A (en) * 2021-05-17 2021-07-20 上海交通大学 Biological analysis code storage method and device based on cloud storage
CN115905156A (en) * 2021-09-30 2023-04-04 伊姆西Ip控股有限责任公司 Data transfer method, device and computer program product for object storage
CN115114232A (en) * 2022-07-15 2022-09-27 济南浪潮数据技术有限公司 Method, device and medium for enumerating historical version objects

Similar Documents

Publication Publication Date Title
CN107832470A (en) A kind of object storage method and device based on storage system
CN110989937B (en) Data storage method, device and equipment and computer readable storage medium
CN103136027B (en) Immediate updating device and immediate updating method
CN105159604A (en) Disk data read-write method and system
CN111736915B (en) Management method, device, equipment and medium for cloud host instance hardware acceleration equipment
CN111090620B (en) File storage method, device, equipment and readable storage medium
US20170199889A1 (en) Method and device for identifying junk picture files
CN102163204A (en) Document management device and document management method
CN105893471B (en) Data processing method and electronic equipment
CN109343859A (en) Information processing method, device and storage medium
CN107633102A (en) A kind of method, apparatus, system and equipment for reading metadata
CN110222046A (en) Processing method, device, server and the storage medium of table data
CN115203190A (en) Method, device and medium for deleting garbage object
CN112000971B (en) A file permission recording method, system and related device
CN104572943B (en) Exempt from installation procedure method for cleaning and device
CN111143293B (en) Metadata acquisition method, device, equipment and computer readable storage medium
CN111045983B (en) Nuclear power plant electronic file management method, device, terminal equipment and medium
CN111258765A (en) Load balancing method and device, computing equipment and storage medium
CN113868194B (en) A management method, device, system and medium for local user groups of storage devices
CN114675776B (en) Resource storage method and device, storage medium and electronic device
CN114880339A (en) Data processing method, device, terminal device and storage medium
JP2008129678A (en) System, method and program for automatically determining file compression
CN115373882A (en) Storage system fault recovery method, system, computer equipment and storage medium
CN108763395B (en) Document processing method and related product
CN109656875B (en) Classification management method and device for storage space, terminal and 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180323