Movatterモバイル変換


[0]ホーム

URL:


CN102236707A - Method, device and system for obtaining update data of database - Google Patents

Method, device and system for obtaining update data of database
Download PDF

Info

Publication number
CN102236707A
CN102236707ACN 201110178045CN201110178045ACN102236707ACN 102236707 ACN102236707 ACN 102236707ACN 201110178045CN201110178045CN 201110178045CN 201110178045 ACN201110178045 ACN 201110178045ACN 102236707 ACN102236707 ACN 102236707A
Authority
CN
China
Prior art keywords
database
allocation list
server
maximal value
update time
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
CN 201110178045
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.)
Guiyang Longmaster Information and Technology Co ltd
Original Assignee
Guiyang Longmaster Information and 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 Guiyang Longmaster Information and Technology Co ltdfiledCriticalGuiyang Longmaster Information and Technology Co ltd
Priority to CN 201110178045priorityCriticalpatent/CN102236707A/en
Publication of CN102236707ApublicationCriticalpatent/CN102236707A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

The invention discloses a method, a device and a system for obtaining update data of a database so as to improve the efficiency of obtaining data updates and reducing data transmission quantity. The method comprises the following steps that: a server obtains a configuration table from the database, wherein the table structure of the configuration table is composed of at least three fields, namely a parameter name, a parameter value and updating time; the server loads all the configurations in the configuration table and records the maximum of the updating time in all the configurations; the server detects where there is updating time greater than the maximum recorded at present in the configuration table of the database, and if so, the server loads all the configurations each having the updating time greater than the maximum recorded at present in the server from the configuration table of the database; and before the completion of all the loads in the present run and before the next time of detection, the server updates the maximum of the updating time recorded previously into the maximum of the updating time of loading the configurations in the present run.

Description

