CN106055353B - Data-updating method and device - Google Patents
Data-updating method and device Download PDFInfo
- Publication number
- CN106055353B CN106055353B CN201610346495.2A CN201610346495A CN106055353B CN 106055353 B CN106055353 B CN 106055353B CN 201610346495 A CN201610346495 A CN 201610346495A CN 106055353 B CN106055353 B CN 106055353B
- Authority
- CN
- China
- Prior art keywords
- data
- version
- data information
- alternate
- final
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Abstract
The disclosure is directed to a kind of data-updating method and devices.This method comprises: obtaining the data information of the client revision obtained after the data information of basic version and the data of client modification basic version;Obtain the data information of the final version of storage;The data information of the data information of final version and client revision is compared with the data information of basic version respectively, obtains comparison result;The data information of final version is updated according to comparison result.Pass through the technical solution, when there is client to modify data, the data information of the final version of the basic version being based on and storage is modified according to client and modified data information is updated data, when basic version and final version can be effectively avoided not is a version, the problem of brought data update clashes, thus effective solution data update inconsistency.
Description
Technical field
This disclosure relates to technical field of data processing more particularly to a kind of data-updating method and device.
Background technique
Currently, multiple types of tools work, exchange and joy can be used in people with the progress of social development and the communication technology
It is happy, such as computer, Intelligent mobile equipment etc..Also there are many kinds synchronous documents, contact person or other data between plurality of devices
Technology and tool.
When synchronous between multiple equipment, the case where modification due to some multi-clients, it is possible that data collision.Now
Some synchronous method the case where not can solve data collision.
Summary of the invention
The embodiment of the present disclosure provides a kind of data-updating method and device, and the technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of data-updating method is provided, which comprises
The data information and client for obtaining basic version are modified the client obtained after the data of the basic version and are repaired
The data information of correcting sheet;
Obtain the data information of the final version of storage;
By the data information of the data information of the final version and the client revision respectively with the basis
The data information of version is compared, and obtains comparison result;
The data information of the final version is updated according to comparison result.
In one embodiment, the data by the data information of the final version and the client revision
Information is compared with the data information of the basic version respectively, obtains comparison result, comprising:
The data information of the final version is compared with the data information of the basic version, is obtained described last
Version is relative to the first alternate data of the basic version and first by alternate data;By the number of the client revision
It is believed that breath is compared with the data information of the basic version, the client revision is obtained relative to the base edition
This second alternate data and second is by alternate data;
The data information that the final version is updated according to comparison result, comprising:
In the data of the basic version, first alternate data and the corresponding substitution behaviour of the second alternate data are executed
Make, executes described first and operated by alternate data and second by corresponding substituted of alternate data, data after being operated;
The data information of the final version is updated according to data after the operation, so that the number of updated final version
There is no substituted before by alternate data in.
In one embodiment, the data information includes data itself or the different data compared to a upper version.
In one embodiment, described by the final version when the data information includes described data itself
Data information is compared with the data information of the basic version, obtains the final version relative to the basic version
First alternate data and first is by alternate data, comprising:
The data of the final version are compared with the data of the basic version, it is opposite to obtain the final version
In the first alternate data of the basic version and first by alternate data.
In one embodiment, described when the data information includes the different data for comparing a upper version
The data information of final version after the basic version is compared with the data information of the basic version, obtains institute
Final version is stated relative to the first alternate data of the basic version and first by alternate data, comprising:
By each version in all versions after the basic version relative to last revision different data, with it is described
Basic version is compared relative to the different data of the last revision of the basic version, obtain the final version relative to
First alternate data of the basic version and first is by alternate data.
In one embodiment, the method also includes:
Judge the client revision it is corresponding mark it is corresponding with the final version identify whether it is identical;
When the mark of the client revision is identical as the mark of the final version, determines and do not occur to update punching
It is prominent;
When the mark of the client revision is not identical as the mark of the final version, determination is updated
Conflict;
When update inconsistency has occurred in determination, execute described in the data information for obtaining basic version and client modification
The step of data information of the client revision obtained after the data of basic version.
In one embodiment, when update inconsistency does not occur, the method also includes:
The data information of the final version is updated according to the data information of the client revision.
In one embodiment, the method also includes:
Determine the corresponding mark of the updated final version;
The data information of updated final version mark corresponding with the updated final version is carried out
Corresponding storage;
Feedback information is exported to the client;The feedback information includes the data letter of the updated final version
Breath mark corresponding with the updated final version.
In one embodiment, the method also includes:
The corresponding mark of each version is generated according to the receiving time of the data information of each version;Or
For the data information build version number of each version, the corresponding mark of each version is generated according to the version number
Know.
In one embodiment, the substitution operation includes add operation, described to include reducing by substitution operation.
In one embodiment, described in the data of the basic version, execute first alternate data and second
It is corresponding by substitution behaviour by alternate data by alternate data and second to execute described first for the corresponding substitution operation of alternate data
Make, data after being operated, comprising:
In the data of the basic version, first alternate data and second alternate data are carried out plus grasped
Make, reducing is carried out by alternate data by alternate data and described second to described first, and remove the add operation repeated
And reducing, data after being operated.
According to the second aspect of an embodiment of the present disclosure, a kind of data update apparatus is provided, described device includes:
First obtains module, and data information and client for obtaining basic version modify the data of the basic version
The data information of the client revision obtained afterwards;
Second obtains module, the data information of the final version for obtaining storage;
Comparison module, for dividing the data information of the data information of the final version and the client revision
It is not compared with the data information of the basic version, obtains comparison result;
First update module, for updating the data information of the final version according to comparison result.
In one embodiment, the comparison module includes:
First Comparative sub-module, for by the data information of the data information of the final version and the basic version into
Row compares, and obtains the final version relative to the first alternate data of the basic version and first by alternate data;
Second Comparative sub-module, for by the data of the data information of the client revision and the basic version
Information is compared, and is obtained the client revision and is replaced relative to the second alternate data of the basic version and second
Codes or data;
First update module includes:
Implementation sub-module executes first alternate data and the second substitution for the data in the basic version
The corresponding substitution operation of data executes described first and is operated by alternate data and second by corresponding substituted of alternate data, obtains
Data after must operating;
Submodule is updated, for updating the data information of the final version according to data after the operation, so that updating
There is no substituted before by alternate data in the data of final version afterwards.
In one embodiment, the data information includes data itself or the different data compared to a upper version.
In one embodiment, when the data information includes described data itself, first Comparative sub-module is used
In:
The data of the final version are compared with the data of the basic version, it is opposite to obtain the final version
In the first alternate data of the basic version and first by alternate data.
In one embodiment, described when the data information includes the different data for comparing a upper version
First Comparative sub-module is used for:
By each version in all versions after the basic version relative to last revision different data, with it is described
Basic version is compared relative to the different data of the last revision of the basic version, obtain the final version relative to
First alternate data of the basic version and first is by alternate data.
In one embodiment, described device further include:
Judgment module, for judging the corresponding mark of client revision mark corresponding with the final version
It is whether identical;
First determining module is identical as the mark of the final version for the mark when the client revision
When, update inconsistency does not occur for determination;
Second determining module is not identical as the mark of the final version for the mark when the client revision
When, update inconsistency has occurred in determination;
Execution module, for determining that triggering first obtains the number that module obtains basic version when update inconsistency has occurred
It is believed that the data information of the client revision obtained after ceasing the data for modifying the basic version with client.
In one embodiment, when update inconsistency does not occur, described device further include:
Second update module, for updating the number of the final version according to the data information of the client revision
It is believed that breath.
In one embodiment, described device further include:
Third determining module, for determining the corresponding mark of the updated final version;
Memory module, for by the data information of the updated final version and the updated final version pair
The mark answered carries out corresponding storage;
Output module, for exporting feedback information to the client;The feedback information include it is described it is updated most
The data information of version and the corresponding mark of the updated final version afterwards.
In one embodiment, described device further include:
Generation module, the receiving time for the data information according to each version generate the corresponding mark of each version
Know;Or the data information build version number for each version, the corresponding mark of each version is generated according to the version number
Know.
In one embodiment, the substitution operation includes add operation, described to include reducing by substitution operation.
In one embodiment, the implementation sub-module is used for:
In the data of the basic version, first alternate data and second alternate data are carried out plus grasped
Make, reducing is carried out by alternate data by alternate data and described second to described first, and remove the add operation repeated
And reducing, data after being operated.
According to the third aspect of an embodiment of the present disclosure, a kind of data update apparatus is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The data information and client for obtaining basic version are modified the client obtained after the data of the basic version and are repaired
The data information of correcting sheet;
Obtain the data information of the final version of storage;
By the data information of the data information of the final version and the client revision respectively with the basis
The data information of version is compared, and obtains comparison result;
The data information of the final version is updated according to comparison result.
The technical scheme provided by this disclosed embodiment can include the following benefits:
(1) in one embodiment, the data information and client that obtain basic version modify the number of the basic version
The data information of the client revision obtained after;Obtain the data information of the final version of storage;By the final edition
Data information of the data information of data information originally and the client revision respectively with the basic version is compared
Compared with obtaining comparison result;The data information of the final version is updated according to comparison result.The number of disclosure acquisition basic version
It is believed that the data information of the client revision obtained after the data of breath, client modification basic version and storage are most
The data information of version afterwards, and these three data informations are compared, comparison result is obtained, and then update according to comparison result
The data information of final version, in this way, when there is client to modify data, according to the client basic version that is based on of modification and
The data information of the final version of storage and modified data information are updated data, and basis can be effectively avoided
When version and final version are not a versions, brought data update the problem of clashing, thus effective solution number
According to update inconsistency.
(2) in another embodiment, described by the data information of the final version and the client revision
Data information be compared respectively with the data information of the basic version, obtain comparison result, comprising: by the final edition
This data information is compared with the data information of the basic version, obtains the final version relative to the base edition
This first alternate data and first is by alternate data;By the data information of the client revision and the basic version
Data information be compared, obtain the client revision relative to the second alternate data of the basic version and
Two by alternate data;The data information that the final version is updated according to comparison result, comprising: in the basic version
In data, first alternate data and the corresponding substitution operation of the second alternate data are executed, executes described first by substitution number
It is operated according to second by corresponding substituted of alternate data, data after being operated;According to data update after the operation
The data information of final version, so that there is no substituted before by alternate data in the data of updated final version.
The data information of final version is compared by the disclosure with the data information of basic version, obtains final version relative to basis
First alternate data of version and first is by alternate data, and by the number of the data information of client revision and basic version
It is believed that breath is compared, client revision is obtained relative to the second of basic version by alternate data and the second substitution number
According to, and in the data of basic version, the first alternate data and first is first carried out and is operated by the corresponding substitution of alternate data, so
After execute the second alternate data and second and operated by the corresponding substitution of alternate data, in this manner it is ensured that updated data are believed
Breath may include all update operations, thus the problem of effective solution data update inconsistency, meanwhile, in the updated last
There is no substituted before by alternate data in the data of version, that is to say, that the number substituted before by other data
According to not appearing in the data of updated final version, in this way, guaranteeing that user data will not be lost and give up without user
The redundant data of abandoning remains.
(3) in another embodiment, the data information includes data itself or the difference compared to a upper version
Data.Data information in the disclosure is either data itself, i.e. such as contact person, communication number.It is also possible to compared to upper
The different data of one version, that is, the data updated, the artificial king two of the connection of a version as above, communication number are
135XXXXXXXXXX modifies king two on the basis of a upper version then data information can be the artificial Wang Peng of connection
For Wang Peng.In this way, data information can use unused form, it can satisfy the different storage demands of different user.
(4) in another embodiment, described by the final edition when the data information includes described data itself
This data information is compared with the data information of the basic version, obtains the final version relative to the base edition
This first alternate data and first is by alternate data, comprising: by the number of the data of the final version and the basic version
According to being compared, the final version is obtained relative to the first alternate data of the basic version and first by alternate data.
In the disclosure when data information is data itself, directly the data of final version and the data of basic version can be compared
Compared with so that it is determined that alternate data and by alternate data out is more convenient to determine in this way, directly comparing between data and data.
(5) in another embodiment, when the data information includes the different data for comparing a upper version,
The data information by the final version after the basic version is compared with the data information of the basic version, is obtained
To the final version relative to the first alternate data of the basic version and first by alternate data, comprising: by the base
Each version is relative to the different data of last revision, with the basic version relative to institute in all versions after plinth version
The different data for stating the last revision of basic version is compared, and obtains of the final version relative to the basic version
One alternate data and first is by alternate data.In the disclosure, data information can also be the different data compared to a upper version,
In this way, by each version in all versions after basic version relative to last revision different data, with basic version phase
The different data of the last revision of basic version is compared, available final version relative to basic version first
Alternate data and first is by alternate data.
(6) in another embodiment, judge the corresponding mark of the client revision and the final version pair
Identifying whether for answering is identical;When the mark of the client revision is identical as the mark of the final version, determine not
Update inconsistency occurs;When the mark of the client revision is not identical as the mark of the final version, determines and occur
Update inconsistency;Determining that the data information and client for executing the acquisition basic version are modified when update inconsistency has occurred
The step of data information of the client revision obtained after the data of the basic version.In the disclosure, acquisition is being executed
The data information of the client revision obtained after the data of data information and client the modification basic version of basic version
The step of before, first judge that the corresponding mark of client revision is corresponding with final version and identify whether identical, work as the two
When identical, then update inconsistency is not present in explanation, and when the two is not identical, then update inconsistency has occurred in explanation, can execute at this time
Obtain the data of the client revision obtained after the data information of basic version and the data of client modification basic version
The step of information, avoids the generation of data update inconsistency using the technical solution of the disclosure.In this way, can quick resulting number
Whether occur according to update inconsistency, to accurately merge the conflict of generation.
(7) in another embodiment, when update inconsistency does not occur, believed according to the data of the client revision
Breath updates the data information of the final version.If it is determined that update inconsistency does not occur in the disclosure, directly repaired according to client
The data information of correcting sheet updates the data information of final version, to guarantee the convenience that data update.
(8) in another embodiment, the corresponding mark of the updated final version is determined;It will be described updated
The data information of final version mark corresponding with the updated final version carries out corresponding storage;Export feedback information extremely
The client;The feedback information includes the data information and the updated final edition of the updated final version
This corresponding mark.It, can directly will be updated last after the data information to final version is updated in the disclosure
The data information of version mark corresponding with updated final version carries out corresponding storage, and then is fed back to terminal, this
Sample, terminal can directly acquire updated final version data information and corresponding mark.
(9) in another embodiment, each version is generated according to the receiving time of the data information of each version
Corresponding mark;Or the data information build version number for each version, each version is generated according to the version number
Corresponding mark.The corresponding mark of version can be according to the generation of the receiving time of data information in the disclosure, be also possible to
For each version distribution version number, as long as the sequencing of version can be characterized, so as to corresponding according to version
Mark determines the data which is latest edition.
(10) in another embodiment, the substitution operation includes add operation, described to include reducing by substitution operation.
In the disclosure, add operation is carried out to alternate data, reducing is carried out to by alternate data, can more accurately merge the number of generation
The residual for the redundant data being rejected will not be generated while guaranteeing that user data will not be lost according to conflict.
(11) in another embodiment, described in the data of the basic version, execute first alternate data
The operation of corresponding with the second alternate data substitution executes described first and is replaced by alternate data and second by alternate data is corresponding
Generation operation, data after being operated, comprising: in the data of the basic version, to first alternate data and described the
Two alternate datas carry out add operation, carry out reducing by alternate data by alternate data and described second to described first, and go
Except the add operation and reducing repeated, data after being operated.In the disclosure, to the first alternate data and the second substitution number
According to add operation is carried out, reducing is carried out by alternate data by alternate data and second to first, and remove repeat plus behaviour
Work and reducing, so that the residual for the redundant data being rejected will not be generated while guaranteeing that user data will not be lost.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of data-updating method shown according to an exemplary embodiment.
Fig. 2 is the flow chart of step S103 in data-updating method shown according to an exemplary embodiment.
Fig. 3 is the flow chart of step S104 in data-updating method shown according to an exemplary embodiment.
Fig. 4 is the flow chart of another data-updating method shown according to an exemplary embodiment.
Fig. 5 is the flow chart of another data-updating method shown according to an exemplary embodiment.
Fig. 6 is the flow chart of another data-updating method shown according to an exemplary embodiment.
Fig. 7 is the flow chart of another data-updating method shown according to an exemplary embodiment.
Fig. 8 is the flow chart of another data-updating method shown according to an exemplary embodiment.
Fig. 9 is the flow chart of another data-updating method shown according to an exemplary embodiment.
Figure 10 is the flow chart of another data-updating method shown according to an exemplary embodiment.
Figure 11 is a kind of block diagram of data update apparatus shown according to an exemplary embodiment.
Figure 12 is the block diagram of comparison module in a kind of data update apparatus shown according to an exemplary embodiment.
Figure 13 is the block diagram of the first update module in a kind of data update apparatus shown according to an exemplary embodiment.
Figure 14 is the block diagram of another data update apparatus shown according to an exemplary embodiment.
Figure 15 is the block diagram of another data update apparatus shown according to an exemplary embodiment.
Figure 16 is the block diagram of another data update apparatus shown according to an exemplary embodiment.
Figure 17 is the block diagram of another data update apparatus shown according to an exemplary embodiment.
Figure 18 is the block diagram shown according to an exemplary embodiment suitable for data update apparatus.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
The embodiment of the present disclosure provides a kind of data-updating method, and this method can be used in server, as shown in Figure 1, should
Method includes step S101-S104:
In step s101, it is obtained after obtaining the data information of basic version and the data of client modification basic version
The data information of client revision;
The data information of basic version, i.e. client modify the data information being based on.And client is in basic version
It modifies on the basis of data information the obtained data information i.e. data information of client revision.
In step s 102, the data information of the final version of storage is obtained;The data information of the final version of storage, can
To be the data information of the latest edition stored in server.
In step s 103, by the data information of the data information of final version and client revision respectively with basis
The data information of version is compared, and obtains comparison result;
In step S104, the data information of final version is updated according to comparison result.
The client obtained after the data information of disclosure acquisition basic version, the data of client modification basic version is repaired
The data information of the final version of the data information and storage of correcting sheet, and these three data informations are compared, it obtains
Comparison result, and then according to the data information of comparison result update final version, in this way, when there is client to modify data, root
The data information and modified data information pair of the final version of the basic version being based on and storage are modified according to client
Data are updated, and when basic version and final version can be effectively avoided not is a version, brought data update
The problem of clashing, thus effective solution data update inconsistency.
As shown in Fig. 2, in one embodiment, above-mentioned steps S103 includes step S201-S202:
In step s 201, the data information of final version is compared with the data information of basic version, is obtained most
Version is relative to the first alternate data of basic version and first by alternate data afterwards;
In step S202, the data information of client revision is compared with the data information of basic version,
Client revision is obtained relative to the second alternate data of basic version and second by alternate data.
For example, the data information of final version is Zhang San 13910000000, and the data information of basic version is
13810000000, then the first alternate data be 139, first by alternate data be 138.
As shown in figure 3, in one embodiment, above-mentioned steps S104 includes step S301-S302:
In step S301, in the data of basic version, executes the first alternate data and the second alternate data is corresponding
Substitution operation executes first and is operated by alternate data and second by corresponding substituted of alternate data, data after being operated;
In step s 302, the data information that final version is updated according to data after operation, so that updated final edition
There is no substituted before by alternate data in this data.
The data information of final version is compared by the disclosure with the data information of basic version, obtains final version phase
For the first alternate data of basic version and first by alternate data, and by the data information of client revision and basis
The data information of version is compared, and obtains client revision relative to the second of basic version by alternate data and second
Alternate data, and in the data of basic version, the first alternate data and first is first carried out by the corresponding substitution of alternate data
Then operation executes the second alternate data and second and is operated by the corresponding substitution of alternate data, in this manner it is ensured that updated
Data information may include all update operations, thus the problem of effective solution data update inconsistency, meanwhile, in the updated
Final version data in there is no before substituted by alternate data, that is to say, that replaced before by other data
The data in generation do not appear in the data of updated final version, in this way, guaranteeing that user data will not be lost and not have
The redundant data residual that user gives up.
In one embodiment, data information includes data itself or the different data compared to a upper version.
Data information in the disclosure is either data itself, i.e. such as contact person, communication number.Be also possible to compared to
The different data of a upper version, that is, the data updated, the artificial king two of the connection of a version as above, communication number are
King two is revised as by 135XXXXXXXX then data information can be the artificial Wang Peng of connection on the basis of a upper version
Wang Peng.In this way, data information can use unused form, it can satisfy the different storage demands of different user.
As shown in figure 4, in one embodiment, when data information includes data itself, above-mentioned steps S201 includes step
Rapid S401:
In step S401, the data of final version are compared with the data of basic version, obtain final version phase
For the first alternate data of basic version and first by alternate data.
It, can be directly by the number of the data of final version and basic version in the disclosure when data information is data itself
According to being compared, so that it is determined that alternate data and by alternate data out, in this way, directly comparing between data and data, is more convenient
It determines.
For example, the data information of final version is Zhang San 13910000000, and the data information of basic version is
13810000000, then the first alternate data be 139, first by alternate data be 138.
As shown in figure 5, in one embodiment, when data information includes the different data compared to a upper version, on
Stating step S201 includes step S501:
In step S501, by different numbers of each version relative to last revision in all versions after basic version
It is compared according to the different data with basic version relative to the last revision of basic version, obtains final version relative to base
First alternate data of plinth version and first is by alternate data.
In the disclosure, data information can also be the different data compared to a upper version, in this way, by after basic version
All versions in different data and basic version upper one edition relative to basic version of each version relative to last revision
This different data is compared, and available final version is substituted relative to the first alternate data of basic version and first
Data.In this way, only record compares the different data of a upper version, data space can be saved.
As shown in fig. 6, in one embodiment, the above method further includes step S601-S604:
In step s 601, judge that the corresponding mark of client revision is corresponding with final version and identify whether phase
Together;According to version it is corresponding identify whether it is identical can determine whether same version, if version it is corresponding mark it is identical,
For same version, if the corresponding mark of version is different, for different editions.
In step S602, when the mark of client revision is identical as the mark of final version, determination does not occur
Update inconsistency;
In step S603, when the mark of the mark of client revision and final version is not identical, determines and occur
Update inconsistency;
In step s 604, determining that execution obtains data information and the client of basic version when update inconsistency has occurred
The step of data information of the client revision obtained after the data of end modification basic version.
In the disclosure, obtained after the data for executing the data information for obtaining basic version and client modification basic version
Client revision data information the step of before, first judge the corresponding mark of client revision and final version
Corresponding to identify whether identical, when the two is identical, then explanation then illustrates to send out there is no update inconsistency when the two is not identical
Update inconsistency has been given birth to, has been obtained after the data of the data information for obtaining basic version and client modification basic version can be executed at this time
The step of data information of the client revision arrived, avoids the hair of data update inconsistency using the technical solution of the disclosure
It is raw.In this way, can quickly determine whether data update inconsistency occurs, to accurately merge the conflict of generation.
For example, the final version of the contact person stored in server is corresponding to be identified as 6, and the contact person of client modification
Version it is corresponding be identified as 5 ', modify based on basic version it is corresponding be identified as 5, at this point, client revision pair
The mark answered mark corresponding from final version is different, illustrates that data update inconsistency has occurred.
As shown in fig. 7, in one embodiment, when update inconsistency does not occur, the above method further includes step S701:
In step s 701, the data information of final version is updated according to the data information of client revision.
If it is determined that update inconsistency does not occur in the disclosure, directly updated most according to the data information of client revision
The data information of version afterwards, to guarantee the convenience that data update.
As shown in figure 8, in one embodiment, the above method further includes step S801-S803:
In step S801, the corresponding mark of updated final version is determined;
In step S802, by the data information of updated final version mark corresponding with updated final version
Carry out corresponding storage;
In step S803, output feedback information to client;Feedback information includes the data of updated final version
Information and the corresponding mark of updated final version.
It, can be directly by updated final version after the data information to final version is updated in the disclosure
Data information mark corresponding with updated final version carry out corresponding storage, and then terminal is fed back to, in this way, eventually
Hold the data information that can directly acquire updated final version and corresponding mark.
As shown in figure 9, in one embodiment, the above method further includes step S901:
In step S901, the corresponding mark of each version is generated according to the receiving time of the data information of each version;
Or the data information build version number for each version, the corresponding mark of each version is generated according to version number.
The corresponding mark of version can be according to the generation of the receiving time of data information in the disclosure, be also possible to be every
The version number of a version distribution, as long as the sequencing of version can be characterized, so as to according to the corresponding mark of version
The data which is latest edition determined.
In one embodiment, substitution operation includes add operation, includes reducing by substitution operation.
In the disclosure, add operation is carried out to alternate data, reducing is carried out to by alternate data, can more accurately merge
The data collision of generation will not generate the residual for the redundant data being rejected while guaranteeing that user data will not be lost.
As shown in Figure 10, in one embodiment, above-mentioned steps S302 includes step S1001:
In step S1001, in the data of basic version, the first alternate data and the second alternate data is carried out plus grasped
Make, reducing carried out by alternate data by alternate data and second to first, and remove the add operation and reducing repeated,
Data after being operated.
In the disclosure, add operation is carried out to the first alternate data and the second alternate data, to first by alternate data and the
Two carry out reducing by alternate data, and remove the add operation and reducing repeated, thus guaranteeing that user data will not
While loss, the residual for the redundant data being rejected will not be generated.
The technical solution of the disclosure is described in detail with a specific embodiment below.
In synchronizing process by version number perhaps modification time or other may indicate that modification occur successive mark come
Show the order that modification occurs, hereafter by taking version number as an example.Wherein, server need to save each version of modification.
Conflict discovery:
1) client upload modification when, to take simultaneously modification based on version number.Such as: client is fetched from server
When data, version number 5;Then after user's modification, when uploading modification, version number 5 is sent to server simultaneously.
2) server receive client modification request when, compare client modification based on version and server it is currently newest
Version it is new and old.If client modification based on version it is identical with server current server latest edition, do not conflict
Occur, covers server-side latest data using client data;If client modification based on version older than server it is newest
Version is then occurred modification conflict (submitted and modified due to other clients, server end state is caused to be updated), starts to merge punching
Prominent logic.
Conflict merges:
1) server finds client and uploads historical record of the modification based on version, hereinafter referred to as basic version.
2) for there is a plurality of record data, mailbox etc.: such as phone modification is abstracted as to increasing and deleting, is calculated separately
Server latest edition and basic version, client submits the version of modification and the difference of basic version, i.e., by final version
Data information is compared with the data information of basic version, obtains first alternate data of the final version relative to basic version
With first by alternate data, the data information of client revision is compared with the data information of basic version, is obtained
Client revision relative to the second alternate data of basic version and second by alternate data, and in the data of basic version
On, the first alternate data and the corresponding substitution operation of the second alternate data are executed, first is executed and is replaced by alternate data and second
Codes or data is corresponding to be operated by substitution, i.e., difference will reset on basic version twice.
And for there was only one record data, such as name: back and forward calculates the difference between two records, if all not having
There is modification, then retains initial value;If having side modification, then the modification of one side of modification is reset on basic version;If both sides do
Modification, then the modification that playback client uploads, and by the content of the current state-of-the-art record of server, increase to the standby of basic version
In note.
4) data after above-mentioned replay operations are saved on the server as the combined final result that conflicts.
Example:
1, the case where a plurality of record:
Contact person's (old version that server saves) that version is 5:
Name: Zhang San
Phone number: 110,120.
Contact person's (server state-of-the-art record) that version is 6:
Name: Zhang San
Phone number: 119,120.
Client submits contact person's modification 5 ' based on version number 5:
Name: Zhang San
Phone number: 110,122.
Clash handle is as a result, the contact person that version number is 7:
Name: Zhang San
Phone number: 119,122.
Operation mode:
6 relative to 5:-110, and+119
5 ' opposite and 5:-120 ,+122
The two operations are reset in version 5, obtain 119,122.
2, the case where the singles data record such as name:
Contact person's (old version that server saves) that version is 5:
Name: Zhang San
Phone number: 110,120.
Contact person's (server state-of-the-art record) that version is 6:
Name: Zhang Sanfeng
Phone number: 110,120.
Client submits contact person's modification 5 ' based on version number 5:
Name: Zhang Junbao
Phone number: 110,120.
Clash handle is as a result, the contact person that version number is 7:
Name: Zhang Junbao
Phone number: 110,120.
Remarks: name Zhang Sanfeng
Specifically, this conflict discovery is also used to other clearly to judge the synchronous of the data of difference, such as with processing scheme
Note, calendar etc..
Through the above technical solutions, modifying the basic version being based on according to client when there is client to modify data
Data are updated with the data information of the final version of storage and modified data information, base can be effectively avoided
When plinth version and final version are not a versions, brought data update the problem of clashing, thus effective solution
Data update inconsistency.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.
Figure 11 is a kind of block diagram of data update apparatus shown according to an exemplary embodiment, which can be by soft
Part, hardware or both are implemented in combination with as some or all of of server.As shown in figure 11, the data update apparatus packet
It includes:
First obtains module 111, is configured as obtaining the data information of basic version and client modifies basic version
The data information of the client revision obtained after data;
Second obtains module 112, is configured as obtaining the data information of the final version of storage;
Comparison module 113 is configured as the data information of the data information of final version and client revision point
It is not compared with the data information of basic version, obtains comparison result;
First update module 114 is configured as updating the data information of final version according to comparison result.
The client obtained after the data information of disclosure acquisition basic version, the data of client modification basic version is repaired
The data information of the final version of the data information and storage of correcting sheet, and these three data informations are compared, it obtains
Comparison result, and then according to the data information of comparison result update final version, in this way, when there is client to modify data, root
The data information and modified data information pair of the final version of the basic version being based on and storage are modified according to client
Data are updated, and when basic version and final version can be effectively avoided not is a version, brought data update
The problem of clashing, thus effective solution data update inconsistency.
As shown in figure 12, in one embodiment, comparison module 113 includes:
First Comparative sub-module 121, be configured as by the data information of the data information of final version and basic version into
Row compares, and obtains final version relative to the first alternate data of basic version and first by alternate data;
Second Comparative sub-module 122 is configured as the data by the data information of client revision and basic version
Information is compared, and obtains client revision relative to the second alternate data of basic version and second by alternate data.
For example, the data information of final version is Zhang San 13910000000, and the data information of basic version is
13810000000, then the first alternate data be 139, first by alternate data be 138.
As shown in figure 13, in one embodiment, the first update module 114 includes:
Implementation sub-module 131 is configured as in the data of basic version, executes the first alternate data and the second substitution number
It is operated according to corresponding substitution, executes first and operated by alternate data and second by corresponding substituted of alternate data, operated
Data afterwards;
Submodule 132 is updated, is configured as updating the data information of final version according to data after operation, so that after updating
Final version data in there is no before substituted by alternate data.
The data information of final version is compared by the disclosure with the data information of basic version, obtains final version phase
For the first alternate data of basic version and first by alternate data, and by the data information of client revision and basis
The data information of version is compared, and obtains client revision relative to the second of basic version by alternate data and second
Alternate data, and in the data of basic version, the first alternate data and first is first carried out by the corresponding substitution of alternate data
Then operation executes the second alternate data and second and is operated by the corresponding substitution of alternate data, in this manner it is ensured that updated
Data information may include all update operations, thus the problem of effective solution data update inconsistency, meanwhile, in the updated
Final version data in there is no before substituted by alternate data, that is to say, that replaced before by other data
The data in generation do not appear in the data of updated final version, in this way, guaranteeing that user data will not be lost and not have
The redundant data residual that user gives up.
In one embodiment, data information includes data itself or the different data compared to a upper version.
Data information in the disclosure is either data itself, i.e. such as contact person, communication number.Be also possible to compared to
The different data of a upper version, that is, the data updated, the artificial king two of the connection of a version as above, communication number are
King two is revised as by 135XXXXXXXX then data information can be the artificial Wang Peng of connection on the basis of a upper version
Wang Peng.In this way, data information can use unused form, it can satisfy the different storage demands of different user.
In one embodiment, when data information includes data itself, the first Comparative sub-module is used for:
The data of final version are compared with the data of basic version, obtain final version relative to basic version
First alternate data and first is by alternate data.
It, can be directly by the number of the data of final version and basic version in the disclosure when data information is data itself
According to being compared, so that it is determined that alternate data and by alternate data out, in this way, directly comparing between data and data, is more convenient
It determines.
For example, the data information of final version is Zhang San 13910000000, and the data information of basic version is
13810000000, then the first alternate data be 139, first by alternate data be 138.
In one embodiment, when data information includes the different data compared to a upper version, first compares submodule
Block is used for:
By different data and basic version of each version relative to last revision in all versions after basic version
The different data of last revision relative to basic version is compared, and obtain final version relative to basic version first is replaced
Codes or data and first is by alternate data.
In the disclosure, data information can also be the different data compared to a upper version, in this way, by after basic version
All versions in different data and basic version upper one edition relative to basic version of each version relative to last revision
This different data is compared, and available final version is substituted relative to the first alternate data of basic version and first
Data.In this way, only record compares the different data of a upper version, data space can be saved.
As shown in figure 14, in one embodiment, above-mentioned apparatus further include:
Judgment module 141 is configured as judging the corresponding mark of client revision mark corresponding with final version
It is whether identical;
First determining module 142 is configured as when the mark of client revision is identical as the mark of final version,
Update inconsistency does not occur for determination;
Second determining module 143 is configured as when the mark of client revision and the mark of final version be not identical
When, update inconsistency has occurred in determination;
Execution module 144 is configured as determining that triggering first obtains module and obtains base edition when update inconsistency has occurred
The data information of the client revision obtained after the data of this data information and client modification basic version.
In the disclosure, obtained after the data for executing the data information for obtaining basic version and client modification basic version
Client revision data information the step of before, first judge the corresponding mark of client revision and final version
Corresponding to identify whether identical, when the two is identical, then explanation then illustrates to send out there is no update inconsistency when the two is not identical
Update inconsistency has been given birth to, has been obtained after the data of the data information for obtaining basic version and client modification basic version can be executed at this time
The step of data information of the client revision arrived, avoids the hair of data update inconsistency using the technical solution of the disclosure
It is raw.In this way, can quickly determine whether data update inconsistency occurs, to accurately merge the conflict of generation.
For example, the final version of the contact person stored in server is corresponding to be identified as 6, and the contact person of client modification
Version it is corresponding be identified as 5 ', modify based on basic version it is corresponding be identified as 5, at this point, client revision pair
The mark answered mark corresponding from final version is different, illustrates that data update inconsistency has occurred.
As shown in figure 15, in one embodiment, when update inconsistency does not occur, above-mentioned apparatus further include:
Second update module 151 is configured as updating the number of final version according to the data information of client revision
It is believed that breath.
If it is determined that update inconsistency does not occur in the disclosure, directly updated most according to the data information of client revision
The data information of version afterwards, to guarantee the convenience that data update.
As shown in figure 16, in one embodiment, above-mentioned apparatus further include:
Third determining module 161 is configured to determine that the corresponding mark of updated final version;
Memory module 162 is configured as the data information of updated final version and updated final version pair
The mark answered carries out corresponding storage;
Output module 163 is configured as output feedback information to client;Feedback information includes updated final version
Data information and the corresponding mark of updated final version.
It, can be directly by updated final version after the data information to final version is updated in the disclosure
Data information mark corresponding with updated final version carry out corresponding storage, and then terminal is fed back to, in this way, eventually
Hold the data information that can directly acquire updated final version and corresponding mark.
As shown in figure 17, in one embodiment, above-mentioned apparatus further include:
Generation module 171 is configured as generating each version according to the receiving time of the data information of each version
Corresponding mark;Or the data information build version number for each version, each version is generated according to the version number
Corresponding mark.
The corresponding mark of version can be according to the generation of the receiving time of data information in the disclosure, be also possible to be every
The version number of a version distribution, as long as the sequencing of version can be characterized, so as to according to the corresponding mark of version
The data which is latest edition determined.
In one embodiment, the substitution operation includes add operation, described to include reducing by substitution operation.
In the disclosure, add operation is carried out to alternate data, reducing is carried out to by alternate data, can more accurately merge
The data collision of generation will not generate the residual for the redundant data being rejected while guaranteeing that user data will not be lost.
In one embodiment, the implementation sub-module is used for:
In the data of the basic version, first alternate data and second alternate data are carried out plus grasped
Make, reducing is carried out by alternate data by alternate data and described second to described first, and remove the add operation repeated
And reducing, data after being operated.
In the disclosure, add operation is carried out to the first alternate data and the second alternate data, to first by alternate data and the
Two carry out reducing by alternate data, and remove the add operation and reducing repeated, thus guaranteeing that user data will not
While loss, the residual for the redundant data being rejected will not be generated.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Figure 18 is a kind of block diagram for data update apparatus shown according to an exemplary embodiment.For example, device
1800 may be provided as a server.Device 1800 includes processing component 1822, further comprises one or more processing
Device, and the memory resource as representated by memory 1832, can be by the instruction of the execution of processing component 1822, example for storing
Such as application program.The application program stored in memory 1832 may include it is one or more each correspond to one group
The module of instruction.In addition, processing component 1822 is configured as executing instruction, to execute the above method.
Device 1800 can also include that a power supply module 1826 be configured as the power management of executive device 1800, and one
Wired or wireless network interface 1850 is configured as device 1800 being connected to network and input and output (I/O) interface
1858.Device 1800 can be operated based on the operating system for being stored in memory 1832, such as Windows ServerTM, Mac
OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of device 1800
When device executes, so that device 1800 is able to carry out above-mentioned data-updating method, which comprises
The data information and client for obtaining basic version are modified the client obtained after the data of the basic version and are repaired
The data information of correcting sheet;
Obtain the data information of the final version of storage;
By the data information of the data information of the final version and the client revision respectively with the basis
The data information of version is compared, and obtains comparison result;
The data information of the final version is updated according to comparison result.
In one embodiment, the data by the data information of the final version and the client revision
Information is compared with the data information of the basic version respectively, obtains comparison result, comprising:
The data information of the final version is compared with the data information of the basic version, is obtained described last
Version is relative to the first alternate data of the basic version and first by alternate data;By the number of the client revision
It is believed that breath is compared with the data information of the basic version, the client revision is obtained relative to the base edition
This second alternate data and second is by alternate data;
The data information that the final version is updated according to comparison result, comprising:
In the data of the basic version, first alternate data and the corresponding substitution behaviour of the second alternate data are executed
Make, executes described first and operated by alternate data and second by corresponding substituted of alternate data, data after being operated;
The data information of the final version is updated according to data after the operation, so that the number of updated final version
There is no substituted before by alternate data in.
In one embodiment, the data information includes data itself or the different data compared to a upper version.
In one embodiment, described by the final version when the data information includes described data itself
Data information is compared with the data information of the basic version, obtains the final version relative to the basic version
First alternate data and first is by alternate data, comprising:
The data of the final version are compared with the data of the basic version, it is opposite to obtain the final version
In the first alternate data of the basic version and first by alternate data.
In one embodiment, described when the data information includes the different data for comparing a upper version
The data information of final version after the basic version is compared with the data information of the basic version, obtains institute
Final version is stated relative to the first alternate data of the basic version and first by alternate data, comprising:
By each version in all versions after the basic version relative to last revision different data, with it is described
Basic version is compared relative to the different data of the last revision of the basic version, obtain the final version relative to
First alternate data of the basic version and first is by alternate data.
In one embodiment, the method also includes:
Judge the client revision it is corresponding mark it is corresponding with the final version identify whether it is identical;
When the mark of the client revision is identical as the mark of the final version, determines and do not occur to update punching
It is prominent;
When the mark of the client revision is not identical as the mark of the final version, determination is updated
Conflict;
When update inconsistency has occurred in determination, execute described in the data information for obtaining basic version and client modification
The step of data information of the client revision obtained after the data of basic version.
In one embodiment, when update inconsistency does not occur, the method also includes:
The data information of the final version is updated according to the data information of the client revision.
In one embodiment, the method also includes:
Determine the corresponding mark of the updated final version;
The data information of updated final version mark corresponding with the updated final version is carried out
Corresponding storage;
Feedback information is exported to the client;The feedback information includes the data letter of the updated final version
Breath mark corresponding with the updated final version.
In one embodiment, the method also includes:
The corresponding mark of each version is generated according to the receiving time of the data information of each version;Or
For the data information build version number of each version, the corresponding mark of each version is generated according to the version number
Know.
In one embodiment, the substitution operation includes add operation, described to include reducing by substitution operation.
In one embodiment, described in the data of the basic version, execute first alternate data and second
It is corresponding by substitution behaviour by alternate data by alternate data and second to execute described first for the corresponding substitution operation of alternate data
Make, data after being operated, comprising:
In the data of the basic version, first alternate data and second alternate data are carried out plus grasped
Make, reducing is carried out by alternate data by alternate data and described second to described first, and remove the add operation repeated
And reducing, data after being operated.
Those skilled in the art will readily occur to its of the disclosure after considering specification and practicing disclosure disclosed herein
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (21)
1. a kind of data-updating method, which is characterized in that the described method includes:
The data information and client that obtain basic version modify the client revision obtained after the data of the basic version
This data information;
Obtain the data information of the final version of storage;
By the data information of the data information of the final version and the client revision respectively with the basic version
Data information be compared, obtain comparison result;
The data information of the final version is updated according to comparison result;
It is described by the data information of the data information of the final version and the client revision respectively with the basis
The data information of version is compared, and obtains comparison result, comprising:
The data information of the final version is compared with the data information of the basic version, obtains the final version
Relative to the first alternate data of the basic version and first by alternate data;The data of the client revision are believed
Breath is compared with the data information of the basic version, obtains the client revision relative to the basic version
Second alternate data and second is by alternate data;
The data information that the final version is updated according to comparison result, comprising:
In the data of the basic version, first alternate data and the corresponding substitution operation of the second alternate data are executed,
It executes described first to be operated by alternate data and second by corresponding substituted of alternate data, data after being operated;
The data information of the final version is updated according to data after the operation, so that in the data of updated final version
There is no substituted before by alternate data.
2. the method as described in claim 1, which is characterized in that
The data information includes data itself or the different data compared to a upper version.
3. method according to claim 2, which is characterized in that described when the data information includes described data itself
The data information of the final version is compared with the data information of the basic version, it is opposite to obtain the final version
In the first alternate data of the basic version and first by alternate data, comprising:
The data of the final version are compared with the data of the basic version, obtain the final version relative to institute
The first alternate data and first of basic version is stated by alternate data.
4. method according to claim 2, which is characterized in that compared to a upper version described in including in the data information
When different data, the data information of the data information by the final version after the basic version and the basic version
It is compared, obtains the final version relative to the first alternate data of the basic version and first by alternate data, packet
It includes:
By each version in all versions after the basic version relative to the different data of last revision and the basis
Version is compared relative to the different data of the last revision of the basic version, obtains the final version relative to described
First alternate data of basic version and first is by alternate data.
5. the method as described in claim 1, which is characterized in that the method also includes:
Judge the client revision it is corresponding mark it is corresponding with the final version identify whether it is identical;
When the mark of the client revision is identical as the mark of the final version, update inconsistency does not occur for determination;
When the mark of the client revision is not identical as the mark of the final version, determines and update punching has occurred
It is prominent;
Determining that the data information and client for executing the acquisition basic version modify the basis when update inconsistency has occurred
The step of data information of the client revision obtained after the data of version.
6. method as claimed in claim 5, which is characterized in that when update inconsistency does not occur, the method also includes:
The data information of the final version is updated according to the data information of the client revision.
7. method according to claim 2, which is characterized in that the method also includes:
Determine the corresponding mark of the updated final version;
The data information of updated final version mark corresponding with the updated final version is carried out corresponding
Storage;
Feedback information is exported to the client;The feedback information include the updated final version data information and
The corresponding mark of the updated final version.
8. method as claimed in claim 5, which is characterized in that the method also includes:
The corresponding mark of each version is generated according to the receiving time of the data information of each version;Or
For the data information build version number of each version, the corresponding mark of each version is generated according to the version number.
9. the method as described in claim 1, which is characterized in that the substitution operation includes add operation, described to be operated by substitution
Including reducing.
10. method as claimed in claim 9, which is characterized in that it is described in the data of the basic version, execute described the
One alternate data and the corresponding substitution operation of the second alternate data, execute described first by alternate data and second by alternate data
It is corresponding to be operated by substitution, data after being operated, comprising:
In the data of the basic version, add operation is carried out to first alternate data and second alternate data, it is right
Described first carries out reducing by alternate data by alternate data and described second, and removes the add operation repeated and subtract behaviour
Make, data after being operated.
11. a kind of data update apparatus, which is characterized in that described device includes:
First obtains module, and data information and client for obtaining basic version are modified after the data of the basic version
The data information of the client revision arrived;
Second obtains module, the data information of the final version for obtaining storage;
Comparison module, for by the data information of the data information of the final version and the client revision respectively with
The data information of the basic version is compared, and obtains comparison result;
First update module, for updating the data information of the final version according to comparison result;
The comparison module includes:
First Comparative sub-module, for comparing the data information of the final version and the data information of the basic version
Compared with obtaining the final version relative to the first alternate data of the basic version and first by alternate data;
Second Comparative sub-module, for by the data information of the data information of the client revision and the basic version
It is compared, obtains the client revision relative to the second alternate data of the basic version and second by substitution number
According to;
First update module includes:
Implementation sub-module executes first alternate data and the second alternate data for the data in the basic version
Corresponding substitution operation executes described first and is operated by alternate data and second by corresponding substituted of alternate data, grasped
Data after work;
Submodule is updated, for updating the data information of the final version according to data after the operation, so that updated
There is no substituted before by alternate data in the data of final version.
12. device as claimed in claim 11, which is characterized in that
The data information includes data itself or the different data compared to a upper version.
13. device as claimed in claim 12, which is characterized in that when the data information includes described data itself, institute
The first Comparative sub-module is stated to be used for:
The data of the final version are compared with the data of the basic version, obtain the final version relative to institute
The first alternate data and first of basic version is stated by alternate data.
14. device as claimed in claim 12, which is characterized in that compare a upper version described in including in the data information
Different data when, first Comparative sub-module is used for:
By each version in all versions after the basic version relative to the different data of last revision and the basis
Version is compared relative to the different data of the last revision of the basic version, obtains the final version relative to described
First alternate data of basic version and first is by alternate data.
15. device as claimed in claim 11, which is characterized in that described device further include:
Judgment module is identified whether for judging that the corresponding mark of the client revision is corresponding with the final version
It is identical;
First determining module, for when the client revision mark it is identical as the mark of the final version when, really
It is fixed that update inconsistency does not occur;
Second determining module, when not identical as the mark of the final version for the mark when the client revision,
Update inconsistency has occurred in determination;
Execution module, for determining that triggering first obtains the data letter that module obtains basic version when update inconsistency has occurred
Cease the data information of the client revision obtained after the data for modifying the basic version with client.
16. device as claimed in claim 15, which is characterized in that when update inconsistency does not occur, described device further include:
Second update module, the data for updating the final version according to the data information of the client revision are believed
Breath.
17. device as claimed in claim 12, which is characterized in that described device further include:
Third determining module, for determining the corresponding mark of the updated final version;
Memory module, for the data information of the updated final version is corresponding with the updated final version
Mark carries out corresponding storage;
Output module, for exporting feedback information to the client;The feedback information includes the updated final edition
This data information and the corresponding mark of the updated final version.
18. device as claimed in claim 15, which is characterized in that described device further include:
Generation module, the receiving time for the data information according to each version generate the corresponding mark of each version;Or
For the data information build version number of each version, the corresponding mark of each version is generated according to the version number.
19. device as claimed in claim 11, which is characterized in that the substitution operation includes add operation, described to be grasped by substitution
Make to include reducing.
20. device as claimed in claim 19, which is characterized in that the implementation sub-module is used for:
In the data of the basic version, add operation is carried out to first alternate data and second alternate data, it is right
Described first carries out reducing by alternate data by alternate data and described second, and removes the add operation repeated and subtract behaviour
Make, data after being operated.
21. a kind of data update apparatus characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The data information and client that obtain basic version modify the client revision obtained after the data of the basic version
This data information;
Obtain the data information of the final version of storage;
By the data information of the data information of the final version and the client revision respectively with the basic version
Data information be compared, obtain comparison result;
The data information of the final version is updated according to comparison result;
It is described by the data information of the data information of the final version and the client revision respectively with the basis
The data information of version is compared, and obtains comparison result, comprising:
The data information of the final version is compared with the data information of the basic version, obtains the final version
Relative to the first alternate data of the basic version and first by alternate data;The data of the client revision are believed
Breath is compared with the data information of the basic version, obtains the client revision relative to the basic version
Second alternate data and second is by alternate data;
The data information that the final version is updated according to comparison result, comprising:
In the data of the basic version, first alternate data and the corresponding substitution operation of the second alternate data are executed,
It executes described first to be operated by alternate data and second by corresponding substituted of alternate data, data after being operated;
The data information of the final version is updated according to data after the operation, so that in the data of updated final version
There is no substituted before by alternate data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610346495.2A CN106055353B (en) | 2016-05-23 | 2016-05-23 | Data-updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610346495.2A CN106055353B (en) | 2016-05-23 | 2016-05-23 | Data-updating method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106055353A CN106055353A (en) | 2016-10-26 |
CN106055353B true CN106055353B (en) | 2019-03-29 |
Family
ID=57174248
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610346495.2A Active CN106055353B (en) | 2016-05-23 | 2016-05-23 | Data-updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106055353B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106055353B (en) * | 2016-05-23 | 2019-03-29 | 北京小米移动软件有限公司 | Data-updating method and device |
CN106775672A (en) * | 2016-11-30 | 2017-05-31 | 努比亚技术有限公司 | The method and terminal of system version upgrading |
CN110019126A (en) * | 2017-11-27 | 2019-07-16 | 航天信息股份有限公司 | A kind of data-updating method and device |
CN116088456B (en) * | 2023-04-06 | 2023-06-16 | 安徽深迪科技有限公司 | MES-based intelligent factory product quality monitoring method and system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101127051A (en) * | 2007-09-29 | 2008-02-20 | 腾讯科技(深圳)有限公司 | Document synchronization method and system |
CN102402600A (en) * | 2011-11-18 | 2012-04-04 | 国电南瑞科技股份有限公司 | Asynchronous collecting method for maintaining consistency of database replicas |
CN103703462A (en) * | 2011-07-15 | 2014-04-02 | 国际商业机器公司 | Versioning of metadata, including presentation of provenance and lineage for versioned metadata |
CN103716370A (en) * | 2013-10-13 | 2014-04-09 | 北界创想(北京)软件有限公司 | Method and device for data synchronization between multiple clients |
CN104025087A (en) * | 2011-12-22 | 2014-09-03 | 艾玛迪斯简易股份公司 | Method and system for data filing systems |
US8887147B2 (en) * | 2005-05-27 | 2014-11-11 | Cisco Technology, Inc. | Method for supporting new network element software versions in an element management system without upgrading |
CN106055353A (en) * | 2016-05-23 | 2016-10-26 | 北京小米移动软件有限公司 | Data update method and apparatus |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020170049A1 (en) * | 2001-02-20 | 2002-11-14 | Suyehira Richard H. | Always-latest program code |
-
2016
- 2016-05-23 CN CN201610346495.2A patent/CN106055353B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8887147B2 (en) * | 2005-05-27 | 2014-11-11 | Cisco Technology, Inc. | Method for supporting new network element software versions in an element management system without upgrading |
CN101127051A (en) * | 2007-09-29 | 2008-02-20 | 腾讯科技(深圳)有限公司 | Document synchronization method and system |
CN103703462A (en) * | 2011-07-15 | 2014-04-02 | 国际商业机器公司 | Versioning of metadata, including presentation of provenance and lineage for versioned metadata |
CN102402600A (en) * | 2011-11-18 | 2012-04-04 | 国电南瑞科技股份有限公司 | Asynchronous collecting method for maintaining consistency of database replicas |
CN104025087A (en) * | 2011-12-22 | 2014-09-03 | 艾玛迪斯简易股份公司 | Method and system for data filing systems |
CN103716370A (en) * | 2013-10-13 | 2014-04-09 | 北界创想(北京)软件有限公司 | Method and device for data synchronization between multiple clients |
CN106055353A (en) * | 2016-05-23 | 2016-10-26 | 北京小米移动软件有限公司 | Data update method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN106055353A (en) | 2016-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106055353B (en) | Data-updating method and device | |
US20180365264A1 (en) | Telemetry system for a cloud synchronization system | |
TWI740901B (en) | Method and device for performing data recovery operation | |
CN110765744B (en) | Multi-user collaborative document editing method and system | |
CN104795069B (en) | Speech recognition method and server | |
CN110519409B (en) | Domain name dynamic configuration method, device, equipment and storage medium | |
EP3101837A1 (en) | User terminal grouping method, conference server and conference system | |
CN110971702A (en) | Service calling method and device, computer equipment and storage medium | |
CN111813378B (en) | Code base construction system, method and related device | |
CN105100244B (en) | Head portrait setting method and device | |
CN107656796B (en) | Virtual machine cold migration method, system and equipment | |
CN111756829A (en) | Account book data synchronization method, device, equipment and storage medium | |
CN110661851A (en) | Data exchange method and device | |
WO2015196805A1 (en) | Batch command execution method and apparatus | |
CN107155167A (en) | Mobile terminal and its Bluetooth pairing name class processing method and storage device | |
EP3119043A1 (en) | Flow table entry management method and device | |
US11237944B2 (en) | Code profiling system and associated methods | |
WO2013000287A1 (en) | Method and device for configuring cell parameters | |
CN112766486A (en) | Searching method of neural network structure, terminal, server and readable storage medium | |
CN112130889A (en) | Resource management method and device, storage medium and electronic device | |
JP2006239849A (en) | Robot control system | |
JP2015072531A (en) | Test support method, test support device, and program | |
CN115858686B (en) | Tree data synchronization method, synchronization circulation model thereof, electronic equipment and medium | |
CN110134460B (en) | System control method, controller, processor and computer readable medium | |
CN110083504B (en) | Running state monitoring method and device for distributed tasks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |