CN109508143A - A kind of date storage method and device - Google Patents

A kind of date storage method and device Download PDF

Info

Publication number
CN109508143A
CN109508143A CN201810942119.9A CN201810942119A CN109508143A CN 109508143 A CN109508143 A CN 109508143A CN 201810942119 A CN201810942119 A CN 201810942119A CN 109508143 A CN109508143 A CN 109508143A
Authority
CN
China
Prior art keywords
data
stored
memory
storage
storage region
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.)
Granted
Application number
CN201810942119.9A
Other languages
Chinese (zh)
Other versions
CN109508143B (en
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 CN201810942119.9A priority Critical patent/CN109508143B/en
Publication of CN109508143A publication Critical patent/CN109508143A/en
Application granted granted Critical
Publication of CN109508143B publication Critical patent/CN109508143B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This application discloses a kind of date storage method and devices, it include: the metadata for obtaining data to be stored, wherein, metadata includes: the initial memory address of data to be stored in memory, and the size of memory space shared by data to be stored, the storage region of data to be stored in memory is determined according to metadata, and data to be stored is stored into the corresponding storage region of data to be stored.It can be seen that, using scheme provided by the embodiments of the present application, can the memory space according to shared by data to be stored in memory initial memory address and data to be stored size, determine the storage region for storing the data to be stored, rather than distribute storage region at random for data to be stored.Wherein, the initial position of the data to be stored in memory, can shared by data stored in memory storage region determine.So that storing data is Coutinuous store in memory, to be effectively reduced disk fragments problem.

Description

A kind of date storage method and device
Technical field
This application involves field of data storage, more particularly to a kind of date storage method and device.
Background technique
With the development of science and technology, there are the data of magnanimity, can store data in memory such as disk. Currently, can directly utilize common file system such as file allocation table (File Allocation when storing data Table, FAT) 32 and file system such as file allocation table (File Allocation Table, FAT) system carry out data Storage.
But since the disk fragments problem of FAT32 and NTFS is than more serious, when may cause memory using one section Between after the memory cannot use, it is necessary to formatted storage device can just continue to use.Wherein, so-called disk fragments are Refer to the position that stores in memory of file and discontinuous, and is dispersedly stored in memory.On the one hand, disk fragmentsization are tight Weight, the storage space utilization that will lead to memory are relatively low.On the other hand, after memory is using a period of time, user Timely formatted storage device may be needed, bad experience is brought to user.
It is, therefore, desirable to provide a kind of scheme, the problem of disk fragments can be mitigated.
Summary of the invention
Technical problems to be solved in this application are how to mitigate disk fragments problem, provide a kind of date storage method And device.
In a first aspect, the embodiment of the present application provides a kind of date storage method, comprising:
The metadata of data to be stored is obtained, the metadata includes: the starting of the data to be stored in memory The size of memory space shared by storage address and the data to be stored;
The storage region of the data to be stored in the memory is determined according to the metadata;
The data to be stored is stored into the corresponding storage region of the data to be stored.
It optionally, include the first storage region and the second storage region in the memory, the data to be stored is in institute Stating the storage region in memory is the storage region in second storage region;The method also includes:
The metadata of the data to be stored is stored into first storage region.
Optionally, second storage region includes the sub-storage areas that several storage sizes are the first numerical value, It is then described to obtain the initial address of the data to be stored in memory, comprising:
Obtain the initial address that the sub-storage areas of data is most recently stored in second storage region;
The initial address of the sub-storage areas for being most recently stored data is added into first numerical value, is obtained described wait deposit Store up the initial memory address of data in the memory.
Optionally, if the size of storage region shared by the data to be stored, it is less than or equal to first numerical value, institute It states and stores the data to be stored into the corresponding storage region of the data to be stored, comprising:
The data to be stored is stored into the sub-storage areas including the initial memory address.
Optionally, if the size of memory space shared by the data to be stored, it is greater than first numerical value, the method is also Include:
By the data to be stored be divided into that the shared storage size of the first number is the first numerical value first wait deposit It stores up data and the shared storage size of the second number is less than the second storing data of first numerical value;Wherein, described One number is positive integer, and second number is equal to 1 or 0;
First data to be stored and second data to be stored are stored respectively into corresponding storage region.
Optionally, the data to be stored includes:
The video data that video monitoring system monitors.
Optionally, the metadata of the video data monitored in the video monitoring system further include:
The video data corresponding time.
Second aspect, the embodiment of the present application provide a kind of data storage device, comprising:
Acquiring unit, for obtaining the metadata of data to be stored, the metadata includes: that the data to be stored is being deposited The size of memory space shared by initial memory address and the data to be stored in reservoir;
Determination unit, for determining the memory block of the data to be stored in the memory according to the metadata Domain;
First storage unit, for the data to be stored to be stored storage region corresponding to the data to be stored In.
It optionally, include the first storage region and the second storage region in the memory, the data to be stored is in institute Stating the storage region in memory is the storage region in second storage region;Described device further include:
Second storage unit, for storing the metadata of the data to be stored into first storage region.
Optionally, second storage region includes the sub-storage areas that several storage sizes are the first numerical value, It is then described to obtain the initial address of the data to be stored in memory, comprising:
Obtain the initial address that the sub-storage areas of data is most recently stored in second storage region;
The initial address of the sub-storage areas for being most recently stored data is added into first numerical value, is obtained described wait deposit Store up the initial memory address of data in memory.
Optionally, if the size of storage region shared by the data to be stored, it is less than or equal to first numerical value, institute The first storage unit is stated, is specifically used for:
The data to be stored is stored into the sub-storage areas including the initial memory address.
Optionally, if the size of memory space shared by the data to be stored, it is greater than first numerical value, described device is also Include:
Division unit is the first number for the data to be stored to be divided into the shared storage size of the first number The first data to be stored and the second number shared storage size of value are less than the second storing data of first numerical value; Wherein, first number is positive integer, and second number is equal to 1 or 0;
Third storage unit, for being stored first data to be stored and second data to be stored respectively to phase In the storage region answered.
Optionally, the data to be stored includes:
The video data that video monitoring system monitors.
Optionally, the metadata of the video data monitored in the video monitoring system further include:
The video data corresponding time.
Compared with prior art, the embodiment of the present application has the advantage that
Date storage method and device provided by the embodiments of the present application, comprising: the metadata of data to be stored is obtained, In, the metadata includes: data to be stored initial memory address in memory and data to be stored institute The size of the memory space accounted for determines the storage region of the data to be stored in the memory according to the metadata, The data to be stored is stored into the corresponding storage region of the data to be stored.It can be seen that being implemented using the application The scheme that example provides can originate storage ground before storing data to be stored in memory according to the data to be stored The size of memory space shared by location and the data to be stored determines the storage region for storing the data to be stored, rather than As in the prior art, distributing storage region at random for the data to be stored.Wherein, the data to be stored is in memory Initial position, can shared by data stored in memory storage region determine.So that being deposited in memory Storing up data is Coutinuous store, to be effectively reduced disk fragments problem.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The some embodiments recorded in application, for those of ordinary skill in the art, without creative efforts, It is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of date storage method provided by the embodiments of the present application;
Fig. 2 is a kind of flow diagram of date storage method provided by the embodiments of the present application;
Fig. 3 is a kind of structural schematic diagram of data storage device provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only this Apply for a part of the embodiment, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art exist Every other embodiment obtained under the premise of creative work is not made, shall fall in the protection scope of this application.
Present inventor has found that the disk of file system such as file allocation table FAT32 and NTFS is broken after study Piece problem is than more serious, and may cause memory cannot be used using the memory after a period of time, it is necessary to format Changing memory can just continue to use.Wherein, so-called disk fragments refer to position that file stores in memory and discontinuous, And it is dispersedly stored in memory.And the serious reason of current file system fragmentationization first is that because file system depositing When storing up data to be stored, storage region is distributed for data at random, rather than is come in conjunction with the stored data area of current storage Determine the storage region of data to be stored.
On the one hand, disk fragmentsization are serious, and the storage space utilization that will lead to memory is relatively low.On the other hand, exist After memory uses a period of time, user may need timely formatted storage device, and bad experience is brought to user.
To solve the above-mentioned problems, the embodiment of the present application provides a kind of date storage method and device, comprising: obtain to The metadata of storing data, wherein the metadata includes: the initial memory address of the data to be stored in memory, And the size of memory space shared by the data to be stored, determine the data to be stored described according to the metadata Storage region in memory stores the data to be stored into the corresponding storage region of the data to be stored.
It can be seen that using scheme provided by the embodiments of the present application, it, can be according to described before storing data to be stored The size of data to be stored memory space shared by initial memory address and the data to be stored in memory, determines storage The storage region of the data to be stored, rather than as in the prior art, distributing memory block at random for the data to be stored Domain.Wherein, the initial position of the data to be stored in memory, can the storage as shared by data stored in memory Region determines.So that storing data is Coutinuous store in memory, to be effectively reduced disk fragments problem.
With reference to the accompanying drawing, the various non-limiting embodiments of the application are described in detail.
Illustrative methods
Referring to Fig. 1, which is a kind of flow diagram of date storage method provided by the embodiments of the present application.
Date storage method provided by the embodiments of the present application, such as can be realized with S101-S103 as follows.
S101: obtaining the metadata of data to be stored, the metadata include the data to be stored in memory The size of memory space shared by initial memory address and the data to be stored.
It should be noted that the embodiment of the present application does not limit the data to be stored specifically, as an example, it is described to Storing data can be the video data that video monitoring system monitors.
It should be noted that so-called metadata is a kind of special data, it is a kind of for describing the data of data.At this Apply in embodiment, the metadata of the data to be stored, it is possible to understand that at the data for describing the data to be stored.
It should be noted that the embodiment of the present application does not limit the size of memory space shared by the metadata specifically, as The size of a kind of example, memory space shared by the metadata for example can be 64 bytes.
In the embodiment of the present application, the metadata of the data to be stored may include the data to be stored in memory In initial memory address and the data to be stored shared by memory space size.
It should be noted that the initial memory address of data to be stored in memory, Ke Yiyou in the embodiment of the present application Storage region shared by stored data determines in the memory, for example, can be by stored in the memory Data shared by storage region end address determine.
It should be noted that the embodiment of the present application does not limit the memory specifically, and as an example, the memory It such as can be hard disk.
It should be noted that in view of in practical application, after data to be stored is stored into memory, it may be necessary to The data to be stored is read out from memory, and the metadata of data to be stored can be used as to search from memory and be somebody's turn to do The index of data to be stored.Therefore, in a kind of possible implementation of the embodiment of the present application, obtain the metadata it Afterwards, the metadata can also be stored in the memory.
Specifically, in a kind of possible implementation of the embodiment of the present application, the memory can be divided into One storage region and the second storage region, wherein first storage region is for storing the number stored in the memory According to metadata, second storage region for storing data itself.
That is, in the embodiment of the present application, it, can be by this yuan of number after the metadata for obtaining the data to be stored According to storing into first storage region.The storage region of the data to be stored in the memory is deposited for described second Storage region in storage area domain.
It should be noted that the embodiment of the present application does not limit first storage region and second storage region specifically Shared memory space size, the size of memory space shared by first storage region for example can be in conjunction with shared by metadata The size of the total memory space of size and memory of memory space determines.As an example, if the memory space of memory For 20G, then the storage region conduct except the first storage region can be removed using 5M preceding in memory as the first storage region Second storage region.
It is understood that since the metadata includes the starting storage ground of the data to be stored in memory The size of memory space shared by location and the data to be stored.Therefore, the metadata of the data to be stored is obtained, is wrapped It includes: obtaining and deposited shared by data to be stored initial memory address in the memory and the data to be stored Store up the size in space.
The embodiment of the present application does not limit specifically and obtains the initial memory address of the data to be stored in the memory Specific implementation, such as above, the initial memory address of data to be stored in memory, can by the memory Storage region shared by stored data determines.
In consideration of it, obtaining the data to be stored described in a kind of possible implementation of the embodiment of the present application Initial address in memory in specific implementation, can be realized with A-B as follows.
Step A: the initial address that the subregion of data is most recently stored in second storage region is obtained.
Step B: adding the first numerical value for the initial address of the subregion for being most recently stored data, obtains described wait store The initial memory address of data in memory.About step A and step B, it should be noted that in the embodiment of the present application, Second storage region can be divided into the sub-storage areas that several storage sizes are the first numerical value, for example, by second Storage region is divided into the sub-storage areas that several storage sizes are 128K.
It is understood that in general, data are sequential storages into second storage region, therefore, recently The initial address of the sub-storage areas of storing data is bigger than the initial address of the sub-storage areas of storing data before.Therefore, exist In a kind of possible implementation of the embodiment of the present application, step A in specific implementation, such as can be to second in memory Storage region is retrieved, and determines in the second storage region the sub-storage areas of storing data, and by the sub-storage areas The middle maximum initial address of initial address, the initial address as the sub-storage areas for being most recently stored data.
It should be noted that the embodiment of the present application, which does not also limit specifically, obtains memory space shared by the data to be stored Size specific implementation.As above, the data to be stored can be the video counts that video monitoring system monitors According to.Since the video data that video monitoring system monitors may need real-time storage, the acquisition data to be stored The size of shared memory space, can use the video data that the video monitoring system is monitored storing frequencies, And parameter of the video data etc. obtains the size of memory space shared by data to be stored.
S102: the storage region of the data to be stored in the memory is determined according to the metadata.
It should be noted that the storage region of the data to be stored referred in the embodiment of the present application in the memory, Refer to, using the initial address of the data to be stored in the memory as initial address, and shared storage size is The storage region of the size of memory space shared by the data to be stored.For example, the data to be stored is in memory Initial memory address is 55, and the size of memory space shared by the data to be stored is 10K, then the data to be stored is in institute The storage region stated in memory refers to, is initial address with 55, and shared storage size is the storage region of 10K.
S103: the data to be stored is stored into the corresponding storage region of the data to be stored.
As it was noted above, in the embodiment of the present application, it is empty that second storage region can be divided into several storages Between size be the first numerical value sub-storage areas.In the embodiment of the present application, step S103 in specific implementation, may include with Lower two kinds of situations:
The first situation: if the size of storage region shared by the data to be stored, it is less than or equal to first number Value then directly stores the data to be stored into the sub-storage areas including the initial memory address.
Second situation: if if the size wait store memory space shared by the data to be stored, it is greater than described the One numerical value, then by the data to be stored be divided into that the shared storage size of the first number is the first numerical value first wait deposit It stores up data and the shared storage size of the second number is less than the second storing data of first numerical value;Wherein, described One number is positive integer, and second number is equal to 1 or 0;By first data to be stored and second number to be stored According to being stored respectively into corresponding storage region.It should be noted that in the embodiment of the present application, by the described first number to be stored According to storing into corresponding storage region, in specific implementation, it can use method described in step A-B described above and obtain institute The initial memory address of the first data to be stored in the memory is stated, then stores first data to be stored to packet In the sub-storage areas for including the initial memory address of the first data to be stored in the memory.
Similarly, second data to be stored is stored into corresponding storage region, in specific implementation, Ke Yili The method described in step A-B described above obtains the starting storage ground of second data to be stored in the memory Then location stores second data to be stored to the starting storage ground including the second data to be stored in the memory In the sub-storage areas of location.
As above, the data to be stored can be the video data that video monitoring system monitors.And from memory When the video data that the middle reading video monitoring system monitors (for example, when playback monitor video), need by the time To read corresponding video data.And the metadata of data to be stored can be used as and search the data to be stored from memory Index.Therefore, in a kind of possible implementation of the embodiment of the present application, if the data to be stored is video monitoring system Obtained video data is monitored, then the metadata of the video data monitored in video monitoring system is in addition to including the video data Except the size of memory space shared by initial memory address and the video data in the memory, it can also wrap It includes: the video data corresponding time.
It, can be with before storing data to be stored it can be seen that using date storage method provided by the embodiments of the present application According to the size of memory space shared by the data to be stored in memory initial memory address and the data to be stored, Determine the storage region for storing the data to be stored, rather than as being at random the data to be stored point in the prior art With storage region.Wherein, the initial position of the data to be stored in memory, can be by data institute stored in memory The storage region that accounts for determines.So that storing data is Coutinuous store in memory, so that it is broken to be effectively reduced disk Piece problem.
Date storage method provided by the embodiments of the present application is described above, below in conjunction with concrete scene to the party Method is introduced.
In this scenario, the size of memory is 10G, two storage regions is divided into, wherein shared by the first storage region The size of memory space be 5M, the size of memory space shared by the second storage region is (10G-5M).Wherein, the first storage The corresponding storage address in region is 0-A, and the corresponding storage address of the second storage region is (A+1)-B.Wherein, the second storage region It is divided into the sub-storage areas that several storage sizes are 128K.
It is understood that the address of each sub-storage areas for example can be [(A+1)-(A+128)], [(A+129)- (A+256)], [(A+257)-(A+384)] ... etc..
Referring to fig. 2, which is a kind of flow diagram of date storage method provided by the embodiments of the present application.
Date storage method provided in this embodiment, such as can be realized with S201-S204 as follows.
S201: the initial memory address for obtaining data to be stored is 128, and obtains storage shared by the data to be stored The size in space is 200k.
S202: the data to be stored is divided into the first number to be stored that a shared storage size is 128K According to and shared storage size be 72K the second data to be stored.
S203: first data to be stored is stored into the sub-storage areas including storage address 128.
S204: determine the initial address of second data to be stored in the memory be 256, by described second to Storing data is stored into the sub-storage areas including storage address 256.
It should be noted that only not constituting a kind of exemplary illustration of the embodiment of the present application to this Shen shown in Fig. 2 Please embodiment restriction.
Example devices
Based on the date storage method that above method embodiment provides, the embodiment of the present application also provides a kind of storages of data Device is introduced the device below in conjunction with attached drawing.
Referring to Fig. 3, which is a kind of structural schematic diagram of data storage device provided by the embodiments of the present application.
Data storage device 300 provided by the embodiments of the present application, such as can specifically include: acquiring unit 310 determines list Member 320 and the first storage unit 330.
Acquiring unit 310, for obtaining the metadata of data to be stored, the metadata includes: the data to be stored The size of memory space shared by initial memory address in memory and the data to be stored;
Determination unit 320, for determining the storage of the data to be stored in the memory according to the metadata Region;
First storage unit 330, for the data to be stored to be stored memory block corresponding to the data to be stored In domain.
It optionally, include the first storage region and the second storage region in the memory, the data to be stored is in institute Stating the storage region in memory is the storage region in second storage region;Described device 300 further include:
Second storage unit, for storing the metadata of the data to be stored into first storage region.
Optionally, second storage region includes the sub-storage areas that several storage sizes are the first numerical value, It is then described to obtain the initial address of the data to be stored in memory, comprising:
Obtain the initial address that the sub-storage areas of data is most recently stored in second storage region;
The initial address of the sub-storage areas for being most recently stored data is added into the first numerical value, obtains the number to be stored According to initial memory address in memory.
Optionally, if the size of storage region shared by the data to be stored, it is less than or equal to first numerical value, institute The first storage unit 330 is stated, is specifically used for:
The data to be stored is stored into the sub-storage areas including the initial memory address.
Optionally, if the size of memory space shared by the data to be stored, it is greater than first numerical value, described device 300 further include:
Division unit is the first number for the data to be stored to be divided into the shared storage size of the first number The first data to be stored and the second number shared storage size of value are less than the second storing data of first numerical value; Wherein, first number is positive integer, and second number is equal to 1 or 0;
Third storage unit, for being stored first data to be stored and second data to be stored respectively to phase In the storage region answered.
Optionally, the data to be stored includes:
The video data that video monitoring system monitors.
Optionally, the metadata of the video data monitored in the video monitoring system further include:
The video data corresponding time.
Since described device 300 is device corresponding with the date storage method of above method embodiment offer, it closes In the specific implementation of each unit of described device, the description section of above method embodiment can be referred to, details are not described herein again.
It, can be with before storing data to be stored it can be seen that using data storage device provided by the embodiments of the present application According to the size of memory space shared by the data to be stored in memory initial memory address and the data to be stored, Determine the storage region for storing the data to be stored, rather than as being at random the data to be stored point in the prior art With storage region.Wherein, the initial position of the data to be stored in memory, can be by data institute stored in memory The storage region that accounts for determines.So that storing data is Coutinuous store in memory, so that it is broken to be effectively reduced disk Piece problem.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the application Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or Person's adaptive change follows the general principle of the application and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by following Claim is pointed out.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims
The foregoing is merely the preferred embodiments of the application, not to limit the application, it is all in spirit herein and Within principle, any modification, equivalent replacement, improvement and so on be should be included within the scope of protection of this application.

Claims (14)

1. a kind of date storage method characterized by comprising
The metadata of data to be stored is obtained, the metadata includes: the starting storage of the data to be stored in memory The size of memory space shared by address and the data to be stored;
The storage region of the data to be stored in the memory is determined according to the metadata;
The data to be stored is stored into the corresponding storage region of the data to be stored.
2. the method according to claim 1, wherein including that the first storage region and second is deposited in the memory Storage area domain, the storage region of the data to be stored in the memory are the storage region in second storage region; The method also includes:
The metadata of the data to be stored is stored into first storage region.
3. the method according to claim 1, wherein second storage region includes that several memory spaces are big Small is the sub-storage areas of the first numerical value, then described to obtain the initial address of the data to be stored in memory, comprising:
Obtain the initial address that the sub-storage areas of data is most recently stored in second storage region;
The initial address of the sub-storage areas for being most recently stored data is added into first numerical value, obtains the number to be stored According to initial memory address in the memory.
4. according to the method described in claim 3, it is characterized in that, if the size of storage region shared by the data to be stored, It is described that the data to be stored is stored into memory block corresponding to the data to be stored less than or equal to first numerical value In domain, comprising:
The data to be stored is stored into the sub-storage areas including the initial memory address.
5. according to the method described in claim 4, it is characterized in that, if the size of memory space shared by the data to be stored, Greater than first numerical value, the method also includes:
The data to be stored is divided into the first number to be stored that the shared storage size of the first number is the first numerical value According to the second storing data for being less than first numerical value with the shared storage size of the second number;Wherein, first number Mesh is positive integer, and second number is equal to 1 or 0;
First data to be stored and second data to be stored are stored respectively into corresponding storage region.
6. the method according to claim 1, wherein the data to be stored includes:
The video data that video monitoring system monitors.
7. according to the method described in claim 6, it is characterized in that, the member of the video data monitored in the video monitoring system Data further include:
The video data corresponding time.
8. a kind of data storage device characterized by comprising
Acquiring unit, for obtaining the metadata of data to be stored, the metadata includes: the data to be stored in memory In initial memory address and the data to be stored shared by memory space size;
Determination unit, for determining the storage region of the data to be stored in the memory according to the metadata;
First storage unit, for storing the data to be stored into the corresponding storage region of the data to be stored.
9. device according to claim 8, which is characterized in that include that the first storage region and second is deposited in the memory Storage area domain, the storage region of the data to be stored in the memory are the storage region in second storage region; Described device further include:
Second storage unit, for storing the metadata of the data to be stored into first storage region.
10. device according to claim 8, which is characterized in that second storage region includes several memory spaces Size is the sub-storage areas of the first numerical value, then described to obtain the initial address of the data to be stored in memory, comprising:
Obtain the initial address that the sub-storage areas of data is most recently stored in second storage region;
The initial address of the sub-storage areas for being most recently stored data is added into first numerical value, obtains the number to be stored According to initial memory address in memory.
11. device according to claim 10, which is characterized in that if storage region shared by the data to be stored is big It is small, it is less than or equal to first numerical value, first storage unit is specifically used for:
The data to be stored is stored into the sub-storage areas including the initial memory address.
12. device according to claim 11, which is characterized in that if memory space shared by the data to be stored is big It is small, it is greater than first numerical value, described device further include:
Division unit is the first numerical value for the data to be stored to be divided into the shared storage size of the first number First data to be stored and the shared storage size of the second number are less than the second storing data of first numerical value;Its In, first number is positive integer, and second number is equal to 1 or 0;
Third storage unit, for being stored first data to be stored and second data to be stored respectively to corresponding In storage region.
13. device according to claim 8, which is characterized in that the data to be stored includes:
The video data that video monitoring system monitors.
14. device according to claim 13, which is characterized in that the video data monitored in the video monitoring system Metadata further include:
The video data corresponding time.
CN201810942119.9A 2018-08-17 2018-08-17 Data storage method and device Active CN109508143B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810942119.9A CN109508143B (en) 2018-08-17 2018-08-17 Data storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810942119.9A CN109508143B (en) 2018-08-17 2018-08-17 Data storage method and device

Publications (2)

Publication Number Publication Date
CN109508143A true CN109508143A (en) 2019-03-22
CN109508143B CN109508143B (en) 2022-04-22

Family

ID=65745673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810942119.9A Active CN109508143B (en) 2018-08-17 2018-08-17 Data storage method and device

Country Status (1)

Country Link
CN (1) CN109508143B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021223669A1 (en) * 2020-05-06 2021-11-11 华为技术有限公司 Metadata storage method and device
CN113934373A (en) * 2021-10-13 2022-01-14 山东鲁软数字科技有限公司 Energy monitoring data storage method and system
CN116501654A (en) * 2022-01-18 2023-07-28 北京科益虹源光电技术有限公司 Data storage method and laser

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008136563A1 (en) * 2007-05-04 2008-11-13 Iucf-Hyu (Imdustry-University Cooperation Foundation Hanyang University) Method of storing meta-data and system for storing meta-data
US20090074308A1 (en) * 2007-09-19 2009-03-19 Ricoh Company, Ltd. Image processing apparatus and image processing method
CN101814044A (en) * 2010-04-19 2010-08-25 中兴通讯股份有限公司 Method and device for processing metadata
US20120303902A1 (en) * 2007-12-19 2012-11-29 International Business Machines Corporation Apparatus and method for managing data storage
CN103984640A (en) * 2014-05-14 2014-08-13 华为技术有限公司 Method and device for realizing data prefetching
CN105468642A (en) * 2014-09-09 2016-04-06 杭州海康威视数字技术股份有限公司 Data storage method and apparatus
CN105786410A (en) * 2016-03-01 2016-07-20 深圳市瑞驰信息技术有限公司 Method for increasing processing speed of data storage system and data storage system
CN106354840A (en) * 2016-08-31 2017-01-25 北京小米移动软件有限公司 File processing method and device and distributed file system
CN106873908A (en) * 2017-01-17 2017-06-20 北京联想核芯科技有限公司 Date storage method and device
WO2017185579A1 (en) * 2016-04-26 2017-11-02 杭州海康威视数字技术股份有限公司 Method and apparatus for data storage
CN107436725A (en) * 2016-05-25 2017-12-05 杭州海康威视数字技术股份有限公司 A kind of data are write, read method, apparatus and distributed objects storage cluster
CN107784121A (en) * 2017-11-18 2018-03-09 中国人民解放军国防科技大学 Lowercase optimization method of log file system based on nonvolatile memory

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008136563A1 (en) * 2007-05-04 2008-11-13 Iucf-Hyu (Imdustry-University Cooperation Foundation Hanyang University) Method of storing meta-data and system for storing meta-data
US20090074308A1 (en) * 2007-09-19 2009-03-19 Ricoh Company, Ltd. Image processing apparatus and image processing method
US20120303902A1 (en) * 2007-12-19 2012-11-29 International Business Machines Corporation Apparatus and method for managing data storage
CN101814044A (en) * 2010-04-19 2010-08-25 中兴通讯股份有限公司 Method and device for processing metadata
CN103984640A (en) * 2014-05-14 2014-08-13 华为技术有限公司 Method and device for realizing data prefetching
CN105468642A (en) * 2014-09-09 2016-04-06 杭州海康威视数字技术股份有限公司 Data storage method and apparatus
CN105786410A (en) * 2016-03-01 2016-07-20 深圳市瑞驰信息技术有限公司 Method for increasing processing speed of data storage system and data storage system
WO2017185579A1 (en) * 2016-04-26 2017-11-02 杭州海康威视数字技术股份有限公司 Method and apparatus for data storage
CN107315533A (en) * 2016-04-26 2017-11-03 杭州海康威视数字技术股份有限公司 A kind of date storage method and device
CN107436725A (en) * 2016-05-25 2017-12-05 杭州海康威视数字技术股份有限公司 A kind of data are write, read method, apparatus and distributed objects storage cluster
CN106354840A (en) * 2016-08-31 2017-01-25 北京小米移动软件有限公司 File processing method and device and distributed file system
CN106873908A (en) * 2017-01-17 2017-06-20 北京联想核芯科技有限公司 Date storage method and device
CN107784121A (en) * 2017-11-18 2018-03-09 中国人民解放军国防科技大学 Lowercase optimization method of log file system based on nonvolatile memory

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021223669A1 (en) * 2020-05-06 2021-11-11 华为技术有限公司 Metadata storage method and device
US12067279B2 (en) 2020-05-06 2024-08-20 Huawei Technologies Co., Ltd. Metadata storage method and device
CN113934373A (en) * 2021-10-13 2022-01-14 山东鲁软数字科技有限公司 Energy monitoring data storage method and system
CN116501654A (en) * 2022-01-18 2023-07-28 北京科益虹源光电技术有限公司 Data storage method and laser
CN116501654B (en) * 2022-01-18 2024-06-04 北京科益虹源光电技术有限公司 Data storage method and laser

Also Published As

Publication number Publication date
CN109508143B (en) 2022-04-22

Similar Documents

Publication Publication Date Title
CN110018788B (en) Hierarchical storage method, hierarchical storage device, electronic equipment and computer readable storage medium
CN109508143A (en) A kind of date storage method and device
CN108512876B (en) Data pushing method and device
CN105338297B (en) A kind of storage of video data and playback system, device and method
CN107315547A (en) A kind of method and device for reading distributed meta data file
US20150215656A1 (en) Content management apparatus and method, and storage medium
CN101635734A (en) Method and device for storing and managing downloaded data on non-volatile storage medium
CN103116552A (en) Method and device for distributing storage space in distributed type storage system
CN105956035A (en) File storage method and device
CN108984560A (en) File memory method and device
CN104243425A (en) Content management method, device and system in content delivery network
CN103198027A (en) Method and device for storing and providing files
CN108874688A (en) A kind of message data caching method and device
WO2011015022A1 (en) High efficient reading and writing method of first in first out data pool
CN108932114A (en) A kind of method and device of data storage
CN107426321A (en) A kind of distributed memory system quota allotment approach and device
TW200905473A (en) Management of internal operations by a storage device
CN109388624A (en) Distributed document delet method, device, system and computer readable storage medium
US10782888B2 (en) Method and device for improving file system write bandwidth through hard disk track management
CN109002503A (en) A kind of metadata read method, device, equipment and readable storage medium storing program for executing
CN107609140A (en) A kind of method and device of distributive catalogue of document system file access
CN108073723A (en) A kind of file in distributed type assemblies storage is from compressing method and equipment
CN110045924B (en) Hierarchical storage method and device, electronic equipment and computer readable storage medium
CN103761194B (en) A kind of EMS memory management process and device
CN108595109B (en) Multi-client writing method based on Ceph distributed storage system

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
GR01 Patent grant
GR01 Patent grant