Data processing method and device and related product

By comparing the change timing and obtaining data content in the data storage cluster, the problem of data inconsistency is solved, the accuracy of business processing is improved, the delay of the data storage cluster is discovered, and efficient and accurate data consistency judgment is achieved.

CN118733192APending Publication Date: 2024-10-01BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410758510.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the existing technology, data inconsistency in multiple data storage clusters of an application results in low accuracy of business processing, making it difficult to efficiently and accurately determine whether data meets consistency requirements.

Method used

By obtaining the identification and change timing information of the data, compare the change timing in each data storage cluster, and if they are consistent, obtain the data content, determine the data consistency, discover the data change delay in the data storage cluster, and improve the accuracy of business processing.

Benefits of technology

It can efficiently and accurately determine whether the data in each data storage cluster of the application meets the consistency requirements, discover the delay in data change in the data storage cluster, and improve the accuracy of business processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733192A_ABST
    Figure CN118733192A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a data processing method and apparatus, and a related product. The method comprises the steps of obtaining a first data identifier of first data and first change time sequence information of the first data; the first data is monitored changed data of the first application; the first change time sequence information is used for representing the change time sequence of the monitored first data; obtaining second change time sequence information of first data stored in a first data storage cluster of the first application according to the first data identifier; the second change time sequence information is used for representing a change time sequence of the first data stored in the first data storage cluster; if the change time sequence represented by the first change time sequence information is equal to or later than the change time sequence represented by the second change time sequence information, obtaining first data content corresponding to the first data identifier from each data storage cluster; and determining whether the data in each data storage cluster meets a data consistency requirement or not according to the consistency of each first data content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular to a data processing method, device and related products. Background Art

[0002] Currently, application data can be stored in multiple data storage clusters, which store the same data of the application, and achieve the effect of data disaster recovery and backup and meet the needs of high-concurrency business processing. Therefore, when the data of the application changes, the data in each data storage cluster needs to be changed synchronously to ensure data consistency and the accuracy of business processing.

[0003] However, in the prior art, the data inconsistency in each data storage cluster of an application is often discovered only when a business error occurs, resulting in low accuracy in business processing. Based on this, it is necessary to provide a technical solution to efficiently and accurately determine whether the data in each data storage cluster of an application meets the data consistency requirements and improve the accuracy of business processing. Summary of the invention

[0004] The embodiments of the present disclosure provide a data processing method, device and related products, which can efficiently and accurately determine whether the data in each data storage cluster of an application meets the data consistency requirements, thereby improving the accuracy of business processing.

[0005] In a first aspect, an embodiment of the present disclosure provides a data processing method, including:

[0006] Acquire a first data identifier of first data and first change timing information of the first data; the first data is the data of the first application that has been monitored and has changed; the first change timing information is used to indicate the change timing of the first data that has been monitored;

[0007] According to the first data identifier of the first data, second change timing information of the first data stored in the first data storage cluster of the first application is obtained; the first application has multiple data storage clusters; each of the data storage clusters is used to store the first data; the first data storage cluster is one of the multiple data storage clusters; the second change timing information is used to represent the change timing of the first data stored in the first data storage cluster;

[0008] If the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information, obtaining the first data content corresponding to the first data identifier from each of the data storage clusters respectively;

[0009] According to the consistency of the contents of each of the first data, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

[0010] In a second aspect, an embodiment of the present disclosure provides a data processing device, including:

[0011] A first acquisition unit is used to acquire a first data identifier of first data and first change timing information of the first data; the first data is the data of the first application that has been monitored and has changed; the first change timing information is used to indicate the change timing of the first data that has been monitored;

[0012] A second acquisition unit is used to acquire, according to a first data identifier of the first data, second change timing information of the first data stored in a first data storage cluster of the first application; the first application has multiple data storage clusters; each of the data storage clusters is used to store the first data; the first data storage cluster is one of the multiple data storage clusters; the second change timing information is used to indicate a change timing of the first data stored in the first data storage cluster;

[0013] a third acquisition unit, configured to acquire the first data content corresponding to the first data identifier from each of the data storage clusters respectively if the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information;

[0014] The consistency determination unit is used to determine whether the data in each of the data storage clusters meets the data consistency requirement according to the consistency of the content of each of the first data.

[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, enable the processor to implement the steps of the method described in the first aspect above.

[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the steps of the method described in the first aspect when executed by a processor.

[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0018] In one or more embodiments of the present disclosure, first, a first data identifier of first data and first change timing information of the first data are obtained, the first data is data that has changed in a monitored first application, and the first change timing information is used to indicate the change timing of the monitored first data. Then, based on the first data identifier of the first data, second change timing information of the first data stored in a first data storage cluster of the first application is obtained, the first application has multiple data storage clusters, each data storage cluster is used to store the first data, the first data storage cluster is one of the multiple data storage clusters, and the second change timing information is used to indicate the change timing of the first data stored in the first data storage cluster. Then, if the change timing indicated by the first change timing information is equal to or later than the change timing indicated by the second change timing information, the first data content corresponding to the first data identifier is obtained from each data storage cluster respectively. Finally, based on the consistency of each first data content, it is determined whether the data in each data storage cluster meets the data consistency requirement. It can be seen that through this embodiment, if the change timing represented by the first change timing information is equal to the change timing represented by the second change timing information, then it means that the change of the first data monitored is the most recent change that occurred in the first data storage cluster for the first data; if the change timing represented by the first change timing information is later than the change timing represented by the second change timing information, then it means that the change of the first data monitored is due to the delay in data change of the first data storage cluster, which is the change that has not yet occurred in the first data storage cluster for the first data. In this case, determining whether the data in each data storage cluster meets the data consistency requirements can achieve the effect of efficiently and accurately determining whether the data in each data storage cluster of the application meets the data consistency requirements, discovering the delay in data change of the data storage cluster, and improving the accuracy of business processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate one or more embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.

[0020] Figure 1 A flowchart of a data processing method provided by an embodiment of the present disclosure;

[0021] Figure 2 A schematic diagram of an application scenario of a data processing method provided by an embodiment of the present disclosure;

[0022] Figure 3A flowchart of a data processing method provided by another embodiment of the present disclosure;

[0023] Figure 4 A flowchart of a data processing method provided by another embodiment of the present disclosure;

[0024] Figure 5 A schematic diagram of the structure of a data processing device provided by an embodiment of the present disclosure;

[0025] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in one or more embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on one or more embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the protection scope of the present disclosure.

[0027] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0028] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0029] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0030] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0031] The disclosed embodiment provides a data processing method, which can efficiently and accurately determine whether the data in each data storage cluster of an application meets the data consistency requirement, thereby improving the accuracy of business processing.

[0032] Figure 1 A flowchart of a data processing method provided by an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the process includes:

[0033] Step S102, obtaining a first data identifier of first data and first change timing information of the first data; the first data is the data of the first application that has been monitored and has changed; the first change timing information is used to indicate the change timing of the first data that has been monitored;

[0034] Step S104, according to the first data identifier of the first data, obtaining second change timing information of the first data stored in the first data storage cluster of the first application; the first application has multiple data storage clusters; each data storage cluster is used to store the first data; the first data storage cluster is one of the multiple data storage clusters; the second change timing information is used to indicate the change timing of the first data stored in the first data storage cluster;