Obtain method, the Apparatus and system of database update data
Technical field
The present invention relates to database maintenance administrative skill field, relate in particular to a kind of method, Apparatus and system that obtains the database update data.
Background technology
The system that on a lot of servers, moves, in service in system, some configuration need be configured by the backstage, and these configurations generally are stored in the database (Database), are convenient to provide the WEB interface for users to revise.The list structure of existing database is totally two fields, is respectively parameter name and parameter value, when configuration data changes, wishes that server program can get access to timely, and according to the configuration that changes, carries out different flow processs.
Existing mode is that server regularly obtains all data in the database configuration table, compares with local current configuration then, finds difference, and explanation changes, and carries out associative operation then.
Though can realize purpose like this, but efficient is very low, at first, whether configuration variation is a small probability event, but no matter change, need obtain all data in the allocation list at every turn, when allocation list was big, volume of transmitted data was bigger, secondly, compare successively in server program, efficient is also lower.
Summary of the invention
Fundamental purpose of the present invention has been to provide a kind of method, Apparatus and system that obtains the database update data, obtains the efficient of Data Update and reduces volume of transmitted data with raising.
For reaching above-mentioned purpose, the present invention discloses a kind of method of obtaining the database update data, comprising:
Server obtains allocation list from database, the list structure of described allocation list at least by parameter name, parameter value and update time three fields form;
Described server loads all configurations in the described allocation list, and writes down the maximal value of update time in all configurations;
Described server detects in the allocation list of described database whether arranged the update time bigger than the maximal value of current record, if having, loads all update times of the configuration bigger than the maximal value of described server current record from the allocation list of described database;
Described server loads the back and before detecting in all that finish this next time, and the maximal value of update time of precedence record is updated to the maximal value that this loads the update time of configuration correspondence.
For reaching above-mentioned purpose, the present invention also discloses a kind of system that obtains the database update data fast, comprising: database and server;
Described database storing has allocation list, the list structure of described allocation list at least by parameter name, parameter value and update times three the word field form;
Described server is used for obtaining allocation list from described database, loads all configurations in the described allocation list, and writes down the maximal value of update time in all configurations; Detect afterwards in the allocation list of described database whether arranged the update time bigger than the maximal value of current record, if have, from the allocation list of described database, load all update times of the configuration bigger than the maximal value of described server current record, and load the back and before detecting in all that finish this next time, the maximal value of update time of precedence record is updated to the maximal value that this loads the update time of configuration correspondence.
For reaching above-mentioned purpose, the present invention also provides a kind of database, the list structure of its allocation list at least by parameter name, parameter value and update time three fields form.
For reaching above-mentioned purpose, the present invention also discloses a kind of server, comprising:
Load-on module is used for obtaining allocation list from described database, loads all configurations in the described allocation list, and in the detection module record maximal value of update time;
Described detection module, be used for the allocation list that maximal value according to update time of record detects database whether arranged the update time bigger than the maximal value of current record, if have, enable described load-on module and from the allocation list of described database, load all update times of the configuration bigger than the maximal value of described server current record;
Described load-on module also is used for loading the back and before detecting in all that finish this next time, and the maximal value of update time of precedence record is updated to the maximal value that this loads the update time of configuration correspondence.
Compared with prior art, method, the Apparatus and system that obtains the database update data disclosed by the invention has the following advantages at least:
Only when configuration changes, could from allocation list, take out data, when so just guaranteeing to have only configuration variation, just have the comparison of data and the more transmission of new data, the cycle of can the scaled-back server detecting, thus greatly improve the efficient of obtaining the database update data and reduced volume of transmitted data.
Description of drawings
Fig. 1 is the method flow diagram that obtains the database update data disclosed by the invention;
Fig. 2 is system and the structure drawing of device that obtains the database update data disclosed by the invention.
Embodiment
Database be according to data structure organize, the warehouse of storage and management data, it has number of different types, has all obtained in all fields using widely to the large-scale database system that can carry out mass data storage from the simplest form that stores various data.Below in conjunction with Figure of description to method, the Apparatus and system that obtains the database update data fast of the present invention.
Embodiment one
Present embodiment discloses a kind of method of obtaining the database update data fast.Wherein the list structure of the allocation list of this database is as shown in table 1:
Parameter name
Parameter value
Update time
Table 1
As known from Table 1, the list structure of its allocation list be provided with parameter name, parameter value and update time three fields.Among the present invention, configuration is the storage unit of database minimum.Being presented on the server interface or list is made up of several configuration institutes usually.Configuration information in the allocation list wherein of the present invention can be log-on messages such as the member's of system age, sex, native place, mailbox, contact method; it also can be the configuration information of the software and hardware of server normal operation; can also be server finish with network in the configuration information of the mutual required communication mechanism of other node; those skilled in the art any can think of configuration information all belong to protection scope of the present invention, follow-up repeating no more.
The method of obtaining the database update data disclosed in this invention is based on the database of above-mentioned table 1, and as shown in Figure 1, this method specifically comprises:
Step S1, start server, finish the initial work of server.The described server of present embodiment includes but not limited to the WEB server.
Step S2, server obtain allocation list from database, load all configurations in the allocation list, and write down the maximal value of update time in all configurations.
Among the present invention, the maximal value of update time is the value of up-to-date update time, generally also is the value with nearest update time server current time, follow-up repeating no more.
After this step was complete, webmaster or other application program may be revised the configuration data in the allocation list in the database.Wherein, preferable when revising configuration data, the current time that database writes down this database in the update time of modification configuration data in the field automatically; And in other application scenarios, also can write temporal information in field update time by webmaster.
Step S3, server detect regularly in the allocation list of database whether arranged the update time bigger than the maximal value of current record.If have, change step S4, if do not have, timing detects to wait for next time.
Step S4, server load all update times of the configuration bigger than the maximal value of server current record from the allocation list of database.After finishing, loading changes step S5.
In this step, if an allocation list has 100 configurations, wherein have only a configuration that renewal has taken place, then in the process that loads, data quantity transmitted also is the pairing data volume of this configuration between database and this server; Than the existing allocation list that reloads, data quantity transmitted has die-offed 100 times.In like manner, when this allocation list had only two configuration datas to take place to upgrade, data quantity transmitted had die-offed 50 times than existing method between server of the present invention and the database.
Step S5, server are updated to the maximal value that this loads the update time of configuration correspondence with the maximal value of the update time of precedence record.After renewal is finished, change step S3 to carry out next circulation.
Among the present invention, only be under the prerequisite of small probability event in the variation of configuration data, the die-offing of transmitted data amount (with reference to the example of step S4) created condition for the cycle that shortens server and regularly detect.For example, the cycle that existing method regularly detects is 1 minute, and the cycle that the present invention then can regularly detect it has shortened 5 seconds, thereby makes the present invention greatly improve the efficient of obtaining the database update data and reduced volume of transmitted data.
What deserves to be explained is that in other embodiments, above-mentioned server also can not adopt the mode that regularly detects to remove execution in step S3, but with relevant event trigger mechanism to trigger relevant detection process and subsequent step S4 and step S5.
Embodiment two
Embodiment is corresponding with said method, and present embodiment discloses a kind of system that obtains the database update data.As shown in Figure 2, this system comprises: server 1 and the database 2 that connects thereof, and its connected mode can be a wired connection, also can be wireless connections, the network that can be based on the internet connects, and also can be based on communicating to connect of mobile radio communication and/or PSTN net.
The disclosed database 2 of present embodiment stores allocation list, and the list structure of its allocation list can be with reference to above-mentioned table 1, its at least by parameter name, parameter value and update times three the word field form.Wherein, server 1 is used for obtaining allocation list from database 2, loads all configurations in the allocation list, and writes down the maximal value of update time in all configurations; Detect afterwards in the allocation list of database 2 whether arranged the update time bigger than the maximal value of current record, if have, from the allocation list of database 2, load of the maximal value bigger configuration of all update times than server 1 current record, and load the back and before detecting in all that finish this next time, the maximal value of update time of precedence record is updated to the maximal value that this loads the update time of configuration correspondence.
As shown in Figure 2, in a specific embodiment, above-mentioned server 1 can comprise the following function module at least:
Load-onmodule 10 is used for obtaining allocation list from database 2, loads all configurations in the allocation list, and writes down the maximal value of update time at detection module 20.And this load-onmodule 10 also is used for loading the back and before detecting finishing when last time all next time, and the maximal value of update time of precedence record is updated to the maximal value that this loads the update time of disposing correspondence.
Detection module 20, be used for the allocation list that maximal value according to update time of record detects database 2 whether arranged the update time bigger than the maximal value of current record, if have, enable load-onmodule 10 and from the allocation list of database 2, load of the maximal value bigger configuration of all update times than server 1 current record.
Preferable, the disclosed system of present embodiment also further comprises the webmaster that is connected with database 2 or other application program (not shown); The server of above-mentioned database 2 then also is used for when arbitrary configuration of the allocation list of webmaster or application modification database, revises the update time of response configuration in the allocation list automatically.
The disclosed system that obtains the database update data of present embodiment, only when configuration changes, could from allocation list, take out data, when so just guaranteeing to have only configuration variation, just have the comparison of data and the more transmission of new data, the cycle of can the scaled-back server detecting, thus greatly improve the efficient of obtaining the database update data and reduced volume of transmitted data.
More than disclosed only be several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.

