CN101540726A - Method, client, server and system of synchronous data - Google Patents

Method, client, server and system of synchronous data Download PDF

Info

Publication number
CN101540726A
CN101540726A CN200910083056A CN200910083056A CN101540726A CN 101540726 A CN101540726 A CN 101540726A CN 200910083056 A CN200910083056 A CN 200910083056A CN 200910083056 A CN200910083056 A CN 200910083056A CN 101540726 A CN101540726 A CN 101540726A
Authority
CN
China
Prior art keywords
client
management information
server end
synchronization packets
information
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
CN200910083056A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN200910083056A priority Critical patent/CN101540726A/en
Publication of CN101540726A publication Critical patent/CN101540726A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention provides methods, a client, a server and a system of synchronous data, wherein one method includes the followings: a first data packet sent by the client is received, and the first data packet contains the management information of managed object MO of the client to be refreshed; the management information of MO in the first data packet is compared with the management information of MO maintained by the server, and a first synchronous data packet is returned according to comparison result so that the client updates and processes the data in a client database according to the management information of MO to be synchronized to the client at least contained in the first data synchronous data packet. In the embodiment of the invention, in the condition of obtaining MO on the basis of slicing of data in the database, the comparison and transmission of management information are carried out by using MO as granularity, thereby solving the problem of low efficiency due to too small granularity in the prior art, improving the synchronous efficiency of data, and improving the system performance.

Description

