CN101901270A - Internal memory database method supporting mass memory - Google Patents

Internal memory database method supporting mass memory Download PDF

Info

Publication number
CN101901270A
CN101901270A CN2010102462882A CN201010246288A CN101901270A CN 101901270 A CN101901270 A CN 101901270A CN 2010102462882 A CN2010102462882 A CN 2010102462882A CN 201010246288 A CN201010246288 A CN 201010246288A CN 101901270 A CN101901270 A CN 101901270A
Authority
CN
China
Prior art keywords
memory
memory database
database
record
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.)
Pending
Application number
CN2010102462882A
Other languages
Chinese (zh)
Inventor
姜权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wingtech Electronic Technology Co Ltd
Original Assignee
SHANGHAI COOLBAR 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 SHANGHAI COOLBAR INFORMATION TECHNOLOGY Co Ltd filed Critical SHANGHAI COOLBAR INFORMATION TECHNOLOGY Co Ltd
Priority to CN2010102462882A priority Critical patent/CN101901270A/en
Publication of CN101901270A publication Critical patent/CN101901270A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an internal memory database method supporting mass memory. The method comprises the following steps of: loading records which are to be accessed by a user and do not exist in the internal memory database from a physical database by using the internal memory database; and when the used memory of the internal memory database reaches an upper limit, periodically clearing the records of which the use probabilities are lower than a set value in the internal memory database. The internal memory database method supporting mass memory fully utilizes internal memory and accelerates internal memory access speed.

Description

A kind of memory database method of supporting mass memory
Technical field
The present invention relates to a kind of memory database data administrative skill, particularly relate to a kind of memory database method of supporting mass memory.
Background technology
In recent years, along with the fast development of infotech, it is more and more important that performance becomes, and all used memory database in many systems.Along with the increase of quantity of information, and the internal memory of memory database place main frame is not enough, has produced some problems.
The basic functional principle of memory database and target are that information is kept in the internal memory, improve response speed, because the speed of internal memory operation is more a lot of soon than the speed of disk operating.Some memory database systems are when starting, the information of all physical databases all is loaded into memory database, as long as the user is the content of operation memory database later on, only need background work process and physical data database data to carry out getting final product synchronously, improved response speed so greatly.As shown in Figure 1, still when physical database has lot of data to be loaded into internal memory, can there be the situation of low memory.The solution of some systems is that a loading section data is in internal memory, the internal memory that uses is before cemented out, and other parts are still in physical database, as shown in Figure 2, so, each user capture still during the data in physical database, all will be reloaded, and so just can not reach the purpose of the fast access of memory database.
Summary of the invention
The technical problem to be solved in the present invention is the defective that can not all be loaded in order to overcome the prior art physical database mass data to be arranged in the memory database, a kind of memory database method of supporting mass memory is provided, the efficient performance that it ensures the memory database of mass memory makes speeding up of access memory database.
The present invention solves above-mentioned technical matters by following technical proposals: a kind of memory database method of supporting mass memory, it is characterized in that, it may further comprise the steps: memory database the user will be visited and not the record in memory database be written into from a physical database, reach in limited time when memory database uses internal memory, regularly remove and use probability to be lower than the record of setting value in the memory database.
Preferably, it is to finish by two threads that work alone that the record that uses probability to be lower than setting value in the memory database is removed in described timing, and two threads that work alone begin to scan one by one from the front end and the tail end of the data of memory database respectively.
Preferably, behind the record in one section memory database of described each thread that works alone scanning, discharge a synchrolock, adopt the mode switch threads of dormancy thread.
Preferably, the record that memory database, exists synchronously from physical database of described memory database.
Preferably, add each access time and access times in the described record, according to the use probability of access time and access times calculating record.
Positive progressive effect of the present invention is: by method of the present invention, over time, user's the information of rolling off the production line can be owing to use probability to diminish and remove from internal memory, all be the user that reaches the standard grade basically in the internal memory, search efficiency than the user that reaches the standard grade has faster so just been arranged, again because backstage cleaning thread can be behind the cleaning one piece of data, the meeting dormancy, so just can not take too many CPU (microprocessor) at short notice, can allow other application program that the chance of access memory data is arranged again, improve response speed.
Description of drawings
The synoptic diagram of low memory may appear in Fig. 1 when loading the physical database content for existing memory database.
Fig. 2 is the existing processing synoptic diagram of memory database under the low memory situation.
Fig. 3 uses probability to be lower than the synoptic diagram of the record of setting value for two-wire journey of the present invention from the memory database two ends toward middle removing.
Fig. 4 is the synoptic diagram of the selection method of synchronization between memory database of the present invention and physical database.
Embodiment
Provide preferred embodiment of the present invention below in conjunction with accompanying drawing, to describe technical scheme of the present invention in detail.
The present invention can be before memory database system starts, the minimum use probability of setting data record.When user application access memory database, if be recorded in the memory database, the access times that it is corresponding add 1 and record time of using, the back is visit directly, if record is not in memory database, to from physical database, be written into this earlier and record in the memory database, and write down the information such as time of adding access times and use for this reason, carry out accessing operation thereafter again.
The record that memory database only exists memory database synchronously from physical database, during as certain bar record modification of physical database,, then refresh and be changed to memory database if when also having this record in the memory database, otherwise needn't refresh, as shown in Figure 4.When memory database is revised data,, then add this record to physical database automatically, promptly be synchronized to physical database automatically as adding record.
Meanwhile, two threads that work alone are arranged, the use probability of every record of dedicated calculation, concrete grammar is as follows: they begin scanning and regularly cleaning from the two ends of data respectively toward the centre, as shown in Figure 3, with access times divided by its for the first time and last service time the interval, if the use probability of calculating is lower than setting value, all content association of the record of its correspondence are removed from memory database, and each thread is after having visited a certain amount of data recording, discharge synchrolock, adopt the mode of dormancy, make and other The Application of Thread access memory database of can having an opportunity continue later on again, memory database just has response speed faster like this.
Use the two-wire journey to be from the benefit of two ends visit data: one, the two-wire journey can be accelerated access speed than the single-threaded more time sheet of getting; Its two, begin from two ends its probability that will visit same data simultaneously to be diminished toward middle reverse direction scanning, it is robbed the synchrolock probability and just diminishes, so the speeding up of traversal.
This scheme is as being used in the instant communication software project, under the very many situations of user, all data in the physical database all can not be loaded into memory database, memory database on many application servers loading data from the same physical database, every application server only will current use probability be loaded into the internal memory from physical database than higher user profile record on current server.
Owing to adopted this scheme, after a period of time, user's the information of rolling off the production line can be owing to use probability to diminish and remove from internal memory, basically all be the user that reaches the standard grade in the internal memory, the search efficiency than the user that reaches the standard grade has faster so just been arranged, again because backstage cleaning thread can be behind the cleaning one piece of data, the meeting dormancy, so just can not take too many CPU (microprocessor) at short notice, can allow other application program that the chance of access memory data is arranged again, improve response speed.
Though more than described the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, under the prerequisite that does not deviate from principle of the present invention and essence, can make numerous variations or modification to these embodiments.Therefore, protection scope of the present invention is limited by appended claims.

