CN104008067B - A kind of method and device of data storage - Google Patents

A kind of method and device of data storage Download PDF

Info

Publication number
CN104008067B
CN104008067B CN201310055475.6A CN201310055475A CN104008067B CN 104008067 B CN104008067 B CN 104008067B CN 201310055475 A CN201310055475 A CN 201310055475A CN 104008067 B CN104008067 B CN 104008067B
Authority
CN
China
Prior art keywords
queue
data
memory
capacity
internal memory
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.)
Active
Application number
CN201310055475.6A
Other languages
Chinese (zh)
Other versions
CN104008067A (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.)
Union Mobile Pay Co Ltd
Original Assignee
Union Mobile Pay 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 Union Mobile Pay Co Ltd filed Critical Union Mobile Pay Co Ltd
Priority to CN201310055475.6A priority Critical patent/CN104008067B/en
Publication of CN104008067A publication Critical patent/CN104008067A/en
Application granted granted Critical
Publication of CN104008067B publication Critical patent/CN104008067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to field of computer technology, more particularly to a kind of method and device of data storage, it is used to solve application server in the prior art and is limited by memory queue capacity, the relatively low problem of operational efficiency.The method of data storage provided in an embodiment of the present invention includes:After the data total amount stored in internal memory major queue reaches total capacity, by the new data Cun Chudao memory buffer queues for receiving;Total capacity of the total capacity of the memory buffer queue less than the internal memory major queue;When the data total amount stored in memory buffer queue reaches total capacity, by the data Cun Chudao non-volatile memory mediums of memory buffer queue;When the hollow remaining capacity of internal memory major queue reaches the first capacity limit value of setting, by in the data Cun Chudao internal memory major queues in non-volatile memory medium no more than the first capacity limit value, so as to expand the capacity of storage queue, the operational efficiency of application server is improve.

Description

