CN101414295A - Method for upgrading database - Google Patents

Method for upgrading database Download PDF

Info

Publication number
CN101414295A
CN101414295A CNA2007101624360A CN200710162436A CN101414295A CN 101414295 A CN101414295 A CN 101414295A CN A2007101624360 A CNA2007101624360 A CN A2007101624360A CN 200710162436 A CN200710162436 A CN 200710162436A CN 101414295 A CN101414295 A CN 101414295A
Authority
CN
China
Prior art keywords
data
database
latest edition
upgrade
upgrading
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
CNA2007101624360A
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.)
Beijing Rising Information Technology Co Ltd
Original Assignee
Beijing Rising International Software 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 Beijing Rising International Software Co Ltd filed Critical Beijing Rising International Software Co Ltd
Priority to CNA2007101624360A priority Critical patent/CN101414295A/en
Publication of CN101414295A publication Critical patent/CN101414295A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a database upgrade method. The method comprises the following steps: requesting upgrade data; acquiring a latest version of the database; inquiring index detail of the data in the latest version of the database so as to find out new data which satisfy the upgrade demand, wherein, the index detail of the data in the latest version of the database is stored in a latest data list in a global shared area; merging all new data which meet the upgrade demand to acquire a latest version of upgrade data package; and providing the latest version of update data package to the database which requests upgrade to finish the upgrade. A seamless upgrade of the databases can be realized by the method.

Description