[0035] Step S106, if the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information, obtaining the first data content corresponding to the first data identifier from each data storage cluster respectively;

[0036] Step S108: determining whether the data in each data storage cluster meets the data consistency requirement according to the consistency of each first data content.

[0037] It can be seen that through this embodiment, if the change timing represented by the first change timing information is equal to the change timing represented by the second change timing information, then it means that the change of the first data monitored is the most recent change that occurred in the first data storage cluster for the first data; if the change timing represented by the first change timing information is later than the change timing represented by the second change timing information, then it means that the change of the first data monitored is due to the delay in data change of the first data storage cluster, which is the change that has not yet occurred in the first data storage cluster for the first data. In this case, determining whether the data in each data storage cluster meets the data consistency requirements can achieve the effect of efficiently and accurately determining whether the data in each data storage cluster of the application meets the data consistency requirements, discovering the delay in data change of the data storage cluster, and improving the accuracy of business processing.

[0038] Figure 1The method flow in can be executed by a monitoring service, which can be set on the first application side or separately from the first application. Figure 1 The first application involved in this embodiment can be any application program, which is not limited here.

[0039] In the above step S102, the monitoring service obtains the first data identifier of the first data and the first change sequence information of the first data, the first data is the data that has been monitored to change in the first application, and the first change sequence information is used to indicate the change sequence of the monitored first data. In this embodiment, the monitoring service monitors the data that has been changed in the first application by monitoring, and uses the data as the first data, and the monitoring service monitors the first change sequence information of the first data by monitoring, the first change sequence information indicates the change sequence of the monitored first data, and the first change sequence information may include the change time information of the first data. In this embodiment, the same data of the first application may change multiple times, so the first data may be monitored to change multiple times, and the first change sequence information of the first data may be monitored each time. By setting the first change sequence information to include the change time information of the first data, the first change sequence information of the first data monitored each time can be different, so that the first change sequence information is unique.

[0040] In one embodiment, obtaining a first data identifier of first data includes:

[0041] Monitoring a data write operation of the first application on any data storage cluster; the data write operation is performed by the first application according to a first data identifier of the first data and the changed data content of the first data after determining that the first data has changed;

[0042] Based on the data write operation, a first data identifier of the first data is obtained.

[0043] In this embodiment, the first application has a first database, and the first database is used to store the data of the first application. In addition, the data of the first application is also stored through multiple data storage clusters. The first database and the multiple data storage clusters store the same data of the first application. The multiple data storage clusters achieve the effect of data disaster recovery and backup and meet the needs of high concurrent business processing. When the first data changes, the first data in the first database is changed first. After the first application monitors that the first data in the first database has changed, for example, when the first application determines that the first data has changed through the log of the first database, the first application obtains the first data identifier of the first data and the changed data content of the first data. According to the first data identifier of the first data and the changed data content of the first data, the first application performs data write operations to each data storage cluster, and writes the first data identifier of the first data and the changed data content of the first data to each data storage cluster, so that the first data in each data storage cluster changes synchronously to ensure data consistency and accuracy of business processing. Each data storage cluster can be a Redis cache cluster.

[0044] Based on this, in this embodiment, the monitoring service monitors the data write operation of the first application on any data storage cluster, and based on the data write operation, obtains the first data identifier of the first data from the operation data of the data write operation.

[0045] It should be noted that, since the first data can be changed multiple times, each time the first application determines that the first data has changed through the log of the first database, the first application obtains the first data identifier of the first data and the changed data content of the first data, and performs data write operations on each data storage cluster. In this embodiment, after the first application performs a data write operation each time, the monitoring service obtains the first data identifier of the first data once, that is, the obtained first data identifier of the first data corresponds to the data write operation one by one, and after the first data is changed multiple times, the first data identifier of the first data is obtained multiple times.

[0046] It should also be noted that since the first application needs to perform data write operations on each data storage cluster after a change occurs to the first data, for the same change to the first data, the monitoring service in this embodiment can obtain multiple data write operations by monitoring the data write operations of the first application on each data storage cluster, and thus obtain the first data identifiers of multiple first data.

[0047] It can be seen that through this embodiment, by monitoring the data write operation of the first application on any data storage cluster, it is possible to monitor the change of the first data of the first application, and obtain the first data identifier of the first data based on the data write operation, so as to timely monitor the data change of the first data and obtain the first data identifier of the first data at the first time when the first data changes, thereby improving the efficiency of obtaining the first data identifier of the first data.

[0048] In one embodiment, monitoring a data write operation of a first application to any data storage cluster includes:

[0049] By setting a non-intrusive embedding point in the first application, the data write operation of the first application on any data storage cluster is monitored.

[0050] In this embodiment, a non-intrusive embedding point is set in advance in the first application, for example, by using Java-agent technology and using the attach mode to set the non-intrusive embedding point, which means that the application code of the first application is not invasive and does not need to be changed. Then, the monitoring service monitors the data write operation of the first application on any data storage cluster through the non-intrusive embedding point.

[0051] In one example, the listening service uses the Java-agent technology and the attach mode to intercept the data write operation of the first application for each data storage cluster, and obtains the first data identifier of the first data. In another example, if the first application is a large application, in order to ensure the stability of the service, the listening service loads the agent mode when the first application is started, and intercepts the data write operation of the first application for each data storage cluster through the agent mode, and obtains the first data identifier of the first data. In another example, the listening service uses the JVM-Sandbox technology to arrange the aspect, intercepts the data write operation of the first application for each data storage cluster, and obtains the first data identifier of the first data.

[0052] It can be seen that through this embodiment, it is possible to adopt non-intrusive tracking points to monitor the data write operations of the first application on any data storage cluster, obtain the first data identifier of the first data, and avoid changing the application code of the first application in a non-intrusive manner, thereby improving the convenience and efficiency of obtaining the first data identifier of the first data.

[0053] In one embodiment, obtaining first change timing information of first data includes:

[0054] Acquire change time information of the first data;

[0055] First change timing information of the first data is generated according to the change time information of the first data.

[0056] In this embodiment, after the monitoring service monitors the data write operation of the first application to any data storage cluster and obtains the first data identifier of the first data according to the data write operation, the monitoring service also obtains the change time information of the first data, and can obtain the change time information of the first data from the log of the first database of the first application. Then, the monitoring service generates the first change sequence information of the first data according to the change time information of the first data. For example, the monitoring service uses the change time information of the first data as the first change sequence information of the first data.

[0057] It can be seen that through this embodiment, the first change timing information of the first data can be generated according to the change time information of the first data, so that when the first data changes multiple times, the first change timing information corresponding to each change is different, making the first change timing information unique, and the order of changes of the first data can be reflected through the order of the first change timing information.

[0058] In the above step S104, the monitoring service obtains the second change timing information of the first data stored in the first data storage cluster of the first application according to the first data identifier of the first data, the first application has multiple data storage clusters, each data storage cluster is used to store the first data, the first data storage cluster is one of the multiple data storage clusters, and the second change timing information is used to represent the change timing of the first data stored in the first data storage cluster.

[0059] As mentioned above, the first application has not only a first database but also multiple data storage clusters. Both the first database and the data storage cluster are used to store the data of the first application. Therefore, the data storage cluster is also used to store the first data. The first data storage cluster can be any one of the multiple data storage clusters.

[0060] In this embodiment, after the monitoring service monitors the data write operation of the first application on any data storage cluster, based on the data write operation, obtains the first data identifier of the first data from the operation data of the data write operation, and obtains the change time information of the first data from the log of the first database of the first application as the first change timing information, the monitoring service also obtains the second change timing information of the first data stored in the first data storage cluster of the first application based on the first data identifier of the first data.

[0061] In one embodiment, obtaining second change timing information of first data stored in a first data storage cluster of a first application according to a first data identifier of the first data includes:

[0062] searching the first data storage cluster for the second change timing information of the first data according to the first data identifier of the first data and the association relationship between the first data identifier of the first data stored in the first data storage cluster and the second change timing information of the first data;

[0063] The association relationship is created by the first application according to the first data identifier of the first data and the change time information of the first data after determining that the first data has changed; the change time information is used to generate the second change timing information.

[0064] In this embodiment, after the first application determines that the first data has changed through the log of the first database, the first application obtains the first data identifier of the first data and the changed data content of the first data, and the first application obtains the change time information of the first data recorded in the log of the first database, and uses the change time information as the second change sequence information. The first application performs a data write operation for each data storage cluster according to the first data identifier of the first data and the changed data content of the first data, and writes the first data identifier of the first data and the changed data content of the first data to each data storage cluster, and the first application performs a data write operation for the first data storage cluster according to the first data identifier of the first data and the second change sequence information, and writes the first data identifier of the first data and the second change sequence information to the first data storage cluster, thereby creating an association relationship between the first data identifier of the first data and the second change sequence information of the first data. It can be seen that the second change sequence message represents the change sequence that has actually occurred in the first data storage cluster for the first data.

[0065] Based on this, in this embodiment, the monitoring service searches for the second change timing information of the first data in the first data storage cluster based on the first data identifier of the first data and the association between the first data identifier of the first data stored in the first data storage cluster and the second change timing information of the first data.

[0066] It can be seen that, through this embodiment, the second change timing information of the first data can be acquired efficiently and quickly by searching for the association relationship.

[0067] It can be understood that the first change timing information represents the change timing of the first data obtained by monitoring the data write operation of the first application to any data storage cluster, and the second change timing information represents the change timing that has actually occurred in the first data storage cluster to the first data. Considering that it takes a certain amount of time to monitor the data write operation of the first application to any data storage cluster and it takes a certain amount of time to complete writing data to the first data storage cluster, the first change timing and the second change timing may be the same or different.

[0068] Case 1: If the change sequence represented by the first change sequence information is equal to the change sequence represented by the second change sequence information, it means that the monitored data change of the first data and the data change of the first data occurring in the first data storage cluster are the same data change of the first data.

[0069] Case 2: If the change timing represented by the first change timing information is later than the change timing represented by the second change timing information, for example, the first data changes at 9:59, and the first application writes the changed data content to the first data storage cluster based on the change and writes the second change timing information at 9:59, but it is monitored that the first data in the first database changes at 10:00, then the first change timing information is 10:00, indicating that the speed of monitoring the data write operation of the first application on any data storage cluster is faster than the speed of completing the writing of data to the first data storage cluster, and the monitored change of the first data is due to the delay in the data change of the first data storage cluster, which is the change that has not yet occurred in the first data storage cluster for the first data, and the monitored change has not actually occurred in the first data storage cluster.

[0070] Case 3: If the change timing represented by the first change timing information is earlier than the change timing represented by the second change timing information, for example, the first data changes at 9:59, and the first application writes the changed data content to the first data storage cluster based on the change and writes the second change timing information as 9:59, but it is monitored that the first data in the first database changes at 9:58, then the first change timing information is 9:58, indicating that the speed of monitoring the data write operation of the first application on any data storage cluster is slower than the speed of completing the writing of data to the first data storage cluster, and the monitored change of the first data is caused by the monitoring delay. The monitored change of the first data storage cluster on the history of the first data is monitored, and the monitored change has actually occurred in the first data storage cluster.

[0071] Based on the above analysis, if the change timing represented by the first change timing information is equal to or later than the change timing represented by the second change timing information, the monitoring service obtains the first data content corresponding to the first data identifier from each data storage cluster respectively, and determines whether the data in each data storage cluster meets the data consistency requirements based on the consistency of each first data content, so as to achieve the effect of efficiently and accurately determining whether the data in each data storage cluster of the application meets the data consistency requirements, discovering the delay of data changes in the data storage cluster, and improving the accuracy of business processing.

[0072] In addition, in this embodiment, if the change sequence indicated by the first change sequence information is earlier than the change sequence indicated by the second change sequence information, the processing flow of the first data identifier of the first data and the first change sequence information of the first data is terminated.

[0073] Referring to the above situation 3, if the change sequence represented by the first change sequence information is earlier than the change sequence represented by the second change sequence information, since the monitoring service will also monitor the data write operation performed by the first application on each data storage cluster based on the change at 9:59, it will subsequently monitor the change of the first data at 9:59. Therefore, there is no need to determine whether the data in each data storage cluster meets the data consistency requirements after monitoring the change at 9:58. Therefore, the monitoring service ends the processing flow of the first data identifier and the first change sequence information of the first data, and waits until the next time the data write operation of the first application on any data storage cluster is monitored and then re-executed. Figure 1 The method flow in the embodiment reduces the data processing amount when the first data is frequently changed, reduces resource consumption, and improves the efficiency of determining the data consistency of the data storage cluster.

[0074] It can be seen that through this embodiment, if the change timing represented by the first change timing information is earlier than the change timing represented by the second change timing information, the processing flow of the first data identifier and the first change timing information of the first data is terminated, which can reduce the data processing amount when the first data changes frequently, reduce resource consumption, and improve the efficiency of determining the data consistency of the data storage cluster.

[0075] In this embodiment, in the above step S106, if the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information, the first data content corresponding to the first data identifier is obtained from each data storage cluster respectively.

[0076] In one embodiment, obtaining first data content corresponding to the first data identifier from each data storage cluster includes:

[0077] After obtaining the first data identifier of the first data and the first duration of the first changed version information of the first data, the first data content corresponding to the first data identifier is obtained from each data storage cluster respectively.

[0078] In this embodiment, after the monitoring service obtains the first data identifier of the first data and the first duration of the first change version information of the first data, for example, after monitoring the first duration of the data write operation of the first application to any data storage cluster, the monitoring service obtains the first data content corresponding to the first data identifier from each data storage cluster, wherein the first data content is the data content of the latest first data stored in each data storage cluster.

[0079] It can be seen that through this embodiment, by delaying the acquisition of the first data content corresponding to the first data identifier by the first time interval, it can be ensured that the first application has completed the data write operation for each data storage cluster, thereby obtaining the latest first data content.

[0080] In the above step S108, based on the consistency of each first data content, it is determined whether the data in each data storage cluster meets the data consistency requirement. In one embodiment, this step includes:

[0081] If the contents of each first data are consistent, it is determined that the data in each data storage cluster meets the data consistency requirement;

[0082] If the first data contents are inconsistent, the first retry operation of the first number is performed according to the first retry time interval; the first retry operation includes: obtaining the first data content corresponding to the first data identifier from each data storage cluster respectively, and determining whether the data in each data storage cluster meets the data consistency requirement according to the consistency of each first data content;

[0083] According to the execution result of the first retry operation, it is determined whether the data in each data storage cluster meets the data consistency requirement.

[0084] In this embodiment, the monitoring service determines whether the first data content corresponding to the first data identifier obtained from each data storage cluster is consistent, wherein the first data content is the data content of the latest first data stored in each data storage cluster. If the first data content is consistent, it means that each data storage cluster has made the same change to the first data, so the monitoring service determines that the data in each data storage cluster meets the data consistency requirement.

[0085] On the contrary, if the contents of each first data are inconsistent, it means that each data storage cluster has not made the same change to the first data. However, considering the scenario where the first data changes frequently, resulting in inconsistency in the contents of each first data, the monitoring service in this embodiment performs the first retry operation of the first number according to the first retry time interval. The first number is greater than or equal to 1. The first retry operation includes: obtaining the first data content corresponding to the first data identifier from each data storage cluster respectively, and determining whether the data in each data storage cluster meets the data consistency requirement based on the consistency of each first data content. Repeatedly judging whether the contents of each first data are consistent by retrying to eliminate the impact of frequent changes in the first data.

[0086] Finally, the monitoring service determines whether the data in each data storage cluster meets the data consistency requirement according to the execution result of the first retry operation.

[0087] It can be seen that through this embodiment, when the contents of each first data are consistent, it can be determined that the data in each data storage cluster meets the data consistency requirements. When the contents of each first data are inconsistent, the impact of frequent changes in the first data can be eliminated by retrying and comparing, so as to accurately determine whether the data in each data storage cluster meets the data consistency requirements.

[0088] In one embodiment, determining whether data in each data storage cluster meets the data consistency requirement according to the execution result of the first retry operation includes:

[0089] If it is determined that the contents of each first data are consistent according to the execution result of any first retry operation, it is determined that the data in each data storage cluster meets the data consistency requirement;

[0090] If it is determined according to the execution results of each first retry operation that the contents of each first data are inconsistent, it is determined that the data in each data storage cluster does not meet the data consistency requirement.

[0091] In this embodiment, after executing the first number of first retry operations, if the monitoring service determines that the contents of each first data are consistent based on the execution result of any first retry operation, then it is determined that the data in each data storage cluster meets the data consistency requirement; conversely, if the monitoring service determines that the contents of each first data are inconsistent based on the execution result of each first retry operation, then it is determined that the data in each data storage cluster does not meet the data consistency requirement.

[0092] It can be seen that through this embodiment, when it is determined that the contents of each first data are consistent after any retry, it can be determined that the data in each data storage cluster meets the data consistency requirements, thereby achieving the effect of accurately determining whether the data in each data storage cluster meets the data consistency requirements.

[0093] Furthermore, the method in this embodiment also includes:

[0094] Determine a source cluster and a target cluster in each data storage cluster of the first application; the target cluster includes clusters other than the source cluster in each data storage cluster;

[0095] Using the source cluster as a benchmark, compare the data in the source cluster and the target cluster to see if they are consistent.

[0096] According to the comparison result, it is determined whether the data in each data storage cluster meets the data consistency requirement.

[0097] In this embodiment, the first application has multiple data storage clusters, and a source cluster and a target cluster are determined in each data storage cluster of the first application. The target cluster is a cluster other than the source cluster in each data storage cluster. The number of source clusters can be one, and the source cluster can be randomly determined. The number of target clusters can be one or more. The first data storage cluster can be a source cluster or a target cluster.

[0098] Next, the monitoring service compares the data in the source cluster and each target cluster based on the source cluster to see whether they are consistent. Here, the data identifier and data content of all data in the source cluster and each target cluster can be compared to see whether they are consistent, where all data includes the first data. When the data identifier and data content are consistent, it is determined that the data in the source cluster and each target cluster are consistent.

[0099] Finally, the monitoring service determines whether the data in each data storage cluster meets the data consistency requirements based on the comparison results.

[0100] It can be seen that through this embodiment, the source cluster and the target cluster can be determined in each data storage cluster of the first application, and the data in the source cluster and the target cluster can be compared to see if they are consistent. By comparing data between clusters, it can be accurately determined whether the data in each data storage cluster meets the data consistency requirements.

[0101] In one embodiment, determining whether the data in each data storage cluster meets the data consistency requirement according to the comparison result includes:

[0102] If the data in the source cluster and the target cluster are consistent, then determine that the data in each data storage cluster meets the data consistency requirements;

[0103] If the data in the source cluster and the target cluster are inconsistent, a second retry operation is performed for a second number of times according to a second retry time interval; the second retry operation includes: taking the source cluster as a benchmark, comparing whether the data in the source cluster and the target cluster are consistent;

[0104] According to the execution result of the second retry operation, it is determined whether the data in each data storage cluster meets the data consistency requirement.

[0105] In this embodiment, the monitoring service determines whether the data in the source cluster and each target cluster are consistent. If they are consistent, it is determined that the data in each data storage cluster meets the data consistency requirements. If they are inconsistent, considering the frequent changes of data in each data storage cluster, the second retry operation of the second number is performed according to the second retry time interval. The second number is greater than or equal to 1. The second retry operation includes: taking the source cluster as a reference, comparing whether the data in the source cluster and the target cluster are consistent. Repeatedly determine whether the data in the source cluster and the target cluster are consistent by retrying to eliminate the impact of frequent data changes.

[0106] Finally, the monitoring service determines whether the data in each data storage cluster meets the data consistency requirement according to the execution result of the second retry operation.

[0107] It can be seen that through this embodiment, when the data in the source cluster and the target cluster are consistent, it can be determined that the data in each data storage cluster meets the data consistency requirements. When the data in the source cluster and the target cluster are inconsistent, the impact of frequent data changes can be eliminated by retrying and comparing, and it can be accurately determined whether the data in each data storage cluster meets the data consistency requirements.

[0108] In one embodiment, determining whether the data in each data storage cluster meets the data consistency requirement according to the execution result of the second retry operation includes:

[0109] If it is determined that the data in the source cluster and the target cluster are consistent according to the execution result of any second retry operation, it is determined that the data in each data storage cluster meets the data consistency requirement;

[0110] If it is determined that the data in the source cluster and the data in the target cluster are inconsistent according to the execution results of each second retry operation, it is determined that the data in each data storage cluster does not meet the data consistency requirement.

[0111] In this embodiment, after executing the second retry operation for the second time, if the listening service determines that the data in the source cluster and each target cluster are consistent based on the execution result of any second retry operation, then it is determined that the data in each data storage cluster meets the data consistency requirements; conversely, if the listening service determines that the data in the source cluster and each target cluster are inconsistent based on the execution results of each second retry operation, then it is determined that the data in each data storage cluster does not meet the data consistency requirements.

[0112] It can be seen that through this embodiment, when it is determined that the data in the source cluster and each target cluster are consistent after any retry, it can be determined that the data in each data storage cluster meets the data consistency requirements, thereby achieving the effect of accurately determining whether the data in each data storage cluster meets the data consistency requirements.