The method of synchrodata, client, server and system
Technical field
The embodiment of the invention relates to network field, and the method, client, the server that relate in particular to a kind of synchrodata reach the communication system based on database.
Background technology
In the communication system based on database, when network environment did not satisfy condition, system need support to work offline for a long time.After working offline, once more during on-line working, need to carry out the mass data bi-directional synchronization between the client and server, that is: with the data upload in the database after the client-side editing to server, and will be in the server end database relevant with work delta data flushes to client.This system need satisfy following demand: data remain in the relational database, and client works offline for a long time, support that bi-directional data is synchronous, support multiple-person cooperative work.
Prior art one provides a kind of FileVersion service technology, and this technology is file in download from FileVersion server (for example VSS, ClearCase, SVN etc.), after revising through client, uploads in the FileVersion server; Data sync is granularity with the file in this technology, realized multiple-person cooperative work, but, communication system based on database, can not simply save as file as the data of product configuration quotation system and carry out data management, need be based on relational database, data sync is that the record with relational database carries out, the FileVersion service technology can't be applicable to the communication system based on database.
Prior art two is with the unit of being recorded as, in database, add time tag or other signs in every record, be used for identification data change situation, add the timestamp that is used to identify the change time for example for every record, add deleted marker for the record of deletion, timestamp, judgement deleted marker by more every record carry out the residual quantity data sync; When having a large amount of record in the database, this Technology Need record quantity relatively is bigger, if will satisfy the bi-directional data synchronisation requirement, client and server need be delivered to the opposite end mutually with a lot of comparing datas, cause data synchronization efficiency very low, had a strong impact on the performance of system.
Summary of the invention
The embodiment of the invention provides a kind of method, client, server of synchrodata to reach the communication system based on database, to improve data synchronization efficiency.
The method of a kind of synchrodata that the embodiment of the invention provides is applied to client, comprising:
Send first packet to server end, comprise the management information of client managed object MO to be refreshed in described first packet;
First synchronization packets that the reception server end returns comprises the management information of the MO that waits to be synchronized to client at least in described first synchronization packets;
Be synchronized to the management information of the MO of client according to waiting of comprising at least in described first synchronization packets, the data in the client database are upgraded processing.
The method of the another kind of synchrodata that the embodiment of the invention provides is applied to server end, comprising:
Receive first packet that client sends, comprise the management information of client managed object MO to be refreshed in described first packet;
The management information of the MO that the management information of MO in described first packet and described server end are safeguarded compares, return first synchronization packets according to comparative result, comprise the management information of the MO that waits to be synchronized to client in described first synchronization packets at least.
A kind of client that the embodiment of the invention provides comprises:
Communication module is used for sending first packet to server end, comprises the management information of client managed object MO to be refreshed in described first packet; And, be used for first synchronization packets that the reception server end returns, comprise the management information of the MO that waits to be synchronized to client in described first synchronization packets at least;
The MO administration module is used for being synchronized to according to waiting of comprising at least of described first synchronization packets management information of the MO of client, and the data in the client database are upgraded processing.
A kind of server that the embodiment of the invention provides comprises:
Communication module is used to receive first packet that client sends, and comprises the management information of client managed object MO to be refreshed in described first packet;
The MO administration module, the management information that is used for MO that management information and the described server end of the MO of described first packet are safeguarded compares;
Described communication module also is used for returning first synchronization packets according to the comparative result of described MO administration module, comprises the management information of the MO that waits to be synchronized to client in described first synchronization packets at least.
A kind of communication system based on database that the embodiment of the invention provides comprises:
Client, be used for sending first packet to server end, the management information that comprises client managed object MO to be refreshed in described first packet, and first synchronization packets returned of reception server end, be synchronized to the management information of the MO of client according to waiting of comprising at least in described first synchronization packets, the data in the client database are upgraded processing;
Server end is used to receive first packet that client sends, and comprises the management information of client managed object MO to be refreshed in described first packet; The management information of the MO that the management information of MO in described first packet and described server end are safeguarded compares; And return first synchronization packets according to the comparative result of described comparison module, comprise the management information of the MO that waits to be synchronized to client in described first synchronization packets at least.
Obtain under the situation of MO based on the data in the database being carried out burst in the embodiment of the invention, by the management information of in mutual first packet of client and server end, carrying client MO to be refreshed, make the management information of MO of management information that the server end receive this first packet will the MO in described first packet and the maintenance of described server end compare, return first synchronization packets according to comparative result, make the client receive this first synchronization packets be synchronized to the management information of the MO of client according to waiting of comprising at least in described first synchronization packets, data in the client database are upgraded processing, thereby realize with MO being that granularity manages information comparison and transmission, in subsequent processes, be granularity promptly with MO, solved the problem of the inefficiency that causes because of undersized in the prior art, improve data synchronization efficiency, promoted systematic function.
Description of drawings
Fig. 1 is the structural representation of a kind of communication system based on database of the embodiment of the invention;
The flow chart of the method for a kind of synchrodata that Fig. 2 provides for the embodiment of the invention one;
The flow chart of the method for a kind of synchrodata that Fig. 3 provides for the embodiment of the invention two;
The flow chart of the method for a kind of synchrodata that Fig. 4 provides for the embodiment of the invention three;
The flow chart of the method for the another kind of synchrodata that Fig. 5 provides for the embodiment of the invention four;
The flow chart of the method for the another kind of synchrodata that Fig. 6 provides for the embodiment of the invention five;
The flow chart of the method for the another kind of synchrodata that Fig. 7 provides for the embodiment of the invention six;
The flow chart of the method for the another kind of synchrodata that Fig. 8 provides for the embodiment of the invention seven;
The structural representation of a kind of client that Fig. 9 provides for the embodiment of the invention;
The structural representation of a kind of server that Figure 10 provides for the embodiment of the invention.
Embodiment
Below by drawings and Examples, the technical scheme of the embodiment of the invention is described in further detail.
The embodiment of the invention provides a kind of method, client, server of synchrodata to reach the communication system based on database, wherein, in communication system based on database, according to type of service or the professional scene of using data of database is carried out burst, clear in order to describe, below with the configuration quotation system for instance, a project A is to there being a plurality of configuration quotation schemes, and a configuration quotation scheme can be thought a big data slice.In a configuration quotation scheme, comprise a plurality of product configurations, each product configuration can be thought a small data sheet, also comprises the quotation at each product configuration, the quotation of each product configuration also can be thought a small data sheet.These small data sheets are independent mutually, and can revise separately.In the embodiment of the invention, with each data slice be called a managed object (Managed Object, hereinafter to be referred as: therefore MO), can be understood as, can have set membership between the MO, promptly big data slice comprises one or more small data sheets; Each MO can corresponding a kind of MO type, every kind of MO type one or more business datum table in can linked database, and promptly the data of a data slice are kept in the table of one or more relational database.
Obtain being understandable that under the situation of MO based on the data in the database being carried out burst,, also relate to the management data of MO, below will describe in detail for the structure and the content of the management data of MO with respect to the business datum in the database.
Fig. 1 is the structural representation of a kind of communication system based on database of the embodiment of the invention.This communication system comprises server end and at least one client, can use scene according to business in the embodiment of the invention, data in the database are carried out burst in advance, each burst is called as a MO, for example, tables of data in the database is classified the one or more tables of data under the same classification of same MO type association according to type of service; With MO is that granularity is carried out the data sync between the client and server end, when having avoided in the prior art carrying out data sync between the client and server end with the unit of being recorded as, and the low problem of performance that large-scale record is relatively caused.
See also shown in Figure 1ly, this communication system comprises:
Client 100, be used for sending first packet to server end, the management information that comprises client managed object MO to be refreshed in first packet, and first synchronization packets returned of reception server end, be synchronized to the management information of the MO of client according to waiting of comprising at least in first synchronization packets, the data in the client database are upgraded processing;
Need to prove that client 100 can be for one or more.Wherein, the management information of the MO that client is to be refreshed can comprise MO sign and MO update mode information.Further, the MO update mode information here can be that MO update time or MO upgrade characteristic value etc.
Server end 200 is used to receive first packet that client sends, and comprises the management information of client managed object MO to be refreshed in first packet; The management information of the MO that the management information of MO in first packet and server end are safeguarded compares; And return first synchronization packets according to comparative result, comprise the management information of the MO that waits to be synchronized to client in first synchronization packets at least.
Concrete, the MO sign that MO sign in described first packet and server end are safeguarded does not match, specifically be that MO sign (as 1,3) in described first packet is when being less than the MO sign (as 1,2,3) that server end safeguards, determine that the MO updating type is for increasing, from the business datum (specifically can be the business datum table) of server end database, obtain and unmatched MO sign corresponding service record, and return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client;
The MO sign that MO sign in described first packet and server end are safeguarded does not match, specifically be that MO sign (as 1,3,4) in described first packet is when being less than the MO sign (as 1,3) that server end safeguards, determine that the MO updating type is deletion, returns first synchronization packets of the management information that comprises the MO that remains to be synchronized to client;
The MO that MO sign in described first packet and server end are safeguarded is marking matched, and when identical MO sign comes from the MO update mode information of client and MO update mode information inconsistency that server end is safeguarded down, determine that the MO updating type is for revising, from the business datum (specifically can be the business datum table) of server end database, obtain the described MO sign corresponding service record with MO update mode information inconsistency, and return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client.
Need to prove, the MO sign that MO sign in described first packet and server end are safeguarded does not match, specifically be MO sign (as 1,3) in described first packet when being less than the MO sign (as 1,2) that server end safeguards, determine that the MO updating type is deletion ﹠amp; Increase, from the business datum (specifically can be the business datum table) of server end database, obtain and unmatched MO sign (specifically being 2) corresponding service record, and return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client; Should be understood that the combination of one or more during the MO updating type can comprise deletion, increases or revise in the embodiment of the invention.
Need to prove that further if the MO updating type is for increasing, the then described management information of waiting to be synchronized to the MO of client comprises at least: MO sign, MO type information and MO updating type information; If the MO updating type is for revising or deletion, the then described management information of waiting to be synchronized to the MO of client comprises at least: MO sign and MO updating type information.Thereby realized server end to client-side to data sync.
In order further to realize the data sync of client to the server end direction, client 100 is further used for the management information according to the MO of described client maintenance, determines to wait to be synchronized to the MO of server end 200; Send second synchronization packets to server end 200, comprise the described management information of waiting to be synchronized to the MO of server end in described second synchronization packets at least; The MO that is synchronized to server end that waits here represents with MO sign and MO type information at least.
Server end 200 is further used for receiving second synchronization packets that client 100 sends, and is synchronized to the management information of the MO of server end according to waiting of comprising at least in described second synchronization packets, the data in the server end database are upgraded processing.
As seen, in the present embodiment, client is by sending first packet of the management information that comprises client MO to be refreshed to server end, and the reception server end comprising at least of returning waits to be synchronized to first synchronization packets of management information of the MO of client, be synchronized to the management information of the MO of client according to waiting of comprising at least in first synchronization packets, the data of client are upgraded processing, thereby realized with MO being that granularity is carried out comparison of MO management information and transmission, promptly obtain under the situation of MO based on the data in the database being carried out burst, realized the data sync of two-way residual quantity between server end and the client, solved the problem of the inefficiency that the large-scale record comparison that brings because of undersized in the prior art caused, improve data synchronization efficiency, promoted systematic function.
The flow chart of the method for a kind of synchrodata that Fig. 2 provides for the embodiment of the invention one, present embodiment can be applied to the communication system based on database, and as the client in the configuration quotation system, as shown in Figure 2, present embodiment comprises:
Step 101, send first packet, comprise the management information of client MO to be refreshed in this first packet to server end.
Wherein, the management information of the MO that client is to be refreshed can comprise MO sign and MO update mode information.Further, the MO update mode information here can be that MO update time, MO upgrade characteristic value, represents identical MO sign the MO of the MO of server end and client is inconsistent down as upgrade characteristic value by different MO.
Should be understood that, the method of the embodiment of the invention can be applied to the configuration quotation system of long-term off-line, after the client and server end network in the configuration quotation system connects normally, can trigger the user end to server end and send first packet, with the request server end to the client synchrodata.
First synchronization packets that step 102, reception server end return comprises the management information of the MO that waits to be synchronized to client at least in this first synchronization packets.
Concrete, the management information that treating here is synchronized to the MO of client can comprise: MO sign and MO updating type information, and optional, can also comprise the MO type information.Need to prove that if MO updating type information representation MO updating type is to increase, then the management information of the MO here comprises MO sign, MO updating type information and MO type information, and also comprises business record in first synchronization packets; If MO updating type information representation MO updating type is for revising, then the management information of the MO here comprises MO sign and MO updating type information; If MO updating type information representation MO updating type is for revising, then the management information of the MO here comprises MO sign and MO updating type information, and also comprises business record in first synchronization packets.
Step 103, be synchronized to the management information of the MO of client, the data in the client database are upgraded processing according to waiting of comprising at least in first synchronization packets.
Concrete, under a kind of realization, step 103 can comprise:
When the information representation of MO updating type increases, further comprise business record in first synchronization packets, business record is inserted in the business datum (specifically can be the business datum table) of MO type information association in the client database, and, upgrade the management information of the MO of client maintenance according to the management information of the MO that waits to be synchronized to client;
When the information representation of MO updating type is deleted, deletion and the marking matched business record of MO in the associated business datum (specifically can be the business datum table) of MO type information from client database, and from the management information of the MO of client maintenance the corresponding maintenance information of deletion;
When the information representation of MO updating type is revised, further comprise business record in first synchronization packets, be revised as business record in first synchronization packets with the marking matched business record of MO in the business datum that MO type information in the client database is associated (specifically can be the business datum table), and, upgrade the management information of the MO of client maintenance according to the management information of the MO that waits to be synchronized to client.
Need to prove that expansion has the MO identification field in the business datum table in the client database; And under a kind of realization, the management information of the MO of client maintenance can be kept in the client database with the form of one or more management data list, includes but not limited to this form.
As seen, in the present embodiment, client is by sending first packet of the management information that comprises client MO to be refreshed to server end, and the reception server end comprising at least of returning waits to be synchronized to first synchronization packets of management information of the MO of client, be synchronized to the management information of the MO of client according to waiting of comprising at least in first synchronization packets, the data of client are upgraded processing, thereby realized with MO being that granularity is carried out comparison of MO management information and transmission, promptly obtain under the situation of MO based on the data in the database being carried out burst, realized server end to client-side to data sync, solved the problem of the inefficiency that the large-scale record comparison that brings because of undersized in the prior art caused, and then improved data synchronization efficiency, promoted systematic function.
Under a kind of realization, when the management information of the MO of the client maintenance form with many management data lists is kept in the client database, concrete, the data structure of the crucial management information of MO is as shown in table 1, wherein the MOType business datum that is used for shining upon this MO is kept in which business datum table of database, and the data structure of the mapping relations of MO type information and business datum table name is as shown in table 2; The business datum table is as shown in table 3, comprises a MOID field, as the external key related with the MOID of table 1.Table 1 is preserved the index of whole system MO, finds the business datum of this MO to store in which business datum table in table 2 by the MOType in the table 1, and to equal the business record of the MOID of this MO be exactly the business datum of this MO to the MOID field in each business datum table.
The definition list of the crucial management information of table 1.MO
Property Name Attribute type Describe
fdn varchar(64) The FND of MO, FDN are the directory tree of MO, set membership between the expression MO
MOID string The MO sign is used for unique identification MO
MOType int The MO type information
name string The title of MO
updatetime int MO update time
editor string Revise the people
The definition list of the mapping relations of table 2.MO type information and business datum table name
Property Name Type Describe
MOType int The type information of MO
Tblname string The business datum table name
The definition list of the mapping relations of table 3.MO sign and business record sign
Property Name Type Describe
RecordID int The major key of business datum table
MOID string The external key related with the MOID of table 1
... ... ...
The flow chart of the method for a kind of synchrodata that Fig. 3 provides for the embodiment of the invention two, present embodiment can be applied to dispose the client in the quotation system, is specially the process of the data that client needs from the server end database synchronization.
As shown in Figure 3, present embodiment comprises:
Step 201, user end to server end send first packet, comprise the management information of client MO to be refreshed in this first packet;
The management information of the MO that the client here is to be refreshed comprises MO sign and MO update mode information at least.
Particularly, client obtains the local MO that need refresh, and the management information of these MO is write in first packet, and first packet is sent to server end.
Wherein, MO update mode information is used to represent the update mode of MO, for two MO with identical MO sign, can know whether corresponding identical business datum of these two MO by MO update mode information relatively; Particularly, MO update mode information can be specially MO update time or MO renewal characteristic value.
Except MO sign and MO update mode information, the management information of MO can also comprise directory tree information (fdn).
First synchronization packets that step 202, client reception server end return comprises the management information of the MO that waits to be synchronized to client at least in this first synchronization packets.
This management information of waiting to be synchronized to the MO of client can comprise: MO sign and MO updating type information, and optional, can also comprise other attribute informations in the table 1.
MO updating type information is used for representing the type of client or server end MO renewal, as increasing, revise and/or deletion.The mapping relations of MO updating type information and MO sign can be referring to table 4.Table 4 and above-mentioned table 1,2 and 3 can be formed the management information of MO, should be understood that, the form of expression of the management information of MO is not limited thereto, and also can be the management information of safeguarding MO with an admin table.
The definition list of the mapping relations of table 4.MO updating type information and MO sign
Property Name Type Describe
MOID string The unique identification of MO
UpdateType int The updating type of expression MO is as the sign that increases, revises and delete
Before execution in step 203,204 and 205, need to prove: because the system that the embodiment of the invention was suitable for is based on relational database, therefore, business datum in the database can be a carrier with the business datum table, be that the embodiment of the invention is come the bearer service data by the business datum table, the business datum table comprises the MO identification field (attribute) of expansion.
The type information of client and server end maintenance and management MO and the map information of business datum table name are referring to above-mentioned table 2; And how the business record that administers and maintains MO to be saved in the database, also is the incidence relation of maintenance service record identification and MO sign, referring to above-mentioned table 3
Step 203, when the information representation of MO updating type increases, further comprise business record in first synchronization packets, this business record is inserted in the business datum table of MO type information association, and, upgrade the management information of the MO of client maintenance according to the management information of the MO that waits to be synchronized to client.
Step 204, when the information representation of MO updating type is deleted, deletion and the marking matched business record of MO from the associated business datum table of MO type information, and from the management information of the MO of client maintenance the corresponding maintenance information of deletion.
Step 205, when the information representation of MO updating type is revised, further comprise business record in first synchronization packets, be revised as business record in first synchronization packets with the marking matched business record of MO in the business datum table that the MO type information is associated, and, upgrade the management information of the MO of client maintenance according to the management information of the MO that waits to be synchronized to client.
In the present embodiment, when the information representation of MO updating type increases or revises, comprise business record in first synchronization packets; When the information representation of MO updating type is deleted, do not comprise business record in first synchronization packets.
As seen, in the present embodiment, client is by sending first packet of the management information that comprises client MO to be refreshed to server end, and the reception server end comprising at least of returning waits to be synchronized to first synchronization packets of management information of the MO of client, be synchronized to the management information of the MO of client according to waiting of comprising at least in first synchronization packets, the data of client are upgraded processing, thereby realized with MO being that granularity is carried out comparison of MO management information and transmission, promptly obtain under the situation of MO based on the data in the database being carried out burst, realized server end to client-side to data sync, solved the problem of the inefficiency that the large-scale record comparison that brings because of undersized in the prior art caused, and then improved data synchronization efficiency, promoted systematic function.
The flow chart of the method for a kind of synchrodata that Fig. 4 provides for the embodiment of the invention three.Present embodiment can be applied to a kind of communication system based on database, as the client in the configuration quotation system, is specially the process of user end to server end synchrodata.
As shown in Figure 4, present embodiment comprises:
Step 301, client determine to wait to be synchronized to the MO of server end according to the management information of the MO of its maintenance, and this waits that the MO that is synchronized to server end represents with MO sign and MO type information at least.
Above-mentioned steps 301 can be specially: which MO is client obtain and passed through increase, modification or deletion according to the MO update mode information in the management information of the MO of its maintenance, MO updating type information, and these MO are the MO that waits to be synchronized to server end.
Under a kind of realization, the attribute information in the table 1,2,3 and 4 all is used to represent MO as the aforementioned.
Step 303, user end to server end send second synchronization packets, comprise the management information of the MO that waits to be synchronized to server end in this second synchronization packets at least.
Optionally, before step 303, can also comprise:
Step 302, determine to wait to be synchronized to the associated business datum table of MO of server end according to this MO type information of waiting to be synchronized to the MO of server end, the MO that obtains to wait to be synchronized to this MO of server end from this business datum table identifies the business record that is mated.
The business record that then further comprises this coupling in second synchronization packets that the user end to server end sends in the step 303.
Specifically, the management information of waiting to be synchronized to the MO of server end comprises MO sign and MO updating type information at least, optionally can also comprise other attribute informations such as MO type information.
For instance, in the configuration quotation system, relational database is carried out burst obtain MO and can be specially according to the type of business datum and carry out burst, for example the configuration data in the business datum belongs to same type, corresponding same MO; Quote data in the business datum belongs to same type, corresponding another MO.In other words, belong to the corresponding identical MO of business datum of same type, promptly have identical MO sign and identical MO type information.Certain bar business record under same MO is updated, and can cause MO also to change update time.
Above-mentioned steps 302 can be specially: client is synchronized to the MO type information in the management information of MO of server end according to waiting of determining of step 301, determine the business datum table name that this MO type information is associated, all marking matched business records of MO of inquiry MO identification field and the MO that waits to be synchronized to server end in this business datum table name corresponding service tables of data.
Above-mentioned steps 303 can be specially: client will include the management information of MO and second synchronization packets of business record sends to server end.
Present embodiment can be the technical scheme that further comprises on the basis of the foregoing description one or embodiment two, promptly present embodiment can be combined to form new technical scheme with the foregoing description one or embodiment two; Also can be an independent technical scheme that realizes.
As seen, in the present embodiment, client determines to wait to be synchronized to the MO of server end, send second synchronization packets of the management information comprise the MO that waits to be synchronized to server end at least to server end, realized with MO being that granularity is carried out comparison of MO management information and transmission, promptly obtain under the situation of MO based on the data in the database being carried out burst, realized the data sync of client to the server end direction, solved the problem of the inefficiency that the large-scale record comparison that brings because of undersized in the prior art caused, and then improved data synchronization efficiency, promoted systematic function.
The flow chart of the method for the another kind of synchrodata that Fig. 5 provides for the embodiment of the invention four.Present embodiment is applied to the communication system based on database, and as the server end in the configuration quotation system, as shown in Figure 5, present embodiment comprises:
Step 401, receive first packet that client sends, comprise the management information of client MO to be refreshed in this first packet.
Wherein, the management information of the MO that client is to be refreshed can comprise MO sign and MO update mode information at least.Further, the MO update mode information here can be that MO update time, MO upgrade characteristic value, represents identical MO sign the MO of the MO of server end and client is inconsistent down as upgrade characteristic value by different MO.For two MO, can know whether corresponding identical business datum of these two MO by MO update mode information relatively with identical MO sign;
Should be understood that, the method of the embodiment of the invention is applied to the configuration quotation system of long-term off-line, after the client and server end network in the configuration quotation system connects normally, can trigger the user end to server end and send first packet, with the request server end to the client synchrodata.
The management information of step 402, MO that the management information of the MO in first packet and server end are safeguarded compares, return first synchronization packets according to comparative result, comprise the management information of the MO that waits to be synchronized to client in this first synchronization packets at least.
Particularly, the corresponding information of the MO in first packet sign or MO sign and MO update mode information and server end maintenance is compared, return first synchronization packets of the management information that comprises the MO that waits to be synchronized to client at least according to comparative result.
Under a kind of realization, step 402 can comprise:
The MO sign that MO sign in first packet and server end are safeguarded does not match, specifically be that MO sign (as 1,3) in described first packet is when being less than the MO sign (as 1,2,3) that server end safeguards, determine that the MO updating type is for increasing, from the business datum of server end database, obtain and unmatched MO sign corresponding service record, and return first synchronization packets of management information that includes business record and wait to be synchronized to the MO of client;
The MO sign that MO sign in first packet and server end are safeguarded does not match, specifically be that MO sign (as 1,3,4) in described first packet is when being less than the MO sign (as 1,3) that server end safeguards, determine that the MO updating type is deletion, returns first synchronization packets of the management information that comprises the MO that remains to be synchronized to client;
The MO that MO sign in first packet and server end are safeguarded is marking matched, and identical MO sign comes from the MO update mode information (as MO update time) of client and the MO update mode information of server end maintenance (as MO update time) down when inconsistent, determine that the MO updating type is for revising, from the business datum of server end database, obtain the MO sign corresponding service record with MO update mode information inconsistency, and return first synchronization packets of management information that includes business record and wait to be synchronized to the MO of client.
Need to prove, the MO sign that MO sign in described first packet and server end are safeguarded does not match, specifically be MO sign (as 1,3) in described first packet when being less than the MO sign (as 1,2) that server end safeguards, determine that the MO updating type is deletion ﹠amp; Increase, promptly delete MO and be designated 3 MO, increase MO and be designated 2 MO, from the business datum (specifically can be the business datum table) of server end database, obtain and unmatched MO sign (specifically being 2) corresponding service record, and return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client; Should be understood that the combination of one or more during the MO updating type can comprise deletion, increases or revise in the embodiment of the invention.
Need to prove that further if the MO updating type is for increasing, the then described management information of waiting to be synchronized to the MO of client comprises at least: MO sign, MO type information and MO updating type information; If the MO updating type is for revising or deletion, the then described management information of waiting to be synchronized to the MO of client comprises at least: MO sign and MO updating type information.
As seen, in the present embodiment, client is by sending first packet of the management information that comprises client MO to be refreshed to server end, server end compares the management information of the MO that management information and the server end of the MO in first packet are safeguarded, return first synchronization packets according to comparative result, thereby realized with MO being that granularity is carried out comparison of MO management information and transmission, promptly obtain under the situation of MO based on the data in the database being carried out burst, realized server end to client-side to data sync, solved the problem of the inefficiency that the large-scale record comparison that brings because of undersized in the prior art caused, and then improved data synchronization efficiency, promoted systematic function.
The flow chart of the method for the another kind of synchrodata that Fig. 6 provides for the embodiment of the invention five.Present embodiment can be applied to the communication system based on database, as the server end in the configuration quotation system, is specially the process of the data of server end database synchronization needs to client.
As shown in Figure 6, present embodiment specifically comprises:
Step 501, server end receive first packet that client sends, and comprise the management information of client MO to be refreshed in this first packet;
Here, the management information of the MO that client is to be refreshed can comprise MO sign and MO update mode information at least.
Before this step, client obtains local MO to be refreshed, and the management information of these MO is write in first packet, and first packet is sent to server end.
At each MO in first packet, the management information of this MO that the management information of the MO in first packet and server end are safeguarded compares, and particularly, MO sign or MO update mode information is compared, and obtains comparative result.This step specifically may further comprise the steps 502-506:
Step 502, when the MO sign of safeguarding when MO sign in first packet and server end does not match, the corresponding MO of the MO that do not match sign is the MO that waits to be synchronized to client, the MO updating type of determining this MO is for increasing or deletion.
Particularly, when the MO in first packet is identified at when not existing in the MO sign that server end safeguards, determine that then the corresponding MO of this MO sign is deleted at server end, promptly the MO updating type is deletion; When the MO that safeguards when server end is identified at and does not exist in first packet, determine that then the corresponding MO of this MO sign is increased at server end, promptly the MO updating type is for increasing.
Step 503, when the MO that safeguards when MO sign in first packet and server end is marking matched, and when identical MO sign comes from the MO update mode information of client and MO update mode information inconsistency that server end is safeguarded down, the corresponding MO of MO sign of update mode information inconsistency is the MO that waits to be synchronized to client, and the MO updating type of determining this MO is for revising.
Particularly, when the MO that safeguards when MO sign in first packet and server end is marking matched, and identical MO sign comes from the MO update time of client down and server end is safeguarded MO update time when inconsistent, determine that the MO updating type of this MO is modification.
MO represents the time of MO recent renewal update time, when revising MO, use the time of service to carry out assignment, whether this field is used for differentiating the data of server end and revised, if MO update time of client is less than the MO update time of server end, then determine server end this MO that more corrected one's mistakes, otherwise, determine that server end do not revise this MO.
Step 504, when the MO updating type when increasing, from the server end database, obtain and unmatched MO sign corresponding service record, with this business record and the management information of waiting to be synchronized to the MO of client write in first synchronization packets.
Wherein the management information of MO comprises at least: MO sign, MO type information and MO updating type information.
Step 505, when the MO updating type when revising, from the server end database, obtain the MO sign corresponding service record with MO update mode information inconsistency, with this business record and the management information of waiting to be synchronized to the MO of client write in first synchronization packets.
Wherein the management information of MO comprises at least: MO sign and MO updating type information.
Step 506, be when deletion when the MO updating type, the management information of waiting to be synchronized to the MO of client is write in first synchronization packets.
Wherein the management information of MO comprises at least: MO sign and MO updating type information.
Step 507, server end return first synchronization packets to client.
At last, client receives first synchronization packets, can upgrade processing to client database according to the description of the foregoing description two.
As seen, in the present embodiment, client is by sending first packet of the management information that comprises client MO to be refreshed to server end, server end compares the management information of the MO that management information and the server end of the MO in first packet are safeguarded, return first synchronization packets according to comparative result, thereby realized with MO being that granularity is carried out comparison of MO management information and transmission, promptly obtain under the situation of MO based on the data in the database being carried out burst, realized server end to client-side to data sync, solved the problem of the inefficiency that the large-scale record comparison that brings because of undersized in the prior art caused, and then improved data synchronization efficiency, promoted systematic function.
The flow chart of the method for the another kind of synchrodata that Fig. 7 provides for the embodiment of the invention six.As shown in Figure 7, the difference of present embodiment and the foregoing description five is: the management information of the MO that client is to be refreshed further comprises MO set membership information, particularly, MO set membership information can be directory tree information (FDN, Full Distinguish Name), FDN is made up of FDNID, for example FDNID1.FDNID2.Each FDNID among the FDN is inequality.The FDN of MO has explained the set membership between MO, the FDN=1 of MO1 for example, and the FDN=1.2 of MO2 illustrates that then MO1 is the father of MO2, and MO1 comprises MO2 in other words, and FDN is that server end is used for that the calculation server end increases than client or the data of deletion.For example, at the FDN=1 of server end MO1, child 1.1,1.3 is arranged under it.The FDN=1 of client MO1 has child 1.1,1.2 under it, then server just can calculate, and concerning this client, service end deleted data sheet 1.2,1.3 is newly-increased data slice.
Like this, at each the sub-MO of father MO in first packet, carry out the following steps of replacement step 502-503:
Step 602, according to directory tree information, relatively whether father MO MO sign down mates with this father MO MO sign down that server end is safeguarded in first packet, when mating, then execution in step 603, otherwise execution in step 604.
Wherein father MO can be the top MO of FDN information representation in first packet.
Concrete, server end is to the client the most top given MO, child MO according to this MO of FDN Gopher end, relatively the MOID of the child MO of this MO of server end and the child MO of this MO of client how much and difference, obtain increase and/or the deletion information of the sub-MO of this MO.Client and service end all have the MO of identical MOID, and then relatively whether MO equates update time, if unequal, determine that then service end revises, and client need refresh.
Whether the MO update mode information that step 603, more identical sub-MO sign come from client down is consistent with the MO update mode information of server end maintenance, when inconsistent, the corresponding MO of this identical sub-MO sign is the MO that waits to be synchronized to client, determines that the MO updating type is for revising; When unanimity, illustrate that this sub-MO of server end does not change.
Particularly, when the sub-MO of first packet neutron MO sign and server end maintenance is marking matched, and when identical sub-MO sign comes from the MO update time of client down and server end is safeguarded MO update time was inconsistent, the MO updating type of determining this sub-MO was for revising.
Step 604, the corresponding MO of the sub-MO sign that do not match are the MO that waits to be synchronized to client, and the updating type of determining the sub-MO under this father MO is for increasing or deletion.
Particularly, when sub-MO that client is sent is identified at when not existing in the sub-MO sign that server end safeguards, determine that then the corresponding serviced device end of MO of this sub-MO sign deleted, promptly the MO updating type is deletion; When sub-MO that server end is safeguarded is identified at when not existing in the sub-MO sign that client sends, determine that then the corresponding MO of this sub-MO sign is the newly-increased MO of server end, promptly the MO updating type is for increasing.
For example, at the FDN=1 of server end MO1, child 1.1,1.3 is arranged under it.The FDN=1 of client MO1 has child 1.1,1.2 under it, then server just can be determined, and concerning this client, server end deleted data sheet 1.2,1.3 is the newly-increased data slice of server end.
As seen, present embodiment according to MO set membership information, compares the management information that belongs to a sub-MO under the father MO on the basis of the foregoing description five, has further improved the efficient of handling.
The flow chart of the method for the another kind of synchrodata that Fig. 8 provides for the embodiment of the invention seven.Present embodiment is applied to server end, is specially the process that server end receives the client data in synchronization.
As shown in Figure 8, present embodiment comprises:
Step 701, server end receive second synchronization packets that client sends.
Step 702, be synchronized to the management information of the MO of server end, the data of server end are upgraded processing according to waiting of comprising at least in second synchronization packets.
Wherein, the management information of waiting to be synchronized to the MO of server end can comprise MO sign and MO updating type information, optionally, can also comprise the MO type information, and the information representation of MO updating type increases, revises or deletes.
Above-mentioned steps 702 can be specially: when the information representation of MO updating type increases, further comprise business record in second synchronization packets, business record is inserted in the business datum table of MO type information association, and according to the management information of the MO in second synchronization packets, the management information of the MO that update service device end is safeguarded;
When the information representation of MO updating type is deleted, deletion and the marking matched business record of MO from the associated business datum table of MO type information, and the corresponding maintenance information of deletion the management information of the MO that safeguards from server end;
When the information representation of MO updating type is revised, further comprise business record in second synchronization packets, be revised as business record in second synchronization packets with the marking matched business record of MO in the business datum table that the MO type information is associated, and according to the management information of the MO in second synchronization packets, the management information of the MO that update service device end is safeguarded.
Further, when the information representation of MO updating type is revised, present embodiment specifically comprises: relatively whether the MO that safeguards in the MO update time in the management information of MO and the server end database in second synchronization packets is consistent update time, MO update time of sending when client is less than the MO update time of server end, illustrate that then other people have revised the data of this MO, the conflict of prompting client data, and inform the nearest reviser Editor of this MO, concrete, server end sends the information that this MO has been modified to client, is used to point out this MO of client to be revised by other clients; Otherwise, be revised as business record in second synchronization packets with the marking matched business record of MO in the business datum table that the MO type information is associated, and according to the management information of the MO in second synchronization packets, the management information of the MO that update service device end is safeguarded, and, the MO in the server end database is revised as the latest services device time update time.
Present embodiment can be the technical scheme that further comprises on the basis of the foregoing description four or embodiment five or embodiment six, promptly present embodiment can be combined to form new technical scheme with the foregoing description four or embodiment five or embodiment six; Also can be an independent technical scheme that realizes.
As seen, in the present embodiment, server end receives second synchronization packets that client sends, be synchronized to the management information of the MO of server end according to waiting of comprising at least in second synchronization packets, the data of server end are upgraded processing, thereby realized with MO being that granularity is carried out comparison of MO management information and transmission, promptly obtain under the situation of MO based on the data in the database being carried out burst, realized the data sync of client to the server end direction, solved the problem of the inefficiency that the large-scale record comparison that brings because of undersized in the prior art caused, when carrying out the off-line multiple-person cooperative work, present embodiment sends the information that this MO has been modified by server end to client, make the probability of data collision reduce greatly, and then improved data synchronization efficiency, promoted systematic function.
The structural representation of a kind of client that Fig. 9 provides for the embodiment of the invention.As shown in Figure 9, the present embodiment client comprises communication module 11 and MO administration module 12, wherein:
Communication module 11 is used for sending first packet to server end, comprises the management information of client managed object MO to be refreshed in first packet; And, be used for first synchronization packets that the reception server end returns, comprise the management information of the MO that waits to be synchronized to client in first synchronization packets at least; Here, the management information of the MO that client is to be refreshed can comprise MO sign and MO update mode information at least.
MO administration module 12 is used for being synchronized to according to waiting of comprising at least of first synchronization packets management information of the MO of client, and the data in the client database are upgraded processing.Thereby realized server end to client-side to data sync.
In order further to realize the data sync of client to the server end direction, above-mentioned MO administration module 12 is further used for the management information according to the MO of client maintenance, determine to wait to be synchronized to the MO of server end, the described MO that is synchronized to server end that waits represents with MO sign and MO type information at least.
Communication module 11 is further used for sending second synchronization packets to server end, comprises the management information of the MO that waits to be synchronized to server end in this second synchronization packets at least.
And, the client of the embodiment of the invention further comprises: client database, be used to preserve local the establishment, the MO that revises and/or delete, the MO that buffer memory comes synchronously from server end, optionally, can also preserve the management information of MO, for example, the table 1 of aforementioned description, table 2, table 3 and table 4 should be understood that, comprise one or more tables of data in the client database and (can be divided into from functional perspective: the business datum table, management data list), wherein preserve business record in some tables of data, the related same MO of business record institute loaded service tables of data under the same type, in other words, the related one or more business datum tables of MO.Should be understood that under a kind of realization, client database can be in client, promptly the local data base of client also can be the external data base that is connected or communicates by letter with client.
In the present embodiment client, communication module 11 has realized the interface function of client and server end, MO administration module 12 be used for being responsible for client database to MO create, increase, inquiry, modification and deletion action, and realize carrying out simultaneous operation with server end by communication module 11.
As seen, the present embodiment client is by sending first packet of the management information that comprises client MO to be refreshed to server end, and the reception server end comprising at least of returning waits to be synchronized to first synchronization packets of management information of the MO of client, be synchronized to the management information of the MO of client according to waiting of comprising at least in first synchronization packets, the data of client are upgraded processing, thereby realized server end to client-side to data sync, and also be used for sending second synchronization packets to server end, the renewal that makes server end carry out the server end database according to second synchronization packets is handled, thereby realized the data sync of client to the server end direction, thereby realized with MO being that granularity is carried out comparison of MO management information and transmission, solved the problem of the inefficiency that causes because of undersized, solved the problem of the inefficiency that the large-scale record comparison that brings because of undersized in the prior art caused, and then improved data synchronization efficiency, promoted systematic function.
The structural representation of a kind of server that Figure 10 provides for the embodiment of the invention.As shown in figure 10, the present embodiment server comprises communication module 21 and MO administration module 22, wherein:
Communication module 21 is used to receive first packet that client sends, and comprises the management information of client managed object MO to be refreshed in described first packet; Here, the management information of the MO that client is to be refreshed can comprise MO sign and MO update mode information at least.
MO administration module 22, the management information that is used for MO that management information and the described server end of the MO of described first packet are safeguarded compares;
Communication module 21 also is used for returning first synchronization packets according to the comparative result of MO administration module 22, comprises the management information of the MO that waits to be synchronized to client in this first synchronization packets at least.
Under a kind of realization, above-mentioned MO administration module 22 can comprise first judge module 23, second judge module 24 and management submodule 25, wherein:
First judge module 23 is used for judging whether the MO sign of first packet and the MO sign that server end is safeguarded mate, and when the MO sign of sign of the MO in first packet and server end maintenance does not match, determines that the MO updating type is for increasing or deletion; The MO that MO sign in first packet and server end are safeguarded is marking matched, is handled by second judge module 24;
Second judge module 24 is used to judge whether the MO update mode information that comes from client under the identical MO sign is consistent with the MO update mode information of server end maintenance, when identical MO sign comes from the MO update mode information of client and MO update mode information inconsistency that server end is safeguarded down, determine that the MO updating type is for revising;
Management submodule 25, be used for when described MO updating type is increase, from the server end database, obtain and unmatched MO sign corresponding service record, return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client by described communication module;
Perhaps, be used for when described MO updating type is modification, from the server end database, obtain the described MO sign corresponding service record with MO update mode information inconsistency, return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client by described communication module;
Perhaps, be used for being when deletion, return first synchronization packets of the management information that comprises the MO that remains to be synchronized to client by described communication module when described MO updating type.Thereby realize server end to client-side to data sync.
In order further to realize the data sync of user end to server extreme direction, above-mentioned communication module 21 is further used for receiving second synchronization packets that client sends;
MO administration module 22 is further used for being synchronized to according to waiting of comprising at least in second synchronization packets management information of the MO of server end, and the data in the server end database are upgraded processing.
Concrete, the management information of waiting to be synchronized to the MO of server end here can comprise MO sign and MO updating type information, optionally, can also comprise the MO type information, and wherein the information representation of MO updating type increases, revises and/or deletes.
When the information representation of MO updating type increases, further comprise business record in second synchronization packets, business record is inserted in the business datum table of MO type information association in the server end database, and according to the management information of the MO in second synchronization packets, the management information of the MO that update service device end is safeguarded;
When the information representation of MO updating type is deleted, deletion and the marking matched business record of MO in the associated business datum table of MO type information from the server end database, and the corresponding maintenance information of deletion the management information of the MO that safeguards from server end;
When the information representation of MO updating type is revised, further comprise business record in second synchronization packets, be revised as business record in second synchronization packets with the marking matched business record of MO in the business datum table that MO type information in the server end database is associated, and according to the management information of the MO in second synchronization packets, the management information of the MO that update service device end is safeguarded.
Further, when the information representation of MO updating type is revised, specifically can comprise: relatively whether the MO that safeguards in the MO update time in the management information of MO and the server end database in second synchronization packets is consistent update time, MO update time of sending when client is less than the MO update time of server end, illustrate that then other people have revised the data of this MO, the conflict of prompting client data, and inform the nearest reviser Editor of this MO, concrete, server end sends the information that this MO has been modified to client, is used to point out this MO of client to be revised by other clients; Otherwise, be revised as business record in second synchronization packets with the marking matched business record of MO in the business datum table that the MO type information is associated, and according to the management information of the MO in second synchronization packets, the management information of the MO that update service device end is safeguarded, and, the MO in the server end database is revised as the latest services device time update time.
And, the server end of the embodiment of the invention further comprises: the server end database, be used for preserving all clients establishments based on the communication system of database, increase and/or modification are (optionally, deletion in addition) complete or collected works of MO, optionally, can also preserve complete or collected works' management information of MO, for example, table 1 based on the aforementioned description of all clients in the communication system of database, table 2, table 3 and table 4, should be understood that under a kind of realization, the server end database can be in server end, being the local data base of server end, also can be the external data base that is connected or communicates by letter with server end.
In the present embodiment server end, communication module 21 has realized the interface function of server end and client, MO administration module 22 is used for being responsible for that MO to the server end database creates, increases, inquiry, modification and/or deletion action, and realizes carrying out simultaneous operation with client by communication module 21.
As seen, the present embodiment server receives first packet of the management information that comprises client MO to be refreshed of client transmission, server end compares the management information of the MO that management information and the server end of the MO in first packet are safeguarded, return first synchronization packets according to comparative result, thereby realized server end to client-side to data sync, and second synchronization packets that also is used to receive the client transmission, be synchronized to the management information of the MO of server end according to waiting of comprising at least in second synchronization packets, data in the server end database are upgraded processing, thereby realized the data sync of client to the server end direction, thereby realized with MO being that granularity is carried out comparison of MO management information and transmission, solved the problem of the inefficiency that causes because of undersized, solved the problem of the inefficiency that the large-scale record comparison that brings because of undersized in the prior art caused, and then improved data synchronization efficiency, promoted systematic function;
When carrying out the off-line multiple-person cooperative work, present embodiment sends the information that this MO has been modified by server end to client, makes the probability of data collision reduce greatly, and then has promoted systematic function.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is when carrying out, execution comprises the step of said method embodiment, and aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to the technical scheme of the explanation embodiment of the invention, is not intended to limit; Although the embodiment of the invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of each embodiment technical scheme of the embodiment of the invention.