Claims (10)

CN 2011101780452011-06-282011-06-28Method, device and system for obtaining update data of databasePendingCN102236707A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN 201110178045CN102236707A (en)2011-06-282011-06-28Method, device and system for obtaining update data of database

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN 201110178045CN102236707A (en)2011-06-282011-06-28Method, device and system for obtaining update data of database

Publications (1)

Publication NumberPublication Date
CN102236707Atrue CN102236707A (en)2011-11-09

Family

ID=44887353

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN 201110178045PendingCN102236707A (en)2011-06-282011-06-28Method, device and system for obtaining update data of database

Country Status (1)

CountryLink
CN (1)CN102236707A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103186401A (en)*2011-12-312013-07-03北京新媒传信科技有限公司Method for updating software system and configuration thereof
CN103365756A (en)*2012-12-272013-10-23贵阳朗玛信息技术股份有限公司 Data hierarchical monitoring system and monitoring method
CN106020944A (en)*2016-05-042016-10-12北京思特奇信息技术股份有限公司Background database configuration based data downloading method and system
CN106980514A (en)*2016-01-192017-07-25阿里巴巴集团控股有限公司The update method and device of configuration data
CN107682356A (en)*2017-10-262018-02-09广州市雷军游乐设备有限公司Update method and device, the equipment and storage medium of data
CN110083522A (en)*2019-03-122019-08-02平安普惠企业管理有限公司Realize the static test and device of allocation list in database
CN112260864A (en)*2020-10-162021-01-22杭州易和网络有限公司Method for configuring equipment configuration information
CN112527910A (en)*2020-12-282021-03-19南京零镜科技有限公司 A data synchronization method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1812331A (en)*2004-12-242006-08-02中兴通讯股份有限公司Method for real-time embodying disparity of network managment foreground and background data
CN101232467A (en)*2008-02-222008-07-30中兴通讯股份有限公司Method for obtaining information using time jab in real time communicating business
CN101308513A (en)*2008-06-272008-11-19福建星网锐捷网络有限公司Distributed system cache data synchronous configuration method and apparatus
CN101719904A (en)*2009-11-262010-06-02上海华平信息技术股份有限公司Method for reducing business communication volumes of server and client during Internet application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1812331A (en)*2004-12-242006-08-02中兴通讯股份有限公司Method for real-time embodying disparity of network managment foreground and background data
CN101232467A (en)*2008-02-222008-07-30中兴通讯股份有限公司Method for obtaining information using time jab in real time communicating business
CN101308513A (en)*2008-06-272008-11-19福建星网锐捷网络有限公司Distributed system cache data synchronous configuration method and apparatus
CN101719904A (en)*2009-11-262010-06-02上海华平信息技术股份有限公司Method for reducing business communication volumes of server and client during Internet application