A kind of method and device of data storage
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method and device of data storage.
Background technology
In computer realm, queue(Queue)It is a kind of critically important data structure, it is a kind of only permission in its one end Insertion(PUSH)Data, and removed in the other end(POP)The limited linear list of the computing of data.Modification to queue is according to elder generation Enter what the principle for first going out was carried out, new member is always added to tail of the queue, leave the member for being always team's head of queue.
In actual applications, memory queue is commonly used to preserve the pending message that application server is received, using clothes The request message that the client that will receive of business device is initiated is inserted into memory queue afterbody, from memory queue head obtain successively will from The message of reason, client is sent to by the message after treatment.Because the size of internal memory is limited, ordinary circumstance all can be internal memory Queue sets a maximum capacity, and after the message capacity in memory queue reaches maximum capacity, memory queue refusal insertion is new Message, cause " vacation overflow ", therefore, the size and performance of memory queue turn into whole application server to a certain extent The bottleneck of energy, causes operational efficiency low.
To sum up, in the prior art, application server is limited by memory queue capacity, and operational efficiency is relatively low.
The content of the invention
The embodiment of the present invention provides a kind of method and device of data storage, is used to solve application server in the prior art Limited by memory queue capacity, the relatively low problem of operational efficiency.
A kind of method of data storage provided in an embodiment of the present invention, including:
After the data total amount stored in internal memory major queue reaches the total capacity of the internal memory major queue, by the new number for receiving According in storage to memory buffer queue;Total capacity of the total capacity of the memory buffer queue less than the internal memory major queue;
When the data total amount stored in the memory buffer queue reaches the total capacity of the memory buffer queue, by institute In stating the data Cun Chudao non-volatile memory mediums of memory buffer queue;
When the hollow remaining capacity of the internal memory major queue reaches the first capacity limit value of setting, non-volatile deposited described It is no more than in internal memory major queue described in the data Cun Chudao of the first capacity limit value in storage media.
It is preferred that total capacity of the first capacity limit value of the setting not less than the memory buffer queue;
Internal memory master described in the data Cun Chudao of the first capacity limit value will be no more than in the non-volatile memory medium In queue, including:
According to the sequencing for receiving data, the first capacity limit value will be no more than in the non-volatile memory medium Data store the internal memory major queue in units of the total capacity of the memory buffer queue.
It is preferred that will in the non-volatile memory medium no more than the first capacity limit value data Cun Chudao described in In internal memory major queue, including:
After the data in the internal memory major queue have all been processed, will be no more than in the non-volatile memory medium In internal memory major queue described in the data Cun Chudao of the first capacity limit value.
It is preferred that will in the non-volatile memory medium no more than the first capacity limit value data Cun Chudao described in After internal memory major queue, also include:
In the absence of the data total amount stored in data, and the memory buffer queue in the non-volatile memory medium The maximum capacity of not up to described memory buffer queue, and the hollow remaining memory capacity of the internal memory major queue is more than the of setting During two capacity limit values, the data in the memory buffer queue are all stored in the internal memory major queue;Described second holds Total capacity of the amount limit value not less than the memory buffer queue.
It is preferred that after in the data Cun Chudao memory buffer queues that will newly receive, by the number of the memory buffer queue Before in storage to non-volatile memory medium, also include:
If the vacant capacity in the internal memory major queue reaches the second capacity limit value, deposited in the memory buffer queue The data total amount of storage is not up to the total capacity of the memory buffer queue, then all deposit the data in the memory buffer queue In storing up the internal memory major queue.
It is preferred that after the data in the memory buffer queue are all stored in the internal memory major queue, also wrapping Include:
By in internal memory major queue described in the new data Cun Chudao for receiving.
A kind of device of data storage provided in an embodiment of the present invention, including:
First memory module, the total appearance for reaching the internal memory major queue when the data total amount stored in internal memory major queue After amount, by new memory buffer queue of the data Cun Chudao total capacities for receiving less than the internal memory major queue total capacity;It is described Total capacity of the total capacity of memory buffer queue less than the internal memory major queue;
Second memory module, for reaching the memory buffer team when the data total amount stored in the memory buffer queue During the total capacity of row, by the data Cun Chudao non-volatile memory mediums of the memory buffer queue;
3rd memory module, the first capacity limit value for reaching setting when the hollow remaining capacity of the internal memory major queue When, internal memory major queue described in the data Cun Chudao of the first capacity limit value will be no more than in the non-volatile memory medium In.
When the data total amount stored in internal memory major queue reaches the total capacity of the internal memory major queue in the embodiment of the present invention Afterwards, in the data Cun Chudao memory buffer queues that will newly receive, when the data total amount stored in the memory buffer queue reaches During the total capacity of the memory buffer queue, by the data Cun Chudao non-volatile memory mediums of the memory buffer queue; When the hollow remaining capacity of the internal memory major queue reaches the first capacity limit value of setting, by the non-volatile memory medium No more than the first capacity limit value data Cun Chudao described in internal memory major queue;So as to expand the capacity of storage queue, Improve the operational efficiency of application server.
Brief description of the drawings
Fig. 1 is the method flow diagram of data storage provided in an embodiment of the present invention;
Fig. 2 is the particular flow sheet of embodiment of the present invention processing data;
Fig. 3 A are the schematic diagram that the embodiment of the present invention only carries out data storage by internal memory major queue;
Fig. 3 B are the schematic diagram in the data Cun Chudao memory buffer queues that the embodiment of the present invention will be received newly;
Fig. 3 C are the embodiment of the present invention by the signal in the data Cun Chudao non-volatile memory mediums of memory buffer queue Figure;
Fig. 3 D are that the queuing data in non-volatile memory medium is stored showing to internal memory major queue by the embodiment of the present invention It is intended to;
Fig. 3 E are the embodiment of the present invention by the schematic diagram in the data Cun Chudao internal memory major queues in memory buffer queue;
Fig. 4 is the structure drawing of device of data storage provided in an embodiment of the present invention.
Specific embodiment
In the embodiment of the present invention after data total amount stored in internal memory major queue reaches the total capacity of internal memory major queue, will In the new data Cun Chudao memory buffer queues for receiving;Total capacity of the total capacity of memory buffer queue less than internal memory major queue; When the data total amount stored in memory buffer queue reaches the total capacity of memory buffer queue, by the data of memory buffer queue In storing non-volatile memory medium;When the hollow remaining capacity of internal memory major queue reaches the first capacity limit value of setting, will It is no more than in the data Cun Chudao internal memory major queues of the first capacity limit value of setting in non-volatile memory medium, so as to expand The capacity of storage queue, improves the operational efficiency of application server.
The embodiment of the present invention not only on the basis of convential memory queue, increased the side of non-volatile memory medium storage Formula, has expanded the capacity of storage queue, and, by using memory buffer queue, make the insertion of data and remove operation difference Carried out parallel in two memory queues, so, can be situated between data are stored to non-volatile memories from memory buffer queue Stored during to internal memory major queue from non-volatile memory medium during matter and by data, the data for both not interfered with internal memory major queue are moved Division operation, does not interfere with the data insertion operation of memory buffer queue yet, so as to improve the parallel processing capability of system;Again Person, the embodiment of the present invention is that the disposable storage of total data when the data total amount of memory buffer queue to be reached total capacity arrives non- In volatile storage medium, the mode of this batch storage can reduce non-volatile memory medium input and output(Input/ Output, I/O)The frequency, improve system in parallel disposal ability.
The embodiment of the present invention is described in further detail with reference to Figure of description.
As shown in figure 1, being the method flow diagram of data storage provided in an embodiment of the present invention, comprise the following steps:
S101:After the data total amount stored in internal memory major queue reaches the total capacity of internal memory major queue, by new reception In data Cun Chudao memory buffer queues;Total capacity of the total capacity of memory buffer queue less than internal memory major queue;
S102:When the data total amount stored in memory buffer queue reaches the total capacity of memory buffer queue, by internal memory In the data Cun Chudao non-volatile memory mediums of buffering queue;
S103:When the hollow remaining capacity of internal memory major queue reaches the first capacity limit value of setting, by non-volatile memories No more than in the data Cun Chudao internal memory major queues of the first capacity limit value of setting in medium.
The executive agent of the embodiment of the present invention can be the computer equipments such as server.The data structure of the embodiment of the present invention It is made up of three parts, respectively the queuing data in internal memory major queue, memory buffer queue and non-volatile memory medium;Here Non-volatile memory medium can be the storage medium such as hard disk;Internal memory major queue and memory buffer queue can be common chain type Obstruction queue, non-volatile memory medium is relative to internal memory major queue and memory buffer queue, it is believed that be no capacity limit The data storage medium of system.When carrying out data processing, the data consumed are removed from internal memory major queue, i.e. POP;Start to receive During data, the data insertion that will be received in i.e. PUSH to internal memory major queue, can enter to the data storage situation of internal memory major queue Row real-time monitoring, when the data stored in monitoring internal memory major queue reach maximum storage capacity, the new data for receiving is inserted Enter, i.e. in PUSH to memory buffer queue, when the data stored in memory buffer queue reach maximum capacity, by memory buffer In all data Cun Chudao non-volatile memory mediums of queue, in this process, the data in internal memory major queue are in not The disconnected state consumed, when the hollow remaining data capacity of internal memory major queue reaches the first capacity limit value of setting, will be non-volatile Property storage medium in no more than setting the first capacity limit value queuing data storage in internal memory major queue;
In specific implementation process, when data speed relatively slow or consumption data speed is received, because data are continuous It is removed, the capacity of internal memory major queue may enough carry the data of continuous insertion, at this moment, only can be entered using internal memory major queue The insertion and removal operation of row data, namely the data storage method employed in background technology;When receiving, data speed is very fast Or consumption data speed it is slower when, the off-capacity of internal memory major queue to carry the data of continuous insertion, when in internal memory major queue When the data total amount of storage reaches the total capacity of internal memory major queue, the new data Cun Chudao memory buffer queues for receiving by after In, carry out from memory buffer queue to non-volatile memory medium according to embodiments of the present invention afterwards, then from non-volatile memories Data storage of the medium to internal memory major queue.
In specific implementation process, after receiving the data, it can be determined that whether the data total amount in internal memory major queue reaches To maximum capacity, queuing data is whether there is in non-volatile memory medium, whether be stored with data in memory buffer queue, only Meet during the data total amount in internal memory major queue reaches maximum capacity, non-volatile memory medium and there is queuing data, internal memory Any one condition in the data that are stored with buffering queue these three conditions, then illustrate that current system enters serialized state, Namely enter by the way of memory buffer queue and non-volatile memory medium auxiliary storage, then can insert data into interior Deposit in buffering queue, otherwise, illustrate that current system is in common non-sequence state, namely carry out only with internal memory major queue The mode of data storage, then in can inserting data into internal memory major queue.
It is preferred that in step S103, the total capacity of the first capacity limit value not less than memory buffer queue of setting;
In in non-volatile memory medium no more than the data Cun Chudao internal memory major queues of the first capacity limit value of setting, Including:
According to the sequencing for receiving data, the first capacity limit value of setting will be no more than in non-volatile memory medium Data are stored in internal memory major queue in units of the total capacity of internal memory buffering queue.
Here, will be from memory buffer queue to non-volatile memory medium, from non-volatile memory medium to internal memory host team The data storage of row is all carried out in units of the total capacity size of internal memory buffering queue, and the mode of this batch storage can be reduced Non-volatile memory medium input and output(Input/Output, I/O)The frequency, improve throughput of system and parallel processing energy Power.From non-volatile memory medium to the storage of internal memory major queue it is to be with the total capacity size of internal memory buffering queue due to data Unit, the first capacity limit value for setting here need to be not less than the total capacity of memory buffer queue.
In specific implementation process, the FIFO principle according to queue operation is initially inserted into the data in memory queue Also preferential to be removed from queue, therefore, in order to ensure the data insertion operation in internal memory major queue by the priority for receiving data Order carry out, can according to receive data sequencing, respectively by non-volatile memory medium with internal memory buffering queue Total capacity is stored in internal memory major queue for the data acquisition system of unit.Specifically, when the data stored in memory buffer queue reach To after maximum capacity, by the data in memory buffer queue, one-time write is situated between to non-volatile memories by way of serializing In matter, that is, the data in being written to non-volatile memory medium are sorted according to sequencing when being received in queue 's;In this process, the data in internal memory major queue are persistently removed, when the hollow remaining data capacity of internal memory major queue reaches After first capacity limit value of setting, the data in non-volatile memory medium can be written to total appearance of internal memory buffering queue Measure as in unit unserializing to internal memory major queue;Here it is possible to the data stored in memory buffer queue are reached total capacity When all data as a data acquisition system, the data acquisition system being written in non-volatile memory medium is sequentially inserted Enter in internal memory major queue;Can be according to the size of internal memory major queue vacant capacity, it is determined that the number being inserted into internal memory major queue According to set number, it is assumed that the total capacity size of internal memory major queue is N, and N is the numerical value more than 0, the total capacity of memory buffer queue Size is N/3, then it is the value more than or equal to N/3 that can set the first capacity limit value;Such as, the first capacity limit value is set to 2N/3, then when the hollow remaining capacity of internal memory major queue reaches 2N/3, if the at this moment queuing data in non-volatile memory medium It is N/3, then the whole queuing datas in non-volatile memory medium is inserted into internal memory major queue, if at this moment non-volatile deposits Queuing data in storage media is 2N/3, then will first be deposited into first data acquisition system in non-volatile memory medium, i.e., the One size is initially inserted into internal memory major queue for the data acquisition system of N/3, and in non-volatile memory medium the is deposited into by after Two data acquisition systems, i.e., second size to be inserted into internal memory major queue after the data acquisition system of N/3, here it is possible to by the After one data acquisition system is deposited into internal memory major queue, second data acquisition system is deposited into internal memory major queue immediately, also may be used After first data acquisition system is deposited into internal memory major queue, to treat that the vacant capacity in internal memory major queue reaches setting again The first capacity limit value after, second data acquisition system is deposited into internal memory major queue.If at this moment in non-volatile memory medium Queuing data be N, because the hollow remaining capacity of internal memory major queue only has 2N/3, can only there is 2N/3 in non-volatile memory medium Queuing data be inserted into internal memory major queue;For another example, the first capacity limit value is set to N, that is, internal memory major queue is worked as in setting It is space-time by the data Cun Chudao internal memory major queues in non-volatile memory medium, at this moment, if in non-volatile memory medium Queuing data be N, can be respectively by three sizes for the data acquisition system of N/3 be sequentially stored into internal memory major queue.
It is preferred that in step S103, by the data in non-volatile memory medium no more than the first capacity limit value for setting In storing internal memory major queue, including:
After the data in internal memory major queue have all been processed, by non-volatile memory medium no more than the of setting In the data Cun Chudao internal memory major queues of one capacity limit value.
In specific implementation process, real-time monitoring can be carried out to the vacant capacity in internal memory major queue, when discovery internal memory After vacant capacity in major queue reaches the first capacity limit value of setting, by non-volatile memory medium no more than the of setting The data of one capacity limit value are stored in internal memory major queue in units of the total capacity of internal memory buffering queue;Deposited to reduce data The fussy degree of storage, can be set to the total capacity of internal memory major queue, namely work as internal memory by the first capacity limit value of internal memory major queue After the data of major queue have all been processed, by non-volatile memory medium no more than internal memory major queue total capacity data with The total capacity of memory buffer queue is that unit is stored in internal memory major queue;
If it is preferred that when the data in internal memory major queue had all been processed, the number in non-volatile memory medium According to total amount more than internal memory major queue total capacity, then by non-volatile memory medium with the total capacity of internal memory buffering queue for singly The data acquisition system of position is stored in internal memory major queue successively, until cannot again accommodate more data acquisition systems in internal memory major queue, If when the data in internal memory major queue have all been processed, the data total amount in non-volatile memory medium is less than or equal to The total capacity of internal memory major queue, then will be all in units of the total capacity of internal memory buffering queue in non-volatile memory medium Data acquisition system is stored in internal memory major queue successively.
It is preferred that after step S103, also including:
In data total amount in the absence of storage in data, and memory buffer queue in non-volatile memory medium is not up to When depositing the maximum capacity of buffering queue, and the hollow remaining memory capacity of internal memory major queue more than the second capacity limit value for setting, will Data in memory buffer queue are all stored in internal memory major queue;Second capacity limit value of setting is not less than memory buffer team The total capacity of row.
In specific implementation process, when the capacity of internal memory major queue carries the data of new reception enough, namely number is received According to speed is relatively slow or consumption data speed state under, if continue using non-volatile memory medium and buffering queue aid in into Row data storage, the storage of data and treatment effeciency are relatively low, therefore, all stored when by the data in non-volatile memory medium After in internal memory major queue, if the data total amount stored in memory buffer queue is not up to the maximum capacity of memory buffer queue, And at this moment the hollow remaining capacity of internal memory major queue carries the data of memory buffer queue enough, then can be by memory buffer queue Data all storage in internal memory major queue, the removal for carrying out data using internal memory major queue afterwards is operated;Here it is possible to will Second capacity limit value is set to the half of internal memory major queue total capacity.
The data in non-volatile memory medium are all stored in internal memory major queue it is preferred that can set and work as Afterwards, if the data total amount stored in memory buffer queue is not up to the maximum capacity of memory buffer queue, and in internal memory major queue When vacant memory capacity is not less than the half of internal memory major queue total capacity, by the data in memory buffer queue, all storage is arrived In internal memory major queue.
It is preferred that after step slol, before step S102, also including:
If the vacant capacity in internal memory major queue reaches above-mentioned second capacity limit value, the data stored in memory buffer queue Total amount is not up to the total capacity of memory buffer queue, then by the data in memory buffer queue, all internal memory major queue is arrived in storage In.
In specific implementation process, if the data in memory buffer queue are not up to memory buffer queue total capacity, Vacant capacity in internal memory major queue reaches above-mentioned second capacity limit value, in order to not delay data processing, can be by memory buffer Data in queue are processed in all storing internal memory major queue immediately, to avoid when the data in internal memory major queue are complete When portion has been processed, the data total amount in memory buffer queue is also not up to maximum capacity, so as to memory buffer cannot be processed in time Data in queue.
It is preferred that after the data in memory buffer queue are all stored in internal memory major queue, also including:
By in the new data Cun Chudao internal memory major queues for receiving.
Here, according to the above, after during the data in memory buffer queue are all stored to internal memory major queue, if At this moment the data total amount in internal memory major queue is also not up to maximum capacity, in order to improve operational efficiency, storage mode is converted to Only with the common mode of internal memory major queue storage, in the data Cun Chudao internal memory major queues that will newly receive, and continue monitoring The data storage situation of internal memory major queue, flexibly selects storage mode as the case may be.
As shown in Fig. 2 being the particular flow sheet of embodiment of the present invention processing data, comprise the following steps:
S201:The data of reception are inserted into internal memory major queue afterbody by initialization system, and the data that will be consumed are from internal memory master Queue head is removed;
As shown in Figure 3A, it is a schematic diagram that data storage is carried out by internal memory major queue;At this moment, non-volatile memories are situated between Queuing data in matter and memory buffer queue is all sky, and the data of reception are inserted into internal memory major queue afterbody, the data of consumption Removed from internal memory major queue head.
S202:When the data total amount of internal memory major queue reaches maximum capacity, the new data Cun Chudao internal memories for receiving are delayed Rush in queue;
As shown in Figure 3 B, it is by the schematic diagram in the new data Cun Chudao memory buffer queues for receiving;Here it is possible to will be interior The total capacity for depositing buffering queue is set as 1/3rd of internal memory major queue total capacity.
S203:When the data total amount of memory buffer queue reaches maximum capacity, by all data of memory buffer queue In storing non-volatile memory medium;
As shown in Figure 3 C, it is schematic diagram in data Cun Chudao non-volatile memory mediums by memory buffer queue;Such as Figure shown in, during by the data Cun Chudao non-volatile memory mediums in memory buffer queue, data can continue from Removed in internal memory major queue, the new data for receiving can continue to be inserted into memory buffer queue, that is, the insertion of data and Removing operation can still be carried out parallel, from greatly enhancing running efficiency of system.
In specific implementation process, in order to avoid cannot in time process internal memory when the data processing in internal memory major queue is complete Data in buffering queue, when the data total amount that can be stored in internal memory major queue is less than the half of total capacity, if non-volatile Property storage medium in there is no the data total amount stored in storage queue data, and memory buffer queue to be not up to memory buffer queue Total capacity, then by the data in memory buffer queue all storage in internal memory major queue.
S204:After the data in internal memory major queue are all removed, according to the sequencing for receiving data, will be non-volatile Property storage medium at least one data acquisition system storage in units of the maximum capacity of internal memory buffering queue to internal memory major queue In;
As shown in Figure 3 D, it is by the schematic diagram of the queuing data storage in non-volatile memory medium to internal memory major queue; During by the queuing data storage in non-volatile memory medium to internal memory major queue, data can continue from internal memory master Removed in queue, the new data for receiving can continue to be inserted into memory buffer queue, that is, the insertion of data and removal behaviour Work can equally continue to carry out parallel.
S205:When half of the data total amount in internal memory major queue less than internal memory major queue total capacity, non-volatile memories Queuing data in medium is sky, and data total amount in memory buffer queue is not up to the maximum capacity of memory buffer queue When, by all data Cun Chudao internal memory major queues in memory buffer queue.
As shown in FIGURE 3 E, it is by the schematic diagram in the data Cun Chudao internal memory major queues in memory buffer queue;This is deposited Storage process does not still interfere with the insertion of data and removes operation.By all data Cun Chudao internal memories in memory buffer queue After in major queue, the total capacity of internal memory major queue is also not up to due to the data total amount in internal memory major queue, new reception afterwards Data are inserted into internal memory major queue, namely the data storage after being carried out only with internal memory major queue, when internal memory host team After data total amount in row reaches maximum capacity, repeat the above steps S202 ~ S205.
Based on same inventive concept, a kind of storage corresponding with the method for data storage is additionally provided in the embodiment of the present invention The device of data, because the principle of the device solve problem is similar to the method for embodiment of the present invention data storage, therefore the dress The implementation put may refer to the implementation of method, repeats part and repeats no more.
As shown in figure 4, be the structure drawing of device of data storage provided in an embodiment of the present invention, including:
First memory module 41, the total capacity for reaching internal memory major queue when the data total amount stored in internal memory major queue Afterwards, by new memory buffer queue of the data Cun Chudao total capacities for receiving less than internal memory major queue total capacity;
Second memory module 42, for reaching the total of memory buffer queue when the data total amount stored in memory buffer queue During capacity, by the data Cun Chudao non-volatile memory mediums of memory buffer queue;
3rd memory module 43, for when the hollow remaining capacity of internal memory major queue reaches the first capacity limit value of setting, By in the data Cun Chudao internal memory major queues in non-volatile memory medium no more than the first capacity limit value.
It is preferred that the 3rd memory module 43 specifically for:
When the hollow remaining capacity of internal memory major queue reaches first capacity not less than memory buffer queue total capacity of setting During limit value, according to receive data sequencing, by non-volatile memory medium no more than the first capacity limit value data with The total capacity of memory buffer queue is that unit is stored in internal memory major queue.
It is preferred that the 3rd memory module 43 specifically for:
After the data in internal memory major queue have all been processed, the first capacity will be no more than in non-volatile memory medium In the data Cun Chudao internal memory major queues of limit value.
It is preferred that the 3rd memory module 43 is additionally operable to:
In data total amount in the absence of storage in data, and memory buffer queue in non-volatile memory medium is not up to Deposit the maximum capacity of buffering queue, and the hollow remaining memory capacity of internal memory major queue more than setting not less than memory buffer queue During the second capacity limit value of total capacity, the data that will be stated in memory buffer queue are all stored in internal memory major queue.
It is preferred that the 3rd memory module 43 is additionally operable to,
After the first memory module is by the new data Cun Chudao memory buffer queues for receiving, the second memory module will be interior Before depositing in the data Cun Chudao non-volatile memory mediums of buffering queue, if the vacant capacity in internal memory major queue reaches second During capacity limit value, the data total amount stored in memory buffer queue is not up to the total capacity of memory buffer queue, then delay internal memory The data rushed in queue are all stored in internal memory major queue.
It is preferred that the 3rd memory module 43 is additionally operable to,
After during the data in memory buffer queue are all stored to internal memory major queue, will the new data storage for receiving To in internal memory major queue.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.And, the present invention can be used and wherein include the computer of computer usable program code at one or more Usable storage medium(Including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)The computer program of upper implementation is produced The form of product.
The present invention is with reference to method according to embodiments of the present invention, device(System)And the flow of computer program product Figure and/or block diagram are described.It should be understood that every first-class during flow chart and/or block diagram can be realized by computer program instructions The combination of flow and/or square frame in journey and/or square frame and flow chart and/or block diagram.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices The device of the function of being specified in present one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy In determining the computer-readable memory that mode works so that instruction of the storage in the computer-readable memory is produced and include finger Make the manufacture of device, the command device realize in one flow of flow chart or multiple one square frame of flow and/or block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented treatment, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
, but those skilled in the art once know basic creation although preferred embodiments of the present invention have been described Property concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to include excellent Select embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification without deviating from essence of the invention to the present invention God and scope.So, if these modifications of the invention and modification belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising these changes and modification.