The upgrade method of database
Technical field
The present invention relates to a kind of upgrade method of database.
Background technology
At computer application field,, often require to carry out regular upgrading for the database that the user uses according to the needs of using.For example, along with the continuous appearance of new virus, need the virus base of antivirus software configuration be carried out.In the technical field of killing the virus, the seamless upgrade of virus base is a problem that receives much concern at present, realizes that seamless upgrade but and be not easy but want perfect.So-called " seamless upgrade " is meant, this a series of actions is upgraded, more becomes, revised to the data of virus base, yet more new element is taking place in a bit imperceptible data of the user of data, and still continuation is as usual used it and without any obstruction.
Many problems appear in existing database upgrade technology.
At first, when data of database is upgraded, generally all can cause the interim time-out of whole service on the local computer.
Virus base is the set of the complex data structures used simultaneously of many clients.When the virus base of antivirus software is frequently upgraded, killing toxic effect rate also will face the danger of remarkable decline.Also have other a lot of databases when upgrading, also to face similar problem.
Secondly, on local computer, if different processes or thread are considered as different users, so, if user A uses legacy data for a long time, renewal has taken place in data between the operating period; And at this moment, user B has got access to up-to-date data, and these two data just might clash so; If the user is C, D, E use the different time data updated again respectively, the probability that the data of these five different editions clash in use is just bigger.
Certainly, when Data Update, interrupt all users' work by force, new data more upgrades the work that recovers all users after finishing again then, is a solution.But this can reduce the data service efficiency.And user's meeting is because upgrade, and the access strategy of change data, even need Suspension of Operations.
The 3rd, the escalation process of prior art is not enough to user transparentization.Whether transparence is meant the user when service end is obtained data, does not worry whether data are old excessively, need queuing to obtain, and whether needs to give back data, and whether data in use can be changed by other user.As user during to the service end request msg, the data that he gets must be up-to-date, that get access at once, that can give back at any time, multi-user's safety.Ideal situation is, the user need not to know for these, and the just request msg and obtain data simply that he will do can be finished the upgrading of database.
The 4th problem of prior art is can not obtain correct data under multithreading, multi-process.If data of database was upgraded when a user asked to upgrade, another user need wait for after Data Update finishes and could visit so, otherwise, just the data that another user can obtain is half new, half is old.
Summary of the invention
The objective of the invention is problem, a kind of upgrade method of improved database is provided, can satisfy the demand of database seamless upgrade at the prior art existence.
According to the present invention, a kind of upgrade method of database is provided, may further comprise the steps: the request upgrade data; Obtain the database latest edition; Inquire about the index detailed catalogue of the data of this database latest edition, satisfy the new data that upgrading requires to find out, wherein the index detailed catalogue of the data of this database latest edition is stored in the latest data tabulation of overall shared region; All are satisfied the new data merging that upgrading requires, obtain the upgrading data packet of latest edition; And the more new data packets of this latest edition offered the database of request upgrading to finish upgrading.
According to embodiments of the invention, wherein, the described database latest edition of obtaining comprises:
Query Database latest edition in overall shared region; This database latest edition is compared with local data base, to determine whether local data base is this database latest edition; When definite local data base is not latest edition, upgrade the data item tabulation in the current use, the data item list storage in the wherein said current use is in the up-to-date tabulation of internal memory; And the data that obtain the database latest edition.
According to embodiments of the invention, wherein, obtain the step of database latest edition the term of execution, refuse any other and obtain the request of database latest edition, before the data of described acquisition database latest edition described.
According to embodiments of the invention, wherein, when described database latest edition is upgraded once more, correspondingly upgrade described latest data tabulation.
According to embodiments of the invention, the upgrade method of database also is included as each renewal data resource a counter is set, and wherein, when new data is created, its counter is added 1; When new data becomes legacy data, corresponding counter is subtracted 1; When client gets access to data, corresponding counter is added 1; And when client discharges data on it, corresponding counter is subtracted 1; When the counting of this counter becomes 0, the corresponding data resource that upgrades of deletion.The counting that can guarantee the data on the client like this is forever greater than 0, and the counting of new data is forever greater than 0; And unmanned data that use, old, counting equals 0.
According to embodiments of the invention, wherein, described database is a virus base.
The present invention can fulfillment database seamless upgrade, make the upgrading of database be similar to the plug-in type database, but have higher dirigibility, extremely low resources occupation rate and good portability, the upgrading of database can not cause the time-out of whole service, can realize new legacy data coexistence, numerous types of data coexistence, multithreading multi-process coexistence, the many service ends of single supplier and multi-client coexistence, escalation process is complete transparence to the client, and support multi-user and multi-platform, thereby overcome the various defectives that exist in the prior art.
The present invention is particularly useful for the upgrading of the virus base of antivirus software, but be not limited to the upgrading of virus base, but go for the upgrading of various databases, particularly be applicable to the database or the miniature database of storage multi-user, striding course, frequent variations, or the set of the complex data structures used simultaneously of other many clients.
Further specify embodiments of the invention below in conjunction with accompanying drawing.
Description of drawings
Fig. 1 is the global workflow journey synoptic diagram that is used for database upgrade according to the embodiment of the invention; And
Fig. 2 is the detail flowchart according to the data that are used to obtain the database latest edition in the embodiments of the invention.
Embodiment
In a preferred embodiment of the invention, as shown in Figure 1, the software systems that are used to realize the method for database upgrade of the present invention comprise four parts: data merge module 1104, data prestrain module 1105, data load module 1106 and data external interface 1107.
Be the example that upgrades in this embodiment with virus base.
For realizing the data upgrading, overall shared region 1100 is set in the memory storage of local computer, all users can both directly have access to data wherein.As shown in 1 figure, overall shared region will be stored latest data tabulation 1101, the up-to-date tabulation 1102 of internal memory and user's shared data 1103.Wherein, latest data tabulation 1101 comprises the tabulation of virus base index detailed catalogue, i.e. the index detailed catalogue of the data of latest edition virus base; The up-to-date tabulation 1102 of internal memory comprises the data item tabulation in the current use, i.e. the index detailed catalogue of the data of the virus base of the current use of user; User's shared data 1103 comprises the set of the data that all users are using.
Data merge module 1104 and are used for by upgrade file, the database specific data is upgraded.During this module work, other all-access to virus base will be under an embargo.
Data prestrain module 1105 can be abstracted into virus base the form of " index+data ".It stashes the positional information of data, visits up-to-date data and pass through " index ".In Fig. 1, the upper strata of data prestrain module is the data load module, and lower floor is a disk original data.
Data load module 1106 is from the nearest object layer of user, and the data distribution strategy is realized at this one deck.The required data that it provides for all users, and guarantee data continuously effective during the visit.
Data external interface 1107 is interfaces that the user can see.This interface converts data directory to a latest data.
The course of work of following descriptive data base upgrading:
The first half of Fig. 1 has been described the loading/upgrading process, and wherein initialization/tabulation of renewal latest data and up-to-date tabulation of internal memory [1009,1004,1005] is respectively the work that data prestrain module and data load module will be finished in loading and escalation process.These two tabulations will be indicated all states of current database.
When the database upgrade of service end, additionally need external program that the service packs of data is downloaded to this locality, upgrade latest data tabulation 1101 simultaneously.
The Lower Half of Fig. 1 has been described the data access process.Specify as follows:
External interface request msg [1001]; The data load module accepts request, and inquires about current latest data version [1006] to data prestrain module; Data prestrain module is accepted inquiry [1012], obtains disk original data simultaneously, and merges module integrated data by data, is visit speed-raising [1015] next time; The data load module obtains required version [1013], and it is compared, and attempts to reuse local data [1007]; If reusable, then successful inquiring obtains more new data [1002]; Otherwise, obtain the pairing data of this version [1014] to data prestrain module once more.
From data external interface 1107, only need pass through request msg [1001], obtain data [1002] and [1003] and can realize that just as for all changes inside the data, the user can't see the visit of data.The benefit of this access module is to upgrade to user's abundant transparence by fulfillment database, comprise: the modification of virus base action during transparence has been upgraded, transparence has used up the release movement of virus base, there is not the generation action of virus base in transparence, and the positional information of transparence virus base.The just request msg that the user is required to be done is to obtain data then, and does not need to consider or any other problem that concern of data qurush level may cause, does not also need to be concerned about the content of data and the ins and outs relevant with upgrading.
From echo plex mode [1002] and [1003] of upgrade data, data have been to upgrade through [1015] step (new data that all meet the demands on the disk is merged) in returning the way, are latest datas.Because data have been the latest data of upgrading through [1015] step in returning the way, and the user is when obtaining data, and the data combining step of [1015] must take place, and data must be upgraded.This has guaranteed that virus base use and escalation process carry out simultaneously, i.e. the upgrading of database can not influence the normal use of virus base or require professional time-out.
When normal load/upgrading, only can upgrade latest data tabulation (step 1011), so load and updating operation is fastish.So just can realize carrying out frequent renewal arbitrarily at the arbitrary portion data of database, and these Data Update actions are to the influence of local computer work efficiency, can be shared by the time and come, As time goes on the demand of new data, customer group can progressively obtain all up-to-date data, and disperses to bear the cost that new data loads.When obtaining data, once only can obtain, upgrade satisfactory that part of data (step 1015), other data can not be changed, the intensity of when so just having shared the data upgrading data having been upgraded.So just having guaranteed that Data Update action is shared by the time the influence of local computer work efficiency comes.Present embodiment is shared formula upgrading, the seamless upgrade of fulfillment database by above-described this data.
For example one to have 10000 data all be legacy data in database.When client 1 was obtained data 1, service end changed data 1 into new data 1, and offered client 1.When client 2 was obtained data 2, service end changed data 2 into new data 2, and offered client 2.Service end need not be spent the time in a week, upgrades 10000 data, and then data 1 and 2 are offered client 1 and 2.When obtaining, the more new element of data has been shared.Please note that " client and service end " described here all is meant thread or process.Such as, process A is a service end, and thread B is a client 1, and thread C is a client 2.
Fig. 2 describes the process of the step 1006 of fetching data among Fig. 1 in detail, and this process is finished by data load module 1106.
The up-to-date tabulation 2101 of internal memory among Fig. 2 is identical with the definition of the up-to-date tabulation 1102 of user's shared data 2102 and above-described internal memory and user's shared data 1103.This locality tabulation 2103 among Fig. 2 comprises the buffering tabulation that the data load inside modules is safeguarded.The overall situation may have a plurality of data load modules and work at the same time, has write down the cache information of all data availables that the data load module managed in the local tabulation, is used for data read and quickens.
The renewal data distribution that following data of description load-on module is carried out or the course of work of loading:
Call related function and get upgrade data [2001]; Fetch data Monitoring Data latest edition under all must cooperating in the outside that data prestrain module 1105 provides at every turn.This data load module [2002] of global lock, be that other all clients, service end operation so far all will stop, any request that other obtains the database latest edition all will be rejected, and up to asking more before the client of new data obtains more new data, lock is just untied.Under the cooperation of data prestrain module, inquire about overall latest data version [2003]; If the latest data version is arranged, then at this locality version reusable [2004] whether; If reusable is not then discarded local version, discharge local data [2007]; Open the shared drive district, attempt in user's shared data, to seek latest edition [2009]; If still can not find the latest data version, judgement is that upgrade status is read the storehouse first or the overall situation is upgraded for the first time, then reading of data and create shared data [2008]; If find the latest data version, this moment, there be (different process transfer) in the shared drive data, and this version that finds [2006] is returned in the then up-to-date tabulation of updating memory [2010]; Before all latest edition data are returned, release data load module [2005].
In renewal data distribution process shown in Figure 2, each upgrades data resource and all is provided with the counter of oneself, when counter becomes 0, can cause this resource deleted.
Obtain more new data in step [2006].In step [2008], when not having overall latest edition data, ask for the latest edition data and create shared drive.In step 2006 and 2008, the counter that upgrades data resource adds 1 respectively, comes to 2.The user use up data upgrade after [2006], counter can subtract 1; When new data occurs [2007], counter can deduct 1 again.Like this, and if only if, and the user uses up data, and new data is when occurring, and counter just can become 0, and legacy data just can be deleted.If customer end A is being used old data, customer end B is being used new data, and the counter of legacy data will be 1 so, and keeps existence.Until customer end A uses up old data, counter is carried out when subtracting 1 operation, and the counter of legacy data just can become 0, causes legacy data deleted.This has just realized can using simultaneously in the method for the invention the virus base of different editions of the same race.

