Summary of the invention
In view of this, the embodiment of the present application provides a kind of realization date storage method and device, to improve data storage clothesMass data storage is realized in business.
To solve the above problems, technical solution provided by the embodiments of the present application is as follows:
The application first aspect provides a kind of method for realizing data storage, and the method is deposited applied to distributed documentStorage system, the external interface connecting object client of the distributed file storage system, which comprises
Receive the data storage request that the object client is sent;The data storage request include storage data withAnd subscriber identity information;
The data storage request is parsed, the corresponding use of the data storage request is obtained according to the subscriber identity informationFamily configuration file;
Data model storage is determined according to the user profile;The data model storage be file memory module orObject memory module;
According to the data model storage, corresponding store path is selected to store data.
In one possible implementation, described before receiving the data storage request that the object client is sentMethod further include:
Start rados service;The rados service is for providing object storage service;
It is described according to the data model storage, selection when the data model storage is the object memory moduleCorresponding store path stores data, comprising:
Corresponding store path is selected, data are stored using rados service.
In one possible implementation, the method also includes:
The corresponding configuration file of the external interface is modified, addition executes the rados service in the configuration fileMemory node.
In one possible implementation, the external interface of the distributed file storage system and the target customerEnd is carried out data transmission using s3 agreement or Swift agreement.
In one possible implementation, the method also includes:
Storage result information is sent to the object client, to show storage result to user.
The application second aspect provides a kind of device for realizing data storage, and described device is deposited applied to distributed documentStorage system, the external interface connecting object client of the distributed file storage system, described device include:
Receiving unit, the data storage request sent for receiving the object client;The data storage request packetInclude the data and subscriber identity information of storage;
Resolution unit obtains the data according to the subscriber identity information and deposits for parsing the data storage requestCorresponding user profile is requested in storage;
Determination unit, for determining data model storage according to the user profile;The data model storage isFile memory module or object memory module;
Storage unit, for selecting corresponding store path to store data according to the data model storage.
In one possible implementation, described device further include:
Start unit, for before receiving unit receives the data storage request, starting rados to be serviced;The radosService is for providing object storage service;
When the data model storage is the object memory module, the storage unit is specifically used for selection and corresponds toStore path, using the rados service data are stored.
In one possible implementation, described device further include:
Unit is modified, for modifying the corresponding configuration file of the external interface, adds and executes in the configuration fileThe memory node of the rados service.
In one possible implementation, the external interface of the distributed file storage system and the target customerEnd is carried out data transmission using s3 agreement or Swift agreement.
In one possible implementation, described device further include:
Transmission unit, for sending storage result information to the object client, to show storage result to user.
It can be seen that the embodiment of the present application has the following beneficial effects:
The embodiment of the present application configures two kinds of memory modules, respectively file memory module in traditional document storage systemWith object memory module, in specific implementation, storage system receives the data that object client is sent by external interface and storesRequest, and the data storage request is parsed, subscriber identity information is obtained, the number is then searched according to subscriber identity informationCorresponding user profile is requested according to storage, data model storage is determined further according to user profile, finally according to determinationData model storage select corresponding store path to carry out data storage, two kinds are merged in a storage system to realizeMemory module selects different memory modules according to the demand of user, improves the utilization rate of storage system, meets mass dataStorage.Meanwhile two kinds of memory modules are disposed in a kind of storage system, reduce equipment cost.
Specific embodiment
In order to make the above objects, features, and advantages of the present application more apparent, with reference to the accompanying drawing and it is specific realMode is applied to be described in further detail the embodiment of the present application.
The technical solution of the application for ease of understanding will first be illustrated the background technique of the application below.
Invention finds that traditional file system storage service is just widely used in traditional storage method research,File storage is exactly network storage (Network Attached Storage, NAS).But since the protocol overhead of NAS is high, bandwidthLow, delay greatly, is unfavorable for applying in High-Performance Computing Cluster.However, facing mass memory demand, object storage service is because of its Gao AnEntirely with high reliability, additional its addressable characteristic, the increasingly favor by numerous Internet users whenever and wherever possible.Object is depositedStorage is the date storage method of non-hierarchical structure, commonly used in cloud.It is object-based to deposit different from other date storage methodsStorage does not use directory tree, object storage, then using flat data structure, instead of the directory tree structure of traditional NAS,Secondary is succinct data read and write interface, to improve the efficiency of user's access and reading and writing data.
Based on this, the embodiment of the present application provides a kind of method and device for realizing data storage, which is based onDistributed file storage system merges two different memory modules, i.e. file memory module and object in the storage systemMemory module, the system receive the data storage request that object client is sent by external interface, and parse data storageRequest is to obtain the corresponding user profile of the data storage request according to subscriber identity information, then according to user configuration textPart determines data model storage, finally according to data model storage, corresponding path of depositing is selected to store data.As it can be seen thatThe embodiment of the present application to provide two kinds of different data memory modules in a kind of storage system for user, both saved equipment atThis, meets the needs of different users simultaneously, improves the competitiveness of file storage and object storage.
Referring to Fig. 1, which is the block schematic illustration of exemplary application scene provided by the embodiments of the present application.Wherein, this ShenPlease the method for realizations data storage that provides of embodiment applied to distributed file storage system 20.
When practical application, distributed file storage system 20 receives the data storage request that object client 10 is sent, andData storage request is parsed, the corresponding user of the data storage request is determined according to the subscriber identity information that parsing obtainsConfiguration file determines data model storage, carries out data storage.
It will be understood by those skilled in the art that block schematic illustration shown in FIG. 1 is only that presently filed embodiment can beAn example being wherein achieved.The scope of application of the application embodiment is not limited by any aspect of the frame.
It should be noted that object client 10 can be carried on terminal, terminal can be it is existing, researching and developing orIn the future research and development, can by it is any type of wiredly and/or wirelessly connection (for example, Wi-Fi, LAN, honeycomb, coaxial cableDeng) any user equipment for interacting, including but not limited to: existing, researching and developing or research and development in the future intelligence can be wornWear equipment, smart phone, non-smart mobile phone, tablet computer, laptop PC, desktop personal computer, small-sized meterCalculation machine, medium-size computer, mainframe computer etc..Presently filed embodiment is unrestricted in this regard.It is also noted that, distributed file storage system 20 can be existing, researching and developing or research and development in the future, energy in the embodiment of the present applicationEnough provide a user an example of the equipment of data storage service.Presently filed embodiment is not in this regard by any limitSystem.
Technical solution provided by the present application for ease of understanding deposits realization data provided by the present application below in conjunction with attached drawingMethod for storing is illustrated.
Referring to fig. 2, which is a kind of flow chart for realizing date storage method provided by the embodiments of the present application, and this method is answeredFor distributed file storage system, wherein the external interface connecting object client of distributed file storage system, this methodMay include:
S201: the data storage request that object client is sent is received.
In the present embodiment, when object client there are data to be stored, sent to distributed file storage systemData storage request realizes data so that distributed file storage system can carry out corresponding operating according to data storage requestStorage.
Wherein, data storage request may include the data and subscriber identity information of storage, which canThink that ID, IP address of corresponding objects client etc. can be with the information of unique identification user identity.
S202: parsing data storage request obtains the corresponding user configuration of data storage request according to subscriber identity informationFile.
In the present embodiment, after receiving the data storage request of object client transmission, data storage request is parsed, withObtain subscriber identity information.Then, the corresponding user profile of data storage request is obtained according to subscriber identity information.
Wherein, user profile is the configuration file being pre-created by system according to the request of user, the user configurationFile may include user identifier, data model storage set by the user storage data.In practical applications, different useFamily corresponds to different user profiles, may include different data model storages in different user profiles.WhereinData model storage can be file memory module and object memory module.
S203: data model storage is determined according to user profile.
In the present embodiment, after parsing obtains user profile, the target customer can be determined from user profileHold corresponding data model storage.
S204: according to data model storage, corresponding store path is selected to store data.
In the present embodiment, when determining data model storage, store path corresponding with the data model storage is selected, soData storage is carried out afterwards.That is, when determining data model storage is file memory module, according to pre-set store path,Data are stored with file memory module;When determining data model storage is object memory module, according to presettingStore path, data are stored with object memory module.
In practical applications, object storage is divided into three-decker, respectively client layer, container floor and object layer, tenantNot as independent distinguishing hierarchy.And in order to realize that merging file storage and object in a set of storage system stores two kinds of storagesMode, universal formulation are four-layer structure, i.e., using tenant as one layer, realize the multi-tenant function of support target storage.In this ShenPlease corresponding distributed file storage system include tenant grade catalogue, container levels catalogue, file-level catalogue, this four layers respectively correspondTenant, user, container and the object of object storage, as shown in Figure 3.
In addition, when storage system completes data storage storage result information can be sent to object client, so as to rightAs client to user show storage result, check storage condition convenient for user.
In practical applications, distributed file storage system external interface can be rados gateway, and rados can be dynamicA kind of stabilization, expansible, high performance unity logic object are provided on a storage equipment group of planes for state variation and heterojunction structure(Object) memory interface is communicated by rados gateway with object client.In specific implementation, external interface and object visitorFamily end can be carried out data transmission using s3 agreement or Swift agreement.
When providing storage service to object client using the distributed document deposit system, starting rados service first,The rados service can be used for providing object storage service for object client;When determine data model storage for object storageWhen mode, corresponding store path is selected, data are stored using rados service.
It should be noted that also needing the corresponding configuration file of modification external interface before starting rados service, matchingSet the memory node that addition in file executes rados service.It is understood that may include in distributed file storage systemMultiple memory nodes can choose one of memory node for executing rados service.
By foregoing description, storage method provided in this embodiment is based on distributed file storage system, in the storage systemTwo different memory modules, i.e. file memory module and object memory module are merged in system, which is connect by external interfaceThe data storage request that object client is sent is received, and parses the data storage request to obtain the number according to subscriber identity informationCorresponding user profile is requested according to storage, data model storage is then determined according to user profile, finally according to numberAccording to memory module, corresponding path of depositing is selected to store data.As it can be seen that the embodiment of the present application is in a kind of storage systemUser provides two kinds of different data memory modules, has both saved equipment cost, has met the needs of different users simultaneously, improves file and depositsThe competitiveness of storage and object storage.
Based on above method embodiment, present invention also provides a kind of devices for realizing data storage, below in conjunction with attachedFigure is illustrated the device.
Referring to fig. 4, which is a kind of structure drawing of device for realizing data storage provided by the embodiments of the present application, described deviceApplied to distributed file storage system, the external interface connecting object client of the distributed file storage system is describedDevice includes:
Receiving unit 401, the data storage request sent for receiving the object client;The data storage requestData and subscriber identity information including storage;
Resolution unit 402 obtains the data according to the subscriber identity information for parsing the data storage requestCorresponding user profile is requested in storage;
Determination unit 403, for determining data model storage according to the user profile;The data model storageFor file memory module or object memory module;
Storage unit 404, for selecting corresponding store path to deposit data according to the data model storageStorage.
In a kind of possible implementation, described device further include:
Start unit, for before receiving unit receives the data storage request, starting rados to be serviced;The radosService is for providing object storage service;
When the data model storage is the object memory module, the storage unit is specifically used for selection and corresponds toStore path, using the rados service data are stored.
In a kind of possible implementation, described device further include:
Unit is modified, for modifying the corresponding configuration file of the external interface, adds and executes in the configuration fileThe memory node of the rados service.
In a kind of possible implementation, the external interface of the distributed file storage system and the object clientCarried out data transmission using s3 agreement or Swift agreement.
In a kind of possible implementation, described device further include:
Transmission unit, for sending storage result information to the object client, to show storage result to user.
It should be noted that the realization of each unit may refer to the realization of Fig. 2 the method embodiment in the present embodiment,Details are not described herein for the present embodiment.
By foregoing description, the embodiment of the present application configures two kinds of memory modules in traditional document storage system, respectivelyFor file memory module and object memory module, in specific implementation, storage system receives object client by external interfaceThe data storage request of transmission, and the data storage request is parsed, subscriber identity information is obtained, then according to user's bodyThe corresponding user profile of part information searching data storage request determines that data store mould further according to user profileFormula finally selects corresponding store path to carry out data storage according to determining data model storage, deposits to realize at oneTwo kinds of memory modules are merged in storage system, are selected different memory modules according to the demand of user, are improved the utilization of storage systemRate meets the storage of mass data.Meanwhile two kinds of memory modules are disposed in a kind of storage system, reduce equipment cost.
It should be noted that each embodiment in this specification is described in a progressive manner, each embodiment emphasis is saidBright is the difference from other embodiments, and the same or similar parts in each embodiment may refer to each other.For realityFor applying system or device disclosed in example, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, phasePlace is closed referring to method part illustration.
It should be appreciated that in this application, " at least one (item) " refers to one or more, and " multiple " refer to two or twoMore than a."and/or" indicates may exist three kinds of relationships, for example, " A and/or B " for describing the incidence relation of affiliated partnerIt can indicate: only exist A, only exist B and exist simultaneously tri- kinds of situations of A and B, wherein A, B can be odd number or plural number.WordSymbol "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or"." at least one of following (a) " or its similar expression, refers toAny combination in these, any combination including individual event (a) or complex item (a).At least one of for example, in a, b or c(a) can indicate: a, b, c, " a and b ", " a and c ", " b and c ", or " a and b and c ", and wherein a, b, c can be individually, can alsoTo be multiple.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to oneEntity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operationThere are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to containLid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including thoseElement, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipmentIntrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded thatThere is also other identical elements in process, method, article or equipment including the element.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processorThe combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only depositReservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technologyIn any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application.Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined hereinGeneral Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the applicationIt is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase oneThe widest scope of cause.