Claims (10)

1. a kind of method of data storage, it is characterised in that the method includes:
After the data total amount stored in internal memory major queue reaches the total capacity of the internal memory major queue, the new data for receiving are deposited In storing up memory buffer queue;Total capacity of the total capacity of the memory buffer queue less than the internal memory major queue;
When the data total amount stored in the memory buffer queue reaches the total capacity of the memory buffer queue, will be described interior In depositing the data Cun Chudao non-volatile memory mediums of buffering queue;
When the hollow remaining capacity of the internal memory major queue reaches the first capacity limit value of setting, the non-volatile memories are situated between It is no more than in internal memory major queue described in the data Cun Chudao of the first capacity limit value in matter;
Will in the non-volatile memory medium no more than the first capacity limit value data Cun Chudao described in internal memory host team After row, methods described also includes:
Do not reached in the absence of the data total amount stored in data, and the memory buffer queue in the non-volatile memory medium To the maximum capacity of the memory buffer queue, and the hollow remaining memory capacity of the internal memory major queue is more than the second appearance of setting During amount limit value, the data in the memory buffer queue are all stored in the internal memory major queue;The second capacity limit Total capacity of the value not less than the memory buffer queue.
2. the method for claim 1, it is characterised in that the first capacity limit value of the setting is slow not less than the internal memory Rush the total capacity of queue;
Internal memory major queue described in the data Cun Chudao of the first capacity limit value will be no more than in the non-volatile memory medium In, including:
According to the sequencing for receiving data, by the number in the non-volatile memory medium no more than the first capacity limit value The total capacity of the memory buffer queue is that unit is stored in the internal memory major queue according to this.
3. the method for claim 1, it is characterised in that described first will be no more than in the non-volatile memory medium In internal memory major queue described in the data Cun Chudao of capacity limit value, including:
It is described by being no more than in the non-volatile memory medium after data in the internal memory major queue have all been processed In internal memory major queue described in the data Cun Chudao of the first capacity limit value.
4. the method for claim 1, it is characterised in that will in the new data Cun Chudao memory buffer queues for receiving it Afterwards, by before in the data Cun Chudao non-volatile memory mediums of the memory buffer queue, also include:
If the vacant capacity in the internal memory major queue reaches the second capacity limit value, stored in the memory buffer queue Data total amount is not up to the total capacity of the memory buffer queue, then by the data in the memory buffer queue, all storage is arrived In the internal memory major queue.
5. the method as described in claim 1 or 4, it is characterised in that all store the data in the memory buffer queue After in the internal memory major queue, also include:
By in internal memory major queue described in the new data Cun Chudao for receiving.
6. a kind of device of data storage, it is characterised in that the device includes:
First memory module, the total capacity for reaching the internal memory major queue when the data total amount stored in internal memory major queue Afterwards, by new memory buffer queue of the data Cun Chudao total capacities for receiving less than the internal memory major queue total capacity;
Second memory module, for reaching the memory buffer queue when the data total amount stored in the memory buffer queue During total capacity, by the data Cun Chudao non-volatile memory mediums of the memory buffer queue;
3rd memory module, for when the hollow remaining capacity of the internal memory major queue reaches the first capacity limit value of setting, inciting somebody to action It is no more than in internal memory major queue described in the data Cun Chudao of the first capacity limit value in the non-volatile memory medium;
3rd memory module is additionally operable to:
Do not reached in the absence of the data total amount stored in data, and the memory buffer queue in the non-volatile memory medium To the maximum capacity of the memory buffer queue, and the internal memory major queue hollow remaining memory capacity being not less than more than setting During the second capacity limit value of the memory buffer queue total capacity, by the data in the memory buffer queue, all institute is arrived in storage In stating internal memory major queue.
7. device as claimed in claim 6, it is characterised in that the 3rd memory module specifically for:
When the hollow remaining capacity of the internal memory major queue reach setting not less than the first of the memory buffer queue total capacity During capacity limit value, according to the sequencing for receiving data, first capacity will be no more than in the non-volatile memory medium The data of limit value are stored in the internal memory major queue in units of the total capacity of the memory buffer queue.
8. device as claimed in claim 6, it is characterised in that the 3rd memory module specifically for:
It is described by being no more than in the non-volatile memory medium after data in the internal memory major queue have all been processed In internal memory major queue described in the data Cun Chudao of the first capacity limit value.
9. device as claimed in claim 6, it is characterised in that the 3rd memory module is additionally operable to,
After first memory module is by the new data Cun Chudao memory buffer queues for receiving, second memory module Before in the data Cun Chudao non-volatile memory mediums of the memory buffer queue, if vacant in the internal memory major queue When capacity reaches the second capacity limit value, the data total amount stored in the memory buffer queue is not up to the memory buffer The total capacity of queue, then all store in the internal memory major queue data in the memory buffer queue.
10. the device as described in claim 6 or 9, it is characterised in that the 3rd memory module is additionally operable to,
After during the data in the memory buffer queue are all stored to the internal memory major queue, will the new data for receiving In storing the internal memory major queue.
CN201310055475.6A 2013-02-21 2013-02-21 A kind of method and device of data storage Active CN104008067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310055475.6A CN104008067B (en) 2013-02-21 2013-02-21 A kind of method and device of data storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310055475.6A CN104008067B (en) 2013-02-21 2013-02-21 A kind of method and device of data storage

