CN103077231B - A kind of method and system of database synchronization - Google Patents

A kind of method and system of database synchronization Download PDF

Info

Publication number
CN103077231B
CN103077231B CN201310004261.6A CN201310004261A CN103077231B CN 103077231 B CN103077231 B CN 103077231B CN 201310004261 A CN201310004261 A CN 201310004261A CN 103077231 B CN103077231 B CN 103077231B
Authority
CN
China
Prior art keywords
user status
communication server
server
controller
database
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.)
Expired - Fee Related
Application number
CN201310004261.6A
Other languages
Chinese (zh)
Other versions
CN103077231A (en
Inventor
胡加明
刘晓东
其他发明人请求不公开姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Codyy Education Technology Co Ltd
Original Assignee
Codyy Education 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 Codyy Education Technology Co Ltd filed Critical Codyy Education Technology Co Ltd
Priority to CN201310004261.6A priority Critical patent/CN103077231B/en
Publication of CN103077231A publication Critical patent/CN103077231A/en
Application granted granted Critical
Publication of CN103077231B publication Critical patent/CN103077231B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of method and system of database synchronization, the inventive method comprises the following steps.After the communication server receives the update instruction of controller, the User Status list of the communication server enters blocking model, and the User Status in User Status list is updated to the spare fields in database server by the communication server.If User Status is not updated to spare fields by the communication server in the first Preset Time, to strategic server request first strategy.User Status after process according to the pending User Status in the pending User Status list of the first strategy process, and is updated to the true field of database server by the communication server.If User Status is successfully updated to spare fields by the communication server in the second Preset Time, communication server notification controller, after spare fields is synchronized to true field according to the synchronic command of controller by database server, the communication server according to the unlock command of controller by User Status list unblocking pattern.

Description

A kind of method and system of database synchronization
Technical field
The invention belongs to instant messaging field, particularly relate to a kind of method and system of database synchronization.
Background technology
Along with the develop rapidly of information society, various means of communication such as Fetion, QQ etc. are generally used by people, and except individual application, the instant communication mode of some enterprise versions is also gradually by masses are familiar with, such as the video conference of cloud platform.In daily use, have a large amount of different personnels participating in the meeting not stop to reach the standard grade to roll off the production line, certain hour is needed owing to transmitting data between the communication server and database, there will be the phenomenon that in communication server buffer memory, in line personnel and database, User Status is inconsistent, bring great interference to video conference user.
Summary of the invention
The invention provides a kind of method and system of database synchronization to solve the problem.
The invention provides a kind of method of database synchronization, comprise the following steps.After the communication server receives the update instruction of controller transmission, the User Status list of the described communication server enters blocking model, and the User Status in User Status list is updated to the spare fields in database server by the described communication server.If described User Status is not updated to described spare fields by the described communication server in the first Preset Time, the described communication server is to strategic server request first strategy.User Status after process according to the pending User Status in the pending User Status list of the first strategy process received, and is updated to the true field of database server by the described communication server.If the described User Status in described User Status list is successfully updated to described spare fields by the described communication server in the second Preset Time, the described communication server notifies described controller, described controller sends synchronic command to database server, after described spare fields is synchronized to true field according to described synchronic command by described database server, described controller sends unlock command to the communication server, the described communication server according to described unlock command by described User Status list unblocking pattern.
The invention provides a kind of system of database synchronization, comprise controller, at least one communication server, strategic server and database server, described controller connects the described communication server and database server respectively, and the described communication server connects described strategic server and database server respectively.Described controller, for sending update instruction to the communication server, and according to the notice of the described communication server, send synchronic command to database server, and after described spare fields is synchronized to true field by described database server, send unlock command to the communication server.The described communication server, for receive controller send update instruction after make user's status list enter blocking model, and the spare fields User Status in User Status list is updated in database server, if and described User Status is not updated to described spare fields in the first Preset Time, to strategic server request first strategy.Also for processing the pending User Status in pending User Status list according to the first strategy received, and the User Status after process is updated to the true field of database server, if and in the second Preset Time, the described User Status in described User Status list is successfully updated to described spare fields, notify described controller, and according to controller send unlock command by described User Status list unblocking pattern.Described strategic server, provides the first strategy to the described communication server.Described database server, for the notice according to described controller, is synchronized to true field by described spare fields.
Compared to prior art, according to the method and system of database synchronization provided by the invention, after the communication server receives the update instruction of controller transmission, its User Status list enters blocking model, and the User Status in User Status list is updated to the spare fields in database server by the communication server.If User Status is not updated to spare fields by the communication server in the first Preset Time, the communication server is to strategic server request first strategy.User Status after process according to the pending User Status in the pending User Status list of the first strategy process received, and is updated to the true field of database server by the communication server.By arranging the first strategy, avoid waiting as long for of pending user.If the User Status in User Status list is successfully updated to spare fields by the communication server in the second Preset Time, communication server notification controller, controller sends synchronic command to database server, after spare fields is synchronized to true field according to synchronic command by database server, controller sends unlock command to the communication server, the communication server according to unlock command by User Status list unblocking pattern.So, ensure that the communication server is consistent with the User Status in database server, improve the quality of video conference.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Figure 1 shows that the process flow diagram of the method for the database synchronization that preferred embodiment according to the present invention provides;
Figure 2 shows that the schematic diagram of the system of the database synchronization that preferred embodiment according to the present invention provides.
Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Figure 1 shows that the process flow diagram of the method for the database synchronization that preferred embodiment according to the present invention provides.As shown in Figure 1, the method for database synchronization that preferred embodiment of the present invention provides comprises step 101 ~ 104.
Step 101: after the communication server receives the update instruction of controller transmission, the User Status list of the described communication server enters blocking model, and the User Status in User Status list is updated to the spare fields in database server by the described communication server.
Specifically, controller sends the mode of update instruction to the communication server, can be periodically to send or not timing transmission, according to demand can sets itself in practical application, but is not construed as limiting this present invention.Before described controller sends update instruction to the described communication server, first send clear command to described database server, described spare fields resets according to described clear command by described database server.In this, after the User Status list of the described communication server enters blocking model, the not newly arrived pending User Status of reprocessing.
Step 102: if described User Status is not updated to described spare fields by the described communication server in the first Preset Time, the described communication server is to strategic server request first strategy.
Specifically, described strategic server stores the first strategy, and the mode that the described communication server obtains the first strategy is, after the communication server sends request to strategic server, the first strategy is sent to the communication server by described strategic server.
If described User Status is successfully updated to described spare fields by the described communication server in the first Preset Time, described communication server notification controller, described controller sends synchronic command to database server, after described spare fields is synchronized to true field according to described synchronic command by described database server, described controller sends unlock command to the communication server, the described communication server according to described unlock command by described User Status list unblocking pattern.In this, if there is multiple communication server, when described User Status is successfully updated to described spare fields by all communication servers, and after notification controller, described controller just sends synchronic command to database server.
Step 103: the User Status after process according to the pending User Status in the pending User Status list of the first strategy process received, and is updated to the true field of database server by the described communication server.
Specifically, described first strategy is, the mode of each pending user in the list of described communication server process pending User Status is concurrent processing, and the time of each pending User Status of described communication server process is the second Preset Time.User Status in User Status list is updated to the spare fields in database server process the pending User Status in pending User Status list in the second Preset Time while by the communication server.In this, described second Preset Time is greater than the first Preset Time.
Step 104: if the described User Status in described User Status list is successfully updated to described spare fields by the described communication server in the second Preset Time, the described communication server notifies described controller, described controller sends synchronic command to database server, after described spare fields is synchronized to true field according to described synchronic command by described database server, described controller sends unlock command to the communication server, the described communication server according to described unlock command by described User Status list unblocking pattern.
Specifically, in described second Preset Time, described User Status is successfully updated to described spare fields by the communication server, and database server is when being synchronized to true field according to the synchronic command of controller by described spare fields, the pending User Status of the communication server still in the pending User Status list of process.Until at the end of the second Preset Time, the pending User Status after process is just updated to the true field of database server by the communication server.So, the User Status that the true field of database server is corresponding up-to-date can be guaranteed.
If described User Status is not successfully updated to described spare fields by the described communication server in the second Preset Time, the described communication server no longer sends notice to described controller, and the blocking model of described User Status list removed voluntarily by the described communication server.Now, the communication server can the newly arrived pending User Status of normal process.In this, this database synchronization failure, controller is waited for and is sent update instruction to the communication server next time.
For example, if the communication server on Dec 26th, 2012 10:00:00 receive the update instruction of controller, the User Status list of the described communication server enters blocking model, and the User Status (user 1,2 and 3 is down status) in own user status list is updated to the spare fields in database server.If the first Preset Time is 10 seconds, during to 10:00:10, if the down status of described user 1,2 and 3 is not also updated to spare fields by the communication server, then the communication server is to strategic server request first strategy.If the pending user in the list of the communication server pending User Status comprises user 3 and 4(is line states), and the second Preset Time is 20 seconds.Between 10:00:10 to 10:00:30, the down status of user 1,2 and 3 is updated to the spare fields in database server by the described communication server, the upper line states (processing time of distribution is the second Preset Time that is 20 seconds) of the user of concurrent processing simultaneously 3 and 4, and at 10:00:30, result is updated to the true field of database server.
If when 10:00:25, the down status of user 1,2 and 3 is successfully updated to spare fields in database server and notification controller by the communication server, controller sends synchronic command to database server, spare fields is synchronized to true field according to described synchronic command by database server, and the unlock command that the communication server sends according to controller is by described User Status list unblocking pattern.If when 10:00:30, the communication server is by the true field of state updating to database server of reaching the standard grade of user 3 and 4, now the corresponding each User Status of the true field of database server is respectively: user 1 and 2 is down status, and user 3 and 4 is upper line states.
Otherwise, if until during 10:00:30, the down status of user 1,2 and 3 is not also updated to the spare fields in database server by the communication server, then this database synchronization failure, when controller sends update instruction to the communication server next time, restart synchronous.The communication server is asynchronous in the reach the standard grade state updating true field to database server of 10:00:30 by user 3 and 4.In the true field of then database server, the User Status before user 1 and 2 state keeps this to upgrade is constant, and the state of user 3 and 4 is upper line states.
Figure 2 shows that the schematic diagram of the system of the database synchronization that preferred embodiment according to the present invention provides.As shown in Figure 2, the system of the database synchronization that present pre-ferred embodiments provides comprises controller 201, the communication server 202 and 203, strategic server 204 and database server 205, controller 201 connects the communication server 202,203 and database server 205 respectively, and the communication server 202 and 203 is connection strategy server 204 and database server 205 respectively.Controller 201, for sending update instruction to the communication server 202 and 203, and according to the notice of the communication server 202 and 203, synchronic command is sent to database server 205, and after spare fields is synchronized to true field by database server 205, send unlock command to the communication server 202 and 203.The communication server 202 and 203, for receive controller 201 send update instruction after make user's status list enter blocking model, and the User Status in User Status list is updated to the spare fields in database server 205, if and in the first Preset Time, User Status is not updated to spare fields, to strategic server 204 ask first strategy.The communication server 202 and 203, also for processing the pending User Status in pending User Status list according to the first strategy received, and the User Status after process is updated to the true field of database server 205, if and in the second Preset Time, the User Status in User Status list is successfully updated to spare fields, notification controller 201, and according to controller 201 send unlock command by User Status list unblocking pattern.Strategic server 204, provides the first strategy to the communication server 202 and 203.Database server 205, for the notice according to controller 201, is synchronized to true field by spare fields.About the operating process of said system with described in said method, therefore repeat no more in this.
In sum, according to the method and system of the database synchronization that present pre-ferred embodiments provides, after the communication server receives the update instruction of controller transmission, its User Status list enters blocking model, and the User Status in User Status list is updated to the spare fields in database server by the communication server.If User Status is not updated to spare fields by the communication server in the first Preset Time, the communication server is to strategic server request first strategy.User Status after process according to the pending User Status in the pending User Status list of the first strategy process received, and is updated to the true field of database server by the communication server.By arranging the first strategy, avoid waiting as long for of pending user.If the User Status in User Status list is successfully updated to spare fields by the communication server in the second Preset Time, communication server notification controller, controller sends synchronic command to database server, after spare fields is synchronized to true field according to synchronic command by database server, controller sends unlock command to the communication server, the communication server according to unlock command by User Status list unblocking pattern.So, ensure that the communication server is consistent with the User Status in database server, improve the quality of video conference.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. a method for database synchronization, is characterized in that, comprises the following steps:
After the communication server receives the update instruction of controller transmission, the User Status list of the described communication server enters blocking model, and the User Status in User Status list is updated to the spare fields in database server by the described communication server;
If described User Status is not updated to described spare fields by the described communication server in the first Preset Time, the described communication server is to strategic server request first strategy;
User Status after process according to the pending User Status in the pending User Status list of the first strategy process received, and is updated to the true field of database server by the described communication server;
If the described User Status in described User Status list is successfully updated to described spare fields by the described communication server in the second Preset Time, the described communication server notifies described controller, described controller sends synchronic command to database server, after described spare fields is synchronized to true field according to described synchronic command by described database server, described controller sends unlock command to the communication server, the described communication server according to described unlock command by described User Status list unblocking pattern.
2. method according to claim 1, it is characterized in that, described first strategy is, the mode of each pending user in the list of described communication server process pending User Status is concurrent processing, and the time of each pending User Status of described communication server process is the second Preset Time.
3. method according to claim 1, it is characterized in that, if described User Status is not successfully updated to described spare fields by the described communication server in the second Preset Time, the described communication server no longer sends notice to described controller, and the blocking model of described User Status list removed voluntarily by the described communication server.
4. method according to claim 1, it is characterized in that, if described User Status is successfully updated to described spare fields by the described communication server in the first Preset Time, described communication server notification controller, described controller sends synchronic command to database server, after described spare fields is synchronized to true field according to described synchronic command by described database server, described controller sends unlock command to the communication server, the described communication server according to described unlock command by described User Status list unblocking pattern.
5. method according to claim 1, it is characterized in that, before described controller sends update instruction to the described communication server, first send clear command to described database server, described spare fields resets according to described clear command by described database server.
6. the system of a database synchronization, it is characterized in that, comprise controller, at least one communication server, strategic server and database server, described controller connects the described communication server and database server respectively, the described communication server connects described strategic server and database server respectively
Described controller, for sending update instruction to the communication server, and according to the notice of the described communication server, send synchronic command to database server, and after spare fields is synchronized to true field by described database server, send unlock command to the communication server;
The described communication server, for receive controller send update instruction after make user's status list enter blocking model, and the spare fields User Status in User Status list is updated in database server, if and in the first Preset Time, described User Status is not updated to described spare fields, to strategic server request first strategy
Also for processing the pending User Status in pending User Status list according to the first strategy received, and the User Status after process is updated to the true field of database server, if and in the second Preset Time, the described User Status in described User Status list is successfully updated to described spare fields, notify described controller, and according to controller send unlock command by described User Status list unblocking pattern;
Described strategic server, provides the first strategy to the described communication server;
Described database server, for the notice according to described controller, is synchronized to true field by described spare fields.
CN201310004261.6A 2013-01-07 2013-01-07 A kind of method and system of database synchronization Expired - Fee Related CN103077231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310004261.6A CN103077231B (en) 2013-01-07 2013-01-07 A kind of method and system of database synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310004261.6A CN103077231B (en) 2013-01-07 2013-01-07 A kind of method and system of database synchronization

Publications (2)

Publication Number Publication Date
CN103077231A CN103077231A (en) 2013-05-01
CN103077231B true CN103077231B (en) 2015-08-19

Family

ID=48153761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310004261.6A Expired - Fee Related CN103077231B (en) 2013-01-07 2013-01-07 A kind of method and system of database synchronization

Country Status (1)

Country Link
CN (1) CN103077231B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107180082B (en) * 2017-05-03 2020-12-18 珠海格力电器股份有限公司 Data updating system and method based on multi-level cache mechanism
CN110413303B (en) * 2019-07-23 2023-02-03 日立楼宇技术(广州)有限公司 Controller synchronization method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046821A (en) * 2006-03-31 2007-10-03 Sap股份公司 Generic database manipulator

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4381655B2 (en) * 2002-05-31 2009-12-09 株式会社日立製作所 Storage system, storage device, and information sharing method using the storage device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046821A (en) * 2006-03-31 2007-10-03 Sap股份公司 Generic database manipulator

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
即时通信软件用户状态管理策略与方法;李立亚等;《电脑编程技巧与维护》;20111231;96-98 *

Also Published As

Publication number Publication date
CN103077231A (en) 2013-05-01

Similar Documents

Publication Publication Date Title
US11368520B2 (en) Method, apparatus, and system for executing distributed transaction resources
CN102025756B (en) Distributed system and data synchronization method thereof
CN103297529B (en) Based on the tree-type structure data synchronous method of timestamp
CN102685239B (en) Distribution type rendering method
CN103595768B (en) A kind of method that realizes configuration synchronization between virtual equipment
CN102291416A (en) Two-way synchronizing method and system of client-side and server-side
CN106713497A (en) Server-side message push device and method and message push system
WO2017114111A1 (en) Asynchronous data synchronization method for distributed system
CN105701159A (en) Data synchronization device and method
CN103024065A (en) System configuration management method for cloud storage system
CN107682460A (en) A kind of distributed storage trunked data communication method and system
CN103077231B (en) A kind of method and system of database synchronization
CN113535391A (en) Distributed cluster state information management method and system of cross-domain large data platform
CN103118072B (en) A kind of method and system of database update
CN104410511A (en) Server management method and system
CN103078784B (en) The method and system that a kind of User Status upgrades
CN103118008B (en) The method and system that a kind of User Status is synchronous
CN102375763B (en) System and method for realizing interprocess communication
CN114116791A (en) Data synchronization method and system based on MQTT protocol message
CN103916409A (en) Method, terminal and system for data synchronization
CN112884930A (en) Intelligent building personnel management and control method, device, system and storage medium
CN102195820B (en) Telecommunication equipment upgrading and maintenance method for telecommunication network transmission system
TW201715389A (en) Network system and software updating method
JP2017167845A (en) Communication device, communication system, communication method and program
CN104363208A (en) Computer intercluster key management method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: Suzhou City, Jiangsu province 215121 Fengting Avenue Suzhou Industrial Park No. 666 Weiting Intelligent Industrial Park Building 8

Applicant after: Kuo Di education and science company limited

Address before: Suzhou City, Jiangsu province 215121 Fengting Avenue Suzhou Industrial Park No. 666 Weiting Intelligent Industrial Park Building 8

Applicant before: Suzhou Kuodi Network Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: SUZHOU KUODI NETWORK TECHNOLOGY CO., LTD. TO: CODYY EDUCATION TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150819

Termination date: 20200107

CF01 Termination of patent right due to non-payment of annual fee