Claims (16)

1, a kind of method of synchrodata is characterized in that, is applied to client, and described method comprises:
Send first packet to server end, comprise the management information of client managed object MO to be refreshed in described first packet;
First synchronization packets that the reception server end returns comprises the management information of the MO that waits to be synchronized to client at least in described first synchronization packets;
Be synchronized to the management information of the MO of client according to waiting of comprising at least in described first synchronization packets, the data in the client database are upgraded processing.
2, the method for synchrodata according to claim 1, it is characterized in that, the described management information of waiting to be synchronized to the MO of client comprises: MO sign, MO type information and MO updating type information, described management information according to the MO that comprises at least in described first synchronization packets, the data in the client database are upgraded processing comprise:
When described MO updating type information representation increases, further comprise business record in described first synchronization packets, described business record is inserted in the business datum of the type information of MO described in client database association, and, upgrade the management information of the MO of client maintenance according to the described management information of waiting to be synchronized to the MO of client;
When described MO updating type information representation is deleted, deletion and the marking matched business record of described MO from the associated business datum of the type information of MO described in the client database, and from the management information of the MO of client maintenance the corresponding maintenance information of deletion;
When described MO updating type information representation is revised, further comprise business record in described first synchronization packets, be revised as business record in described first synchronization packets with the marking matched business record of described MO in the business datum that the type information of MO described in the client database is associated, and, upgrade the management information of the MO of client maintenance according to the described management information of waiting to be synchronized to the MO of client.
3, the method for synchrodata according to claim 1 is characterized in that, described method further comprises:
According to the management information of the MO of described client maintenance, determine to wait to be synchronized to the MO of server end, described MO represents with MO sign and MO type information at least;
Send second synchronization packets to server end, comprise the described management information of waiting to be synchronized to the MO of server end in described second synchronization packets at least.
4, the method for synchrodata according to claim 3 is characterized in that,, further comprises before server end sends second synchronization packets described:
Determine to wait in the client database to be synchronized to the associated business datum of MO of server end according to described MO type information, from described business datum, obtain the business record that is mated with this MO sign;
And the business record that in second synchronization packets that server end sends, further comprises described coupling.
5, a kind of method of synchrodata is characterized in that, is applied to server end, and described method comprises:
Receive first packet that client sends, comprise the management information of client managed object MO to be refreshed in described first packet;
The management information of the MO that the management information of MO in described first packet and described server end are safeguarded compares, return first synchronization packets according to comparative result, comprise the management information of the MO that waits to be synchronized to client in described first synchronization packets at least.
6, the method for synchrodata according to claim 5, it is characterized in that, the management information of the MO that described client is to be refreshed comprises MO sign and MO update mode information at least, described with the MO in first packet management information and the management information of the MO that safeguards of described server end compare, comprising:
When the MO sign of sign of the MO in described first packet and server end maintenance does not match, determine that the MO updating type is for increasing or deletion;
The MO that MO in described first packet sign and server end are safeguarded is marking matched, and identical MO sign determines that the MO updating type is modification when coming from the MO update mode information of client and MO update mode information inconsistency that server end is safeguarded down.
7, the method for synchrodata according to claim 6 is characterized in that, describedly returns first synchronization packets according to comparative result and comprises:
When described MO updating type when increasing, from the server end database, obtain and unmatched MO sign corresponding service record, and return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client;
When described MO updating type is modification, from the server end database, obtain the described MO sign corresponding service record with MO update mode information inconsistency, and return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client;
When described MO updating type is when deletion, return first synchronization packets of the management information that comprises the MO that remains to be synchronized to client.
8, the method for synchrodata according to claim 6, it is characterized in that, the management information of the MO that described client is to be refreshed further comprises MO set membership information, and described management information and the management information of the MO that safeguards of described server end with the MO in first packet compares and comprises:
According to described MO set membership information, relatively whether the sub-MO sign under the described father MO of sub-MO sign under the father MO of client and server end mates;
When coupling, whether the MO update mode information that server end is safeguarded under the more identical MO sign is consistent with the MO update mode information of client, when inconsistent, determines that the MO updating type is for revising;
When not matching, the MO updating type of determining the sub-MO under the described father MO is for increasing or deletion.
9, the method for synchrodata according to claim 5 is characterized in that, described method further comprises:
Receive second synchronization packets that client sends;
Be synchronized to the management information of the MO of server end according to waiting of comprising at least in described second synchronization packets, the data in the server end database are upgraded processing.
10, the method for synchrodata according to claim 9, it is characterized in that, the described management information of waiting to be synchronized to the MO of server end comprises MO sign, MO type information and MO updating type information, describedly be synchronized to the management information of the MO of server end, the data in the server end database are upgraded to handle comprise according to waiting of comprising at least in described second synchronization packets:
When described MO updating type information representation increases, further comprise business record in described second synchronization packets, described business record is inserted in the business datum of the association of MO type information described in the server end database, and according to the management information of the MO in described second synchronization packets, the management information of the MO that update service device end is safeguarded;
When described MO updating type information representation is deleted, deletion and the marking matched business record of described MO from the associated business datum of MO type information described in the server end database, and the corresponding maintenance information of deletion the management information of the MO that safeguards from server end;
When described MO updating type information representation is revised, further comprise business record in described second synchronization packets, be revised as business record in described second synchronization packets with the marking matched business record of described MO in the business datum that MO type information described in the server end database is associated, and according to the management information of the MO in described second synchronization packets, the management information of the MO that update service device end is safeguarded.
11, a kind of client is characterized in that, comprising:
Communication module is used for sending first packet to server end, comprises the management information of client managed object MO to be refreshed in described first packet; And, be used for first synchronization packets that the reception server end returns, comprise the management information of the MO that waits to be synchronized to client in described first synchronization packets at least;
The MO administration module is used for being synchronized to according to waiting of comprising at least of described first synchronization packets management information of the MO of client, and the data in the client database are upgraded processing.
12, client according to claim 11, it is characterized in that, described MO administration module is further used for the management information according to the MO of described client maintenance, determines to wait to be synchronized to the MO of server end, and described MO represents with MO sign and MO type information at least;
Described communication module is further used for sending second synchronization packets to server end, comprises the described management information of waiting to be synchronized to the MO of server end in described second synchronization packets at least.
13, a kind of server is characterized in that, comprising:
Communication module is used to receive first packet that client sends, and comprises the management information of client managed object MO to be refreshed in described first packet;
The MO administration module, the management information that is used for MO that management information and the described server end of the MO of described first packet are safeguarded compares;
Described communication module also is used for returning first synchronization packets according to the comparative result of described MO administration module, comprises the management information of the MO that waits to be synchronized to client in described first synchronization packets at least.
14, server according to claim 13 is characterized in that, the management information of the MO that described client is to be refreshed comprises MO sign and MO update mode information at least, and described MO administration module comprises:
First judge module is used for judging whether the MO sign of first packet and the MO sign that server end is safeguarded mate, and when the MO sign that MO sign in described first packet and server end are safeguarded does not match, determines that the MO updating type is for increasing or deletion; The MO that MO sign in described first packet and server end are safeguarded is marking matched, is handled by second judge module;
Second judge module, be used to judge whether the MO update mode information that comes from client under the identical MO sign is consistent with the MO update mode information of server end maintenance, when under identical MO sign, coming from the MO update mode information of client and MO update mode information inconsistency that server end is safeguarded, determine that the MO updating type is for revising;
The management submodule, be used for when described MO updating type is increase, from the server end database, obtain and unmatched MO sign corresponding service record, return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client by described communication module;
Perhaps, be used for when described MO updating type is modification, from the server end database, obtain the described MO sign corresponding service record with MO update mode information inconsistency, return first synchronization packets of management information that includes described business record and wait to be synchronized to the MO of client by described communication module;
Perhaps, be used for being when deletion, return first synchronization packets of the management information that comprises the MO that remains to be synchronized to client by described communication module when described MO updating type.
15, server according to claim 13 is characterized in that, described communication module is further used for receiving second synchronization packets that client sends;
Described MO administration module is further used for being synchronized to according to waiting of comprising at least in described second synchronization packets management information of the MO of server end, and the data in the server end database are upgraded processing.
16, a kind of communication system based on database is characterized in that, comprising:
Client, be used for sending first packet to server end, the management information that comprises client managed object MO to be refreshed in described first packet, and first synchronization packets returned of reception server end, be synchronized to the management information of the MO of client according to waiting of comprising at least in described first synchronization packets, the data in the client database are upgraded processing;
Server end is used to receive first packet that client sends, and comprises the management information of client managed object MO to be refreshed in described first packet; The management information of the MO that the management information of MO in described first packet and described server end are safeguarded compares; And return first synchronization packets according to the comparative result of described comparison module, comprise the management information of the MO that waits to be synchronized to client in described first synchronization packets at least.
CN200910083056A 2009-04-27 2009-04-27 Method, client, server and system of synchronous data Pending CN101540726A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910083056A CN101540726A (en) 2009-04-27 2009-04-27 Method, client, server and system of synchronous data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910083056A CN101540726A (en) 2009-04-27 2009-04-27 Method, client, server and system of synchronous data