Publications (2)

Publication Number Publication Date
CN104008067A CN104008067A (en) 2014-08-27
CN104008067B true CN104008067B (en) 2017-05-31

Family

ID=51368727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310055475.6A Active CN104008067B (en) 2013-02-21 2013-02-21 A kind of method and device of data storage

Country Status (1)

Country Link
CN (1) CN104008067B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473329A (en) * 2013-09-17 2013-12-25 广州市信息安全测评中心 Persistent data queue as well as loading method and loading device of persistent data queue
CN105721216A (en) * 2016-02-29 2016-06-29 浪潮通信信息系统有限公司 Management method and device of network management device
CN106850849A (en) * 2017-03-15 2017-06-13 联想(北京)有限公司 A kind of data processing method, device and server

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996266A (en) * 2006-12-15 2007-07-11 华为技术有限公司 Multi-level buffering type memory system and method therefor
CN102591864A (en) * 2011-01-06 2012-07-18 上海银晨智能识别科技有限公司 Data updating method and device in comparison system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996266A (en) * 2006-12-15 2007-07-11 华为技术有限公司 Multi-level buffering type memory system and method therefor
CN102591864A (en) * 2011-01-06 2012-07-18 上海银晨智能识别科技有限公司 Data updating method and device in comparison system

Also Published As