[0113] In one embodiment, the above method flow further includes:

[0114] Reading a second data identifier of second data from a first database; the first database is used to store data of the first application;

[0115] Acquire second data content corresponding to the second data identifier from each data storage cluster respectively;

[0116] According to the consistency of each second data content, it is determined whether the data in each data storage cluster meets the data consistency requirement.

[0117] In this embodiment, the first application has a first database, and ideally, all or part of the data in the first database is backed up in each data storage cluster of the first application. In this embodiment, the monitoring service reads the second data identifier of the second data from the first database, and the second data is the same or different data from the first data.

[0118] Next, the monitoring service obtains the second data content corresponding to the second data identifier from each data storage cluster respectively, where the second data content is the latest data content of the second data stored in each data storage cluster.

[0119] Finally, the monitoring service determines whether the data in each data storage cluster meets the data consistency requirement according to the consistency of each second data content.

[0120] It can be seen that through this embodiment, the second data identifier of the second data can also be read from the first database, and the second data content corresponding to the second data identifier can be obtained from each data storage cluster respectively. According to the consistency of each second data content, it is determined whether the data in each data storage cluster meets the data consistency requirement, thereby achieving the effect of determining the data consistency of each data storage cluster, and achieving the effect of determining the data consistency of each data storage cluster and the data consistency of each data storage cluster with the first database.

[0121] In one embodiment, determining whether the data in each data storage cluster meets the data consistency requirement according to the consistency of each second data content includes:

[0122] If the contents of each second data are consistent, it is determined that the data in each data storage cluster meets the data consistency requirement;

[0123] If the second data contents are inconsistent, a third retry operation is performed for a third time according to a third retry time interval; the third retry operation includes: obtaining the second data content corresponding to the second data identifier from each data storage cluster, and determining whether the data in each data storage cluster meets the data consistency requirement according to the consistency of each second data content;

[0124] According to the execution result of the third retry operation, it is determined whether the data in each data storage cluster meets the data consistency requirement.

[0125] In this embodiment, the monitoring service determines whether the second data content corresponding to the second data identifier obtained from each data storage cluster is consistent, wherein the second data content is the data content of the latest second data stored in each data storage cluster. If the second data content is consistent, it means that each data storage cluster has made the same change to the second data, so the monitoring service determines that the data in each data storage cluster meets the data consistency requirement.

[0126] On the contrary, if the contents of each second data are inconsistent, it means that each data storage cluster has not made the same change to the second data. However, considering the scenario where the second data is frequently changed, resulting in inconsistency in the contents of each second data, in this embodiment, the third retry operation of the third number is performed at the third retry time interval, and the third number is greater than or equal to 1. The third retry operation includes: obtaining the second data content corresponding to the second data identifier from each data storage cluster respectively, and determining whether the data in each data storage cluster meets the data consistency requirement based on the consistency of each second data content. Repeatedly judging whether the contents of each second data are consistent by retrying eliminates the impact of frequent changes in the second data.

[0127] Finally, the monitoring service determines whether the data in each data storage cluster meets the data consistency requirement according to the execution result of the third retry operation.

[0128] It can be seen that through this embodiment, when the contents of each second data are consistent, it can be determined that the data in each data storage cluster meets the data consistency requirements. When the contents of each second data are inconsistent, the impact of frequent changes in the second data can be eliminated by retrying and comparing, so as to accurately determine whether the data in each data storage cluster meets the data consistency requirements.

[0129] In one embodiment, determining whether the data in each data storage cluster meets the data consistency requirement according to the execution result of the third retry operation includes:

[0130] If it is determined that the contents of each second data are consistent according to the execution result of any third retry operation, it is determined that the data in each data storage cluster meets the data consistency requirement;

[0131] If it is determined that the contents of each second data are inconsistent according to the execution results of each third retry operation, it is determined that the data in each data storage cluster does not meet the data consistency requirement.

[0132] In this embodiment, after executing the third retry operation for the third time, if the monitoring service determines that the contents of each second data are consistent based on the execution result of any third retry operation, then it is determined that the data in each data storage cluster meets the data consistency requirements; conversely, if the monitoring service determines that the contents of each second data are inconsistent based on the execution results of each third retry operation, then it is determined that the data in each data storage cluster does not meet the data consistency requirements.

[0133] It can be seen that through this embodiment, when it is determined that the contents of each second data are consistent after any retry, it can be determined that the data in each data storage cluster meets the data consistency requirements, thereby achieving the effect of accurately determining whether the data in each data storage cluster meets the data consistency requirements.

[0134] In this embodiment, it is also possible to simulate the change of data in the first database of the first application, for example, to simulate the change of the third data in the first database. The simulated change means that the third data is assumed to be the changed data, so that the monitoring service obtains the third data content corresponding to the third data identifier from each data storage cluster according to the third data identifier of the third data, and determines whether the data in each data storage cluster meets the data consistency requirement according to the consistency of each third data content. The third data content is the data content of the latest third data stored in each data storage cluster.

[0135] Based on the technical concept of the above embodiments, an embodiment of the present disclosure further provides an application scenario diagram of a data processing method. Figure 2 A schematic diagram of an application scenario of a data processing method provided by an embodiment of the present disclosure, such as Figure 2 As shown, the scenario includes a first application, a first database, multiple data storage clusters (including the first data storage cluster), a monitoring service and a message queue. In the first application, it includes a native code portion of the first application and a monitoring point that does not intrude on the native code portion of the first application.

[0136] exist Figure 2 In the scenario shown, the native code portion of the first application is used to: after determining through the log of the first database that the first data has changed, perform data write operations on each data storage cluster according to the first data identifier of the first data and the changed first data content.

[0137] The monitoring tracking point is used to: intercept the data write operation performed by the native code part of the first application to any data storage cluster according to the first data identifier of the first data and the changed first data content, obtain the first data identifier of the first data based on the data write operation, and determine the change time information of the first data from the log of the first database according to the first data identifier of the first data as the first change sequence information, and send the first data identifier of the first data and the first change sequence information to the message queue. Therefore, the first change sequence information is used to represent the change sequence of the monitored first data.

[0138] The monitoring tracking point is also used for: when the native code part of the first application writes the changed first data content to the first data storage cluster, second change timing information is generated according to the change time of the first data in the first database, and the second change timing information is synchronously written to the first data storage cluster. Therefore, the second change timing information represents the change timing of the first data that has been changed in the first data storage cluster.

[0139] The message queue is used to send the first data identifier and the first change timing information of the first data to the monitoring service after receiving the first data identifier and the first change timing information of the first data for a first duration by means of delayed message sending.

[0140] The monitoring service is used to: receive the first data identifier and the first change timing information of the first data, and execute through the LUA script Figure 1 In the method flow, the second change timing information of the first data stored in the first data storage cluster of the first application is obtained according to the first data identifier of the first data through the LUA script; if the change timing represented by the first change timing information is equal to or later than the change timing represented by the second change timing information, the first data content corresponding to the first data identifier is obtained from each data storage cluster respectively, and according to the consistency of each first data content, it is determined whether the data in each data storage cluster meets the data consistency requirement.