Publications (1)

Publication Number Publication Date
CN101540726A true CN101540726A (en) 2009-09-23

Family

ID=41123722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910083056A Pending CN101540726A (en) 2009-04-27 2009-04-27 Method, client, server and system of synchronous data

Country Status (1)

Country Link
CN (1) CN101540726A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130762A (en) * 2010-11-26 2011-07-20 华为技术有限公司 Method, device and system for synchronizing service information by using path computation element (PCE)
CN102202073A (en) * 2010-03-24 2011-09-28 杭州华三通信技术有限公司 Distributed system and data synchronization method thereof
CN103309901A (en) * 2012-03-16 2013-09-18 深圳市快播科技有限公司 Method and device for storage of sorted set data
WO2014015809A1 (en) * 2012-07-25 2014-01-30 腾讯科技(深圳)有限公司 Method for synchronization of ugc master and backup data and system thereof, and computer storage medium
CN104298742A (en) * 2014-10-09 2015-01-21 国电南瑞科技股份有限公司 Data fragmentation method for fragmentation real-time database of energy management system
CN105187475A (en) * 2015-06-09 2015-12-23 深圳市金蝶友商电子商务服务有限公司 Method and system for data synchronization
CN105357290A (en) * 2015-10-26 2016-02-24 无锡天脉聚源传媒科技有限公司 Video relevant information synchronization processing method and device
CN105430041A (en) * 2015-10-26 2016-03-23 深圳市乐唯科技开发有限公司 Method and apparatus for updating data
CN105653560A (en) * 2014-11-28 2016-06-08 华为软件技术有限公司 Method and device for data filing
CN106557262A (en) * 2015-09-23 2017-04-05 腾讯科技(深圳)有限公司 A kind of data processing method and device
CN108073707A (en) * 2017-12-19 2018-05-25 银联商务股份有限公司 Financial transaction data update method, device and computer read/write memory medium
CN108241684A (en) * 2016-12-26 2018-07-03 航天信息股份有限公司 A kind of data-updating method and group system
CN108874884A (en) * 2018-05-04 2018-11-23 广州多益网络股份有限公司 Data synchronization updating methods, devices and systems, server apparatus
CN111343274A (en) * 2020-02-28 2020-06-26 国铁吉讯科技有限公司 Data synchronization interaction method
CN111367860A (en) * 2018-12-26 2020-07-03 北京奇虎科技有限公司 File refreshing method and device
CN112749197A (en) * 2021-01-12 2021-05-04 中国平安财产保险股份有限公司 Data fragment refreshing method, device, equipment and storage medium
CN113037844A (en) * 2021-03-12 2021-06-25 北京京东振世信息技术有限公司 Identification updating method and device
CN114697210A (en) * 2017-11-22 2022-07-01 华为技术有限公司 Network performance guarantee method and device

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102202073A (en) * 2010-03-24 2011-09-28 杭州华三通信技术有限公司 Distributed system and data synchronization method thereof
CN102202073B (en) * 2010-03-24 2014-05-07 杭州华三通信技术有限公司 Distributed system and data synchronization method thereof
CN102130762A (en) * 2010-11-26 2011-07-20 华为技术有限公司 Method, device and system for synchronizing service information by using path computation element (PCE)
CN103309901A (en) * 2012-03-16 2013-09-18 深圳市快播科技有限公司 Method and device for storage of sorted set data
CN103309901B (en) * 2012-03-16 2017-11-17 深圳市快播科技有限公司 The storage method and device of sequence collection data
WO2014015809A1 (en) * 2012-07-25 2014-01-30 腾讯科技(深圳)有限公司 Method for synchronization of ugc master and backup data and system thereof, and computer storage medium
CN104298742A (en) * 2014-10-09 2015-01-21 国电南瑞科技股份有限公司 Data fragmentation method for fragmentation real-time database of energy management system
CN105653560A (en) * 2014-11-28 2016-06-08 华为软件技术有限公司 Method and device for data filing
CN105653560B (en) * 2014-11-28 2019-05-14 华为软件技术有限公司 Data archiving method and device
CN105187475B (en) * 2015-06-09 2018-10-12 深圳金蝶账无忧网络科技有限公司 The method and system that data synchronize
CN105187475A (en) * 2015-06-09 2015-12-23 深圳市金蝶友商电子商务服务有限公司 Method and system for data synchronization
CN106557262B (en) * 2015-09-23 2020-07-14 腾讯科技(深圳)有限公司 Data processing method and device
CN106557262A (en) * 2015-09-23 2017-04-05 腾讯科技(深圳)有限公司 A kind of data processing method and device
CN105357290A (en) * 2015-10-26 2016-02-24 无锡天脉聚源传媒科技有限公司 Video relevant information synchronization processing method and device
CN105430041A (en) * 2015-10-26 2016-03-23 深圳市乐唯科技开发有限公司 Method and apparatus for updating data
CN105430041B (en) * 2015-10-26 2019-01-04 深圳市乐唯科技开发有限公司 A kind of method and device of more new data
CN108241684A (en) * 2016-12-26 2018-07-03 航天信息股份有限公司 A kind of data-updating method and group system
CN108241684B (en) * 2016-12-26 2021-08-24 航天信息股份有限公司 Data updating method and cluster system
CN114697210B (en) * 2017-11-22 2023-11-03 华为技术有限公司 Network performance guarantee method and device
CN114697210A (en) * 2017-11-22 2022-07-01 华为技术有限公司 Network performance guarantee method and device
CN108073707A (en) * 2017-12-19 2018-05-25 银联商务股份有限公司 Financial transaction data update method, device and computer read/write memory medium
CN108874884B (en) * 2018-05-04 2021-05-04 广州多益网络股份有限公司 Data synchronization updating method, device and system and server equipment
CN108874884A (en) * 2018-05-04 2018-11-23 广州多益网络股份有限公司 Data synchronization updating methods, devices and systems, server apparatus
CN111367860A (en) * 2018-12-26 2020-07-03 北京奇虎科技有限公司 File refreshing method and device
CN111343274A (en) * 2020-02-28 2020-06-26 国铁吉讯科技有限公司 Data synchronization interaction method
CN112749197A (en) * 2021-01-12 2021-05-04 中国平安财产保险股份有限公司 Data fragment refreshing method, device, equipment and storage medium
CN112749197B (en) * 2021-01-12 2024-04-05 中国平安财产保险股份有限公司 Data fragment refreshing method, device, equipment and storage medium
CN113037844A (en) * 2021-03-12 2021-06-25 北京京东振世信息技术有限公司 Identification updating method and device

