[go: up one dir, main page]

CN106375354B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN106375354B
CN106375354B CN201510428090.9A CN201510428090A CN106375354B CN 106375354 B CN106375354 B CN 106375354B CN 201510428090 A CN201510428090 A CN 201510428090A CN 106375354 B CN106375354 B CN 106375354B
Authority
CN
China
Prior art keywords
data
server
client
abnormal
operation request
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
Application number
CN201510428090.9A
Other languages
Chinese (zh)
Other versions
CN106375354A (en
Inventor
侯柏平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510428090.9A priority Critical patent/CN106375354B/en
Publication of CN106375354A publication Critical patent/CN106375354A/en
Application granted granted Critical
Publication of CN106375354B publication Critical patent/CN106375354B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data processing method, firstly, a client initiates a service operation request to a server; then monitoring whether the processing result of the service operation request is abnormal or not; if the abnormal condition is monitored, the data of the client side is synchronized to the server side, and the data in the server side is changed to be consistent with the data in the client side. According to the data processing method, the client actively senses the abnormality and compensates the abnormality, the problem that due to the fact that the account information of the server in the account management system is less than the account information of the client, the account information of the client cannot be recovered after being deleted when the abnormality occurs, and therefore data consistency is affected is solved, meanwhile, the server does not need to call back the data change of the client every time, and system resource overhead is reduced.

Description

Data processing method and device
Technical Field
The application relates to the technical field of electronics, in particular to a data processing method and a data processing device.
Background
In the existing member management system, a member center generally adopts a server to record account information of a member. At present, most member management systems support mobile phone number registration to enhance safety, but due to events such as replacement of mobile phone numbers by members, old mobile phone numbers which are not logged in for a long time often form some sleeping account numbers at a service end, which brings troubles to re-registration of old mobile phone numbers after being liable to be mastered, for example, the old mobile phone number 13800001111 is a sleeping account number and corresponds to the account number 20880001 of a member management center, and two operations are generated when the mobile phone number is liable to be mastered again and then is registered, namely, the account number 20880002 of a new member management center is registered, and the account number 20880001 of the old member management center is cancelled, so that the uniqueness of the mobile phone account number 13800001111 is ensured. The two operations are two operations of the same transaction, but if any one of the operations is not completed due to an abnormality, problems such as that the same mobile phone number corresponds to two member account numbers, or an old account number has been cancelled and a new account number has not been successfully registered due to an abnormality, for example, after the client successfully deletes the old account number 20880001, the new account number 20880002 is successfully registered, and the old account number 20880001 is not deleted due to an abnormality, the new account number 20880002 is not successfully registered, and at this time, the same mobile phone account number 13800001111 corresponds to the account number 20880002 on the client and corresponds to the account number 20880001 on the server, so that data of the server and the client are inconsistent.
In this regard, a data consistency method is adopted to ensure that the information of the member account on the server and the member account on the client are consistent. The main data consistency method at present is to trigger an asynchronous event when the database layer table record of the server is changed, and synchronize the member account information of the server to the client. Still referring to the above example, since most of the data of the member account 20880001 is recorded on the client side and only part of the account information is recorded on the server side, the account cannot be fully recovered if the client deletes the old account 20880001. At the moment, whether the client information exists is identified by inquiring whether the client information exists or not through the server side, if the client information does not exist, log is made, an alarm is given, and manual intervention is carried out. Meanwhile, by adopting the data consistency method, for each change of the data of a single member, the server side synchronizes all the data of the member to the client side, so that the additional callback which is partially invalid is caused, and the resource waste of the server side is caused.
Disclosure of Invention
In view of the above problems, the present application provides a data processing method, a data processing apparatus, a data processing terminal device, and a data processing system.
The technical scheme adopted by the application is as follows:
the application provides a data processing method, which comprises the following steps:
the client side initiates a service operation request to the server side;
monitoring whether the processing result of the service operation request is abnormal or not;
if the abnormal condition is monitored, the data of the client side is synchronized to the server side, and the data in the server side is changed to be consistent with the data in the client side.
Optionally, the exception includes that a data consistency state between the client and the server is unknown or data inconsistency.
Optionally, the monitoring whether the processing result of the service operation request is abnormal specifically includes:
judging whether a response message of the server to the service operation request is received, wherein when the response message is received, the processing result of the service operation request is normal, otherwise, the processing result is abnormal;
or monitoring whether the data of the client is rolled back or not, wherein when the data of the client is rolled back, the processing result of the service operation request is abnormal;
or monitoring whether an abnormal response message sent by the server is received, and when the abnormal response message is received, the processing result of the service operation request is abnormal.
Optionally, if the monitoring is abnormal, synchronizing the data of the client to the server, so that the data in the server is changed to be consistent with the data in the client, specifically including:
if the abnormal condition is monitored, the data of the client side is synchronized to the server side according to the transaction log, and the data in the server side is changed to be consistent with the data in the client side.
Optionally, the transaction log at least includes service operation request initiation time, data before initiation of the service operation request, and data after initiation of the service operation request.
Optionally, if the monitoring is abnormal, synchronizing the data of the client to the server, so that the data in the server is changed to be consistent with the data in the client, including: and if the abnormal condition is monitored, immediately synchronizing the data of the client to the server, so that the data in the server is changed to be consistent with the data in the client.
Optionally, the data processing method further includes:
and inquiring the transaction log regularly, and if the processing result of the business operation request is abnormal and the data of the client is not synchronized to the server, synchronizing the data of the client to the server.
Optionally, the periodically querying the transaction log includes: the transaction log is queried at first time intervals.
Optionally, the querying the transaction log at every first time interval includes: and inquiring the transaction log before a second time interval at every first time interval, wherein the second time interval is smaller than the first time interval.
The present application also provides a data processing apparatus, comprising:
the service operation request unit is used for the client to initiate a service operation request to the server;
the exception monitoring unit is used for monitoring whether the processing result of the service operation request is abnormal or not;
and the data synchronization unit is used for synchronizing the data of the client to the server if the abnormality is monitored, so that the data in the server is changed to be consistent with the data in the client.
Optionally, the abnormality monitoring unit includes at least one of the following sub-units:
a response message judging subunit, configured to judge whether a response message to the service operation request from the server is received, where when the response message is received, a processing result of the service operation request is normal, and otherwise, the processing result is abnormal;
the data rollback monitoring subunit is configured to monitor whether data of the client is rolled back, and when the data of the client is rolled back, a processing result of the service operation request is abnormal;
and the abnormal response monitoring subunit is used for monitoring whether an abnormal response message sent by the server is received, and when the abnormal response message is received, the processing result of the service operation request is abnormal.
Optionally, the data synchronization unit includes a first data synchronization subunit, configured to synchronize, if an exception is monitored, the data of the client to the server according to the transaction log, so that the data in the server is changed to be consistent with the data in the client.
Optionally, the data synchronization unit includes a second data synchronization subunit, configured to, if an anomaly is monitored, immediately synchronize the data of the client to the server, so that the data in the server is changed to be consistent with the data in the client.
Optionally, the data processing apparatus further includes: and the timing data synchronization unit is used for regularly inquiring the transaction log, and synchronizing the data of the client to the server if the processing result of the service operation request is abnormal and the data of the client is not synchronized to the server.
Optionally, the timing data synchronization unit includes a first timing data synchronization subunit, configured to query a transaction log at intervals of a first time interval, and synchronize the data of the client to the server if it is queried that a processing result of the service operation request is abnormal and the data of the client is not synchronized to the server.
Optionally, the first timing data synchronization subunit includes a second timing data synchronization subunit, configured to query, every first time interval, a transaction log before a second time interval, where the second time interval is smaller than the first time interval, and synchronize, if it is queried that a processing result of the service operation request is abnormal and data of the client is not synchronized to the server, the data of the client is synchronized to the server.
The present application also provides a data processing terminal device, including:
a central processing unit;
an input/output unit;
a memory;
the memory stores the data processing method provided by the application; and after start-up can be operated according to the method described above.
The application also provides a data processing system which comprises a client and a server, wherein the client adopts the database data consistency method based on the client.
Compared with the prior art, the method has the following advantages:
the data processing method provided by the application comprises the steps that firstly, a client side initiates a service operation request to a server side; then monitoring whether the processing result of the service operation request is abnormal or not; if the abnormal condition is monitored, the data of the client side is synchronized to the server side, and the data in the server side is changed to be consistent with the data in the client side. Compared with the traditional database data consistency method for sensing abnormality and compensating by the server, the data processing method provided by the application changes the main party into actively sensing abnormality and compensating by the client, solves the problem that the client account information cannot be recovered after being deleted when abnormality occurs because the server account information in the account management system is less than the client account information, and further influences the data consistency, and simultaneously does not need the server to call back the client for each data change, and reduces the system resource overhead.
Drawings
FIG. 1 is a flow chart of an embodiment of a data processing method provided herein;
fig. 2 is a schematic diagram of an embodiment of a data processing apparatus provided in the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The present application provides a data processing method, a data processing apparatus, a data processing terminal device, and a data processing system, and the following describes embodiments of the present application in detail with reference to the accompanying drawings in order.
Please refer to fig. 1, which is a flowchart illustrating an embodiment of a data processing method according to the present application, the method includes the following steps:
step S101: the client side initiates a service operation request to the server side. In the step, the client initiates a service operation request to the database server.
Part of data in the client is synchronously stored in the database server, and in the embodiment provided by the application, the data synchronously stored in the client and the database server are referred to as common data information.
The data management mode is a mode which is common in member management in the prior art, in an embodiment provided by the present application, the data storage mode is used for member management of a comprehensive multi-application website, for example, a group website has multiple application platforms such as mailboxes, games, forums, blogs, malls, and the like under flags, so that a user can freely log in other application platforms under the group website even after registering on a certain application platform. The group member center is a database server, and the member management center of each application platform is a client.
Because the number of the clients is large, the member information categories are numerous, the data size is large, and all the information cannot be synchronously stored in the server, only account information such as member ID, login password, user name, bound mobile phone number, bound mailbox number and the like can be synchronously stored in the server in the form of public data information. For a certain member, all member information is stored on the client, and only public data information (such as account information) is synchronously stored on the server. It is easy to understand that the member information includes account information, and in addition, includes other information of the member on the client, such as the name of the character in the game, the type of the character, the grade of the character, the resource information, etc., which is not described herein again.
The above embodiment is only an implementation manner provided by the present application, and as a modification of the above embodiment, the application platform only stores common data information, such as account information of a member, and the like, in this case, the application platform is a database server, and all member information of the member is stored in an operation end of the member, i.e., a client, and for example, a chat record is only stored in the client and not stored in the database server.
It should be noted that, in the above two implementations, the application platform is a client in one embodiment, and is a server in another embodiment, depending on the application scenario. It is further stated that, in the present application, as long as in the corresponding application scenario, the party that only stores the public data information is the server, and the party that contains other related data information in addition to the public data information is the client.
The business operation comprises the operations of data addition, deletion, modification and the like. In an embodiment provided by the present application, the business operation includes operations such as adding, modifying, and deleting all or part of data of the member account information.
In a preferred embodiment provided by the present application, the client is a member center of a payer, the database server is a member center of a group, and the business operations include registering a new member, modifying transactions such as account and password, and synchronizing the modified member information. The public data information comprises a member ID, a login password, a bound mobile phone number and the like. The member information comprises the public data information, identity information, a balance treasure account, a money bringing account and the like.
Step S102: and monitoring whether the processing result of the service operation request is abnormal or not.
Through step S101, a service operation request has been initiated to the server, and then, it is necessary to monitor whether a processing result of the service operation request is abnormal.
The data consistency between the client and the server is guaranteed, so that the data consistency state between the client and the server is unknown or inconsistent, and the client and the server are regarded as abnormal. For the situation that a client initiates a service operation request to a server, data consistency requires that both the client and the server complete corresponding service operations, and the situation that the data operation cannot be completed due to an abnormality of any party affects the data consistency.
The exception includes data rollback of the client, that is, in the process of a service operation, the data of the client is not changed at last because the service operation is not completed due to equipment failure, abnormal power failure, error in client operation, operation overflow, error in an application program, violation of integrity limit, deadlock in a parallel transaction, and the like in the local area of the client, and at this time, the service operation corresponding to the server may have been completed, and the data of the corresponding server may have been changed, so that the data of the client and the data of the server are inconsistent.
In this case, an exception capture function, such as try-catch-final in JAVA language, may be used to monitor the processing result of the service operation request by the client and the server, and if it is monitored that the service operation is rolled back locally at the client and the server returns information that the processing of the service operation request is completed, it is indicated that the data of the client and the server are inconsistent and the data consistency is damaged.
It should be noted that, when the service operation is rolled back locally, if the service operation corresponding to the server is not completed because of an exception, the service operation of the server may have been executed partially, so that data therein may have changed, the data state has uncertainty, and the data of the client and the data of the server may not be consistent, and therefore, the data also belongs to an exception affecting data consistency. At this time, according to the type of the fault occurring at the server, the obtained monitoring results of the service operation condition of the server are also different, for example, when the service operation is not completed due to sudden power failure of the server, the server does not return the processing result of the service operation request, and the processing result of the service operation request by the server cannot be monitored at this time; when the service end does not complete the service operation due to the exceptions such as operation overflow, application program error and the like, corresponding exception response messages such as 'system exception' and the like are returned, and the exception response messages returned from the service end can be monitored.
In addition to the above situation of local business operation rollback, the exception also includes that the business operation is completed locally, but after the service end is not completed, that is, after the business operation request is initiated, the data operation of the business operation at the client is completed, and the data of the client has changed, whereas at the service end, the data operation is not completed due to equipment failure, abnormal power failure, operation overflow, application program error, violation of integrity limit, deadlock of parallel transaction, and the like, and the data of the service end is not changed or partially changed, resulting in inconsistency of the data of the client and the service end. At this time, according to the type of the fault occurring at the server, the obtained monitoring results of the service operation condition of the server are also different, for example, when the data operation is not completed due to sudden power failure of the server, the server does not return the processing result of the service operation request, and at this time, the processing result of the service operation request by the server cannot be monitored; and when the data operation is not completed due to the exceptions such as operation overflow, application program error and the like, the server side returns a corresponding exception response message, and at the moment, the pre-agreed exception response message returned from the server side can be monitored.
It should be noted that, in the foregoing embodiment, a try-catch-find exception capture function in the JAVA language is used as a monitoring means, and besides, various alternative implementation methods are still available in the prior art, which are not described herein again and are all within the protection scope of the present application.
Step S103: if the abnormal condition is monitored, the data of the client side is synchronized to the server side, and the data in the server side is changed to be consistent with the data in the client side.
Through step S102, whether the processing result of the service operation request is abnormal or not is monitored, and if the processing result of the service operation request is monitored to be abnormal, the data of the client is synchronized to the server, so that the data in the server is changed to be consistent with the data in the client.
In a traditional database system, a server is used as a main body for data recovery, a transaction log is recorded by the server, and when data is abnormal, the server recovers the data according to the transaction log. In the member management system, the database server only stores the public data information synchronously, only the public data information can be recovered during data recovery, and other member information on the client cannot be recovered, so that data errors or data loss are caused, which is a main problem to be solved by the data processing method provided by the application.
In an embodiment provided by the present application, the transaction log is recorded by the client, and data recovery is performed by taking the client as a main body. The transaction log at least comprises service operation initiation time, data before service operation initiation and data after service operation initiation, the client actively identifies scenes needing to be recovered, and synchronizes the data of the client to the server according to corresponding transaction records in the transaction log for scenes which really possibly cause data inconsistency. The service end provides a forward operation interface (such as an execute interface) and a reverse operation interface (such as a compensation interface) for each scene, the forward operation interface is used for providing service call of business operation, and the reverse operation interface is used for providing service call of the service end for data synchronization of the client end. All information of the members is stored in the client, so when the business operation is abnormal, the client can synchronize the data of the client to the server according to the transaction log, and the data in the server for transaction processing is changed into a state consistent with the data in the client by taking the client as a main body, wherein the data generally refers to common data information synchronously stored in the server and the client.
For example, in an initial state, the client and the server store first data synchronously, and the business operation is to change the first data into second data. If the client side rolls back the business operation due to the abnormality, the data of the client side is still the first data, the business operation of the server side is completed, and the first data of the server side is changed into the second data, the first data of the client side is synchronized to the server side, so that the second data in the server side is changed into the first data; and if the first data is changed into the second data after the transaction of the client is submitted and the first data is still the first data because the server is not changed due to the exception, the second data of the client is synchronized to the server, and the first data in the server is changed into the second data.
In order to reduce the data loss caused by the abnormality, the data of the client needs to be synchronized to the server in real time, so as to ensure that the data of the client and the data of the server are consistent as much as possible, that is, if the abnormality is monitored, the data of the client is immediately synchronized to the server, so that the data in the server is changed to be consistent with the data in the client.
In order to avoid that synchronization cannot be completed due to the fact that an exception occurs again in the process of synchronizing the data of the client to the server, in an embodiment provided by the present application, the method further includes a timing synchronization step of querying a transaction log at a timing, checking the transaction log, and synchronizing the data of the client to the server if the processing result of the service operation request is queried to be abnormal and the data of the client is not synchronized to the server. The timing query of the transaction log may be a query of the transaction log at a first time interval, so as to periodically synchronize the data of the client to the server, thereby reducing a loss caused by an abnormal operation of synchronizing the data of the client to the server in real time, for example, a transaction log is queried every 20 seconds. In order to ensure that the transaction log is not repeatedly queried for processing, generally, the transaction log before a second time interval is queried at a first time interval, where the second time interval is smaller than the first time interval, for example, 15 seconds before querying every 20 seconds.
By this, the data processing flow provided by the present application is completed through steps S101 to S103.
In a preferred embodiment provided by the present application, the client is a member center of a payer, the database server is a member center of a group, and the business operations include registering a new member, modifying an account password, synchronizing member information after modification, and the like. The public data information comprises a member ID, a login password, a bound mobile phone number and the like. The member information comprises the public data information, identity information, a balance treasure account, a money bringing account and the like. The table structure of the transaction log is as shown in table 1:
Figure BDA0000763290090000091
taking the service operation as an example of modifying a login password:
for the member ID20880001, the original password is password 123, and the password is modified to 456. At this time, the transaction log recorded by the client at least comprises: CHANGE _ PASSWORD, genekey 20880001 (userId stored), initial PASSWORD 123, and new PASSWORD 456.
If after a service operation request is initiated, a local exception occurs to cause service operation rollback, the password rollback on the client is 123, the password of the server may be 123 or may have been modified to 456, and data consistency cannot be guaranteed due to uncertainty, so that data of the client needs to be synchronized to the server, initial password of a corresponding member ID20880001 in a transaction log is queried to be 123, the data of the client is synchronized to the server, and the password on the server is covered by 123, so that it is ensured that the passwords of the client and the server are both 123.
If the local service operation is completed after the service operation request is initiated, the password on the client is modified to 456, and the server does not return the processing result of the service operation request when the service operation request is abnormal, it is not known whether the password on the server is modified at this time, and in order to ensure data consistency, the data of the client needs to be synchronized to the server, the new password of the corresponding member ID20880001 in the transaction log is inquired to 456 and synchronized to the server, the password on the server is covered by 456, and it is ensured that the passwords of the client and the server are both 456. If the exception of the server is not eliminated yet and the synchronization is unsuccessful, entering a timing synchronization step, and executing the operation again every 20 seconds until the data synchronization is completed.
Taking the service operation as a mobile phone number registration example:
for the member ID20880001, the bound mobile phone number 13800001111 becomes a sleeping account number because the member is not logged in for a long time. When the mobile phone number 13800001111 is easy to master, the new user uses the mobile phone number to register a new member ID 20880002, and in order to ensure the uniqueness of the member corresponding to the mobile phone number 13800001111, the new member 20880002 and the seller 20880001 need to be registered at the same time in the transaction.
If a service operation request is initiated, due to rolling back of abnormal local service operation, the client side sells a newly registered 20880002 account and recovers an old account number 20880001, the account number corresponding to the mobile phone number 13800001111 is 20880001, the server side logs off the old account number 20880001 and registers a new account number 20880002, and the account number corresponding to the mobile phone number 13800001111 is 20880002. Therefore, the data of the client needs to be synchronized to the server, and the service recovers members 20880001 by querying a sceneKey in a transaction log 13800001111|20880001 and synchronizing to the server, so that it is ensured that the members corresponding to the mobile phone numbers 13800001111 on the client and the server are 20880001.
If a service operation request is initiated, a local service operation is completed, an old account 20880001 is logged out and a new account 20880002 is registered successfully on a client, an account corresponding to a mobile phone number 13800001111 is 20880002, the server is abnormal and does not register the new account 20880002 successfully, the old account 20880001 is deleted or is not deleted, a mobile phone number 13800001111 may correspond to the old account 20880001 or may not be corresponding to the account, the server returns a pre-agreed abnormal response message "system abnormal", at this time, after the client monitors the abnormal response message, the data of the client needs to be synchronized to the server, a newid 13800001111|20880002 in a transaction log is queried and synchronized to the server, and the new account 20880002 is registered on the server and the old account 20880001 is deleted, so that members corresponding to the mobile phone numbers 13800001111 on the client and the server are 20880002.
These embodiments are intended to cover modifications of the embodiments described above, which do not depart from the spirit of the present application and which are intended to be within the scope of the present application.
In the foregoing embodiment, a data processing method is provided, and correspondingly, the present application further provides a data processing apparatus. Please refer to fig. 2, which is a schematic diagram of an embodiment of a data processing apparatus according to the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
A data processing apparatus of the present embodiment includes: a service operation request unit 101, configured to initiate a service operation request to a server by a client; an exception monitoring unit 102, configured to monitor whether a processing result of the service operation request is abnormal; and the data synchronization unit 103 is configured to synchronize the data of the client to the server if the abnormality is monitored, so that the data in the server is changed to be consistent with the data in the client.
Optionally, the anomaly monitoring unit 102 includes at least one of the following sub-units:
a response message judging subunit, configured to judge whether a response message to the service operation request from the server is received, where when the response message is received, a processing result of the service operation request is normal, and otherwise, the processing result is abnormal;
the data rollback monitoring subunit is configured to monitor whether data of the client is rolled back, and when the data of the client is rolled back, a processing result of the service operation request is abnormal;
and the abnormal response monitoring subunit is used for monitoring whether an abnormal response message sent by the server is received, and when the abnormal response message is received, the processing result of the service operation request is abnormal.
Optionally, the data synchronization unit 103 includes a first data synchronization subunit, configured to synchronize, if an exception is monitored, the data of the client to the server according to the transaction log, so that the data in the server is changed to be consistent with the data in the client.
Optionally, the data synchronization unit 103 includes a second data synchronization subunit, configured to, if an anomaly is monitored, immediately synchronize the data of the client to the server, so that the data in the server is changed to be consistent with the data in the client.
Optionally, the data processing apparatus further includes: and the timing data synchronization unit is used for regularly inquiring the transaction log, and synchronizing the data of the client to the server if the processing result of the service operation request is abnormal and the data of the client is not synchronized to the server.
Optionally, the timing data synchronization unit includes a first timing data synchronization subunit, configured to query a transaction log at intervals of a first time interval, and synchronize the data of the client to the server if it is queried that a processing result of the service operation request is abnormal and the data of the client is not synchronized to the server.
Optionally, the first timing data synchronization subunit includes a second timing data synchronization subunit, configured to query, every first time interval, a transaction log before a second time interval, where the second time interval is smaller than the first time interval, and synchronize, if it is queried that a processing result of the service operation request is abnormal and data of the client is not synchronized to the server, the data of the client is synchronized to the server.
The foregoing is an embodiment of a data processing apparatus provided in the present application.
The present application also provides a data processing terminal device, including:
a central processing unit;
an input/output unit;
a memory;
the memory stores the data processing method provided by the application; and after start-up can be operated according to the method described above.
For example, the terminal device is a computer, the computer and a remote server synchronously store common data information, the computer initiates a service operation request to the remote server, and monitors whether processing results of the computer and the remote server for the service operation request are abnormal; if the abnormality is monitored, synchronizing the data in the computer to the remote server, and changing the data in the remote server to be consistent with the data in the computer. Since the data processing terminal device uses the data processing method, the related points refer to the description of the embodiment of the data processing method, and are not described herein again.
The invention further provides a data processing system which comprises a client and a server, wherein the client adopts the data processing method provided by the application.
For example, the client is a computer, public data information is synchronously stored in the computer and the server, the computer initiates an transaction to the server, and monitors whether the processing results of the computer and the server to the service operation request are abnormal or not; if the abnormality is monitored, synchronizing the data in the computer to the remote server, and changing the data in the remote server to be consistent with the data in the computer.
Since the data processing system uses the data processing method, please refer to the description of the embodiment of the data processing method for related parts, which is not described herein again.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

Claims (16)

1. A data processing method, comprising:
the client side initiates a service operation request to the server side;
monitoring whether the processing result of the service operation request is abnormal or not, including: if the processing result of the business operation request by any one of the client and the server is abnormal, monitoring that the processing result of the business operation request is abnormal;
if the abnormal condition is monitored, the data of the client side is synchronized to the server side, and the data in the server side is changed to be consistent with the data in the client side.
2. The data processing method of claim 1, wherein the exception comprises a data coherency state ambiguity or a data inconsistency between the client and the server.
3. The data processing method according to claim 1, wherein the monitoring whether the processing result of the service operation request is abnormal specifically includes:
judging whether a response message of the server to the service operation request is received, wherein when the response message is received, the processing result of the service operation request is normal, otherwise, the processing result is abnormal;
or monitoring whether the data of the client is rolled back or not, wherein when the data of the client is rolled back, the processing result of the service operation request is abnormal;
or monitoring whether an abnormal response message sent by the server is received, and when the abnormal response message is received, the processing result of the service operation request is abnormal.
4. The data processing method according to claim 1, wherein if an anomaly is monitored, synchronizing data of the client to the server to change the data in the server to be consistent with the data in the client, specifically comprising:
if the abnormal condition is monitored, the data of the client side is synchronized to the server side according to the transaction log, and the data in the server side is changed to be consistent with the data in the client side.
5. The data processing method of claim 4, wherein the transaction log at least comprises a service operation request initiation time, data before the service operation request is initiated, and data after the service operation request is initiated.
6. The data processing method of claim 1,
if the monitoring is abnormal, synchronizing the data of the client to the server to make the data in the server consistent with the data in the client, including: and if the abnormal condition is monitored, immediately synchronizing the data of the client to the server, so that the data in the server is changed to be consistent with the data in the client.
7. The data processing method of claim 1, further comprising:
and inquiring the transaction log at regular time, and if the processing result of the business operation request is abnormal and the data of the client are not synchronized to the server, synchronizing the data of the client to the server.
8. The data processing method of claim 7, wherein the periodically querying the transaction log comprises: the transaction log is queried at first time intervals.
9. The data processing method of claim 8, wherein querying the transaction log at first intervals comprises: and inquiring the transaction log before a second time interval at every first time interval, wherein the second time interval is smaller than the first time interval.
10. A data processing apparatus, comprising:
the service operation request unit is used for the client to initiate a service operation request to the server;
an exception monitoring unit, configured to monitor whether a processing result of the service operation request is abnormal, including: if the processing result of the business operation request by any one of the client and the server is abnormal, monitoring that the processing result of the business operation request is abnormal;
and the data synchronization unit is used for synchronizing the data of the client to the server if the abnormality is monitored, so that the data in the server is changed to be consistent with the data in the client.
11. The data processing apparatus of claim 10,
the abnormality monitoring unit includes at least one of the following sub-units:
a response message judging subunit, configured to judge whether a response message to the service operation request from the server is received, where when the response message is received, a processing result of the service operation request is normal, and otherwise, the processing result is abnormal;
the data rollback monitoring subunit is configured to monitor whether data of the client is rolled back, and when the data of the client is rolled back, a processing result of the service operation request is abnormal;
and the abnormal response monitoring subunit is used for monitoring whether an abnormal response message sent by the server is received, and when the abnormal response message is received, the processing result of the service operation request is abnormal.
12. The data processing apparatus of claim 10,
the data synchronization unit comprises a first data synchronization subunit, and is used for synchronizing the data of the client to the server according to the transaction log if the abnormality is monitored, so that the data in the server is changed to be consistent with the data in the client.
13. The data processing apparatus of claim 10,
the data synchronization unit comprises a second data synchronization subunit, and is used for immediately synchronizing the data of the client to the server if the abnormality is monitored, so that the data in the server is changed to be consistent with the data in the client.
14. The data processing apparatus of claim 10, further comprising: and the timing data synchronization unit is used for regularly inquiring the transaction log, and synchronizing the data of the client to the server if the processing result of the service operation request is abnormal and the data of the client is not synchronized to the server.
15. The data processing apparatus according to claim 14, wherein the timing data synchronization unit includes a first timing data synchronization subunit, configured to query a transaction log at first time intervals, and synchronize data of the client with the server if it is queried that a processing result of the service operation request is abnormal and common data of the client and the server is not synchronized with the server.
16. The data processing apparatus according to claim 15, wherein the first timing data synchronization subunit includes a second timing data synchronization subunit, configured to query, at a first time interval, a transaction log before a second time interval, where the second time interval is smaller than the first time interval, and synchronize the data of the client to the server if the processing result of the service operation request is abnormal and the data of the client is not synchronized to the server.
CN201510428090.9A 2015-07-20 2015-07-20 Data processing method and device Active CN106375354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510428090.9A CN106375354B (en) 2015-07-20 2015-07-20 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510428090.9A CN106375354B (en) 2015-07-20 2015-07-20 Data processing method and device

Publications (2)

Publication Number Publication Date
CN106375354A CN106375354A (en) 2017-02-01
CN106375354B true CN106375354B (en) 2020-06-05

Family

ID=57879764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510428090.9A Active CN106375354B (en) 2015-07-20 2015-07-20 Data processing method and device

Country Status (1)

Country Link
CN (1) CN106375354B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778775B (en) * 2020-06-16 2024-10-18 北京沃东天骏信息技术有限公司 Program data processing method, device, electronic equipment and computer readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996855A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 A method and system for keeping data consistency
CN101009516A (en) * 2006-01-26 2007-08-01 华为技术有限公司 A method and system for data synchronization
CN101075864A (en) * 2007-07-16 2007-11-21 腾讯科技(深圳)有限公司 Method for synchronizing and processing data, customer terminal equipment and servo
CN101431741A (en) * 2008-12-19 2009-05-13 北京邮电大学 Method for maintaining PIM data consistency
CN102255964A (en) * 2011-07-01 2011-11-23 清华大学 Internet application software testing method and system
CN101102311B (en) * 2006-07-08 2012-04-04 华为技术有限公司 A method, client and system for negotiating data synchronization mechanism
CN102468906A (en) * 2010-11-04 2012-05-23 腾讯科技(深圳)有限公司 Interactive logic fault-tolerance method in online games and online game fault-tolerance system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009516A (en) * 2006-01-26 2007-08-01 华为技术有限公司 A method and system for data synchronization
CN101102311B (en) * 2006-07-08 2012-04-04 华为技术有限公司 A method, client and system for negotiating data synchronization mechanism
CN1996855A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 A method and system for keeping data consistency
CN101075864A (en) * 2007-07-16 2007-11-21 腾讯科技(深圳)有限公司 Method for synchronizing and processing data, customer terminal equipment and servo
CN101431741A (en) * 2008-12-19 2009-05-13 北京邮电大学 Method for maintaining PIM data consistency
CN102468906A (en) * 2010-11-04 2012-05-23 腾讯科技(深圳)有限公司 Interactive logic fault-tolerance method in online games and online game fault-tolerance system
CN102255964A (en) * 2011-07-01 2011-11-23 清华大学 Internet application software testing method and system

Also Published As

Publication number Publication date
CN106375354A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
US9189348B2 (en) High availability database management system and database management method using same
CN107515874B (en) Method and equipment for synchronizing incremental data in distributed non-relational database
US20200328959A1 (en) Data transmission method and apparatus
US9753954B2 (en) Data node fencing in a distributed file system
US20150213100A1 (en) Data synchronization method and system
CN111177165B (en) Method, device and device for data consistency detection
US20120278429A1 (en) Cluster system, synchronization controlling method, server, and synchronization controlling program
US20160041886A1 (en) Data storage upon database failure
CN104156361A (en) Method and system for achieving data synchronization
CN106933843A (en) database heartbeat detecting method and device
CN107870982A (en) Data processing method, system and computer readable storage medium
CN107040576A (en) Information-pushing method and device, communication system
CN108228581B (en) Zookeeper compatible communication method, server and system
CN105574026A (en) Method and device for service supporting by using non-relational database
CN114844771A (en) Monitoring method, device, storage medium, and program product for microservice system
CN116821232A (en) Data synchronization method and related device
CN106375354B (en) Data processing method and device
CN111404737B (en) Disaster recovery processing method and related device
CN113761051B (en) Message push method, data acquisition method, device, system, equipment and medium
CN110928945B (en) Data processing method and device for database and data processing system
CN105095310A (en) Data processing method, first server, second server and data processing system
CN102137083B (en) Method, device and system for registering application system
CN113486029A (en) Data compensation method, system and equipment for service degradation
CN117349384B (en) Database synchronization method, system and equipment
CN112217881B (en) File synchronization method and equipment based on operation and maintenance audit system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200921

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right