[0141] It should be noted that in Figure 2 In the scenario shown, the monitoring point is used to implement the process of intercepting the data write operation to obtain the first data identifier of the first data, and to implement the process of generating the first change timing information and the second change timing information. Figure 2 In the scenario shown, since the message queue implements delayed sending, the monitoring service can be executed immediately after receiving the first data identifier and the first change timing information of the first data. Figure 1 In the method flow. Figure 2In the scenario shown, the first application continuously writes the changed data in the first database into each data storage cluster, the monitoring point continuously monitors the data write operation performed by the first application on any data storage cluster and any data, and continuously uses the monitored data identifier as the first data identifier, continuously uses the monitored change timing information as the first change timing information, and continuously sends the first data identifier and the first change timing information of the first data to the message queue. The monitoring point also continuously writes the second change timing information to the first data storage cluster. In this embodiment, the second change timing information can also be set to expire naturally, and the configured expiration time can be 10 seconds.

[0142] Figure 3 A flowchart of a data processing method provided by another embodiment of the present disclosure is shown in FIG. Figure 3 As shown, this method is Figure 2 The listening service execution in includes:

[0143] Step S302, determining whether the contents of each first data are consistent;

[0144] Step S304: if they are consistent, it is determined that the data in each data storage cluster meets the data consistency requirement;

[0145] Step S306, if not, repeatedly obtaining each first data content and determining whether each first data content is consistent;

[0146] Step S306 may be repeated multiple times.

[0147] Step S308, determining whether the first data contents are consistent during any retry;

[0148] Step S310: If yes, record the retry success information to determine whether the data in each data storage cluster meets the data consistency requirement;

[0149] Step S312: if not, record the retry failure information and determine that the data in each data storage cluster does not meet the data consistency requirement;

[0150] Step S314, continue to obtain the monitored changed data identifier and change timing information from the message queue.

[0151] Figure 4 A flowchart of a data processing method provided by another embodiment of the present disclosure is shown in FIG. Figure 4 As shown, this method is Figure 2 The listening service execution in includes:

[0152] Step S402, determining a source cluster and a target cluster in each data storage cluster of the first application;

[0153] Step S404, taking the source cluster as a benchmark, comparing whether the data in the source cluster and the target cluster are consistent;

[0154] When comparing, for each data identifier, you can first compare the data length, which includes the length of the data content corresponding to the data identifier. If the lengths are inconsistent, the data are determined to be inconsistent. If the lengths are consistent, the data contents are compared. If the data contents are consistent, the data are determined to be consistent.

[0155] Step S406: If they are consistent, it is determined that the data in each data storage cluster meets the data consistency requirement;

[0156] Step S408: If they are not consistent, then the source cluster is used as a benchmark to compare whether the data in the source cluster and the target cluster are consistent;

[0157] Step S408 may be repeated multiple times.

[0158] Step S410, determining whether the data storage clusters are consistent during any retry;

[0159] Step S412: If yes, record the retry success information to determine whether the data in each data storage cluster meets the data consistency requirement;

[0160] Step S414: if not, record the retry failure information to determine that the data in each data storage cluster does not meet the data consistency requirement.

[0161] exist Figure 2 In the scenario shown, the monitoring tracking point can simulate the change of data in the first database of the first application, for example, simulate the change of the third data in the first database. The simulated change means: the third data is assumed to be the changed data, and the monitoring tracking point sends the third data identifier of the third data as the data identifier intercepted from the data write operation to the message queue, so that the monitoring service obtains the third data content corresponding to the third data identifier from each data storage cluster according to the third data identifier of the third data, and determines whether the data in each data storage cluster meets the data consistency requirement according to the consistency of each third data content. Among them, the third data content is the data content of the latest third data stored in each data storage cluster.

[0162] In summary, through this embodiment, if the change timing represented by the first change timing information is equal to the change timing represented by the second change timing information, then it means that the change of the first data monitored is the most recent change that occurred in the first data storage cluster for the first data; if the change timing represented by the first change timing information is later than the change timing represented by the second change timing information, then it means that the change of the first data monitored is due to the delay in data change of the first data storage cluster, which is the change that has not yet occurred in the first data storage cluster for the first data. In this case, determining whether the data in each data storage cluster meets the data consistency requirements can achieve the effect of efficiently and accurately determining whether the data in each data storage cluster of the application meets the data consistency requirements, discovering the delay in data change of the data storage cluster, and improving the accuracy of business processing.

[0163] Figure 5 A structural diagram of a data processing device provided by an embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the device comprises:

[0164] A first acquisition unit 51 is used to acquire a first data identifier of first data and first change timing information of the first data; the first data is the data of the first application that has been monitored and has changed; the first change timing information is used to indicate the change timing of the first data that has been monitored;

[0165] A second acquisition unit 52 is used to acquire, according to a first data identifier of the first data, second change timing information of the first data stored in a first data storage cluster of the first application; the first application has multiple data storage clusters; each of the data storage clusters is used to store the first data; the first data storage cluster is one of the multiple data storage clusters; the second change timing information is used to indicate a change timing of the first data stored in the first data storage cluster;

[0166] A third acquisition unit 53 is configured to acquire the first data content corresponding to the first data identifier from each of the data storage clusters if the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information;

[0167] The consistency determination unit 54 is used to determine whether the data in each of the data storage clusters meets the data consistency requirement according to the consistency of the content of each of the first data.

[0168] Optionally, the first acquiring unit 51 is specifically configured to:

[0169] monitoring a data write operation of the first application on any one of the data storage clusters; the data write operation is performed by the first application according to a first data identifier of the first data and a changed data content of the first data after determining that the first data has been changed;

[0170] Based on the data write operation, a first data identifier of the first data is obtained.

[0171] Optionally, the first acquiring unit 51 is further specifically configured to:

[0172] By setting a non-intrusive embedding point in the first application, the data write operation of the first application on any one of the data storage clusters is monitored.

[0173] Optionally, the first acquiring unit 51 is specifically configured to:

[0174] Acquire change time information of the first data;

[0175] The first change timing information of the first data is generated according to the change time information of the first data.

[0176] Optionally, the second acquiring unit 52 is specifically configured to:

[0177] searching the first data storage cluster for the second change timing information of the first data according to the first data identifier of the first data and the association relationship between the first data identifier of the first data stored in the first data storage cluster and the second change timing information of the first data;

[0178] The association relationship is created by the first application according to the first data identifier of the first data and the change time information of the first data after determining that the first data has changed; the change time information is used to generate the second change timing information.

[0179] Optionally, the third obtaining unit 53 is specifically configured to:

[0180] After obtaining the first data identifier of the first data and the first duration of the first changed version information of the first data, the first data content corresponding to the first data identifier is obtained from each of the data storage clusters.

[0181] Optionally, an end unit is further included, for:

[0182] If the change sequence indicated by the first change sequence information is earlier than the change sequence indicated by the second change sequence information, the processing flow for the first data identifier of the first data and the first change sequence information of the first data is terminated.

[0183] Optionally, the consistency determination unit 54 is specifically configured to:

[0184] If the contents of each of the first data are consistent, determining that the data in each of the data storage clusters meets the data consistency requirement;