Similar Documents

Publication Publication Date Title
CN101540726A (en) Method, client, server and system of synchronous data
CN101064630B (en) Data synchronization method and system
CN111459985B (en) Identification information processing method and device
CN102129478B (en) Database synchronization method and system thereof
CN101334797B (en) Distributed file systems and its data block consistency managing method
CN111460023B (en) Method, device, equipment and storage medium for processing service data based on elastic search
JP4397385B2 (en) Method implemented as computer processor instructions stored in computer and storage medium readable by computer
CN106462592A (en) Systems and methods to optimize multi-version support in indexes
CN102073540A (en) Distributed affair submitting method and device thereof
CN102103642B (en) Data-erasure method based on OLTP, system and graphic data base server
CN110879813A (en) Binary log analysis-based MySQL database increment synchronization implementation method
US8280917B1 (en) Batching content management operations to facilitate efficient database interactions
EP2461615A1 (en) Method for backing up terminal data and system thereof
US20100153423A1 (en) Batch data synchronization with foreign key constraints
CN101004744A (en) System and method for synchronizing indexes of remote files at multiple points
CN101751473A (en) The searching of a kind of amendment record item, renewal and method for synchronous and data sync equipment
CN101790257A (en) Method for memorizing data and network management system
US20220035786A1 (en) Distributed database management system with dynamically split b-tree indexes
KR102038529B1 (en) System for processing real-time data modification of in-memory database
US20100153346A1 (en) Data integrity in a database environment through background synchronization
CN111367994A (en) Method and system for synchronously backing up incremental data of database
US7599903B2 (en) Systems and methods for extracting data sets from an online relational database into a data warehouse
CN111382142B (en) Database operation method, server and computer storage medium
CN110263060B (en) ERP electronic accessory management method and computer equipment
CN102006156A (en) Method and system for synchronizing configuration data among boards

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
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

Open date: 20090923