Claims (5)

1. memory database method of supporting mass memory, it is characterized in that, it may further comprise the steps: memory database the user will be visited and not the record in memory database be written into from a physical database, reach in limited time when memory database uses internal memory, regularly remove and use probability to be lower than the record of setting value in the memory database.
2. the memory database method of support mass memory as claimed in claim 1, it is characterized in that, it is to finish by two threads that work alone that the record that uses probability to be lower than setting value in the memory database is removed in described timing, and two threads that work alone begin to scan one by one from the front end and the tail end of the data of memory database respectively.
3. the memory database method of support mass memory as claimed in claim 2 is characterized in that, behind the record in one section memory database of described each thread that works alone scanning, discharges a synchrolock, adopts the mode switch threads of dormancy thread.
4. the memory database method of support mass memory as claimed in claim 3 is characterized in that, the record that described memory database exists memory database synchronously from physical database.
5. the memory database method of support mass memory as claimed in claim 1 is characterized in that, adds each access time and access times in the described record, according to the use probability of access time and access times calculating record.
CN2010102462882A 2010-08-05 2010-08-05 Internal memory database method supporting mass memory Pending CN101901270A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102462882A CN101901270A (en) 2010-08-05 2010-08-05 Internal memory database method supporting mass memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102462882A CN101901270A (en) 2010-08-05 2010-08-05 Internal memory database method supporting mass memory

Publications (1)

Publication Number Publication Date
CN101901270A true CN101901270A (en) 2010-12-01

Family

ID=43226804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102462882A Pending CN101901270A (en) 2010-08-05 2010-08-05 Internal memory database method supporting mass memory

Country Status (1)