Claims (6)

1, a kind of upgrade method of database may further comprise the steps:
The request upgrade data;
Obtain the database latest edition;
Inquire about the index detailed catalogue of the data of this database latest edition, satisfy the new data that upgrading requires to find out, wherein the index detailed catalogue of the data of this database latest edition is stored in the latest data tabulation of overall shared region;
All are satisfied the new data merging that upgrading requires, obtain the upgrading data packet of latest edition; And
The more new data packets of this latest edition is offered the database of request upgrading to finish upgrading.
2, according to the process of claim 1 wherein that the described database latest edition of obtaining comprises:
Query Database latest edition in overall shared region;
This database latest edition is compared with local data base, to determine whether local data base is this database latest edition;
When definite local data base is not latest edition, upgrade the data item tabulation in the current use, the data item list storage in the wherein said current use is in the up-to-date tabulation of internal memory; And the data that obtain the database latest edition.
3,, wherein, obtain the step of database latest edition the term of execution, refuse any other and obtain the request of database latest edition, before the data of described acquisition database latest edition described according to the method for claim 2.
4,, when described database latest edition is upgraded once more, correspondingly upgrade described latest data tabulation according to the process of claim 1 wherein.
5, according to the method for claim 2, also be included as each renewal data resource a counter is set, wherein,
When new data is created, its counter is added 1;
When new data becomes legacy data, corresponding counter is subtracted 1;
When client gets access to data, corresponding counter is added 1; And when client discharges data on it, corresponding counter is subtracted 1;
When the counting of this counter becomes 0, the corresponding data resource that upgrades of deletion.
6, according to the process of claim 1 wherein that described database is a virus base.
CNA2007101624360A 2007-10-15 2007-10-15 Method for upgrading database Pending CN101414295A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007101624360A CN101414295A (en) 2007-10-15 2007-10-15 Method for upgrading database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007101624360A CN101414295A (en) 2007-10-15 2007-10-15 Method for upgrading database

