CN107590271A - A kind of operating method and system based on metadata - Google Patents
A kind of operating method and system based on metadata Download PDFInfo
- Publication number
- CN107590271A CN107590271A CN201710882788.7A CN201710882788A CN107590271A CN 107590271 A CN107590271 A CN 107590271A CN 201710882788 A CN201710882788 A CN 201710882788A CN 107590271 A CN107590271 A CN 107590271A
- Authority
- CN
- China
- Prior art keywords
- metadata
- data
- attribute
- container
- volume structure
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention discloses a kind of operating method and system based on metadata, belongs to computer storage application field.This method includes:The data volume structure of metadata is determined according to the attribute of metadata;Data are obtained according to the data volume structure of metadata;Data are deposited to storage file.Data volume structure of the invention by determining metadata, and corresponding data are obtained according to the data volume structure of metadata, the technical scheme that data are stored in storage file, the technical problem that data storage does not interact with the database on upper strata is avoided, realizes the technique effect of the independence of data memory module in file system.
Description
Technical field
Applied technical field is stored the present invention relates to computer, more particularly to a kind of operating method based on metadata and is
System.
Background technology
In development of user space file system, data memory module belongs to the bottom module of system, not with the number on upper strata
Interacted according to storehouse, the related metadata of data storage can not be stored in database.In the prior art, by establishing metadata pair
As model, mark, keyword and the property value of the metadata object in metadata generation metadata object model, according to pass
The mode that the ordering rule of key word stores in the metadata object to metadata node successively carries out associative operation to metadata.
During the present invention is realized, inventor has found that at least there are the following problems:
1. the independence of data memory module in file system can not be kept;
2. have to rely on storage and use that the products such as data block realize metadata;
The content of the invention
To achieve the above object, the one side provided according to embodiments of the present invention, the invention provides one kind based on member
The operating method of data, methods described include:The data volume structure of metadata is determined according to the attribute of metadata.According to the member
The data volume structure of data obtains data.The data are deposited to storage file.
According to the present embodiment by determining the data volume structure of metadata, and number is obtained according to the data volume structure of metadata
According to the data acquired are deposited into the technical scheme into storage file, realizes and keeps data storage in file system
Independence, the technique effect of the persistent storage of metadata independent of data block.
Further, it is described to be included according to the data volume structure of metadata acquisition data:According to the metadata
Data volume structure determination cell therefor class.The data are obtained according to the container class.
Further, it is described to be included according to the container class acquisition data:The member is determined according to the container class
The container of data.In the above-described container according to the data structure of the metadata, the data structure of the metadata is generated
Corresponding unique mark.The data structure and the corresponding unique mark are preserved.The container is according to
Data volume structure and the container class obtain the data.
Further, methods described also includes:Number according to the unique mark to the metadata in the above-described container
Positioned according to structure.Obtain the position of the data structure of the metadata in the above-described container.According to the position pair
The corresponding data are modified operation.Obtained data are deposited to the storage file after operation will be modified, with for
Change the corresponding data.
Further, the attribute of the metadata includes:The data block numbering attribute of the metadata, metadata relative to
Data block starting location offset amount attribute, the start bit of metadata incremental numbering attribute, metadata increment block in delta file
Put one or more attributes in attribute, metadata version attribute and metadata length attribute.
According to another aspect of the present invention, the embodiments of the invention provide one kind corresponding with the above method to be based on first number
According to operating system, the system includes:Determining module:For determining the data volume knot of metadata according to the attribute of metadata
Structure.First acquisition module:For obtaining data according to the data volume structure of the metadata.Memory module:For by the number
According to storage to storage file.
Further, the determining module specifically includes:Determining unit:For the data volume structure according to the metadata
Determine cell therefor class.Acquiring unit:For obtaining the data according to the container class.
Further, the acquiring unit also includes:Determination subelement:For determining first number according to the container class
According to container.Generate subelement:For according to the data structure of the metadata, generating the metadata in the above-described container
The corresponding unique mark of data structure.Preserve subelement:For the data structure uniquely to be marked with described accordingly
Knowledge is preserved;Obtain subelement:The data are obtained according to the data volume structure and the container class for the container.
Further, the system also includes:Locating module:For in the above-described container according to the unique mark to institute
The data structure for stating metadata is positioned.Second acquisition module:For obtaining the data structure of the metadata in institute
State the position in container.Change module:For being modified operation to the corresponding data according to the position.Replace mould
Block:Deposited for the data obtained after operation will to be modified to the storage file, to replace the corresponding data.
Further, the attribute of the metadata includes:The data block numbering attribute of the metadata, metadata relative to
Data block starting location offset amount attribute, the start bit of metadata incremental numbering attribute, metadata increment block in delta file
Put one or more attributes in attribute, metadata version attribute and metadata length attribute.
The beneficial effect of the embodiment of the present invention is, as a result of the data that metadata is determined according to the attribute of metadata
Body structure, data, and the technical scheme that data are stored in storage file are obtained according to data volume structure, avoid number
The technical problem not interacted according to storage with the database on upper strata, realize the independence of data memory module in file system
Technique effect.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of operating method based on metadata provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet for operating method based on metadata that another embodiment of the present invention provides;
Fig. 3 is a kind of schematic flow sheet for operating method based on metadata that another embodiment of the present invention provides;
Fig. 4 is a kind of schematic flow sheet for operating method based on metadata that another embodiment of the present invention provides;
Fig. 5 is a kind of structural representation of operating system based on metadata provided in an embodiment of the present invention;
Fig. 6 is a kind of structural representation for operating system based on metadata that another embodiment of the present invention provides;
Fig. 7 is a kind of structural representation for operating system based on metadata that another embodiment of the present invention provides;
Fig. 8 is a kind of structural representation for operating system based on metadata that another embodiment of the present invention provides.
Embodiment
To make the object, technical solutions and advantages of the present invention of greater clarity, with reference to embodiment and join
According to accompanying drawing, the present invention is described in more detail.It should be understood that these descriptions are merely illustrative, and it is not intended to limit this hair
Bright scope.In addition, in the following description, the description to known features and technology is eliminated, to avoid unnecessarily obscuring this
The concept of invention.
Referring to Fig. 1, Fig. 1 is a kind of flow signal of operating method based on metadata provided in an embodiment of the present invention
Figure.
As shown in figure 1, in an embodiment of the present invention, there is provided a kind of operating method based on metadata, this method bag
Include:
Step S100:The data volume structure of metadata is determined according to the attribute of metadata.
Step S200:Data are obtained according to the data volume structure of metadata.
Step S300:Data are deposited to storage file.
In the present embodiment, metadata has different attributes in different application scenarios, according to not belonging to together for metadata
Property can obtain the corresponding data volume structure of metadata.The data according to corresponding to the data volume structure of metadata obtains metadata,
And the data are deposited into storage file.
The technical scheme provided according to the present embodiment, on the one hand, realize and maintain the only of data storage in file system
The technique effect of vertical property;On the other hand, the technology of data block need not be depended on again by also achieving the persistent storage of metadata
Upper effect.
Referring to Fig. 2, the flow that Fig. 2 is a kind of operating method based on metadata that another embodiment of the present invention provides is shown
It is intended to.
As shown in Fig. 2 step S200 includes:
Step S210:According to the data volume structure determination cell therefor class of metadata.
Step S220:Data are obtained according to container class.
In the present embodiment, further refinement has been carried out to a upper embodiment.First, determined according to the attribute of metadata
The data volume structure of metadata, further according to the data volume structure determination cell therefor class of metadata, and obtained according to container class
Corresponding data, finally the data of acquisition are deposited into storage file.
Referring to Fig. 3, the flow that Fig. 3 is a kind of operating method based on metadata that another embodiment of the present invention provides is shown
It is intended to.
As shown in figure 3, step S220 includes:
Step S221:The container of metadata is determined according to container class.
Step S222:In a reservoir according to the data structure of metadata, the data structure for generating metadata is corresponding
Unique mark.
Step S223:Data structure and corresponding unique mark are preserved.
Step S224:Container obtains data according to data volume structure and container class.
In the present embodiment, the data volume structure of the metadata is determined according to the attribute of metadata, according to first number of determination
According to data volume structure determination cell therefor class, determine the container of metadata according to the container class of determination, the container was according to should
The data volume structure and container class of metadata obtain corresponding data, and the data acquired are deposited into storage file.
In the present embodiment, in a reservoir, according to the data structure of metadata, corresponding unique mark is generated, i.e. every
The corresponding unique mark of one data structure.
Preferably, data structure and corresponding unique mark are preserved in the form of key-value pair.
Referring to Fig. 4, the flow that Fig. 4 is a kind of operating method based on metadata that another embodiment of the present invention provides is shown
It is intended to.
As shown in figure 4, this method also includes:
Step S400:The data structure of metadata is positioned according to unique mark in a reservoir.
Step S500:Obtain the position of the data structure of metadata in a reservoir.
Step S600:Operation is modified to corresponding data according to position.
Step S700:Obtained data are deposited to storage file after operation will be modified, to replace corresponding data.
In the present embodiment, it is to be understood that can not data be modified with operation in storage file, so, when
When needing to modify to data, due to the corresponding unique mark of a data structure, by unique mark to corresponding
The data structure of metadata is positioned, and so as to obtain the position of the data structure of the metadata in a reservoir, is being found
Behind corresponding position, corresponding data are modified with operation, then the data obtained after change is operated are deposited to storage file,
So that data before to be replaced.
Preferably, when needing to delete data, the data according to unique mark to corresponding metadata in a reservoir are passed through
Structure is positioned, so as to obtain the position of the data structure of the metadata in a reservoir, after corresponding position is found,
Corresponding data are deleted, to replace the data in storage file, i.e., also carried out the corresponding data in storage file
Delete.
Preferably, when needing to change data, the data according to unique mark to corresponding metadata in a reservoir are passed through
Structure is positioned, so as to obtain the position of the data structure of the metadata in a reservoir, after corresponding position is found,
Corresponding data are modified, to replace the data in storage file, to realize the modification of data.
Preferably, when needing to increase data, the data according to unique mark to corresponding metadata in a reservoir are passed through
Structure is positioned, so as to obtain the position of the data structure of the metadata in a reservoir, after corresponding position is found,
Corresponding data are increased, to replace the data in storage file, to realize the increase of data.
The technical scheme provided by the present embodiment, the change for realizing data is replaced and updated, to ensure storage file
In data validity and reliability.
Specifically, the attribute of metadata includes:The data block numbering attribute of metadata, metadata originate relative to data block
Original position attribute, the first number of position offset attribute, metadata incremental numbering attribute, metadata increment block in delta file
According to one or more attributes in version number's attribute and metadata length attribute.
It is understood that the data volume structure of metadata is determined according to the attribute of above-mentioned metadata, attribute
Difference, the data volume structure of corresponding metadata just differ naturally.
According to another aspect of the present invention, the embodiments of the invention provide one kind corresponding with the above method to be based on first number
According to operating system.
Referring to Fig. 5, Fig. 5 is a kind of structural representation of operating system based on metadata provided in an embodiment of the present invention
Figure.
As shown in figure 5, the system includes:Determining module:For determining the data volume of metadata according to the attribute of metadata
Structure.First acquisition module:For obtaining data according to the data volume structure of metadata.Memory module:For data to be deposited
To storage file.
Referring to Fig. 6, Fig. 6 is a kind of structural representation of operating system based on metadata provided in an embodiment of the present invention
Figure.
As shown in fig. 6, the first acquisition module specifically includes:Determining unit:It is true for the data volume structure according to metadata
Determine cell therefor class.Acquiring unit:For obtaining data according to container class.
Referring to Fig. 7, Fig. 7 is a kind of structural representation of operating system based on metadata provided in an embodiment of the present invention
Figure.
As shown in fig. 7, acquiring unit also includes:Determination subelement:For determining the container of metadata according to container class.It is raw
Into subelement:For according to the data structure of metadata, the data structure for generating metadata to be unique accordingly in a reservoir
Mark.Preserve subelement:For data structure and corresponding unique mark to be preserved.Obtain subelement:For container
Data are obtained according to data volume structure and container class.
Referring to Fig. 8, Fig. 8 is a kind of structural representation of operating system based on metadata provided in an embodiment of the present invention
Figure.
As shown in figure 8, the system also includes:Locating module:For the number according to unique mark to metadata in a reservoir
Positioned according to structure.Second acquisition module:For obtaining the position of the data structure of metadata in a reservoir.Change mould
Block:For being modified operation to corresponding data according to position.Replacement module:For the number obtained after operation will to be modified
According to storage to storage file, to replace corresponding data.
Specifically, the attribute of metadata includes:The data block numbering attribute of metadata, metadata originate relative to data block
Original position attribute, the first number of position offset attribute, metadata incremental numbering attribute, metadata increment block in delta file
According to one or more attributes in version number's attribute and metadata length attribute.
Different pieces of information body structure of the invention by corresponding to metadata due to the different attribute of metadata, so according to first number
According to attribute determine the data volume structure of metadata, data are obtained according to the data volume structure of metadata, and will acquire
Data deposit the technical scheme into storage file, avoid the data storage of metadata and use is necessarily dependent upon database production
The technical problem of product, realize the technique effect of independence that the data of metadata use and persistence.
It should be appreciated that the above-mentioned embodiment of the present invention is used only for exemplary illustration or explains the present invention's
Principle, without being construed as limiting the invention.Therefore, that is done without departing from the spirit and scope of the present invention is any
Modification, equivalent substitution, improvement etc., should be included in the scope of the protection.In addition, appended claims purport of the present invention
Covering the whole changes fallen into scope and border or this scope and the equivalents on border and repairing
Change example.
Claims (10)
1. a kind of operating method based on metadata, it is characterised in that methods described includes:
The data volume structure of metadata is determined according to the attribute of metadata;
Data are obtained according to the data volume structure of the metadata;
The data are deposited to storage file.
2. a kind of operating method based on metadata according to claim 1, it is characterised in that described according to first number
According to data volume structure obtain data include:
According to the data volume structure determination cell therefor class of the metadata;
The data are obtained according to the container class.
3. a kind of operating method based on metadata according to claim 1, it is characterised in that described according to the container
Class, which obtains the data, to be included:
The container of the metadata is determined according to the container class;
In the above-described container according to the data structure of the metadata, the data structure for generating the metadata is corresponding only
One mark;
The data structure and the corresponding unique mark are preserved;
The container obtains the data according to the data volume structure and the container class.
4. a kind of operating method based on metadata according to claim 3, it is characterised in that methods described also includes:
The data structure of the metadata is positioned according to the unique mark in the above-described container;
Obtain the position of the data structure of the metadata in the above-described container;
Operation is modified to the corresponding data according to the position;
Obtained data are deposited to the storage file after operation will be modified, to replace the corresponding data.
A kind of 5. operating method based on metadata according to any one of claim 1-4, it is characterised in that the member
The attribute of data includes:
The data block numbering attribute of the metadata, metadata increase relative to data block starting location offset amount attribute, metadata
Measure original position attribute, metadata version attribute and the metadata length of numbering attribute, metadata increment block in delta file
The one or more attributes spent in attribute.
6. a kind of operating system based on metadata, it is characterised in that the system includes:
Determining module:For determining the data volume structure of metadata according to the attribute of metadata;
First acquisition module:For obtaining data according to the data volume structure of the metadata;
Memory module:For the data to be deposited to storage file.
A kind of 7. operating system based on metadata according to claim 6, it is characterised in that first acquisition module
Specifically include:
Determining unit:For the data volume structure determination cell therefor class according to the metadata;
Acquiring unit:For obtaining the data according to the container class.
8. a kind of operating system based on metadata according to claim 7, it is characterised in that the acquiring unit is also wrapped
Include:
Determination subelement:For determining the container of the metadata according to the container class;
Generate subelement:For according to the data structure of the metadata, generating the number of the metadata in the above-described container
According to the corresponding unique mark of structure;
Preserve subelement:For the data structure and the corresponding unique mark to be preserved;
Obtain subelement:The data are obtained according to the data volume structure and the container class for the container.
9. a kind of operating system based on metadata according to claim 1, it is characterised in that the system also includes:
Locating module:For being determined in the above-described container according to the unique mark the data structure of the metadata
Position;
Second acquisition module:For obtaining the position of the data structure of the metadata in the above-described container;
Change module:For being modified operation to the corresponding data according to the position;
Replacement module:Deposited for the data obtained after operation will to be modified to the storage file, to replace corresponding institute
State data.
10. a kind of operating system based on metadata according to any one of claim 6-9, it is characterised in that described
The attribute of metadata includes:
The data block numbering attribute of the metadata, metadata increase relative to data block starting location offset amount attribute, metadata
Measure original position attribute, metadata version attribute and the metadata length of numbering attribute, metadata increment block in delta file
The one or more attributes spent in attribute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710882788.7A CN107590271A (en) | 2017-09-26 | 2017-09-26 | A kind of operating method and system based on metadata |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710882788.7A CN107590271A (en) | 2017-09-26 | 2017-09-26 | A kind of operating method and system based on metadata |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107590271A true CN107590271A (en) | 2018-01-16 |
Family
ID=61047858
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710882788.7A Pending CN107590271A (en) | 2017-09-26 | 2017-09-26 | A kind of operating method and system based on metadata |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107590271A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109542879A (en) * | 2018-11-21 | 2019-03-29 | 成都材智科技有限公司 | A kind of method and apparatus based on dynamic data Template Manager data |
-
2017
- 2017-09-26 CN CN201710882788.7A patent/CN107590271A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109542879A (en) * | 2018-11-21 | 2019-03-29 | 成都材智科技有限公司 | A kind of method and apparatus based on dynamic data Template Manager data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107403335A (en) | A kind of drawn a portrait based on depth user carries out the system and implementation method of precision marketing | |
CN104391725A (en) | Page display method and page display device | |
CN106354513A (en) | Layered development method for form | |
CN103744948B (en) | Searching data checks the method and system of reason of discrepancies | |
CN104182484A (en) | Method and device for realizing mapping of HBase data and Java domain objects | |
CN106776633A (en) | The apparatus and method that what user can configure automatically generate a2l files | |
CN110990467B (en) | BIM model format conversion method and conversion system | |
CN105205189B (en) | The integrated approach of BIM model and high speed acquisition data system based on container | |
CN102564435A (en) | Navigation electronic map incremental bag and self-checking method | |
CN106528760A (en) | IFC-standard-based analysis model working method applied to engineering project | |
CN108984186A (en) | A kind of BIM model dynamic loading method based on chart database | |
CN102607576A (en) | Difference data generation method and generation device for electronic navigation map | |
CN107944063A (en) | It is a kind of that method and system are recommended based on the news of topic model and groups of users | |
CN114707077A (en) | Knowledge graph-based recommendation method for Internet of things | |
CN106777097B (en) | Merging method for metadata layering extension | |
TW201616377A (en) | Reorganizing and presenting data fields with erroneous inputs | |
CN107590271A (en) | A kind of operating method and system based on metadata | |
CN105205684A (en) | Recommended display method of matched products and apparatus | |
US9471640B2 (en) | Automatic conversion of units of measure during data stream processing | |
CN111967970A (en) | Bank product recommendation method and device based on spark platform | |
CN103778153B (en) | A kind of method and system generating nominal data storehouse based on ASAP standard | |
CN110955743B (en) | Method and device for establishing space index file for vector elements | |
CN112015804A (en) | Data synchronization method, device, equipment and storage medium | |
US20060129271A1 (en) | System, method, and article of manufacture for generating a CAD model indicating an amount of material added or removed from a part to form a feature in the part | |
CN104850646A (en) | Method of mining frequent subgraphs for single uncertain graphs |
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: 20180116 |