Publication number Publication date
CN104008067A (en) 2014-08-27

Similar Documents

Publication Publication Date Title
Attia et al. Cygraph: A reconfigurable architecture for parallel breadth-first search
CN101122886B (en) Method and device for dispensing cache room and cache controller
CN103412786A (en) High performance server architecture system and data processing method thereof
CN104008067B (en) A kind of method and device of data storage
CN105573711B (en) A kind of data cache method and device
CN102130833A (en) Memory management method and system of traffic management chip chain tables of high-speed router
CN107077390A (en) A kind of task processing method and network interface card
CN101604261B (en) Task scheduling method for supercomputer
WO2014173166A1 (en) Shared resource scheduling method and system
CN101866277B (en) Data reordering method and device
CN109800074A (en) Task data concurrently executes method, apparatus and electronic equipment
CN103888452B (en) For the order-preserving method and device of message compression
CN108139938A (en) For assisting the device of main thread executing application task, method and computer program using secondary thread
CN105518617B (en) Data cached processing method and processing device
CN102214184A (en) Intermediate file processing device and intermediate file processing method of distributed computing system
CN106484689B (en) Data processing method and device
CN101957777B (en) Method for scheduling data processing procedure
CN104572903B (en) A kind of method of the control data loading of Hbase database
CN101324863A (en) Device and method for controlling synchronous static memory
CN103593148A (en) CDF side off-line call ticket data quick access method and device
CN102201818A (en) Method and device for outputting Turbo decoding result
CN106814973B (en) Packet cutting controller of memory, memory and packet cutting control method of memory
CN104639208B (en) Task processing method and device for implementing multi-path search
CN105024943B (en) Method and storage medium for selecting a waiting queue from which to extract a transmission data segment
WO2024066545A1 (en) Cache management method and device for multi-port reading and writing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant