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
CN102236707A CN 201110178045 CN201110178045A CN102236707A CN 102236707 A CN102236707 A CN 102236707A CN 201110178045 CN201110178045 CN 201110178045 CN 201110178045 A CN201110178045 A CN 201110178045A CN 102236707 A CN102236707 A CN 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 ltd filed Critical Guiyang Longmaster Information and Technology Co ltd
Priority to CN 201110178045 priority Critical patent/CN102236707A/en
Publication of CN102236707A publication Critical patent/CN102236707A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

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-on module 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-on module 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-on module 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)

1. a method of obtaining the database update data is characterized in that, 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.
2. the method for obtaining the database update data according to claim 1 is characterized in that, also comprises: when webmaster was revised arbitrary configuration of allocation list of described database, the server of described database was revised the update time of this configuration automatically.
3. the method for obtaining the database update data according to claim 1 is characterized in that, also comprises: webmaster when arbitrary configuration of the allocation list of revising described database, the update time of revising this configuration in the lump.
4. according to the arbitrary described method of obtaining the database update data of claim 1 to 3, it is characterized in that described server detects regularly in the allocation list of described database whether arranged the update time bigger than the maximal value of current record.
5. according to the arbitrary described method of obtaining the database update data of claim 1 to 3, it is characterized in that the detection of described server is by Event triggered.
6. a system that obtains the database update data is characterized in that, 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.
7. the system that obtains the database update data according to claim 6 is characterized in that, the server of described database also is used for when webmaster is revised arbitrary configuration of allocation list of described database, the update time of revising this configuration automatically.
8. a database is characterized in that, the list structure of its allocation list at least by parameter name, parameter value and update time three fields form.
9. database according to claim 8 is characterized in that, the server of described database also is used for when webmaster is revised arbitrary configuration of allocation list of described database, the update time of revising this configuration automatically.
10. a server is characterized in that, 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.
CN 201110178045 2011-06-28 2011-06-28 Method, device and system for obtaining update data of database Pending CN102236707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110178045 CN102236707A (en) 2011-06-28 2011-06-28 Method, device and system for obtaining update data of database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110178045 CN102236707A (en) 2011-06-28 2011-06-28 Method, device and system for obtaining update data of database

Publications (1)

Publication Number Publication Date
CN102236707A true CN102236707A (en) 2011-11-09

Family

ID=44887353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110178045 Pending CN102236707A (en) 2011-06-28 2011-06-28 Method, device and system for obtaining update data of database

Country Status (1)

Country Link
CN (1) CN102236707A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186401A (en) * 2011-12-31 2013-07-03 北京新媒传信科技有限公司 Method for updating software system and configuration thereof
CN103365756A (en) * 2012-12-27 2013-10-23 贵阳朗玛信息技术股份有限公司 Hierarchical data monitoring system and monitoring method
CN106020944A (en) * 2016-05-04 2016-10-12 北京思特奇信息技术股份有限公司 Background database configuration based data downloading method and system
CN106980514A (en) * 2016-01-19 2017-07-25 阿里巴巴集团控股有限公司 The update method and device of configuration data
CN107682356A (en) * 2017-10-26 2018-02-09 广州市雷军游乐设备有限公司 Update method and device, the equipment and storage medium of data
CN110083522A (en) * 2019-03-12 2019-08-02 平安普惠企业管理有限公司 Realize the static test and device of allocation list in database
CN112260864A (en) * 2020-10-16 2021-01-22 杭州易和网络有限公司 Method for configuring equipment configuration information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1812331A (en) * 2004-12-24 2006-08-02 中兴通讯股份有限公司 Method for real-time embodying disparity of network managment foreground and background data
CN101232467A (en) * 2008-02-22 2008-07-30 中兴通讯股份有限公司 Method for obtaining information using time jab in real time communicating business
CN101308513A (en) * 2008-06-27 2008-11-19 福建星网锐捷网络有限公司 Distributed system cache data synchronous configuration method and apparatus
CN101719904A (en) * 2009-11-26 2010-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 number Priority date Publication date Assignee Title
CN1812331A (en) * 2004-12-24 2006-08-02 中兴通讯股份有限公司 Method for real-time embodying disparity of network managment foreground and background data
CN101232467A (en) * 2008-02-22 2008-07-30 中兴通讯股份有限公司 Method for obtaining information using time jab in real time communicating business
CN101308513A (en) * 2008-06-27 2008-11-19 福建星网锐捷网络有限公司 Distributed system cache data synchronous configuration method and apparatus
CN101719904A (en) * 2009-11-26 2010-06-02 上海华平信息技术股份有限公司 Method for reducing business communication volumes of server and client during Internet application

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186401A (en) * 2011-12-31 2013-07-03 北京新媒传信科技有限公司 Method for updating software system and configuration thereof
CN103186401B (en) * 2011-12-31 2016-04-20 北京新媒传信科技有限公司 A kind of software systems and config update method thereof
CN103365756A (en) * 2012-12-27 2013-10-23 贵阳朗玛信息技术股份有限公司 Hierarchical data monitoring system and monitoring method
CN103365756B (en) * 2012-12-27 2016-04-06 贵阳朗玛信息技术股份有限公司 Data hierarchy supervisory system and method for supervising
CN106980514A (en) * 2016-01-19 2017-07-25 阿里巴巴集团控股有限公司 The update method and device of configuration data
CN106020944A (en) * 2016-05-04 2016-10-12 北京思特奇信息技术股份有限公司 Background database configuration based data downloading method and system
CN106020944B (en) * 2016-05-04 2019-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-26 2018-02-09 广州市雷军游乐设备有限公司 Update method and device, the equipment and storage medium of data
CN107682356B (en) * 2017-10-26 2020-08-04 广州市雷军游乐设备有限公司 Data updating method and device, equipment and storage medium
CN110083522A (en) * 2019-03-12 2019-08-02 平安普惠企业管理有限公司 Realize the static test and device of allocation list in database
CN112260864A (en) * 2020-10-16 2021-01-22 杭州易和网络有限公司 Method for configuring equipment configuration information

Similar Documents

Publication Publication Date Title
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
CN101790156B (en) Strategy optimization based method and device for repairing fault of terminal software
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
CN102624865A (en) Cluster load prediction method and distributed cluster management system
CN110245145A (en) Structure synchronization method and apparatus of the relevant database to Hadoop database
CN110825408B (en) Program version updating method, self-service device and version control server
CN103200247A (en) Data downloading method and personal computer (PC) downloading client side
CN104954482A (en) Configuration management system and method
CN111046081B (en) Industrial time sequence data access method and system
CN115622986A (en) Sensor communication protocol analysis method, system, storage medium and electronic equipment
CN108255735A (en) Associated environment test method, electronic device and computer readable storage medium
CN104410511A (en) Server management method and system
CN106982128A (en) Network community construction method
CN112202909B (en) Online upgrading method and system for computer storage system
CN107291938B (en) Order inquiry system and method
CN112764874A (en) CMDB configuration management system-based virtual machine server information acquisition method
CN111475468A (en) Log access method, device, equipment and storage medium of newly added system
CN110399534B (en) Terminal performance report generation method, device, equipment and storage medium
CN105813102A (en) Automatic testing system and automatic testing method
CN114626096A (en) Wafer processing production data management method and device and electronic equipment
CN104111929A (en) Electronic device and server management control system and method
CN102902825B (en) A kind of database optimizing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20111109