[0185] If the first data contents are inconsistent, the first retry operation of the first number is performed according to the first retry time interval; the first retry operation includes: obtaining the first data content corresponding to the first data identifier from each of the data storage clusters, and determining whether the data in each of the data storage clusters meets the data consistency requirement according to the consistency of each of the first data contents;

[0186] According to the execution result of the first retry operation, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

[0187] Optionally, the consistency determination unit 54 is further specifically configured to:

[0188] If it is determined according to the execution result of any one of the first retry operations that the contents of each of the first data are consistent, then it is determined that the data in each of the data storage clusters meets the data consistency requirement;

[0189] If it is determined that the contents of each of the first data are inconsistent according to the execution results of each of the first retry operations, it is determined that the data in each of the data storage clusters does not meet the data consistency requirement.

[0190] Optionally, a cluster comparison unit is further included, configured to:

[0191] Determine a source cluster and a target cluster in each of the data storage clusters of the first application; the target cluster includes clusters other than the source cluster in each of the data storage clusters;

[0192] Taking the source cluster as a benchmark, comparing whether the data in the source cluster and the target cluster are consistent;

[0193] According to the comparison result, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

[0194] Optionally, the cluster comparison unit is specifically used for:

[0195] If the data in the source cluster is consistent with the data in the target cluster, determining that the data in each of the data storage clusters meets the data consistency requirement;

[0196] If the data in the source cluster and the target cluster are inconsistent, performing a second retry operation for a second number of times according to a second retry time interval; the second retry operation includes: taking the source cluster as a reference, comparing whether the data in the source cluster and the target cluster are consistent;

[0197] According to the execution result of the second retry operation, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

[0198] Optionally, the cluster comparison unit is further specifically configured to:

[0199] If it is determined according to the execution result of any one of the second retry operations that the data in the source cluster is consistent with the data in the target cluster, then it is determined that the data in each of the data storage clusters meets the data consistency requirement;

[0200] If it is determined that the data in the source cluster and the data in the target cluster are inconsistent according to the execution results of each of the second retry operations, it is determined that the data in each of the data storage clusters does not meet the data consistency requirement.

[0201] Optionally, a database comparison unit is further included, for:

[0202] Reading a second data identifier of second data from a first database; the first database is used to store data of the first application;

[0203] Acquire second data content corresponding to the second data identifier from each of the data storage clusters respectively;

[0204] According to the consistency of the contents of each of the second data, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

[0205] Optionally, the database comparison unit is specifically used for:

[0206] If the contents of each of the second data are consistent, determining that the data in each of the data storage clusters meets the data consistency requirement;

[0207] If the second data contents are inconsistent, performing a third retry operation for a third time at a third retry time interval; the third retry operation includes: obtaining the second data content corresponding to the second data identifier from each of the data storage clusters, and determining whether the data in each of the data storage clusters meets the data consistency requirement according to the consistency of each of the second data contents;

[0208] According to the execution result of the third retry operation, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

[0209] Optionally, the database comparison unit is further specifically configured to:

[0210] If it is determined according to the execution result of any one of the third retry operations that the contents of each of the second data are consistent, then it is determined that the data in each of the data storage clusters meets the data consistency requirement;

[0211] If it is determined that the contents of each of the second data are inconsistent according to the execution results of each of the third retry operations, it is determined that the data in each of the data storage clusters does not meet the data consistency requirement.

[0212] The data processing device in the embodiment of the present disclosure can implement each process of the above-mentioned data processing method embodiment and achieve the same effect and function, which will not be repeated here.

[0213] An embodiment of the present disclosure further provides an electronic device, Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure, such as Figure 6 As shown, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 601 and memory 602, and one or more applications or data may be stored in the memory 602. Among them, the memory 602 may be a short-term storage or a persistent storage. The application stored in the memory 602 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 601 may be configured to communicate with the memory 602 to execute a series of computer executable instructions in the memory 602 on the electronic device. The electronic device may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input or output interfaces 605, one or more keyboards 606, etc.

[0214] In a specific embodiment, the electronic device includes a processor; and a memory configured to store computer executable instructions, wherein when the computer executable instructions are executed, the processor implements the following process:

[0215] Acquire a first data identifier of first data and first change timing information of the first data; the first data is the data of the first application that has been monitored and has changed; the first change timing information is used to indicate the change timing of the first data that has been monitored;

[0216] According to the first data identifier of the first data, second change timing information of the first data stored in the first data storage cluster of the first application is obtained; the first application has multiple data storage clusters; each of the data storage clusters is used to store the first data; the first data storage cluster is one of the multiple data storage clusters; the second change timing information is used to represent the change timing of the first data stored in the first data storage cluster;

[0217] If the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information, obtaining the first data content corresponding to the first data identifier from each of the data storage clusters respectively;

[0218] According to the consistency of the contents of each of the first data, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

[0219] The electronic device in the embodiment of the present disclosure can implement each process of the above-mentioned data processing method embodiment and achieve the same effect and function, which will not be repeated here.

[0220] Another embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented:

[0221] Acquire a first data identifier of first data and first change timing information of the first data; the first data is the data of the first application that has been monitored and has changed; the first change timing information is used to indicate the change timing of the first data that has been monitored;

[0222] According to the first data identifier of the first data, second change timing information of the first data stored in the first data storage cluster of the first application is obtained; the first application has multiple data storage clusters; each of the data storage clusters is used to store the first data; the first data storage cluster is one of the multiple data storage clusters; the second change timing information is used to represent the change timing of the first data stored in the first data storage cluster;

[0223] If the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information, obtaining the first data content corresponding to the first data identifier from each of the data storage clusters respectively;

[0224] According to the consistency of the contents of each of the first data, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

[0225] The storage medium in the embodiment of the present disclosure can implement each process of the above-mentioned data processing method embodiment and achieve the same effect and function, which will not be repeated here.

[0226] Another embodiment of the present disclosure further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following process is implemented:

[0227] Acquire a first data identifier of first data and first change timing information of the first data; the first data is the data of the first application that has been monitored and has changed; the first change timing information is used to indicate the change timing of the first data that has been monitored;

[0228] According to the first data identifier of the first data, second change timing information of the first data stored in the first data storage cluster of the first application is obtained; the first application has multiple data storage clusters; each of the data storage clusters is used to store the first data; the first data storage cluster is one of the multiple data storage clusters; the second change timing information is used to represent the change timing of the first data stored in the first data storage cluster;

[0229] If the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information, obtaining the first data content corresponding to the first data identifier from each of the data storage clusters respectively;

[0230] According to the consistency of the contents of each of the first data, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

[0231] The computer program product in the embodiments of the present disclosure can implement the various processes of the above-mentioned data processing method embodiments and achieve the same effects and functions, which will not be repeated here.

[0232] In various embodiments of the present disclosure, the computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0233] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0234] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0235] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0236] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of the present disclosure, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0237] Those skilled in the art will appreciate that one or more embodiments of the present disclosure may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0238] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0239] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0240] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0241] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0242] One or more embodiments of the present disclosure may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present disclosure may also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0243] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0244] The above description is only an embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.

Claims