Cited By (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103186401A (en)*2011-12-312013-07-03北京新媒传信科技有限公司Method for updating software system and configuration thereof
CN103186401B (en)*2011-12-312016-04-20北京新媒传信科技有限公司A kind of software systems and config update method thereof
CN103365756A (en)*2012-12-272013-10-23贵阳朗玛信息技术股份有限公司 Data hierarchical monitoring system and monitoring method
CN103365756B (en)*2012-12-272016-04-06贵阳朗玛信息技术股份有限公司 Data hierarchical monitoring system and monitoring method
CN106980514A (en)*2016-01-192017-07-25阿里巴巴集团控股有限公司The update method and device of configuration data
CN106020944A (en)*2016-05-042016-10-12北京思特奇信息技术股份有限公司Background database configuration based data downloading method and system
CN106020944B (en)*2016-05-042019-05-24北京思特奇信息技术股份有限公司It is a kind of to configure the method and system for carrying out data downloading based on background data base
CN107682356A (en)*2017-10-262018-02-09广州市雷军游乐设备有限公司Update method and device, the equipment and storage medium of data
CN107682356B (en)*2017-10-262020-08-04广州市雷军游乐设备有限公司Data updating method and device, equipment and storage medium
CN110083522A (en)*2019-03-122019-08-02平安普惠企业管理有限公司Realize the static test and device of allocation list in database
CN112260864A (en)*2020-10-162021-01-22杭州易和网络有限公司Method for configuring equipment configuration information
CN112527910A (en)*2020-12-282021-03-19南京零镜科技有限公司 A data synchronization method and system

Similar Documents

PublicationPublication DateTitle
CN102236707A (en)Method, device and system for obtaining update data of database
CN102930062B (en)The method of the quick horizontal extension of a kind of database
CN110825408B (en)Program version updating method, self-service device and version control server
EP2328302B1 (en)A method and device for maintaining a changelog in data synchronization
CN106998274A (en)Application message method for pushing and device
CN109376139A (en)Centralized database monitoring method, computer installation and storage medium
CN102291416A (en)Two-way synchronizing method and system of client-side and server-side
CN110647531A (en)Data synchronization method, device, equipment and computer readable storage medium
CN111046081B (en)Industrial time sequence data access method and system
CN103200247A (en)Data downloading method and personal computer (PC) downloading client side
CN110737506A (en)virtual machine image version management method
CN113254530A (en)Mobile terminal off-line processing method, system, electronic equipment and storage medium
CN113763043A (en)Advertisement landing page display method and device, storage medium and computer equipment
CN113986939A (en) Data change method and device for database
CN113656380B (en) Data lifecycle management method and device
CN112202909B (en)Online upgrading method and system for computer storage system
CN111475468B (en)Log access method, device, equipment and storage medium of newly-added system
CN105813102A (en)Automatic testing system and automatic testing method
CN105930100B (en)A kind of implementation method optimizing usim card file read-write speed and frequency
CN111385613B (en)Television system repairing method, storage medium and application server
CN117874033A (en)Database sub-table method and device, electronic equipment and storage medium
CN113849520B (en)Intelligent recognition method and device for abnormal SQL, electronic equipment and storage medium
CN116820927A (en)Method and device for processing exception of batch operation
CN102487426B (en)Method for improving charging accuracy, system thereof and apparatus thereof
CN102902825B (en)A kind of database optimizing method and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C12Rejection of a patent application after its publication
RJ01Rejection of invention patent application after publication

Application publication date:20111109


[8]ページ先頭

©2009-2025 Movatter.jp