Publications (1)

Publication Number Publication Date
CN101414295A true CN101414295A (en) 2009-04-22

Family

ID=40594832

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007101624360A Pending CN101414295A (en) 2007-10-15 2007-10-15 Method for upgrading database

Country Status (1)

Country Link
CN (1) CN101414295A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043853A (en) * 2010-12-22 2011-05-04 中国农业银行股份有限公司 Method and device for updating stored data
CN102737028A (en) * 2011-04-01 2012-10-17 深圳市赛格导航科技股份有限公司 Synchronization method and synchronization system of database
CN103634272A (en) * 2012-08-21 2014-03-12 腾讯科技(深圳)有限公司 A file scan method, a client device and a server
CN104281809A (en) * 2014-09-30 2015-01-14 北京奇虎科技有限公司 Method, device and system for searching and killing viruses
CN104866339A (en) * 2015-04-27 2015-08-26 努比亚技术有限公司 Distributed persistent management method, system and device of FOTA data
CN105791242A (en) * 2014-12-24 2016-07-20 阿里巴巴集团控股有限公司 Object type identification method and system, server and client
CN107256223A (en) * 2017-04-28 2017-10-17 努比亚技术有限公司 A kind of method, device and terminal for updating internal storage data
CN110618824A (en) * 2018-06-20 2019-12-27 中移(杭州)信息技术有限公司 Software upgrading method, device, medium and equipment

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043853A (en) * 2010-12-22 2011-05-04 中国农业银行股份有限公司 Method and device for updating stored data
CN102737028A (en) * 2011-04-01 2012-10-17 深圳市赛格导航科技股份有限公司 Synchronization method and synchronization system of database
CN103634272A (en) * 2012-08-21 2014-03-12 腾讯科技(深圳)有限公司 A file scan method, a client device and a server
CN104281809A (en) * 2014-09-30 2015-01-14 北京奇虎科技有限公司 Method, device and system for searching and killing viruses
CN105791242A (en) * 2014-12-24 2016-07-20 阿里巴巴集团控股有限公司 Object type identification method and system, server and client
CN105791242B (en) * 2014-12-24 2019-02-26 阿里巴巴集团控股有限公司 Recognition methods, server, client and the system of object type
CN104866339A (en) * 2015-04-27 2015-08-26 努比亚技术有限公司 Distributed persistent management method, system and device of FOTA data
CN104866339B (en) * 2015-04-27 2019-08-16 努比亚技术有限公司 Distributed persistence management method, system and the device of FOTA data
CN107256223A (en) * 2017-04-28 2017-10-17 努比亚技术有限公司 A kind of method, device and terminal for updating internal storage data
CN110618824A (en) * 2018-06-20 2019-12-27 中移(杭州)信息技术有限公司 Software upgrading method, device, medium and equipment