Country Link
CN (1) CN101901270A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831017A (en) * 2012-08-31 2012-12-19 河海大学 High-efficiency distributed parallel authentication system
CN103377071A (en) * 2012-04-20 2013-10-30 宇龙计算机通信科技(深圳)有限公司 Data batch delete method and system
WO2014089828A1 (en) * 2012-12-14 2014-06-19 华为技术有限公司 Method for accessing storage device and storage device
CN105279104A (en) * 2015-11-25 2016-01-27 北京京东尚科信息技术有限公司 Data caching method based on java platform
CN105447037A (en) * 2014-08-29 2016-03-30 优视科技有限公司 Caching clearing method and device
CN106446038A (en) * 2016-08-31 2017-02-22 武汉钢铁工程技术集团通信有限责任公司 Hybrid database-based data access control system and method
CN109189845A (en) * 2018-08-22 2019-01-11 郑州云海信息技术有限公司 A kind of method and apparatus of internal storage data processing
CN110750960A (en) * 2018-07-05 2020-02-04 武汉斗鱼网络科技有限公司 Configuration file analysis method, storage medium, electronic device and system
CN111221912A (en) * 2020-01-06 2020-06-02 中科驭数(北京)科技有限公司 Data synchronization method and device between database and hardware

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060080270A1 (en) * 2004-10-07 2006-04-13 Shigeko Mori Method for determining an access mode to a dataset
CN101059810A (en) * 2007-03-16 2007-10-24 华为技术有限公司 System and method for implementing automatic optimization of data base system
CN101320392A (en) * 2008-07-17 2008-12-10 中兴通讯股份有限公司 High-capacity data access method and device of internal memory database
CN101329685A (en) * 2008-07-30 2008-12-24 烽火通信科技股份有限公司 Implementing method of memory database on household gateway

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060080270A1 (en) * 2004-10-07 2006-04-13 Shigeko Mori Method for determining an access mode to a dataset
CN101059810A (en) * 2007-03-16 2007-10-24 华为技术有限公司 System and method for implementing automatic optimization of data base system
CN101320392A (en) * 2008-07-17 2008-12-10 中兴通讯股份有限公司 High-capacity data access method and device of internal memory database
CN101329685A (en) * 2008-07-30 2008-12-24 烽火通信科技股份有限公司 Implementing method of memory database on household gateway

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103377071A (en) * 2012-04-20 2013-10-30 宇龙计算机通信科技(深圳)有限公司 Data batch delete method and system
CN102831017A (en) * 2012-08-31 2012-12-19 河海大学 High-efficiency distributed parallel authentication system
CN102831017B (en) * 2012-08-31 2014-09-10 河海大学 High-efficiency distributed parallel authentication system
WO2014089828A1 (en) * 2012-12-14 2014-06-19 华为技术有限公司 Method for accessing storage device and storage device
CN104054071A (en) * 2012-12-14 2014-09-17 华为技术有限公司 Method for accessing storage device and storage device
CN105447037A (en) * 2014-08-29 2016-03-30 优视科技有限公司 Caching clearing method and device
CN105279104A (en) * 2015-11-25 2016-01-27 北京京东尚科信息技术有限公司 Data caching method based on java platform
CN106446038A (en) * 2016-08-31 2017-02-22 武汉钢铁工程技术集团通信有限责任公司 Hybrid database-based data access control system and method
CN110750960A (en) * 2018-07-05 2020-02-04 武汉斗鱼网络科技有限公司 Configuration file analysis method, storage medium, electronic device and system
CN109189845A (en) * 2018-08-22 2019-01-11 郑州云海信息技术有限公司 A kind of method and apparatus of internal storage data processing
CN111221912A (en) * 2020-01-06 2020-06-02 中科驭数(北京)科技有限公司 Data synchronization method and device between database and hardware

Similar Documents

Publication Publication Date Title
CN101901270A (en) Internal memory database method supporting mass memory
CN102567184B (en) Journal storage method based on Flash
JP6014925B2 (en) Memory recovery method and apparatus
CN103885728B (en) A kind of disk buffering system based on solid-state disk
EP3832450A1 (en) Method for aggregation optimization of time series data
CN101930404A (en) Memory device and operation method thereof
CN103246696A (en) High-concurrency database access method and method applied to multi-server system
CN103647935A (en) Video data storage method and video monitoring device
CN108694231A (en) Using NVM and by multiple log recording buffers come ahead log recording
CN102981944B (en) A kind of log storing method based on file system
CN102521269A (en) Index-based computer continuous data protection method
CN102541757A (en) Write cache method, cache synchronization method and device
CN103577348A (en) Method and mobile device for automatically counting application cache size and reminding user
US20200133871A1 (en) Method, device and computer program product for data writing
CN102253941A (en) Cache updating method and cache updating device
CN102945251A (en) Method for optimizing performance of disk database by memory database technology
CN104270605B (en) A kind of processing method and processing device of video monitoring data
CN103514274A (en) Method for data migration of non-relational database HBase
US20180253384A1 (en) Variable cache for non-volatile memory
CN102110167A (en) Method for implementing log information management in numerical control system
CN102929697A (en) State machine, scheduling method and device and universal serial bus (USB) media play control device
CN103077166A (en) Spatial multiplexing method and device for small file storage
CN105447168A (en) Method for restoring and recombining fragmented files in MP4 format
CN102629250A (en) Recovery method of redo log files for main memory database
CN103778120A (en) Global file identification generation method, generation device and corresponding distributed file system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
ASS Succession or assignment of patent right

Owner name: SHANGHAI WENTAI ELECTRONIC SCIENCE + TECHNOLOGY CO

Free format text: FORMER OWNER: SHANGHAI COOLBAR INFORMATION TECHNOLOGY CO., LTD.

Effective date: 20130204

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20130204

Address after: 200001 6B01 room, G District, No. 666, Huangpu District, Shanghai, Beijing East Road

Applicant after: Shanghai Wentai Electronic Science & Technology Co., Ltd.

Address before: 200001, room 816, C District, No. 666, Huangpu District, Shanghai, Beijing East Road

Applicant before: Shanghai Coolbar Information Technology Co., Ltd.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20101201

RJ01 Rejection of invention patent application after publication