1. A data processing method, characterized in that: include: Acquire a first data identifier of first data and first change timing information of the first data; The first data is monitored changed data of the first application; The first change timing information is used to indicate the monitored change timing of the first data; acquiring, according to the first data identifier of the first data, second change timing information of the first data stored in the first data storage cluster of the first application; The first application has a plurality of data storage clusters; each of the data storage clusters is used to store the first data; The first data storage cluster is one of the multiple data storage clusters; The second change timing information is used to indicate a change timing of the first data stored in the first data storage cluster; If the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information, obtaining the first data content corresponding to the first data identifier from each of the data storage clusters respectively; According to the consistency of the contents of each of the first data, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

2. The method according to claim 1, characterized in that The obtaining of the first data identifier of the first data includes: monitoring a data write operation of the first application on any one of the data storage clusters; the data write operation is performed by the first application according to a first data identifier of the first data and a changed data content of the first data after determining that the first data has been changed; Based on the data write operation, a first data identifier of the first data is obtained.

3. The method according to claim 2, characterized in that The monitoring of the data write operation of the first application on any one of the data storage clusters includes: By setting a non-intrusive embedding point in the first application, the data write operation of the first application on any one of the data storage clusters is monitored.

4. The method according to claim 1, characterized in that: Acquiring first change timing information of the first data includes: Acquire change time information of the first data; The first change timing information of the first data is generated according to the change time information of the first data.

5. The method according to claim 1, characterized in that The acquiring, according to the first data identifier of the first data, second change timing information of the first data stored in the first data storage cluster of the first application includes: searching the first data storage cluster for the second change timing information of the first data according to the first data identifier of the first data and the association relationship between the first data identifier of the first data stored in the first data storage cluster and the second change timing information of the first data; The association relationship is created by the first application according to the first data identifier of the first data and the change time information of the first data after determining that the first data has changed; the change time information is used to generate the second change timing information.

6. The method according to claim 1, characterized in that The obtaining the first data content corresponding to the first data identifier from each of the data storage clusters respectively includes: After obtaining the first data identifier of the first data and the first duration of the first changed version information of the first data, the first data content corresponding to the first data identifier is obtained from each of the data storage clusters.

7. The method according to claim 1, characterized in that Also includes: If the change sequence indicated by the first change sequence information is earlier than the change sequence indicated by the second change sequence information, the processing flow for the first data identifier of the first data and the first change sequence information of the first data is terminated.

8. The method according to claim 1, characterized in that The determining, based on the consistency of the contents of each of the first data, whether the data in each of the data storage clusters meets the data consistency requirement includes: If the contents of each of the first data are consistent, determining that the data in each of the data storage clusters meets the data consistency requirement; If the first data contents are inconsistent, the first retry operation of the first number is performed according to the first retry time interval; the first retry operation includes: obtaining the first data content corresponding to the first data identifier from each of the data storage clusters, and determining whether the data in each of the data storage clusters meets the data consistency requirement according to the consistency of each of the first data contents; According to the execution result of the first retry operation, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

9. The method according to claim 8, characterized in that The determining, according to the execution result of the first retry operation, whether the data in each of the data storage clusters meets the data consistency requirement includes: If it is determined according to the execution result of any one of the first retry operations that the contents of each of the first data are consistent, then it is determined that the data in each of the data storage clusters meets the data consistency requirement; If it is determined that the contents of each of the first data are inconsistent according to the execution results of each of the first retry operations, it is determined that the data in each of the data storage clusters does not meet the data consistency requirement.

10. The method according to claim 1, characterized in that Also includes: Determining a source cluster and a target cluster in each of the data storage clusters of the first application; The target cluster includes clusters other than the source cluster in each of the data storage clusters; Taking the source cluster as a benchmark, comparing whether the data in the source cluster and the target cluster are consistent; According to the comparison result, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

11. The method according to claim 10, characterized in that Determining, according to the comparison result, whether the data in each of the data storage clusters meets the data consistency requirement includes: If the data in the source cluster is consistent with the data in the target cluster, determining that the data in each of the data storage clusters meets the data consistency requirement; If the data in the source cluster and the target cluster are inconsistent, performing a second retry operation for a second number of times according to a second retry time interval; the second retry operation includes: taking the source cluster as a reference, comparing whether the data in the source cluster and the target cluster are consistent; According to the execution result of the second retry operation, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

12. The method according to claim 11, characterized in that The determining, according to the execution result of the second retry operation, whether the data in each of the data storage clusters meets the data consistency requirement includes: If it is determined according to the execution result of any one of the second retry operations that the data in the source cluster is consistent with the data in the target cluster, then it is determined that the data in each of the data storage clusters meets the data consistency requirement; If it is determined that the data in the source cluster and the data in the target cluster are inconsistent according to the execution results of each of the second retry operations, it is determined that the data in each of the data storage clusters does not meet the data consistency requirement.

13. The method according to claim 1, characterized in that Also includes: Reading a second data identifier of second data from the first database; The first database is used to store data of the first application; Acquire second data content corresponding to the second data identifier from each of the data storage clusters respectively; According to the consistency of the contents of each of the second data, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

14. The method according to claim 13, characterized in that The determining, based on the consistency of the contents of each of the second data, whether the data in each of the data storage clusters meets the data consistency requirement includes: If the contents of each of the second data are consistent, determining that the data in each of the data storage clusters meets the data consistency requirement; If the second data contents are inconsistent, performing a third retry operation for a third time at a third retry time interval; the third retry operation includes: obtaining the second data content corresponding to the second data identifier from each of the data storage clusters, and determining whether the data in each of the data storage clusters meets the data consistency requirement according to the consistency of each of the second data contents; According to the execution result of the third retry operation, it is determined whether the data in each of the data storage clusters meets the data consistency requirement.

15. The method according to claim 14, characterized in that The determining, according to the execution result of the third retry operation, whether the data in each of the data storage clusters meets the data consistency requirement includes: If it is determined according to the execution result of any one of the third retry operations that the contents of each of the second data are consistent, then it is determined that the data in each of the data storage clusters meets the data consistency requirement; If it is determined that the contents of each of the second data are inconsistent according to the execution results of each of the third retry operations, it is determined that the data in each of the data storage clusters does not meet the data consistency requirement.

16. A data processing device, characterized in that: include: A first acquisition unit, configured to acquire a first data identifier of first data and first change timing information of the first data; The first data is monitored changed data of the first application; The first change timing information is used to indicate the monitored change timing of the first data; A second acquisition unit, configured to acquire, according to a first data identifier of the first data, second change timing information of the first data stored in a first data storage cluster of the first application; The first application has a plurality of data storage clusters; each of the data storage clusters is used to store the first data; The first data storage cluster is one of the multiple data storage clusters; The second change timing information is used to indicate a change timing of the first data stored in the first data storage cluster; a third acquisition unit, configured to acquire the first data content corresponding to the first data identifier from each of the data storage clusters respectively if the change sequence indicated by the first change sequence information is equal to or later than the change sequence indicated by the second change sequence information; The consistency determination unit is used to determine whether the data in each of the data storage clusters meets the data consistency requirement according to the consistency of the content of each of the first data.

17. An electronic device, characterized in that: include: processor; as well as, A memory configured to store computer executable instructions, which, when executed, cause the processor to implement the steps of the method according to any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the steps of the method described in any one of claims 1 to 15.

19. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.