Similar Documents

Publication Publication Date Title
CN101414295A (en) Method for upgrading database
US7765189B2 (en) Data migration apparatus, method, and program for data stored in a distributed manner
US8156507B2 (en) User mode file system serialization and reliability
US20100122239A1 (en) Method and apparatus for monitoring runtime of persistence applications
JP2008541263A (en) Fast and reliable synchronization of file system directories
KR20110128846A (en) Programming model for synchronizing browser caches across devices and web services
JP2009294695A (en) Transaction parallel control method, database management system, and program
JP2007193471A (en) Reservation management program, reservation management device and reservation management method
CN101095111A (en) A method of maintaining applications in a computing device
US20170039046A1 (en) Lock-free execution of workflow instances
US20170039521A1 (en) Protection of running workflows against deployment
US20170039492A1 (en) Workflow management system leveraging in-memory platform artifacts
EP2674868A1 (en) Database update notification method
US8132174B2 (en) Concurrency management in cluster computing of business applications
JP4432087B2 (en) Database update management system, program and method
CN114925084A (en) Distributed transaction processing method, system, device and readable storage medium
KR101175505B1 (en) System for providing user data storage enviroment using network based file system in n-screen
CN110058923B (en) Docker container COW mechanism optimization method and system based on dynamic prefetching strategy
US8918370B2 (en) Dynamic allocation of program libraries
EP2187318A1 (en) Performance optimized retrieve transformation nodes
US10558502B2 (en) Software application runtime having dynamic evaluation functions and parameters
US20170039520A1 (en) Developer mode for workflow systems steering patch deployment
US20170337197A1 (en) Rule management system and method
US7536422B2 (en) Method for process substitution on a database management system
US20130042248A1 (en) System and method for supporting parallel threads in a multiprocessor environment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1127419

Country of ref document: HK

ASS Succession or assignment of patent right

Owner name: BEIJING RISING INTERNATIONAL TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: BEIJING RISING INTERNATIONAL SOFTWARE CO., LTD.

Effective date: 20100413

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100080 ROOM 1305, ZHONGKE BUILDING, NO.22, ZHONGGUANCUN AVENUE, BEIJING CITY TO: 100190 ROOM 1301, ZHONGKE BUILDING, NO.22, ZHONGGUANCUN AVENUE, HAIDIAN DISTRICT, BEIJING CITY

TA01 Transfer of patent application right

Effective date of registration: 20100413

Address after: 100190 Beijing City, Haidian District Zhongguancun Street Branch No. 22 building, room 1301

Applicant after: Beijing Rising Information Technology Co., Ltd.

Address before: 100080, room 1305, Zhongke building, 22 Zhongguancun street, Beijing

Applicant before: Beijing Rising International Software Co., Ltd.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20090422

REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1127419

Country of ref document: HK