WO2021168654A1 - Method and apparatus for detecting synchronized data, server, and data synchronization system - Google Patents

Method and apparatus for detecting synchronized data, server, and data synchronization system Download PDF

Info

Publication number
WO2021168654A1
WO2021168654A1 PCT/CN2020/076609 CN2020076609W WO2021168654A1 WO 2021168654 A1 WO2021168654 A1 WO 2021168654A1 CN 2020076609 W CN2020076609 W CN 2020076609W WO 2021168654 A1 WO2021168654 A1 WO 2021168654A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
time
detection
target
synchronization
Prior art date
Application number
PCT/CN2020/076609
Other languages
French (fr)
Chinese (zh)
Inventor
徐豪聪
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to PCT/CN2020/076609 priority Critical patent/WO2021168654A1/en
Priority to CN202080092970.2A priority patent/CN114981797A/en
Publication of WO2021168654A1 publication Critical patent/WO2021168654A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication

Definitions

  • This application relates to the field of data synchronization, and more specifically, to a method, device, server, and data synchronization system for detecting synchronized data.
  • each site is a server or a cluster composed of multiple servers. These sites will maintain data synchronization, so that part of the data content or all the data content stored therein are consistent. However, in this data synchronization, the consistency detection method of the synchronized data needs to be improved.
  • this application proposes a method, device, server, and data synchronization system for detecting synchronization data to improve the above-mentioned problems.
  • the present application provides a method for detecting synchronization data, the method includes: obtaining data and detecting a corresponding target time; obtaining first data and second data, the first data being synchronized data stored at the source end
  • the corresponding update time in the target time is the data of the target time
  • the second data is the data of the synchronization data stored at the target end and the corresponding update time is the target time
  • the synchronization data stored in the source end is the synchronization data.
  • the synchronization data stored by the target end is data synchronized from the source end; the data detection is performed on the first data and the second data.
  • the present application provides a method for detecting synchronization data, which is applied to a data synchronization system.
  • the data synchronization system includes a detection end, a source end, and a target end.
  • the synchronization data stored at the source end is synchronized to The data of the target end, the synchronized data stored by the target end is data synchronized from the source end, and the method includes: the detection end obtains the data and detects the corresponding target time; obtains the first data and the second data,
  • the first data is data in which the update time corresponding to the target time in the synchronization data stored at the source end is the target time
  • the second data is the data in which the update time corresponding to the target time in the synchronization data stored at the target end is the target time Time data; the data detection is performed on the first data and the second data.
  • the present application provides an apparatus for detecting synchronization data.
  • the apparatus includes: a time obtaining unit for obtaining a target time corresponding to the data detection; a data obtaining unit for obtaining first data and second data,
  • the first data is data whose update time is the target time in the synchronization data stored at the source end
  • the second data is data whose update time is the target time in the synchronization data stored at the target end
  • the synchronization data stored by the source end is data synchronized to the target end
  • the synchronization data stored by the target end is data synchronized from the source end
  • the data detection unit is configured to compare the first data and Perform the data detection on the second data.
  • the present application provides a data synchronization system.
  • the data synchronization system includes a detection end, a source end, and a target end.
  • the synchronization data stored by the source end is data synchronized to the target end.
  • the synchronization data stored by the target end is the data synchronized from the source end; the detection end is used to obtain the target time corresponding to the data detection; obtain the first data and the second data, and the first data is the source end
  • the corresponding update time in the stored synchronization data is the data at the target time, and the second data is the data at the target time corresponding to the update time in the synchronization data stored at the target end; for the first data And performing the data detection on the second data.
  • the present application provides a server including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, so The one or more programs are configured to perform the methods described above.
  • the present application provides a computer-readable storage medium having program code executable by a processor, the program code causing the processor to execute the above-mentioned method.
  • the present application provides a method, device, server, and data synchronization system for detecting synchronized data.
  • the corresponding target time is detected by first obtaining the data, and then the corresponding update time in the synchronized data stored at the source is obtained as the target time.
  • Data is used as the first data, and the data whose update time is the target time corresponding to the synchronization data stored on the target side is obtained as the second data, and then the data detection is performed on the first data and the second data .
  • the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
  • FIG. 1 shows a schematic diagram of an application scenario of a method for detecting synchronized data proposed in this application
  • Figure 2 shows a flow chart of a method for detecting synchronization data proposed by the present application
  • FIG. 3 shows a flowchart of another method for detecting synchronization data proposed by the present application
  • Fig. 4 shows a flow chart of a positioning detection proposed in this application
  • FIG. 5 shows a flowchart of another method for detecting synchronization data proposed by the present application
  • Fig. 6 shows a flowchart of another method for detecting synchronization data proposed by the present application
  • FIG. 7 shows a flowchart of another method for detecting synchronization data proposed by the present application.
  • FIG. 8 shows a structural block diagram of a device for detecting synchronization data proposed by this application
  • FIG. 9 shows a structural block diagram of another device for detecting synchronization data proposed by this application.
  • Fig. 10 shows a structural block diagram of an electronic device proposed in this application.
  • FIG. 11 is a storage unit for storing or carrying program code for implementing the method for detecting synchronization data according to the embodiment of the present application according to an embodiment of the present application.
  • Internet companies deploy multiple sites distributed in different regions.
  • data synchronization is performed between different sites. For example, in order to facilitate user login when accessing each site, login information such as user names and passwords of all users will be synchronized between different sites.
  • a site can be understood as one end.
  • the site that initiates synchronization during the data synchronization process can be understood as the source end
  • the site receiving the synchronized data can be understood as the target end.
  • the synchronized data may be detected, for example, whether the synchronized data stored in the target end is consistent with the data in the source end. The inventor found that there are still many problems that need to be improved in the detection process of related synchronization data.
  • all the synchronization data are detected at one time each time, which in turn causes a large amount of data to be detected each time.
  • all the synchronized data will be checked at one time each time, and some data that has not been updated will be checked repeatedly. For example, there are 100 pieces of data stored on the source end, and these 100 pieces of data will be synchronized to the target end as synchronization data, and the synchronized data stored on the target end will include the 100 pieces of data.
  • only 10 of these 100 pieces of data may be updated more frequently.
  • not only the 10 data that has been updated with a higher frequency will be detected, but also another 90 pieces of data will be detected, resulting in some data that has not been updated. Repeated detection.
  • 100 pieces of data are stored at the source, and the 100 pieces of data will be detected one by one. In this case, the data that has been detected before will be checked later. In the process of testing other data, the previously tested data may be updated again, but for the previously tested data that has been updated again, the test cannot be performed immediately, which may cause the test results to be different from the actual situation. Inconsistent.
  • the inventor proposes the method, device, server, and data synchronization system for detecting synchronization data in this application.
  • the method provided by this application can at least detect the corresponding target time by acquiring the data first, and then acquire the source.
  • the data corresponding to the update time of the target time in the synchronization data stored at the target end is used as the first data, and the data corresponding to the update time of the target time stored in the synchronization data is obtained as the second data, and then the data
  • the data detection is performed on the first data and the second data.
  • the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
  • the cross-computer room data synchronization system 100 shown in FIG. 1 includes a first site 110, a second site 120 and a detection terminal 130.
  • the first site 110, the second site 120, and the detection terminal 130 exchange data with each other through the network 140.
  • the first site 110 is deployed in the first computer room 111
  • the second site 120 is deployed in the second computer room 121.
  • both the first site 110 and the second site 120 can be respectively used as the source end or the target end in the data synchronization process.
  • the first site 110 synchronizes data with the second site 120
  • the first site 110 can be understood as the source end
  • the second site 120 can be understood as the target end.
  • the second site 120 synchronizes data with the first site 110
  • the second site 120 can be understood as the source end
  • the first site 110 can be understood as the target end.
  • a method for detecting synchronization data includes:
  • the data stored in either the source end or the target end will correspond to the configuration update time parameter.
  • the update time corresponding to the data represents the time when the data was last updated.
  • the update time corresponding to the data A is a year a month a hour a minute a second, which means that the data A was updated in a year a month a hour a minute and a second.
  • the target time can be acquired first as the basis for the selection of the update time.
  • the target time can be a time, such as a year, a month, a hour, a minute, and a second, or a time period, such as a year, a month, a hour, a minute, and a second to a year, a month, and a hour. b minutes and b seconds.
  • time itself is an objective and sequential parameter. For example, when a year, a month, a hour, a minute, and a second, the time of a year, a month, a hour, a minute, and a second will not appear again. In this case, as a way to determine the target time, the time at which the previous data detection ends the detection can be used as the starting point to determine the target time, so as to ensure that all updated data can be detected.
  • S120 Acquire first data and second data, where the first data is data whose update time is the target time in the synchronization data stored at the source end, and the second data is the data corresponding to the synchronization data stored at the target end.
  • the update time of is the data of the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is data synchronized from the source end.
  • the source end will synchronize data to the target end, and the data synchronized from the source end to the target end is regarded as synchronized data in this embodiment.
  • data A there are 5 pieces of data stored at the source end, namely data A, data B, data C, data D, and data E.
  • the data D and the data E can be understood as a kind of incremental data, which will then be determined as the synchronized data of the source side and the target side.
  • the update time corresponding to the same data is the same regardless of whether it is on the source side or the target side when a data synchronization is completed.
  • the same data can be understood as data corresponding to the same data identifier. Still taking the aforementioned data D and data E as examples, after the data D and data E are synchronized to the target end, the update time of the data D stored in the target end is the same as the update time of the data D stored in the source end Yes, the update time of the data E stored at the target end is the same as the update time of the data E stored at the source end.
  • the source end again synchronizes the updated data of data D and data E to After the target end, the update time of data D and data E at the target end will still be consistent with the update time of data D and data E at the source end.
  • the update time corresponding to the data D stored in the source is a year a month 10: 0: 0 second
  • the data E corresponding update time is a year a month 11: 0: 0 second.
  • the corresponding update time of data D stored on the target side is also a year a month 10: 0 0 seconds
  • the update time of data E is also a year a month 11: 0: 0 seconds.
  • the update time corresponding to the source end of the data D is changed to a year a month 12: 0: 0 seconds, and the data D is synchronized again After arriving at the target end, the corresponding update time of the data D on the target end will also be changed to 12: 0: 0 seconds of year a and month a.
  • the update time corresponding to the synchronized data stored at the source end can be matched with the target time, and the data whose update time matches the target time can be filtered out as the first data.
  • the update time corresponding to the synchronized data stored at the target end can also be matched with the target time, and data whose update time matches the target time can be filtered out as the second data.
  • S130 Perform the data detection on the first data and the second data.
  • the data detection may be a detection of the consistency of the data.
  • the consistency can be understood as whether the data is the same.
  • the value corresponding to data D at the source end is 0, and the value corresponding to data D at the target end is 1, and then it is determined that the data D at the source end is inconsistent with the data D at the target end.
  • the value of data D at the target end is inconsistent
  • the data detection may be to detect the format of the data to detect whether each piece of data fits the data storage format defined by the site where it is located.
  • the source side defines the synchronization data to be stored in a first format
  • the target side defines the synchronization data to be stored in a second format different from the first format.
  • the same piece of data is stored at the source, it is stored in the first format, and after being synchronized to the target, it is stored in the second format, so that it can adapt to the services carried by different sites. Data reading method.
  • the method for detecting synchronization data provided in this embodiment first detects the corresponding target time by acquiring the data, and then acquires the data whose update time is the target time in the synchronization data stored at the source end as the first data, and Obtain the data whose update time is the target time in the synchronization data stored at the target end as the second data, and then perform the data detection on the first data and the second data.
  • the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
  • a method for detecting synchronization data includes:
  • the amount of data synchronized from the source end to the target end may be relatively large, and in order to reduce the amount of data that needs to be detected each time, data detection can be performed multiple times. In this embodiment, there may be multiple ways to determine how many data detections are specifically required after the data detection starts, and the target time corresponding to each data detection.
  • each cycle can correspond to one data detection
  • the target time corresponding to the current data detection is the cycle length of the corresponding cycle.
  • the period is once every 1 minute
  • the time length of the target time corresponding to each data detection is 1 minute
  • the start time of the target time of the current data detection is corresponding to the previous data detection The end time of the target time.
  • a total time range of data detection may be determined first, and the total time range is divided into multiple sub-time ranges, and each sub-time range corresponds to one data detection.
  • the target time of the current data detection is the corresponding sub-time range.
  • the determined total time range is from 10 o'clock to 11 o'clock, then it is divided into 6 sub-time ranges, that is, from 10 o'clock to 10 o'clock, 10 is divided into the first sub-time range, and 10: 10 to 10: 20 is divided into The second sub-time range, 10:20 to 10:30 is divided into the third sub-time range, 10:30 to 10:40 is divided into the fourth sub-time range, and 10:40 to 10:50 is divided into the fifth A sub-time range, 10:50 to 11 o'clock is the sixth sub-time range.
  • the target time corresponding to the first sub-time range is from 10 to 10:10
  • the target time is from 10:10 to 10 Point 20, and so on.
  • S220 Acquire first data and second data, where the first data is data with the update time corresponding to the target time in the synchronization data stored at the source end, and the second data is the data corresponding to the synchronization data stored at the target end.
  • the update time of is the data of the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is data synchronized from the source end.
  • whether the data included in the first data and the data included in the second data are consistent can be compared one by one. It should be noted that in the process of comparing one by one, it is to compare whether the value of the same piece of data at the source end and the value at the target end are the same, or to judge based on the first data, whether the data in the first data are all Exist in the second data.
  • the first data includes data F, data G, data H, and data I
  • the source end completes the synchronization of data F, data G, data H, and data I
  • the acquired second The data should also be data F, data G, data H, and data I.
  • the value of the data may be tampered with during transmission or changed due to transmission errors. There is also a situation where part of the synchronized data is not successfully synchronized to the target end.
  • the synchronization data stored at the source end is the aforementioned data F, data G, data H, and data I, and the data I among them may not be successfully synchronized to the target end, then when the second data is obtained (and, Data I has not been synchronized before), it is possible that only data F, data G, and data H can be obtained. Therefore, in this way of comparing one by one, you can first compare whether the data included in the second data are all included in the data included in the first data, and whether the data included in the second data are all included in the first data. When the included data is included, it is then specifically compared whether the value of the data included in the first data is consistent with the value of the data included in the second data.
  • the detecting whether the first data is consistent with the second data includes: acquiring a characteristic value of the first data; acquiring a characteristic value of the second data; if the first data The characteristic value of is the same as the characteristic value of the second data, and it is determined that the first data is consistent with the second data.
  • the acquiring the characteristic value of the first data includes: sending a characteristic value calculation instruction to the source end, and the characteristic value calculation instruction carries a trigger to calculate the first Structured query code for data feature value calculation (for example, SQL (Structured Query Language) code); receiving the data returned by the source in response to the feature value calculation instruction as the feature value of the first data.
  • SQL Structured Query Language
  • the obtaining the characteristic value of the second data includes: sending a characteristic value calculation instruction to the target end, and the characteristic value calculation instruction carries a structure that triggers the calculation of the characteristic value calculation of the second data Query code; receiving the data returned by the source in response to the feature value calculation instruction as the feature value of the second data.
  • S240 If it is detected that the first data is inconsistent with the second data, locate and detect data that is inconsistent among the data included in the first data and the data included in the second data.
  • the end time of the target time corresponding to the current data detection is the start time of the target time corresponding to the next data detection.
  • the data included in the first data of the positioning detection data that is inconsistent with the data included in the second data includes:
  • the cut-off time is a time within the current target time. Exemplarily, if the current target time is from 10 o'clock to 11 o'clock, the cut-off time of the first positioning detection can be 10:30, or 10:40.
  • S242 Acquire first to-be-positioned data, where the first to-be-positioned data is data in the first data whose corresponding update time is between the start time of the target time and the end time.
  • S243 Acquire second to-be-positioned data, where the second to-be-positioned data is data in the second data whose corresponding update time is between the start time of the target time and the end time.
  • S244 Detect whether the first data to be positioned and the second data to be positioned are consistent.
  • S245 If the first data to be positioned is inconsistent with the second data to be positioned, enter the next position detection until the data included in the first data and the data included in the second data are positioned. And the cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection.
  • the cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection, which can be understood as the start time of the target time of the current data detection to the next positioning detection
  • the length of time between the cut-off time is half of the time length between the start time of the target time of the current data detection and the cut-off time of the current positioning detection.
  • the target time of the current data detection is from 10 to 11
  • the cut-off time of the current (it can be the first time) positioning detection is 10:30
  • the cut-off time of the next positioning detection It can be 10:15.
  • the step of entering the next data detection based on the result of the positioning detection includes: S246: if the first data to be positioned is consistent with the second data to be positioned, entering The start time of the next data detection and the target time of the next data detection is the end time of the current positioning detection.
  • the next data detection will also be triggered.
  • the cut-off time of each positioning detection in addition to the aforementioned method, that is, the cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection.
  • the cut-off time of each positioning detection can also be dynamically adjusted according to the real-time situation. As a way, the cut-off time of each location detection can be determined according to the amount of data corresponding to the current data detection. In this way, the larger the amount of data corresponding to the corresponding data detection, the cut-off time of each location detection The time is reduced more than the cut-off time of the last positioning detection. Among them, the reduction can be understood as the degree of shortening of the length of time.
  • the aforementioned cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection, which can be understood as the cut-off time of the next positioning detection compared to the previous positioning detection
  • the length of the cut-off time of detection is reduced by half.
  • the cut-off time of the next positioning detection will be earlier in time sequence than the cut-off time of the last positioning detection.
  • the update time of the inconsistent data is from the cut-off time of the current positioning detection to the end of the target time of the current data detection.
  • the positioning detection is started, and the cut-off time of the first positioning detection is 10:30, then the first data to be positioned is the corresponding update in the first data Data from 10:30 to 10:30, the second to-be-positioned data is the data corresponding to the update time of 10:30 to 10:30 in the second data, then if the first to-be-positioned data and the second to-be-positioned data are detected If the bit data is consistent, then the update time of the inconsistent data must be within the time period of 10:30 to 11, but the solution provided in this embodiment will not use the time of 10:30 to 11 Positioning detection is performed in the segment, but directly enters the next data detection with 10:30 as the starting point of time, because inconsistent data in the time period from 10:30 to 11:00 will inevitably be detected in the data with 10:30 as the starting point It is detected in the middle, so there is no need to waste time to perform positioning detection at the time period of 10:30 to 11: 00, which can improve
  • the method for detecting synchronization data can perform data detection on synchronized data multiple times based on the updated data of the data.
  • the corresponding data detection corresponding to the current data can be obtained first.
  • Target time and then obtain the data whose update time is the target time in the synchronization data stored at the source end as the first data, and obtain the data whose update time is the target time in the synchronization data stored at the target end as the first data Second data, and then check the consistency of the first data and the second data.
  • the next data check is started, thereby
  • the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the cost of verification .
  • the first data and the second data to be detected at the current time can be determined based on the update time for the synchronized data, so that it can support the dynamic change of the source or target data, that is, for the data that has been detected in advance.
  • the data can also be checked again immediately.
  • a method for detecting synchronization data includes:
  • S320 Acquire first data and second data, where the first data is data whose update time is the target time in the synchronization data stored at the source end, and the second data is the data corresponding to the synchronization data stored at the target end.
  • the update time of is the data of the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is data synchronized from the source end.
  • S340 If it is detected that the first data is inconsistent with the second data, locate and detect data that is inconsistent among the data included in the first data and the data included in the second data.
  • S350 Acquire data to be modified, where the data to be modified is data that is inconsistent among data included in the first data and data included in the second data.
  • S351 Modify the data to be modified to make the first data consistent with the second data.
  • the method before changing the data to be changed, the method further includes: sending a prompt message for changing the data; if an instruction to allow the data change is received, executing the changing of the data to be changed.
  • the prompt information can be sent to the administrator terminal, and if the administrator terminal detects that the administrator has triggered the operation of agreeing to the data change, it can return the instruction to allow the data change.
  • the next data detection can be performed.
  • the method for detecting synchronization data can perform data detection on synchronized data multiple times based on the updated data of the data.
  • the corresponding data detection corresponding to the current data can be obtained first.
  • Target time and then obtain the data whose update time is the target time in the synchronization data stored at the source end as the first data, and obtain the data whose update time is the target time in the synchronization data stored at the target end as the first data Second data, and then check the consistency of the first data and the second data.
  • the next data check is started, thereby
  • the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the cost of verification .
  • the located data to be changed will be further changed, so that the first data and the second data involved in the current data detection can be changed to be consistent, so as to realize the repaired data synchronization process. mistake.
  • a method for detecting synchronization data includes:
  • S410 Obtain the service currently carried by the source end, where the data generated by the service is stored at the source end.
  • S420 Determine a target time corresponding to data detection based on the service type of the service.
  • the determining the target time corresponding to the data detection based on the service type of the service includes: obtaining the data generation frequency corresponding to the service type; if the data generation frequency is lower than the threshold frequency, obtaining the first time As the target time; if the data generation frequency is not lower than the threshold frequency, acquire the second time as the target time; wherein the time length of the second time is greater than the time length of the first time.
  • the method before obtaining the data generation frequency corresponding to the service type, the method further includes: obtaining and storing the data generation frequency of each service type; and the obtaining the data generation frequency corresponding to the service type, Including: reading the stored data generation frequency of the service type.
  • S430 Acquire first data and second data, where the first data is data with the update time corresponding to the target time in the synchronization data stored at the source end, and the second data is the data corresponding to the synchronization data stored at the target end.
  • the update time of is the data of the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is data synchronized from the source end.
  • S440 Perform the data detection on the first data and the second data.
  • the method for detecting synchronized data can obtain the service currently carried by the source end, and determine the target time corresponding to data detection based on the service type of the service. In each data detection process, First obtain the target time corresponding to the current data detection, and then obtain the data whose update time is the target time in the synchronization data stored at the source end as the first data, and obtain the corresponding data in the synchronization data stored at the target end The data whose update time is the target time is used as the second data, and then the consistency of the first data and the second data is detected, if it is detected that the first data and the second data obtained at the time are consistent , The next data detection starts, so that in the detection process of the synchronized data from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce Repeat the data volume of the test and reduce the cost of verification.
  • the process of detecting the synchronized data can be dynamically adjusted based on the service currently carried by the source at the same time, so as to improve the flexibility of the synchronized data detection process.
  • the data synchronization system includes a detection end, a source end, and a target end.
  • the synchronization data stored at the source end is synchronized.
  • the synchronized data stored by the target end is data synchronized from the source end, and the method includes:
  • the detection terminal acquires data and detects the corresponding target time.
  • S520 Acquire first data and second data, where the first data is data whose corresponding update time is the target time in the synchronization data stored by the source end, and the second data is data stored by the target end.
  • the corresponding update time in the synchronized data is the data of the target time.
  • S530 Perform the data detection on the first data and the second data.
  • the method for detecting synchronization data detects the corresponding target time by first acquiring the data, and then acquiring the data whose update time is the target time in the synchronization data stored at the source end as the first data, and acquiring The data with the update time corresponding to the target time in the synchronization data stored at the target end is used as the second data, and then the data detection is performed on the first data and the second data.
  • the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
  • an apparatus 600 for detecting synchronization data provided by the present application, and the apparatus 600 includes:
  • the time acquiring unit 610 is configured to acquire the target time corresponding to the data detection.
  • the data acquisition unit 620 is configured to acquire first data and second data, where the first data is data whose update time is the target time in the synchronization data stored at the source end, and the second data is data stored at the target end.
  • the corresponding update time in the synchronization data is the target time data, wherein the synchronization data stored by the source end is the data synchronized to the target end, and the synchronization data stored by the target end is the synchronization data from the source end.
  • the data detection unit 630 is configured to perform the data detection on the first data and the second data.
  • the time acquisition unit 610 is specifically configured to acquire the target time corresponding to the current data detection in the current data detection.
  • the data detection unit 630 is specifically configured to detect whether the first data is consistent with the second data; if it is detected that the first data is consistent with the second data, enter the next The data detection.
  • the data detection unit 630 is specifically further configured to locate and detect the data included in the first data and the data included in the second data if it is detected that the first data is inconsistent with the second data. Inconsistent data; based on the result of the positioning detection, proceed to the next data detection.
  • the end time of the target time corresponding to the current data detection is the start time of the target time corresponding to the next data detection.
  • the data detection unit 630 is specifically configured to obtain the characteristic value of the first data; obtain the characteristic value of the second data; if the characteristic value of the first data is the same as the characteristic value of the second data Same, it is determined that the first data is consistent with the second data.
  • the data detection unit 630 is specifically configured to send a feature value calculation instruction to the source end, and the feature value calculation instruction carries a structured query code that triggers the calculation of the first data feature value calculation; and receives the source The data returned by the terminal in response to the characteristic value calculation instruction is used as the characteristic value of the first data.
  • the data detection unit 630 is further specifically configured to send a feature value calculation instruction to the target terminal, and the feature value calculation instruction carries a structured query code that triggers the calculation of the second data feature value calculation; The data returned by the source in response to the feature value calculation instruction is used as the feature value of the second data.
  • the data detection unit 630 is specifically configured to obtain the cut-off time of the current positioning detection; obtain the first to-be-positioned data, where the first to-be-positioned data is the first data, and the corresponding update time is Data between the start time of the target time and the end time; acquire second to-be-positioned data, where the second to-be-positioned data is the second data, and the corresponding update time is at the start of the target time Data between time and the cut-off time; if the first to-be-positioned data is inconsistent with the second to-be-positioned data, enter the next positioning detection until the data included in the first data is positioned Data that is inconsistent with the data included in the second data, and the cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection.
  • the data detection unit 630 is specifically configured to enter the next data detection if the first data to be positioned is consistent with the second data to be positioned, and the next data detection
  • the start time of the target time is the end time of the current positioning detection.
  • the device 600 further includes: a data compensation unit 640, configured to obtain data to be modified, where the data to be modified is the data included in the first data and the first data.
  • the second data includes data that is inconsistent, and the data to be changed is modified to make the first data consistent with the second data.
  • the device 600 may further include: a compensation prompt unit 650, configured to send out prompt information for data modification.
  • the data compensation unit 640 is configured to, if an instruction allowing data modification is received, execute the modification to the data to be modified.
  • the time obtaining unit 610 is specifically configured to obtain the service currently carried by the source end, wherein the data generated by the service is stored at the source end; the data detection is determined based on the service type of the service The corresponding target time.
  • the time obtaining unit 610 is specifically configured to obtain the data generation frequency corresponding to the service type; if the data generation frequency is lower than the threshold frequency, obtain the first time as the target time; if the data generation frequency is not low At the threshold frequency, a second time is acquired as the target time; wherein the time length of the second time is greater than the time length of the first time.
  • the device further includes a data generation frequency obtaining unit 611, configured to obtain and store the data generation frequency of each service type. In this manner, the time obtaining unit 610 is specifically configured to read the stored data generation frequency of the service type.
  • the device for detecting synchronization data detects the corresponding target time by acquiring the data first, and then acquires the data whose update time is the target time in the synchronization data stored at the source end as the first data, and acquires The data with the update time corresponding to the target time in the synchronization data stored at the target end is used as the second data, and then the data detection is performed on the first data and the second data.
  • the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
  • an embodiment of the present application also provides another electronic device 200 including a processor 102 that can execute the foregoing short message pushing method.
  • the electronic device 200 further includes a memory 104 and a network module 106.
  • the memory 104 stores a program that can execute the content in the foregoing embodiment, and the processor 102 can execute the program stored in the memory 104.
  • the processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 200, by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and calling data stored in the memory 104 , Perform various functions of the electronic device 200 and process data.
  • the processor 102 may use at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PDA Programmable Logic Array
  • the processor 102 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 102, but may be implemented by a communication chip alone.
  • the memory 104 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 104 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 104 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc.
  • the data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
  • the network module 106 is used to receive and send electromagnetic waves, and realize the mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, such as with an audio playback device.
  • the network module 106 may include various existing circuit elements for performing these functions, for example, an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a subscriber identity module (SIM) card, a memory, etc. .
  • SIM subscriber identity module
  • the network module 106 can communicate with various networks, such as the Internet, an intranet, and a wireless network, or communicate with other devices through a wireless network.
  • the aforementioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network.
  • the network module 106 can exchange information with the base station.
  • the electronic device 200 may be a server that executes the foregoing method embodiments.
  • FIG. 11 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 1100 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 1100 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 1100 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 1100 has a storage space for executing the program code 810 of any method step in the above-mentioned method. These program codes can be read from or written into one or more computer program products.
  • the program code 1110 may be compressed in an appropriate form, for example.
  • the method, device, server, and data synchronization system for detecting synchronized data detect the corresponding target time by first obtaining the data, and then obtaining the corresponding update time in the synchronized data stored at the source end.
  • the data of the target time is used as the first data
  • the data corresponding to the update time of the target time in the synchronization data stored on the target side is obtained as the second data, and then the data of the first data and the second data are obtained Perform the data detection.
  • the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.

Abstract

Disclosed in the embodiments of the present application are a method and apparatus for detecting synchronized data, a server, and a data synchronization system. The method comprises: obtaining target time corresponding to data detection; obtaining first data and second data, the first data being the data in synchronized data stored in a source end to which the update time corresponding is the target time, and the second data being the data in synchronized data stored in a target end to which the update time corresponding is the target time, wherein the synchronized data stored in the source end is the data synchronized to the target end, and the synchronized data stored in the target end is the data synchronized from the source end; and performing the data detection on the first data and the second data. According to the method, first data and second data serving as portions to be detected can be determined on the basis of update time in a detection process of synchronized data that is synchronized from the source end to the target end, so as to reduce the amount of repeatedly detected data and reduce the cost of verification.

Description

检测同步数据的方法、装置、服务器以及数据同步系统Method, device, server and data synchronization system for detecting synchronization data 技术领域Technical field
本申请涉及数据同步领域,更具体地,涉及一种检测同步数据的方法、装置、服务器以及数据同步系统。This application relates to the field of data synchronization, and more specifically, to a method, device, server, and data synchronization system for detecting synchronized data.
背景技术Background technique
出于数据安全备份或提高各地用户的访问速度等目的,一些互联网站会在不同地点部署多个站点。其中,每个站点为一台服务器或者由多台服务器所组成的集群。这些站点之间会保持数据同步,以使得其中所存储的部分数据内容或者全部数据内容一致。但是,在该数据同步中,所同步数据的一致性检测方式还有待提升。For the purpose of data security backup or to improve the access speed of users everywhere, some Internet sites will deploy multiple sites in different locations. Among them, each site is a server or a cluster composed of multiple servers. These sites will maintain data synchronization, so that part of the data content or all the data content stored therein are consistent. However, in this data synchronization, the consistency detection method of the synchronized data needs to be improved.
发明内容Summary of the invention
鉴于上述问题,本申请提出了一种检测同步数据的方法、装置、服务器以及数据同步系统,以改善上述问题。In view of the above-mentioned problems, this application proposes a method, device, server, and data synchronization system for detecting synchronization data to improve the above-mentioned problems.
第一方面,本申请提供了一种检测同步数据的方法,所述方法包括:获取数据检测对应的目标时间;获取第一数据以及第二数据,所述第一数据为源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为目标端存储的同步数据中对应的更新时间为所述目标时间的数据,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据;对所述第一数据以及所述第二数据的进行所述数据检测。In a first aspect, the present application provides a method for detecting synchronization data, the method includes: obtaining data and detecting a corresponding target time; obtaining first data and second data, the first data being synchronized data stored at the source end The corresponding update time in the target time is the data of the target time, and the second data is the data of the synchronization data stored at the target end and the corresponding update time is the target time, wherein the synchronization data stored in the source end is the synchronization data. For the data to the target end, the synchronization data stored by the target end is data synchronized from the source end; the data detection is performed on the first data and the second data.
第二方面,本申请提供了一种检测同步数据的方法,应用于数据同步系统,所述数据同步系统包括检测端、源端以及目标端,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据,所述方法包括:所述检测端获取数据检测对应的目标时间;获取第一数据以及第二数据,所述第一数据为所述源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为所述目标端存储的同步数据中对应的更新时间为所述目标时间的数据;对所述第一数据以及所述第二数据的进行所述数据检测。In the second aspect, the present application provides a method for detecting synchronization data, which is applied to a data synchronization system. The data synchronization system includes a detection end, a source end, and a target end. The synchronization data stored at the source end is synchronized to The data of the target end, the synchronized data stored by the target end is data synchronized from the source end, and the method includes: the detection end obtains the data and detects the corresponding target time; obtains the first data and the second data, The first data is data in which the update time corresponding to the target time in the synchronization data stored at the source end is the target time, and the second data is the data in which the update time corresponding to the target time in the synchronization data stored at the target end is the target time Time data; the data detection is performed on the first data and the second data.
第三方面,本申请提供了一种检测同步数据的装置,所述装置包括:时间获取单元,用于获取数据检测对应的目标时间;数据获取单元,用于获取第一数据以及第二数据,所述第一数据为源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为目标端存储的同步数据中对应的更新时间为所述目标时间的数据,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据;数据检测单 元,用于对所述第一数据以及所述第二数据的进行所述数据检测。In a third aspect, the present application provides an apparatus for detecting synchronization data. The apparatus includes: a time obtaining unit for obtaining a target time corresponding to the data detection; a data obtaining unit for obtaining first data and second data, The first data is data whose update time is the target time in the synchronization data stored at the source end, and the second data is data whose update time is the target time in the synchronization data stored at the target end, Wherein, the synchronization data stored by the source end is data synchronized to the target end, and the synchronization data stored by the target end is data synchronized from the source end; the data detection unit is configured to compare the first data and Perform the data detection on the second data.
第四方面,本申请提供了一种数据同步系统,所述数据同步系统包括检测端、源端以及目标端,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据;所述检测端,用于获取数据检测对应的目标时间;获取第一数据以及第二数据,所述第一数据为所述源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为所述目标端存储的同步数据中对应的更新时间为所述目标时间的数据;对所述第一数据以及所述第二数据的进行所述数据检测。In a fourth aspect, the present application provides a data synchronization system. The data synchronization system includes a detection end, a source end, and a target end. The synchronization data stored by the source end is data synchronized to the target end. The synchronization data stored by the target end is the data synchronized from the source end; the detection end is used to obtain the target time corresponding to the data detection; obtain the first data and the second data, and the first data is the source end The corresponding update time in the stored synchronization data is the data at the target time, and the second data is the data at the target time corresponding to the update time in the synchronization data stored at the target end; for the first data And performing the data detection on the second data.
第五方面,本申请提供了一种服务器,包括一个或多个处理器以及存储器;一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述的方法。In a fifth aspect, the present application provides a server including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, so The one or more programs are configured to perform the methods described above.
第六方面,本申请提供了一种具有处理器可执行的程序代码的计算机可读存储介质,所述程序代码使所述处理器执行上述的方法。In a sixth aspect, the present application provides a computer-readable storage medium having program code executable by a processor, the program code causing the processor to execute the above-mentioned method.
本申请提供的一种检测同步数据的方法、装置、服务器以及数据同步系统,通过先获取数据检测对应的目标时间,进而再获取源端存储的同步数据中对应的更新时间为所述目标时间的数据作为第一数据,以及获取目标端存储的同步数据中对应的更新时间为所述目标时间的数据作为第二数据,然后对所述第一数据以及所述第二数据的进行所述数据检测。从而实现了在对从源端同步到目标端的同步数据的检测过程中,可以基于更新时间来确定作为待检测部分的第一数据和第二数据,以便减少重复进行检测的数据量并降低校验成本。The present application provides a method, device, server, and data synchronization system for detecting synchronized data. The corresponding target time is detected by first obtaining the data, and then the corresponding update time in the synchronized data stored at the source is obtained as the target time. Data is used as the first data, and the data whose update time is the target time corresponding to the synchronization data stored on the target side is obtained as the second data, and then the data detection is performed on the first data and the second data . Thus, in the detection process of the synchronized data synchronized from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了本申请提出的一种检测同步数据的方法的应用场景示意图;FIG. 1 shows a schematic diagram of an application scenario of a method for detecting synchronized data proposed in this application;
图2示出了本申请提出的一种检测同步数据的方法的流程图;Figure 2 shows a flow chart of a method for detecting synchronization data proposed by the present application;
图3示出了本申请提出的另一种检测同步数据的方法的流程图;Fig. 3 shows a flowchart of another method for detecting synchronization data proposed by the present application;
图4示出了本申请提出的一种定位检测的流程图;Fig. 4 shows a flow chart of a positioning detection proposed in this application;
图5示出了本申请提出的再一种检测同步数据的方法的流程图;FIG. 5 shows a flowchart of another method for detecting synchronization data proposed by the present application;
图6示出了本申请提出的又一种检测同步数据的方法的流程图;Fig. 6 shows a flowchart of another method for detecting synchronization data proposed by the present application;
图7示出了本申请提出的又一种检测同步数据的方法的流程图;FIG. 7 shows a flowchart of another method for detecting synchronization data proposed by the present application;
图8示出了本申请提出的一种检测同步数据的装置的结构框图;FIG. 8 shows a structural block diagram of a device for detecting synchronization data proposed by this application;
图9示出了本申请提出的另一种检测同步数据的装置的结构框图;FIG. 9 shows a structural block diagram of another device for detecting synchronization data proposed by this application;
图10示出了本申请提出的一种电子设备的结构框图。Fig. 10 shows a structural block diagram of an electronic device proposed in this application.
图11是本申请实施例的用于保存或者携带实现根据本申请实施例的检测同步数据的方法的程序代码的存储单元。FIG. 11 is a storage unit for storing or carrying program code for implementing the method for detecting synchronization data according to the embodiment of the present application according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
通常互联网公司会部署多个分布在不同区域站点,有时为了保证所部署的不同站点之间的数据相同或者站点中的部分数据相同,会在不同的站点之间进行数据同步。例如,为了便于用户在接入到每个站点时都能进行用户登录,不同的站点之间会同步所有用户的用户名和密码等登录信息。Generally, Internet companies deploy multiple sites distributed in different regions. Sometimes, in order to ensure that the data between the deployed sites is the same or part of the data in the site is the same, data synchronization is performed between different sites. For example, in order to facilitate user login when accessing each site, login information such as user names and passwords of all users will be synchronized between different sites.
通常一个站点是建设在一个机房之中的,所以当在不同的站点之间进行数据同步时,也可以看作是在不同的机房之间进行的跨机房数据同步。其中,一个站点可以理解为一端,例如,在数据同步过程中发起同步的站点可以被理解为源端,而接收同步数据的站点可以被理解为目标端。在进行跨机房数据同步的情况下,为了便于检测所同步数据是否会有错误,可以对所同步数据进行检测,例如,检测目标端中存储的同步数据是否与源端中的数据一致。发明人发现,在相关的同步数据的检测过程中,还有许多需要改善的问题。Usually a site is built in a computer room, so when data is synchronized between different sites, it can also be regarded as cross-computer room data synchronization between different computer rooms. Among them, a site can be understood as one end. For example, the site that initiates synchronization during the data synchronization process can be understood as the source end, and the site receiving the synchronized data can be understood as the target end. In the case of data synchronization across computer rooms, in order to facilitate the detection of whether the synchronized data has errors, the synchronized data may be detected, for example, whether the synchronized data stored in the target end is consistent with the data in the source end. The inventor found that there are still many problems that need to be improved in the detection process of related synchronization data.
在一种相关的同步数据的检测过程中,每次都会一次性的对所有的同步数据进行检测,进而造成每次所需检测的数据量较大。并且,每次都会一次性的对所有的同步数据进行检测,还会对于一些并未发生更新的数据的重复检测。例如,在源端存储有100条数据,而这100条数据都会作为同步数据同步到目标端,进而目标端存储的同步数据就会包括该100条数据。可选的,这100条数据可能就会只有10条数据会较大频率的发生更新。但是,在每次的同步数据的检测过程中,不仅会检测该10条较大频率的发生更新的数据,还会对另外的90条数据也进行检测,进而造成对于一些并未发生更新的数据的重复检测。In a related synchronization data detection process, all the synchronization data are detected at one time each time, which in turn causes a large amount of data to be detected each time. In addition, all the synchronized data will be checked at one time each time, and some data that has not been updated will be checked repeatedly. For example, there are 100 pieces of data stored on the source end, and these 100 pieces of data will be synchronized to the target end as synchronization data, and the synchronized data stored on the target end will include the 100 pieces of data. Optionally, only 10 of these 100 pieces of data may be updated more frequently. However, in each detection process of synchronized data, not only the 10 data that has been updated with a higher frequency will be detected, but also another 90 pieces of data will be detected, resulting in some data that has not been updated. Repeated detection.
在另一种相关的同步数据的检测过程中,在源端存储有100条数据,并且会逐条对该100条数据进行检测,在这种情况下,对于在先已经检测的数据,在后续对其他数据进行检测的过程中,该在先已经检测的数据可能又回发生更新,但是对于该又发生更新的在先已经检测的数据,无法即时的进行检测,造成检测结果与实际情况可能会有不一致。In another related synchronization data detection process, 100 pieces of data are stored at the source, and the 100 pieces of data will be detected one by one. In this case, the data that has been detected before will be checked later. In the process of testing other data, the previously tested data may be updated again, but for the previously tested data that has been updated again, the test cannot be performed immediately, which may cause the test results to be different from the actual situation. Inconsistent.
因此,为了改善上述问题,发明人提出了本申请中的检测同步数据的方法、装置、服务器以及数据同步系统,本申请提供的方法至少可以通过先获取数据检测对应的目标时间,进而再获取源端存储的同步数据中对应的更新时间为所述目标时间的数据作为第一数据,以及获取目标端存储的同步数据中对应的更新时间为所述目标时间的数据作为第二数据,然后对所述第一数据以及所述第二数据的进行所述数据检测。从而实现了在对从源端同步到目标端的同步数据的检测过程中,可以基于更新时间来确定作为待检测部分的第一数据和第二数据,以便减少重复进行检测的数据量并降低校验成本。Therefore, in order to improve the above problems, the inventor proposes the method, device, server, and data synchronization system for detecting synchronization data in this application. The method provided by this application can at least detect the corresponding target time by acquiring the data first, and then acquire the source. The data corresponding to the update time of the target time in the synchronization data stored at the target end is used as the first data, and the data corresponding to the update time of the target time stored in the synchronization data is obtained as the second data, and then the data The data detection is performed on the first data and the second data. Thus, in the detection process of the synchronized data synchronized from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
下面先对本申请提供的检测同步数据的方法、装置所运行于的一种数据同步系统的环境进行介绍。The following first introduces the environment of a data synchronization system in which the method and device for detecting synchronization data provided by the present application operate.
如图1所示,图1所示的跨机房数据同步系统100中包括第一站点110、 第二站点120以及检测端130。其中,第一站点110、第二站点120以及检测端130相互之间通过网络140进行数据交互。其中,第一站点110部署在第一机房111中,而第二站点120部署在第二机房121中。需要说明的是,在本申请中第一站点110和第二站点120都可以分别作为数据同步过程中源端或者目标端。例如,若第一站点110向第二站点120同步数据,第一站点110即可被理解为源端,而第二站点120可以被理解为目标端。再例如,若第二站点120向第一站点110同步数据,第二站点120即可被理解为源端,而第一站点110可以被理解为目标端。As shown in FIG. 1, the cross-computer room data synchronization system 100 shown in FIG. 1 includes a first site 110, a second site 120 and a detection terminal 130. Among them, the first site 110, the second site 120, and the detection terminal 130 exchange data with each other through the network 140. Among them, the first site 110 is deployed in the first computer room 111, and the second site 120 is deployed in the second computer room 121. It should be noted that in the present application, both the first site 110 and the second site 120 can be respectively used as the source end or the target end in the data synchronization process. For example, if the first site 110 synchronizes data with the second site 120, the first site 110 can be understood as the source end, and the second site 120 can be understood as the target end. For another example, if the second site 120 synchronizes data with the first site 110, the second site 120 can be understood as the source end, and the first site 110 can be understood as the target end.
下面将结合附图具体描述本申请的各实施例。Hereinafter, each embodiment of the present application will be described in detail with reference to the accompanying drawings.
请参阅图2,本申请提供的一种检测同步数据的方法,所述方法包括:Please refer to FIG. 2, a method for detecting synchronization data provided by the present application, the method includes:
S110:获取数据检测对应的目标时间。S110: Obtain the target time corresponding to the data detection.
需要说明的是,在本实施例中,无论是源端还是目标端中存储的数据都会对应配置更新时间这个参数。数据对应的更新时间表征的是数据最近一次被更新的时间。示例性的,数据A对应的更新时间为a年a月a时a分a秒,那么也就意味着数据A是在a年a月a时a分a秒被更新的。It should be noted that, in this embodiment, the data stored in either the source end or the target end will correspond to the configuration update time parameter. The update time corresponding to the data represents the time when the data was last updated. Exemplarily, the update time corresponding to the data A is a year a month a hour a minute a second, which means that the data A was updated in a year a month a hour a minute and a second.
在数据检测开始时,可以先获取目标时间作为更新时间选择的基准。在本实施例中,目标时间可以为一个时刻,例如a年a月a时a分a秒,也可以为一个时间段,例如a年a月a时a分a秒到a年a月a时b分b秒。At the beginning of the data detection, the target time can be acquired first as the basis for the selection of the update time. In this embodiment, the target time can be a time, such as a year, a month, a hour, a minute, and a second, or a time period, such as a year, a month, a hour, a minute, and a second to a year, a month, and a hour. b minutes and b seconds.
在本实施例中可以有多种的确定目标时间的方式。首先需要说明的是,时间本身是一个客观而具有顺序性的参数。例如,当在a年a月a时a分a秒之后,不会再次出现a年a月a时a分a秒这个时间。在这种情况下,作为一种确定目标时间的方式,可以以前一次数据检测所结束检测的时刻为起点,确定目标时间,以便可以保证可以对所有的具有更新的数据都进行检测。In this embodiment, there can be multiple ways to determine the target time. The first thing to note is that time itself is an objective and sequential parameter. For example, when a year, a month, a hour, a minute, and a second, the time of a year, a month, a hour, a minute, and a second will not appear again. In this case, as a way to determine the target time, the time at which the previous data detection ends the detection can be used as the starting point to determine the target time, so as to ensure that all updated data can be detected.
S120:获取第一数据以及第二数据,所述第一数据为源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为目标端存储的同步数据中对应的更新时间为所述目标时间的数据,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据。S120: Acquire first data and second data, where the first data is data whose update time is the target time in the synchronization data stored at the source end, and the second data is the data corresponding to the synchronization data stored at the target end. The update time of is the data of the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is data synchronized from the source end.
需要说明的是,源端会向目标端同步数据,而从源端同步到目标端的数据在本实施例中被当做同步数据。例如,在源端存储有5条数据分别是数据A、数据B、数据C、数据D以及数据E。而其中源端在将数据D以及数据E同步到目标端的情况下,那么数据数据D以及数据E就可以被理解为一种增量数据,进而会被确定为源端以及目标端的同步数据。It should be noted that the source end will synchronize data to the target end, and the data synchronized from the source end to the target end is regarded as synchronized data in this embodiment. For example, there are 5 pieces of data stored at the source end, namely data A, data B, data C, data D, and data E. In the case where the source side synchronizes the data D and the data E to the target side, the data D and the data E can be understood as a kind of incremental data, which will then be determined as the synchronized data of the source side and the target side.
并且,还需要说明的是,对于同一数据无论是在源端还是在目标端在完成一次数据同步的情况下所对应的更新时间是相同的。该同一数据可以理解为对应于同一数据标识的数据。还是以前述的数据D以及数据E为例,在数据D以及数据E被同步到目标端以后,目标端所存储的数据D的更新时间与源端所存储的所述数据D的更新时间是相同的,目标端所存储的数据E的更新时间与源端所存储的所述数据E的更新时间是相同的。并且,在数据D和数据E被同步到目标端以后,即使源端的数据D和数据E再次发生更新而造成对应的更新时 间变更,在源端再次将数据D和数据E更新后的数据同步到目标端后,处于目标端的数据D和数据E的更新时间依然会与源端的数据D和数据E的更新时间保持一致。In addition, it should be noted that the update time corresponding to the same data is the same regardless of whether it is on the source side or the target side when a data synchronization is completed. The same data can be understood as data corresponding to the same data identifier. Still taking the aforementioned data D and data E as examples, after the data D and data E are synchronized to the target end, the update time of the data D stored in the target end is the same as the update time of the data D stored in the source end Yes, the update time of the data E stored at the target end is the same as the update time of the data E stored at the source end. Moreover, after data D and data E are synchronized to the target end, even if the source end data D and data E are updated again and the corresponding update time is changed, the source end again synchronizes the updated data of data D and data E to After the target end, the update time of data D and data E at the target end will still be consistent with the update time of data D and data E at the source end.
例如,源端所存储的数据D对应的更新时间为a年a月10时0分0秒,数据E对应的更新时间为a年a月11时0分0秒。在数据D和数据E还未被同步到目标端的情况下,源端首次对数据D和数据E进行同步后,目标端所存储的数据D对应的更新时间也为a年a月10时0分0秒,以及数据E的更新时间也为a年a月11时0分0秒。之后,若源端的数据D再次被更新,且更新时间发生在12时,那么数据D在源端对应的更新时间则变更为a年a月12时0分0秒,而在数据D再次被同步到目标端之后,数据D在目标端对应的更新时间也会变更为a年a月12时0分0秒。For example, the update time corresponding to the data D stored in the source is a year a month 10: 0: 0 second, and the data E corresponding update time is a year a month 11: 0: 0 second. In the case that data D and data E have not been synchronized to the target side, after the source side synchronizes data D and data E for the first time, the corresponding update time of data D stored on the target side is also a year a month 10: 0 0 seconds, and the update time of data E is also a year a month 11: 0: 0 seconds. After that, if the source data D is updated again, and the update time occurs at 12 o'clock, then the update time corresponding to the source end of the data D is changed to a year a month 12: 0: 0 seconds, and the data D is synchronized again After arriving at the target end, the corresponding update time of the data D on the target end will also be changed to 12: 0: 0 seconds of year a and month a.
在获取到目标时间后,可以将源端存储的同步数据对应的更新时间与该目标时间进行匹配,进而筛选出更新时间为该目标时间匹配的数据作为第一数据。类似的,可以也将目标端存储的同步数据对应的更新时间与该目标时间进行匹配,进而筛选出更新时间为该目标时间匹配的数据作为第二数据。After the target time is obtained, the update time corresponding to the synchronized data stored at the source end can be matched with the target time, and the data whose update time matches the target time can be filtered out as the first data. Similarly, the update time corresponding to the synchronized data stored at the target end can also be matched with the target time, and data whose update time matches the target time can be filtered out as the second data.
S130:对所述第一数据以及所述第二数据的进行所述数据检测。S130: Perform the data detection on the first data and the second data.
作为一种方式,该数据检测可以为数据的一致性的检测。该一致性可以理解为数据是否相同。示例性的,对于数据D在源端对应的值为0,而在数据D在目标端对应的值为1,进而就确定源端的数据D和目标端的数据D不一致,当数据D在目标端的值也为0时,进而就确定源端的数据D和目标端的数据D一致。As a way, the data detection may be a detection of the consistency of the data. The consistency can be understood as whether the data is the same. Exemplarily, the value corresponding to data D at the source end is 0, and the value corresponding to data D at the target end is 1, and then it is determined that the data D at the source end is inconsistent with the data D at the target end. When the value of data D at the target end is inconsistent When it is also 0, it is determined that the data D at the source end is consistent with the data D at the target end.
作为另外一种方式,该数据检测可以是对数据的格式进行检测,以检测每条数据是否适配所在站点所定义的数据存储格式。示例性的,源端定义有同步数据以第一格式进行存储,而目标端定义同步数据以不同于该第一格式的第二格式进行存储。也就是说,对于同一条数据存储在源端时,是以第一格式进行存储的,而在被同步到目标端之后是以第二格式进行存储的,以便可以适应不同站点各自所承载业务的数据读取方式。As another way, the data detection may be to detect the format of the data to detect whether each piece of data fits the data storage format defined by the site where it is located. Exemplarily, the source side defines the synchronization data to be stored in a first format, and the target side defines the synchronization data to be stored in a second format different from the first format. In other words, when the same piece of data is stored at the source, it is stored in the first format, and after being synchronized to the target, it is stored in the second format, so that it can adapt to the services carried by different sites. Data reading method.
本实施例提供的一种检测同步数据的方法,通过先获取数据检测对应的目标时间,进而再获取源端存储的同步数据中对应的更新时间为所述目标时间的数据作为第一数据,以及获取目标端存储的同步数据中对应的更新时间为所述目标时间的数据作为第二数据,然后对所述第一数据以及所述第二数据的进行所述数据检测。从而实现了在对从源端同步到目标端的同步数据的检测过程中,可以基于更新时间来确定作为待检测部分的第一数据和第二数据,以便减少重复进行检测的数据量并降低校验成本。The method for detecting synchronization data provided in this embodiment first detects the corresponding target time by acquiring the data, and then acquires the data whose update time is the target time in the synchronization data stored at the source end as the first data, and Obtain the data whose update time is the target time in the synchronization data stored at the target end as the second data, and then perform the data detection on the first data and the second data. Thus, in the detection process of the synchronized data synchronized from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
请参阅图3,本申请提供的一种检测同步数据的方法,所述方法包括:Please refer to FIG. 3, a method for detecting synchronization data provided by the present application, the method includes:
S210:在当次的数据检测中,获取所述当次的数据检测对应的目标时间。S210: In the current data detection, obtain the target time corresponding to the current data detection.
需要说明的是,在从源端同步到目标端的同步数据可能数据量会较大,而为了减小每次需要检测的数据量,可以分多次进行数据检测。在本实施例中,可以有多种确定在数据检测开始后具体需要进行几次数据检测,以及每次数据检测对应的目标时间的方式。It should be noted that the amount of data synchronized from the source end to the target end may be relatively large, and in order to reduce the amount of data that needs to be detected each time, data detection can be performed multiple times. In this embodiment, there may be multiple ways to determine how many data detections are specifically required after the data detection starts, and the target time corresponding to each data detection.
作为一种方式,可以在第一次数据检测开始以后按照周期性的方式来进行数据检测。在这种方式下,每一个周期就可以对应一次数据检测,而当次的数据检测对应的目标时间就为对应周期的周期长度。示例性的,若周期为每1分钟一次,对于每一次数据检测对应的目标时间的时间长度就为1分钟,且当次的数据检测的目标时间的开始时刻即为前一次的数据检测对应的目标时间的结束时刻。As a way, data detection can be performed in a periodic manner after the first data detection starts. In this way, each cycle can correspond to one data detection, and the target time corresponding to the current data detection is the cycle length of the corresponding cycle. Exemplarily, if the period is once every 1 minute, the time length of the target time corresponding to each data detection is 1 minute, and the start time of the target time of the current data detection is corresponding to the previous data detection The end time of the target time.
作为再一种方式,可以先确定一个数据检测的总时间范围,而将该总时间范围划分为多个子时间范围,该每个子时间范围对应一次数据检测。在这种方式下,当次的数据检测的目标时间即为对应的子时间范围。示例性的,若确定的总时间范围为10点到11点,然后划分6个子时间范围,即10点到10点10分为第一个子时间范围,10点10分到10点20分为第二个子时间范围,10点20分到10点30分为第三个子时间范围,10点30分到10点40分为第四个子时间范围,10点40分到10点50分为第五个子时间范围,10点50分到11点为第六个子时间范围。在这种划分方式下,对应于第一个子时间范围确定的目标时间即为10点到10点10分,而对应于第二个子时间范围,定的目标时间即为10点10分到10点20分,以此类推。As another way, a total time range of data detection may be determined first, and the total time range is divided into multiple sub-time ranges, and each sub-time range corresponds to one data detection. In this way, the target time of the current data detection is the corresponding sub-time range. Exemplarily, if the determined total time range is from 10 o'clock to 11 o'clock, then it is divided into 6 sub-time ranges, that is, from 10 o'clock to 10 o'clock, 10 is divided into the first sub-time range, and 10: 10 to 10: 20 is divided into The second sub-time range, 10:20 to 10:30 is divided into the third sub-time range, 10:30 to 10:40 is divided into the fourth sub-time range, and 10:40 to 10:50 is divided into the fifth A sub-time range, 10:50 to 11 o'clock is the sixth sub-time range. In this way of division, the target time corresponding to the first sub-time range is from 10 to 10:10, and corresponding to the second sub-time range, the target time is from 10:10 to 10 Point 20, and so on.
S220:获取第一数据以及第二数据,所述第一数据为源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为目标端存储的同步数据中对应的更新时间为所述目标时间的数据,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据。S220: Acquire first data and second data, where the first data is data with the update time corresponding to the target time in the synchronization data stored at the source end, and the second data is the data corresponding to the synchronization data stored at the target end. The update time of is the data of the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is data synchronized from the source end.
S230:检测所述第一数据与所述第二数据是否一致。S230: Detect whether the first data is consistent with the second data.
S231:若检测到所述第一数据与所述第二数据一致,进入到下一次的所述数据检测。S231: If it is detected that the first data is consistent with the second data, proceed to the next data detection.
在本实施例中,有多种方式可以检测第一数据和第二数据是否一致。In this embodiment, there are multiple ways to detect whether the first data and the second data are consistent.
作为一种方式,可以逐一比对第一数据包括的数据和第二数据包括的数据是否一致。需要说明的是,在进行逐一比对的过程中,是比较的同一条数据在源端的值和在目标端的值是否一致,或者说以第一数据为基础判断,第一数据中的数据是否都存在于第二数据中。As a way, whether the data included in the first data and the data included in the second data are consistent can be compared one by one. It should be noted that in the process of comparing one by one, it is to compare whether the value of the same piece of data at the source end and the value at the target end are the same, or to judge based on the first data, whether the data in the first data are all Exist in the second data.
示例性的,若第一数据包括数据F、数据G、数据H以及数据I,那么在源端完成对于数据F、数据G、数据H以及数据I的同步的情况下,所获取到的第二数据也应该为数据F、数据G、数据H以及数据I,但是可能因为网络的原因,会造成数据的值在传输途中被篡改或者因为传输错误而造成变更。而还有一种情况是,对于部分被同步的数据并未成功的被同步到目标端。例如,源端存储的同步数据为前述的数据F、数据G、数据H以及数据I,而其中的数据I可能并未成功的被同步到目标端,那么在获取到第二数据时(并且,数据I之前还未被同步过),可能仅能获取到数据F、数据G、数据H。因此,在逐一比对的这种方式中,可以先逐一比对第二数据所包括的数据是否均存在于第一数据包括的数据中,在第二数据所包括的数据均存在于第一数据包括的数据中时,然后再具体比对第一数据包括的数据中值与第二数据包括的数据值的是否一致。Exemplarily, if the first data includes data F, data G, data H, and data I, then when the source end completes the synchronization of data F, data G, data H, and data I, the acquired second The data should also be data F, data G, data H, and data I. However, due to network reasons, the value of the data may be tampered with during transmission or changed due to transmission errors. There is also a situation where part of the synchronized data is not successfully synchronized to the target end. For example, the synchronization data stored at the source end is the aforementioned data F, data G, data H, and data I, and the data I among them may not be successfully synchronized to the target end, then when the second data is obtained (and, Data I has not been synchronized before), it is possible that only data F, data G, and data H can be obtained. Therefore, in this way of comparing one by one, you can first compare whether the data included in the second data are all included in the data included in the first data, and whether the data included in the second data are all included in the first data. When the included data is included, it is then specifically compared whether the value of the data included in the first data is consistent with the value of the data included in the second data.
作为一种方式,所述检测所述第一数据与所述第二数据是否一致,包括:获取所述第一数据的特征值;获取所述第二数据的特征值;若所述第一数据的特征值与所述第二数据的特征值相同,确定所述第一数据与所述第二数据一致。在这种方式下,可选的,所述获取所述第一数据的特征值,包括:向所述源端发送特征值计算指令,所述特征值计算指令中携带有触发计算所述第一数据特征值计算的结构化查询代码(例如,SQL(Structured Query Language)代码);接收所述源端响应所述特征值计算指令返回的数据作为所述第一数据的特征值。As a way, the detecting whether the first data is consistent with the second data includes: acquiring a characteristic value of the first data; acquiring a characteristic value of the second data; if the first data The characteristic value of is the same as the characteristic value of the second data, and it is determined that the first data is consistent with the second data. In this manner, optionally, the acquiring the characteristic value of the first data includes: sending a characteristic value calculation instruction to the source end, and the characteristic value calculation instruction carries a trigger to calculate the first Structured query code for data feature value calculation (for example, SQL (Structured Query Language) code); receiving the data returned by the source in response to the feature value calculation instruction as the feature value of the first data.
可选的,所述获取所述第二数据的特征值,包括:向所述目标端发送特征值计算指令,所述特征值计算指令中携带有触发计算所述第二数据特征值计算的结构化查询代码;接收所述源端响应所述特征值计算指令返回的数据作为所述第二数据的特征值。Optionally, the obtaining the characteristic value of the second data includes: sending a characteristic value calculation instruction to the target end, and the characteristic value calculation instruction carries a structure that triggers the calculation of the characteristic value calculation of the second data Query code; receiving the data returned by the source in response to the feature value calculation instruction as the feature value of the second data.
S240:若检测到所述第一数据与所述第二数据不一致,定位检测所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据。S240: If it is detected that the first data is inconsistent with the second data, locate and detect data that is inconsistent among the data included in the first data and the data included in the second data.
S250:基于所述定位检测的结果,进入到下一次的所述数据检测。S250: Based on the result of the positioning detection, proceed to the next data detection.
需要说明的是,当次的所述数据检测对应的目标时间的结束时刻,为下一次的所述数据检测对应的目标时间的开始时刻。It should be noted that the end time of the target time corresponding to the current data detection is the start time of the target time corresponding to the next data detection.
作为一种方式,如图4所示,所述定位检测所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据,包括:As a manner, as shown in FIG. 4, the data included in the first data of the positioning detection data that is inconsistent with the data included in the second data includes:
S241:获取当次定位检测的截止时刻。S241: Acquire the cut-off time of the current positioning detection.
需要说明的是,截止时刻为处于当次的目标时间内的一个时刻。示例性的,若当次的目标时间为10点到11点,那么第一次定位检测的截止时刻就可以为10点30分,也可以为10点40分。It should be noted that the cut-off time is a time within the current target time. Exemplarily, if the current target time is from 10 o'clock to 11 o'clock, the cut-off time of the first positioning detection can be 10:30, or 10:40.
S242:获取第一待定位数据,所述第一待定位数据为所述第一数据中,对应的更新时间在所述目标时间的开始时刻到所述截止时刻之间的数据。S242: Acquire first to-be-positioned data, where the first to-be-positioned data is data in the first data whose corresponding update time is between the start time of the target time and the end time.
S243:获取第二待定位数据,所述第二待定位数据为所述第二数据中,对应的更新时间在所述目标时间的开始时刻到所述截止时刻之间的数据。S243: Acquire second to-be-positioned data, where the second to-be-positioned data is data in the second data whose corresponding update time is between the start time of the target time and the end time.
S244:检测所述第一待定位数据和所述第二待定位数据是否一致。S244: Detect whether the first data to be positioned and the second data to be positioned are consistent.
S245:若所述第一待定位数据与所述第二待定位数据不一致,进入下一次的所述定位检测,直到定位到所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据,且下一次的所述定位检测的截止时刻为上一次的所述定位检测的截止时刻的一半。S245: If the first data to be positioned is inconsistent with the second data to be positioned, enter the next position detection until the data included in the first data and the data included in the second data are positioned. And the cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection.
其中,需要说明的是,下一次的所述定位检测的截止时刻为上一次的所述定位检测的截止时刻的一半,可以理解为当次数据检测的目标时间的开始时刻到下一次的定位检测的截止时刻之间的时间长度,为当次数据检测的目标时间的开始时刻到当次的定位检测的截止时刻之间的时间长度的一半。示例性的,当次的数据检测的目标时间为10点到11点,那么当次(可以为第一次)的定位检测的截止时刻为10点30分,那么下一次的定位检测的截止时刻可以为10点15分。It should be noted that the cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection, which can be understood as the start time of the target time of the current data detection to the next positioning detection The length of time between the cut-off time is half of the time length between the start time of the target time of the current data detection and the cut-off time of the current positioning detection. Exemplarily, the target time of the current data detection is from 10 to 11, then the cut-off time of the current (it can be the first time) positioning detection is 10:30, then the cut-off time of the next positioning detection It can be 10:15.
在这种方式下,所述基于所述定位检测的结果,进入到下一次的所述数据检测,包括:S246:若所述第一待定位数据与所述第二待定位数据一致,进入 到下一次的所述数据检测,且下一次的所述数据检测的目标时间的开始时刻为所述当次定位检测的截止时刻。还有,当定位到所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据之后,也会触发进入到下一次的数据检测。In this manner, the step of entering the next data detection based on the result of the positioning detection includes: S246: if the first data to be positioned is consistent with the second data to be positioned, entering The start time of the next data detection and the target time of the next data detection is the end time of the current positioning detection. In addition, after locating data that is inconsistent in the data included in the first data and the data included in the second data, the next data detection will also be triggered.
此外,对于每次的定位检测的截止时刻的确定除了可以采用前述的方式,即下一次的所述定位检测的截止时刻为上一次的所述定位检测的截止时刻的一半这种方式外,对于每次的定位检测的截止时刻还可以根据实时的情况进行动态的调整。作为一种方式,可以根据当次数据检测对应的数据量来确定每次定位检测的截止时刻,在这种方式下,对应的数据检测对应的数据量越大,那么每次的定位检测的截止时刻相比上一次的定位检测的截止时刻缩减得越大。其中,该缩减可以理解为时间长度的缩短程度。例如,前述的下一次的所述定位检测的截止时刻为上一次的所述定位检测的截止时刻的一半,就可以理解为下一次的所述定位检测的截止时刻相比上一次的所述定位检测的截止时刻的时间长度缩减一半。In addition, for the determination of the cut-off time of each positioning detection, in addition to the aforementioned method, that is, the cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection. The cut-off time of each positioning detection can also be dynamically adjusted according to the real-time situation. As a way, the cut-off time of each location detection can be determined according to the amount of data corresponding to the current data detection. In this way, the larger the amount of data corresponding to the corresponding data detection, the cut-off time of each location detection The time is reduced more than the cut-off time of the last positioning detection. Among them, the reduction can be understood as the degree of shortening of the length of time. For example, the aforementioned cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection, which can be understood as the cut-off time of the next positioning detection compared to the previous positioning detection The length of the cut-off time of detection is reduced by half.
需要说明的是,如前述所示,下一次的定位检测的截止时刻会相比上一次的定位检测的截止时刻在时间顺序上更靠前当次的目标检测的开始时刻,那么在一次定位检测过程中,检测到第一待定位数据与所述第二待定位数据一致,那么就表征不一致的数据的更新时间是在当次的定位检测的截止时刻到当次的数据检测的目标时间的结束时刻之间,那么为了便于提升整体的检测效率,就不用再进行下一次的定位检测,而是直接进入到下一次的数据检测,并且下次的数据检测的目标时间的开始时刻就为检测到第一待定位数据与所述第二待定位数据一致的那次定位检测的截止时刻。It should be noted that, as shown above, the cut-off time of the next positioning detection will be earlier in time sequence than the cut-off time of the last positioning detection. During the process, if it is detected that the first data to be positioned is consistent with the second data to be positioned, the update time of the inconsistent data is from the cut-off time of the current positioning detection to the end of the target time of the current data detection Between time, in order to facilitate the improvement of the overall detection efficiency, there is no need to perform the next positioning detection, but directly enter the next data detection, and the start time of the target time of the next data detection is the detection The cut-off time of the positioning detection when the first to-be-positioned data is consistent with the second to-be-positioned data.
下面在通过一个实例对前述内容进行说明。The foregoing content is explained below through an example.
若当次的数据检测的目标时间为10点到11点。那么在检测到第一数据和第二数据不一致的情况下,开始进行定位检测,第一次的定位检测的截止时刻为10点30分,那么第一待定位数据就是第一数据中对应的更新时间在10点到10点30分的数据,第二待定位数据就是第二数据中对应的更新时间在10点到10点30分的数据,那么若检测到第一待定位数据和第二待定位数据一致,那么就会表征不一致的数据的更新时间肯定是在10点30到11点这个时间段内,但是,本实施例提供的方案中并不会再以10点30到11点这个时间段进行定位检测,而是直接以10点30为时间起点进入下一次的数据检测,因为10点30到11点这个时间段内不一致的数据,必然会在以10点30为时间起点的数据检测中被检测到,所以就不用再浪费时间再进行10点30到11点这个时间段的定位检测,进而可以实现提升数据检测的效率。If the target time of the current data detection is 10 o'clock to 11 o'clock. Then when the first data and the second data are detected to be inconsistent, the positioning detection is started, and the cut-off time of the first positioning detection is 10:30, then the first data to be positioned is the corresponding update in the first data Data from 10:30 to 10:30, the second to-be-positioned data is the data corresponding to the update time of 10:30 to 10:30 in the second data, then if the first to-be-positioned data and the second to-be-positioned data are detected If the bit data is consistent, then the update time of the inconsistent data must be within the time period of 10:30 to 11, but the solution provided in this embodiment will not use the time of 10:30 to 11 Positioning detection is performed in the segment, but directly enters the next data detection with 10:30 as the starting point of time, because inconsistent data in the time period from 10:30 to 11:00 will inevitably be detected in the data with 10:30 as the starting point It is detected in the middle, so there is no need to waste time to perform positioning detection at the time period of 10:30 to 11: 00, which can improve the efficiency of data detection.
本实施例提供的一种检测同步数据的方法,可以基于数据的更新数据对同步数据分多次进行数据检测,在每次的数据检测过程中,可以先获取所述当次的数据检测对应的目标时间,进而再获取源端存储的同步数据中对应的更新时间为所述目标时间的数据作为第一数据,以及获取目标端存储的同步数据中对应的更新时间为所述目标时间的数据作为第二数据,然后对所述第一数据以及所述第二数据的一致性进行检测,若检测到当次所获取的第一数据以及第二数 据一致,就开始进行下一次的数据检测,从而实现了在对从源端同步到目标端的同步数据的检测过程中,可以基于更新时间来确定作为待检测部分的第一数据和第二数据,以便减少重复进行检测的数据量并降低校验成本。The method for detecting synchronization data provided in this embodiment can perform data detection on synchronized data multiple times based on the updated data of the data. In each data detection process, the corresponding data detection corresponding to the current data can be obtained first. Target time, and then obtain the data whose update time is the target time in the synchronization data stored at the source end as the first data, and obtain the data whose update time is the target time in the synchronization data stored at the target end as the first data Second data, and then check the consistency of the first data and the second data. If it is detected that the first data and the second data obtained at the time are consistent, the next data check is started, thereby In the detection process of the synchronized data from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the cost of verification .
并且,在本实施例中对于同步数据可以基于更新时间来确定当次进行检测的第一数据和第二数据,进而可以实现支持源端或者目标端数据的动态变化,即对于已经在先检测过的数据也可以即时的被在后再次检测。In addition, in this embodiment, the first data and the second data to be detected at the current time can be determined based on the update time for the synchronized data, so that it can support the dynamic change of the source or target data, that is, for the data that has been detected in advance. The data can also be checked again immediately.
请参阅图5,本申请提供的一种检测同步数据的方法,所述方法包括:Please refer to FIG. 5, a method for detecting synchronization data provided by the present application, the method includes:
S310:在当次的数据检测中,获取所述当次的数据检测对应的目标时间。S310: In the current data detection, obtain the target time corresponding to the current data detection.
S320:获取第一数据以及第二数据,所述第一数据为源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为目标端存储的同步数据中对应的更新时间为所述目标时间的数据,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据。S320: Acquire first data and second data, where the first data is data whose update time is the target time in the synchronization data stored at the source end, and the second data is the data corresponding to the synchronization data stored at the target end. The update time of is the data of the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is data synchronized from the source end.
S330:检测所述第一数据与所述第二数据是否一致。S330: Detect whether the first data is consistent with the second data.
S331:若检测到所述第一数据与所述第二数据一致,进入到下一次的所述数据检测。S331: If it is detected that the first data is consistent with the second data, proceed to the next data detection.
S340:若检测到所述第一数据与所述第二数据不一致,定位检测所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据。S340: If it is detected that the first data is inconsistent with the second data, locate and detect data that is inconsistent among the data included in the first data and the data included in the second data.
S350:获取待更改数据,所述待更改数据为所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据。S350: Acquire data to be modified, where the data to be modified is data that is inconsistent among data included in the first data and data included in the second data.
S351:对所述待更改数据进行更改,以用于使所述第一数据和所述第二数据一致。S351: Modify the data to be modified to make the first data consistent with the second data.
可选的,所述对所述待更改数据进行更改之前还包括:发出进行数据更改的提示信息;若接收到允许进行数据更改的指令,执行所述对所述待更改数据进行更改。可选的,该提示信息可以发送到管理员终端中,若管理员终端检测到管理员触发了同意进行数据更改的操作后,就可以返回允许进行数据更改的指令。Optionally, before changing the data to be changed, the method further includes: sending a prompt message for changing the data; if an instruction to allow the data change is received, executing the changing of the data to be changed. Optionally, the prompt information can be sent to the administrator terminal, and if the administrator terminal detects that the administrator has triggered the operation of agreeing to the data change, it can return the instruction to allow the data change.
S360:基于所述定位检测的结果,进入到下一次的所述数据检测。S360: Based on the result of the positioning detection, proceed to the next data detection.
作为一致方式,可以在检测到完成对前述定位到的不一致的数据进行更改后,再进行下一次的数据检测。As a consistent method, after detecting that the previously located inconsistent data has been changed, the next data detection can be performed.
本实施例提供的一种检测同步数据的方法,可以基于数据的更新数据对同步数据分多次进行数据检测,在每次的数据检测过程中,可以先获取所述当次的数据检测对应的目标时间,进而再获取源端存储的同步数据中对应的更新时间为所述目标时间的数据作为第一数据,以及获取目标端存储的同步数据中对应的更新时间为所述目标时间的数据作为第二数据,然后对所述第一数据以及所述第二数据的一致性进行检测,若检测到当次所获取的第一数据以及第二数据一致,就开始进行下一次的数据检测,从而实现了在对从源端同步到目标端的同步数据的检测过程中,可以基于更新时间来确定作为待检测部分的第一数据和第二数据,以便减少重复进行检测的数据量并降低校验成本。The method for detecting synchronization data provided in this embodiment can perform data detection on synchronized data multiple times based on the updated data of the data. In each data detection process, the corresponding data detection corresponding to the current data can be obtained first. Target time, and then obtain the data whose update time is the target time in the synchronization data stored at the source end as the first data, and obtain the data whose update time is the target time in the synchronization data stored at the target end as the first data Second data, and then check the consistency of the first data and the second data. If it is detected that the first data and the second data obtained at the time are consistent, the next data check is started, thereby In the detection process of the synchronized data from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the cost of verification .
并且在本实施例中,对于定位到的待更改数据会进一步的进行更改,以使 得当次的数据检测所涉及的第一数据和第二数据能够更改到一致,进而实现修复数据同步过程中出现的错误。And in this embodiment, the located data to be changed will be further changed, so that the first data and the second data involved in the current data detection can be changed to be consistent, so as to realize the repaired data synchronization process. mistake.
请参阅图6,本申请提供的一种检测同步数据的方法,所述方法包括:Please refer to FIG. 6, a method for detecting synchronization data provided by the present application, the method includes:
S410:获取所述源端当前所承载的业务,其中,所述业务所产生的数据存储在所述源端。S410: Obtain the service currently carried by the source end, where the data generated by the service is stored at the source end.
S420:基于所述业务的业务类型确定数据检测对应的目标时间。S420: Determine a target time corresponding to data detection based on the service type of the service.
作为一种方式,所述基于所述业务的业务类型确定数据检测对应的目标时间,包括:获取所述业务类型对应的数据产生频率;若所述数据产生频率低于阈值频率,获取第一时间作为目标时间;若所述数据产生频率不低于所述阈值频率,获取第二时间作为目标时间;其中,所述第二时间的时间长度大于所述第一时间的时间长度。As a way, the determining the target time corresponding to the data detection based on the service type of the service includes: obtaining the data generation frequency corresponding to the service type; if the data generation frequency is lower than the threshold frequency, obtaining the first time As the target time; if the data generation frequency is not lower than the threshold frequency, acquire the second time as the target time; wherein the time length of the second time is greater than the time length of the first time.
可选的,作为一种方式,所述获取所述业务类型对应的数据产生频率之前还包括:获取并存储每种业务类型的数据产生频率;所述获取所述业务类型对应的数据产生频率,包括:读取存储的所述业务类型的数据产生频率。Optionally, as a way, before obtaining the data generation frequency corresponding to the service type, the method further includes: obtaining and storing the data generation frequency of each service type; and the obtaining the data generation frequency corresponding to the service type, Including: reading the stored data generation frequency of the service type.
S430:获取第一数据以及第二数据,所述第一数据为源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为目标端存储的同步数据中对应的更新时间为所述目标时间的数据,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据。S430: Acquire first data and second data, where the first data is data with the update time corresponding to the target time in the synchronization data stored at the source end, and the second data is the data corresponding to the synchronization data stored at the target end. The update time of is the data of the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is data synchronized from the source end.
S440:对所述第一数据以及所述第二数据的进行所述数据检测。S440: Perform the data detection on the first data and the second data.
本实施例提供的一种检测同步数据的方法,可以获取所述源端当前所承载的业务,基于所述业务的业务类型确定数据检测对应的目标时间,在每次的数据检测过程中,可以先获取所述当次的数据检测对应的目标时间,进而再获取源端存储的同步数据中对应的更新时间为所述目标时间的数据作为第一数据,以及获取目标端存储的同步数据中对应的更新时间为所述目标时间的数据作为第二数据,然后对所述第一数据以及所述第二数据的一致性进行检测,若检测到当次所获取的第一数据以及第二数据一致,就开始进行下一次的数据检测,从而实现了在对从源端同步到目标端的同步数据的检测过程中,可以基于更新时间来确定作为待检测部分的第一数据和第二数据,以便减少重复进行检测的数据量并降低校验成本。The method for detecting synchronized data provided in this embodiment can obtain the service currently carried by the source end, and determine the target time corresponding to data detection based on the service type of the service. In each data detection process, First obtain the target time corresponding to the current data detection, and then obtain the data whose update time is the target time in the synchronization data stored at the source end as the first data, and obtain the corresponding data in the synchronization data stored at the target end The data whose update time is the target time is used as the second data, and then the consistency of the first data and the second data is detected, if it is detected that the first data and the second data obtained at the time are consistent , The next data detection starts, so that in the detection process of the synchronized data from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce Repeat the data volume of the test and reduce the cost of verification.
并且,对于目标时间为基于业务类型来确定的,还可以同时时间基于源端当前所承载的业务来动态调整检测同步数据的过程,提升同步数据检测过程的灵活性。In addition, for the target time determined based on the service type, the process of detecting the synchronized data can be dynamically adjusted based on the service currently carried by the source at the same time, so as to improve the flexibility of the synchronized data detection process.
请参阅图7,本申请提供的一种检测同步数据的方法,应用于数据同步系统,所述数据同步系统包括检测端、源端以及目标端,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据,所述方法包括:Please refer to FIG. 7, a method for detecting synchronization data provided by the present application is applied to a data synchronization system. The data synchronization system includes a detection end, a source end, and a target end. The synchronization data stored at the source end is synchronized. For the data to the target end, the synchronized data stored by the target end is data synchronized from the source end, and the method includes:
S510:所述检测端获取数据检测对应的目标时间。S510: The detection terminal acquires data and detects the corresponding target time.
S520:获取第一数据以及第二数据,所述第一数据为所述源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为所述目标端存 储的同步数据中对应的更新时间为所述目标时间的数据。S520: Acquire first data and second data, where the first data is data whose corresponding update time is the target time in the synchronization data stored by the source end, and the second data is data stored by the target end. The corresponding update time in the synchronized data is the data of the target time.
S530:对所述第一数据以及所述第二数据的进行所述数据检测。S530: Perform the data detection on the first data and the second data.
本申请提供的一种检测同步数据的方法,通过先获取数据检测对应的目标时间,进而再获取源端存储的同步数据中对应的更新时间为所述目标时间的数据作为第一数据,以及获取目标端存储的同步数据中对应的更新时间为所述目标时间的数据作为第二数据,然后对所述第一数据以及所述第二数据的进行所述数据检测。从而实现了在对从源端同步到目标端的同步数据的检测过程中,可以基于更新时间来确定作为待检测部分的第一数据和第二数据,以便减少重复进行检测的数据量并降低校验成本。The method for detecting synchronization data provided by the present application detects the corresponding target time by first acquiring the data, and then acquiring the data whose update time is the target time in the synchronization data stored at the source end as the first data, and acquiring The data with the update time corresponding to the target time in the synchronization data stored at the target end is used as the second data, and then the data detection is performed on the first data and the second data. Thus, in the detection process of the synchronized data synchronized from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
请参阅图8,本申请提供的一种检测同步数据的装置600,所述装置600包括:Please refer to FIG. 8, an apparatus 600 for detecting synchronization data provided by the present application, and the apparatus 600 includes:
时间获取单元610,用于获取数据检测对应的目标时间。The time acquiring unit 610 is configured to acquire the target time corresponding to the data detection.
数据获取单元620,用于获取第一数据以及第二数据,所述第一数据为源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为目标端存储的同步数据中对应的更新时间为所述目标时间的数据,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据。The data acquisition unit 620 is configured to acquire first data and second data, where the first data is data whose update time is the target time in the synchronization data stored at the source end, and the second data is data stored at the target end. The corresponding update time in the synchronization data is the target time data, wherein the synchronization data stored by the source end is the data synchronized to the target end, and the synchronization data stored by the target end is the synchronization data from the source end. The data.
数据检测单元630,用于对所述第一数据以及所述第二数据的进行所述数据检测。The data detection unit 630 is configured to perform the data detection on the first data and the second data.
作为一种方式,时间获取单元610,具体用于在当次的数据检测中,获取所述当次的数据检测对应的目标时间。在这种方式下,数据检测单元630,具体用于检测所述第一数据与所述第二数据是否一致;若检测到所述第一数据与所述第二数据一致,进入到下一次的所述数据检测。可选的,数据检测单元630,具体还用于若检测到所述第一数据与所述第二数据不一致,定位检测所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据;基于所述定位检测的结果,进入到下一次的所述数据检测。其中,当次的所述数据检测对应的目标时间的结束时刻,为下一次的所述数据检测对应的目标时间的开始时刻。As a way, the time acquisition unit 610 is specifically configured to acquire the target time corresponding to the current data detection in the current data detection. In this manner, the data detection unit 630 is specifically configured to detect whether the first data is consistent with the second data; if it is detected that the first data is consistent with the second data, enter the next The data detection. Optionally, the data detection unit 630 is specifically further configured to locate and detect the data included in the first data and the data included in the second data if it is detected that the first data is inconsistent with the second data. Inconsistent data; based on the result of the positioning detection, proceed to the next data detection. Wherein, the end time of the target time corresponding to the current data detection is the start time of the target time corresponding to the next data detection.
可选的,数据检测单元630,具体用于获取所述第一数据的特征值;获取所述第二数据的特征值;若所述第一数据的特征值与所述第二数据的特征值相同,确定所述第一数据与所述第二数据一致。其中,数据检测单元630,具体用于向所述源端发送特征值计算指令,所述特征值计算指令中携带有触发计算所述第一数据特征值计算的结构化查询代码;接收所述源端响应所述特征值计算指令返回的数据作为所述第一数据的特征值。类似的,数据检测单元630,还具体用于向所述目标端发送特征值计算指令,所述特征值计算指令中携带有触发计算所述第二数据特征值计算的结构化查询代码;接收所述源端响应所述特征值计算指令返回的数据作为所述第二数据的特征值。Optionally, the data detection unit 630 is specifically configured to obtain the characteristic value of the first data; obtain the characteristic value of the second data; if the characteristic value of the first data is the same as the characteristic value of the second data Same, it is determined that the first data is consistent with the second data. Wherein, the data detection unit 630 is specifically configured to send a feature value calculation instruction to the source end, and the feature value calculation instruction carries a structured query code that triggers the calculation of the first data feature value calculation; and receives the source The data returned by the terminal in response to the characteristic value calculation instruction is used as the characteristic value of the first data. Similarly, the data detection unit 630 is further specifically configured to send a feature value calculation instruction to the target terminal, and the feature value calculation instruction carries a structured query code that triggers the calculation of the second data feature value calculation; The data returned by the source in response to the feature value calculation instruction is used as the feature value of the second data.
在这种方式中,数据检测单元630,具体用于获取当次定位检测的截止时刻;获取第一待定位数据,所述第一待定位数据为所述第一数据中,对应的更新时间在所述目标时间的开始时刻到所述截止时刻之间的数据;获取第二待定位数据,所述第二待定位数据为所述第二数据中,对应的更新时间在所述目标时间 的开始时刻到所述截止时刻之间的数据;若所述第一待定位数据与所述第二待定位数据不一致,进入下一次的所述定位检测,直到定位到所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据,且下一次的所述定位检测的截止时刻为上一次的所述定位检测的截止时刻的一半。In this manner, the data detection unit 630 is specifically configured to obtain the cut-off time of the current positioning detection; obtain the first to-be-positioned data, where the first to-be-positioned data is the first data, and the corresponding update time is Data between the start time of the target time and the end time; acquire second to-be-positioned data, where the second to-be-positioned data is the second data, and the corresponding update time is at the start of the target time Data between time and the cut-off time; if the first to-be-positioned data is inconsistent with the second to-be-positioned data, enter the next positioning detection until the data included in the first data is positioned Data that is inconsistent with the data included in the second data, and the cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection.
在这种方式中,数据检测单元630,具体用于若所述第一待定位数据与所述第二待定位数据一致,进入到下一次的所述数据检测,且下一次的所述数据检测的目标时间的开始时刻为所述当次定位检测的截止时刻。In this manner, the data detection unit 630 is specifically configured to enter the next data detection if the first data to be positioned is consistent with the second data to be positioned, and the next data detection The start time of the target time is the end time of the current positioning detection.
作为一种方式,如图9所示,所述装置600,还包括:数据补偿单元640,用于获取待更改数据,所述待更改数据为所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据,对所述待更改数据进行更改,以用于使所述第一数据和所述第二数据一致。在这种方式下,可选的,所述装置600,还包括:补偿提示单元650,用于发出进行数据更改的提示信息。对应的,数据补偿单元640,用于在若接收到允许进行数据更改的指令,执行所述对所述待更改数据进行更改。As a way, as shown in FIG. 9, the device 600 further includes: a data compensation unit 640, configured to obtain data to be modified, where the data to be modified is the data included in the first data and the first data. The second data includes data that is inconsistent, and the data to be changed is modified to make the first data consistent with the second data. In this manner, optionally, the device 600 may further include: a compensation prompt unit 650, configured to send out prompt information for data modification. Correspondingly, the data compensation unit 640 is configured to, if an instruction allowing data modification is received, execute the modification to the data to be modified.
作为一种方式,时间获取单元610,具体用于获取所述源端当前所承载的业务,其中,所述业务所产生的数据存储在所述源端;基于所述业务的业务类型确定数据检测对应的目标时间。可选的,时间获取单元610,具体用于获取所述业务类型对应的数据产生频率;若所述数据产生频率低于阈值频率,获取第一时间作为目标时间;若所述数据产生频率不低于所述阈值频率,获取第二时间作为目标时间;其中,所述第二时间的时间长度大于所述第一时间的时间长度。可选的,所述装置还包括数据产生频率获取单元611,用于获取并存储每种业务类型的数据产生频率。在这种方式下,时间获取单元610,具体用于读取存储的所述业务类型的数据产生频率。As a way, the time obtaining unit 610 is specifically configured to obtain the service currently carried by the source end, wherein the data generated by the service is stored at the source end; the data detection is determined based on the service type of the service The corresponding target time. Optionally, the time obtaining unit 610 is specifically configured to obtain the data generation frequency corresponding to the service type; if the data generation frequency is lower than the threshold frequency, obtain the first time as the target time; if the data generation frequency is not low At the threshold frequency, a second time is acquired as the target time; wherein the time length of the second time is greater than the time length of the first time. Optionally, the device further includes a data generation frequency obtaining unit 611, configured to obtain and store the data generation frequency of each service type. In this manner, the time obtaining unit 610 is specifically configured to read the stored data generation frequency of the service type.
本申请提供的一种检测同步数据的装置,通过先获取数据检测对应的目标时间,进而再获取源端存储的同步数据中对应的更新时间为所述目标时间的数据作为第一数据,以及获取目标端存储的同步数据中对应的更新时间为所述目标时间的数据作为第二数据,然后对所述第一数据以及所述第二数据的进行所述数据检测。从而实现了在对从源端同步到目标端的同步数据的检测过程中,可以基于更新时间来确定作为待检测部分的第一数据和第二数据,以便减少重复进行检测的数据量并降低校验成本。The device for detecting synchronization data provided by the present application detects the corresponding target time by acquiring the data first, and then acquires the data whose update time is the target time in the synchronization data stored at the source end as the first data, and acquires The data with the update time corresponding to the target time in the synchronization data stored at the target end is used as the second data, and then the data detection is performed on the first data and the second data. Thus, in the detection process of the synchronized data synchronized from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
下面将结合图10对本申请提供的一种电子设备进行说明。Hereinafter, an electronic device provided by the present application will be described with reference to FIG. 10.
请参阅图10,基于上述的短信推送方法,本申请实施例还提供的另一种包括可以执行前述短信推送方法的处理器102的电子设备200。电子设备200还包括存储器104、以及网络模块106。其中,该存储器104中存储有可以执行前述实施例中内容的程序,而处理器102可以执行该存储器104中存储的程序。Referring to FIG. 10, based on the foregoing short message pushing method, an embodiment of the present application also provides another electronic device 200 including a processor 102 that can execute the foregoing short message pushing method. The electronic device 200 further includes a memory 104 and a network module 106. Wherein, the memory 104 stores a program that can execute the content in the foregoing embodiment, and the processor 102 can execute the program stored in the memory 104.
其中,处理器102利用各种接口和线路连接整个电子设备200内的各个部分,通过运行或执行存储在存储器104内的指令、程序、代码集或指令集,以及调用存储在存储器104内的数据,执行电子设备200的各种功能和处理数据。可选地,处理器102可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵 列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器102可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器102中,单独通过一块通信芯片进行实现。Among them, the processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 200, by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and calling data stored in the memory 104 , Perform various functions of the electronic device 200 and process data. Optionally, the processor 102 may use at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). A kind of hardware form to realize. The processor 102 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 102, but may be implemented by a communication chip alone.
存储器104可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器104可用于存储指令、程序、代码、代码集或指令集。存储器104可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 104 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 104 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 104 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc. The data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
所述网络模块106用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯,例如和音频播放设备进行通讯。所述网络模块106可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。所述网络模块106可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。例如,网络模块106可以与基站进行信息交互。The network module 106 is used to receive and send electromagnetic waves, and realize the mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, such as with an audio playback device. The network module 106 may include various existing circuit elements for performing these functions, for example, an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a subscriber identity module (SIM) card, a memory, etc. . The network module 106 can communicate with various networks, such as the Internet, an intranet, and a wireless network, or communicate with other devices through a wireless network. The aforementioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. For example, the network module 106 can exchange information with the base station.
可选的,电子设备200可以为执行前述方法实施例的服务器。Optionally, the electronic device 200 may be a server that executes the foregoing method embodiments.
请参考图11,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质1100中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 11, which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 1100 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
计算机可读存储介质1100可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质1100包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质1100具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码1110可以例如以适当形式进行压缩。The computer-readable storage medium 1100 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 1100 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1100 has a storage space for executing the program code 810 of any method step in the above-mentioned method. These program codes can be read from or written into one or more computer program products. The program code 1110 may be compressed in an appropriate form, for example.
综上所述,本申请提供的一种检测同步数据的方法、装置、服务器以及数据同步系统,通过先获取数据检测对应的目标时间,进而再获取源端存储的同步数据中对应的更新时间为所述目标时间的数据作为第一数据,以及获取目标端存储的同步数据中对应的更新时间为所述目标时间的数据作为第二数据,然后对所述第一数据以及所述第二数据的进行所述数据检测。从而实现了在对从源端同步到目标端的同步数据的检测过程中,可以基于更新时间来确定作为待检测部分的第一数据和第二数据,以便减少重复进行检测的数据量并降低校验成本。In summary, the method, device, server, and data synchronization system for detecting synchronized data provided by the present application detect the corresponding target time by first obtaining the data, and then obtaining the corresponding update time in the synchronized data stored at the source end. The data of the target time is used as the first data, and the data corresponding to the update time of the target time in the synchronization data stored on the target side is obtained as the second data, and then the data of the first data and the second data are obtained Perform the data detection. Thus, in the detection process of the synchronized data synchronized from the source end to the target end, the first data and the second data as the part to be detected can be determined based on the update time, so as to reduce the amount of repeated detection data and reduce the verification. cost.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种检测同步数据的方法,其特征在于,所述方法包括:A method for detecting synchronization data, characterized in that the method includes:
    获取数据检测对应的目标时间;Obtain the target time corresponding to the data detection;
    获取第一数据以及第二数据,所述第一数据为源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为目标端存储的同步数据中对应的更新时间为所述目标时间的数据,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据;Acquire first data and second data, where the first data is data whose corresponding update time is the target time in the synchronization data stored at the source end, and the second data is the corresponding update in the synchronization data stored at the target end Time is data of the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is data synchronized from the source end;
    对所述第一数据以及所述第二数据的进行所述数据检测。The data detection is performed on the first data and the second data.
  2. 根据权利要求1所述的方法,其特征在于,所述获取数据检测对应的目标时间,包括:在当次的数据检测中,获取所述当次的数据检测对应的目标时间;The method according to claim 1, wherein the obtaining the target time corresponding to the data detection comprises: in the current data detection, obtaining the target time corresponding to the current data detection;
    所述对所述第一数据以及所述第二数据的进行所述数据检测,包括:检测所述第一数据与所述第二数据是否一致;若检测到所述第一数据与所述第二数据一致,进入到下一次的所述数据检测。The performing the data detection on the first data and the second data includes: detecting whether the first data and the second data are consistent; if the first data and the first data are detected If the two data are consistent, proceed to the next data detection.
  3. 根据权利要求2所述的方法,其特征在于,所述对所述第一数据以及所述第二数据的进行所述数据检测还包括:The method according to claim 2, wherein said performing said data detection on said first data and said second data further comprises:
    若检测到所述第一数据与所述第二数据不一致,定位检测所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据;If it is detected that the first data is inconsistent with the second data, locate and detect data that is inconsistent among the data included in the first data and the data included in the second data;
    基于所述定位检测的结果,进入到下一次的所述数据检测。Based on the result of the positioning detection, proceed to the next data detection.
  4. 根据权利要求3所述的方法,其特征在于,所述定位检测所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据,包括:The method according to claim 3, wherein the positioning detecting data that is inconsistent in the data included in the first data and the data included in the second data includes:
    获取当次定位检测的截止时刻;Get the cut-off time of the current positioning detection;
    获取第一待定位数据,所述第一待定位数据为所述第一数据中,对应的更新时间在所述目标时间的开始时刻到所述截止时刻之间的数据;Acquiring first to-be-positioned data, where the first to-be-positioned data is data in the first data whose corresponding update time is between the start time of the target time and the end time;
    获取第二待定位数据,所述第二待定位数据为所述第二数据中,对应的更新时间在所述目标时间的开始时刻到所述截止时刻之间的数据;Acquiring second to-be-positioned data, where the second to-be-positioned data is data in the second data whose corresponding update time is between the start time of the target time and the end time;
    若所述第一待定位数据与所述第二待定位数据不一致,进入下一次的所述定位检测,直到定位到所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据,且下一次的所述定位检测的截止时刻为上一次的所述定位检 测的截止时刻的一半。If the first to-be-positioned data is inconsistent with the second to-be-positioned data, proceed to the next positioning detection until the positioning finds that the data included in the first data is inconsistent with the data included in the second data And the cut-off time of the next positioning detection is half of the cut-off time of the previous positioning detection.
  5. 根据权利要求4所述的方法,其特征在于,所述基于所述定位检测的结果,进入到下一次的所述数据检测,包括:The method according to claim 4, wherein the step to the next data detection based on the result of the positioning detection comprises:
    若所述第一待定位数据与所述第二待定位数据一致,进入到下一次的所述数据检测,且下一次的所述数据检测的目标时间的开始时刻为所述当次定位检测的截止时刻。If the first to-be-positioned data is consistent with the second to-be-positioned data, proceed to the next data detection, and the start time of the target time of the next data detection is that of the current positioning detection Deadline.
  6. 根据权利要求2-5任一所述的方法,其特征在于,所述检测所述第一数据与所述第二数据是否一致,包括:The method according to any one of claims 2-5, wherein the detecting whether the first data is consistent with the second data comprises:
    获取所述第一数据的特征值;Acquiring a characteristic value of the first data;
    获取所述第二数据的特征值;Acquiring the characteristic value of the second data;
    若所述第一数据的特征值与所述第二数据的特征值相同,确定所述第一数据与所述第二数据一致。If the characteristic value of the first data is the same as the characteristic value of the second data, it is determined that the first data is consistent with the second data.
  7. 根据权利要求6所述的方法,其特征在于,所述获取所述第一数据的特征值,包括:The method according to claim 6, wherein the obtaining the characteristic value of the first data comprises:
    向所述源端发送特征值计算指令,所述特征值计算指令中携带有触发计算所述第一数据特征值计算的结构化查询代码;Sending a feature value calculation instruction to the source end, where the feature value calculation instruction carries a structured query code that triggers the calculation of the feature value calculation of the first data;
    接收所述源端响应所述特征值计算指令返回的数据作为所述第一数据的特征值。Receiving the data returned by the source in response to the characteristic value calculation instruction as the characteristic value of the first data.
  8. 根据权利要求6所述的方法,其特征在于,所述获取所述第二数据的特征值,包括:The method according to claim 6, wherein the acquiring the characteristic value of the second data comprises:
    向所述目标端发送特征值计算指令,所述特征值计算指令中携带有触发计算所述第二数据特征值计算的结构化查询代码;Sending a feature value calculation instruction to the target terminal, where the feature value calculation instruction carries a structured query code that triggers the calculation of the second data feature value calculation;
    接收所述源端响应所述特征值计算指令返回的数据作为所述第二数据的特征值。Receiving the data returned by the source in response to the characteristic value calculation instruction as the characteristic value of the second data.
  9. 根据权利要求2-8任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 2-8, wherein the method further comprises:
    获取待更改数据,所述待更改数据为所述第一数据包括的数据中与所述第二数据包括的数据中不一致的数据;Acquiring data to be modified, where the data to be modified is data that is inconsistent among data included in the first data and data included in the second data;
    对所述待更改数据进行更改,以用于使所述第一数据和所述第二数据一致。The data to be modified is modified to make the first data consistent with the second data.
  10. 根据权利要求9所述的方法,其特征在于,所述对所述待更改数据进行更改之前还包括:The method according to claim 9, characterized in that, before changing the data to be changed, the method further comprises:
    发出进行数据更改的提示信息;Send out reminders for data changes;
    若接收到允许进行数据更改的指令,执行所述对所述待更改数据进行更改。If an instruction to allow data modification is received, execute the modification to the data to be modified.
  11. 根据权利要求2所述的方法,其特征在于,当次的所述数据检测对应的目标时间的结束时刻,为下一次的所述数据检测对应的目标时间的开始时刻。The method according to claim 2, wherein the end time of the target time corresponding to the current data detection is the start time of the target time corresponding to the next data detection.
  12. 根据权利要求1所述的方法,其特征在于,所述获取数据检测对应的目标时间,包括:The method according to claim 1, wherein said acquiring data and detecting the corresponding target time comprises:
    获取所述源端当前所承载的业务,其中,所述业务所产生的数据存储在所述源端;Acquiring the service currently carried by the source end, wherein the data generated by the service is stored at the source end;
    基于所述业务的业务类型确定数据检测对应的目标时间。The target time corresponding to the data detection is determined based on the service type of the service.
  13. 根据权利要求12所述的方法,其特征在于,所述基于所述业务的业务类型确定数据检测对应的目标时间,包括:The method according to claim 12, wherein the determining the target time corresponding to data detection based on the service type of the service comprises:
    获取所述业务类型对应的数据产生频率;Acquiring the data generation frequency corresponding to the service type;
    若所述数据产生频率低于阈值频率,获取第一时间作为目标时间;If the data generation frequency is lower than the threshold frequency, acquiring the first time as the target time;
    若所述数据产生频率不低于所述阈值频率,获取第二时间作为目标时间;其中,所述第二时间的时间长度大于所述第一时间的时间长度。If the data generation frequency is not lower than the threshold frequency, the second time is acquired as the target time; wherein the time length of the second time is greater than the time length of the first time.
  14. 根据权利要求13所述的方法,其特征在于,所述获取所述业务类型对应的数据产生频率之前还包括:The method according to claim 13, wherein before obtaining the frequency of data generation corresponding to the service type, the method further comprises:
    获取并存储每种业务类型的数据产生频率;Obtain and store the frequency of data generation for each business type;
    所述获取所述业务类型对应的数据产生频率,包括:The obtaining the data generation frequency corresponding to the service type includes:
    读取存储的所述业务类型的数据产生频率。Read the stored data generation frequency of the service type.
  15. 根据权利要求14所述的方法,其特征在于,所述源端和所述目标端分别配置在不同的机房。The method according to claim 14, wherein the source terminal and the target terminal are respectively configured in different computer rooms.
  16. 一种检测同步数据的方法,其特征在于,应用于数据同步系统,所述数据同步系统包括检测端、源端以及目标端,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据,所述方法包括:A method for detecting synchronization data, characterized in that it is applied to a data synchronization system, the data synchronization system includes a detection end, a source end, and a target end, wherein the synchronization data stored by the source end is synchronized to the target end Data, the synchronized data stored by the target end is data synchronized from the source end, and the method includes:
    所述检测端获取数据检测对应的目标时间;The detection terminal acquires data and detects the corresponding target time;
    获取第一数据以及第二数据,所述第一数据为所述源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为所述目标端存储的同步数据中对应的更新时间为所述目标时间的数据;Acquire first data and second data, where the first data is data whose update time is the target time in the synchronization data stored at the source end, and the second data is the synchronization data stored at the target end The corresponding update time in is the data of the target time;
    对所述第一数据以及所述第二数据的进行所述数据检测。The data detection is performed on the first data and the second data.
  17. 一种检测同步数据的装置,其特征在于,所述装置包括:A device for detecting synchronization data, characterized in that the device includes:
    时间获取单元,用于获取数据检测对应的目标时间;The time acquisition unit is used to acquire the target time corresponding to the data detection;
    数据获取单元,用于获取第一数据以及第二数据,所述第一数据为源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为目标端存储的同步数据中对应的更新时间为所述目标时间的数据,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据;The data acquisition unit is configured to acquire first data and second data, where the first data is data whose corresponding update time is the target time in the synchronization data stored at the source end, and the second data is data stored at the target end The corresponding update time in the synchronization data is data at the target time, wherein the synchronization data stored at the source end is data synchronized to the target end, and the synchronization data stored at the target end is synchronized data from the source end. data;
    数据检测单元,用于对所述第一数据以及所述第二数据的进行所述数据检测。The data detection unit is configured to perform the data detection on the first data and the second data.
  18. 一种数据同步系统,其特征在于,所述数据同步系统包括检测端、源端以及目标端,其中,所述源端存储的同步数据为同步到所述目标端的数据,所述目标端存储的同步数据为从所述源端同步的数据;A data synchronization system, characterized in that the data synchronization system includes a detection end, a source end, and a target end, wherein the synchronization data stored by the source end is data synchronized to the target end, and the target end stores Synchronized data is data synchronized from the source end;
    所述检测端,用于获取数据检测对应的目标时间;获取第一数据以及第二数据,所述第一数据为所述源端存储的同步数据中对应的更新时间为所述目标时间的数据,所述第二数据为所述目标端存储的同步数据中对应的更新时间为所述目标时间的数据;对所述第一数据以及所述第二数据的进行所述数据检测。The detection end is used to obtain the target time corresponding to the data detection; obtain the first data and the second data, the first data being data whose update time corresponding to the target time in the synchronization data stored at the source end is the target time The second data is data whose corresponding update time is the target time in the synchronization data stored by the target end; the data detection is performed on the first data and the second data.
  19. 一种服务器,其特征在于,包括一个或多个处理器以及存储器;A server, characterized in that it includes one or more processors and a memory;
    一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行权利要求1-15任一所述的方法。One or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1-15.
  20. 一种具有处理器可执行的程序代码的计算机可读存储介质,其特征在于,所述程序代码使所述处理器执行权利要求1-15任一所述的方法。A computer-readable storage medium having program code executable by a processor, wherein the program code causes the processor to execute the method according to any one of claims 1-15.
PCT/CN2020/076609 2020-02-25 2020-02-25 Method and apparatus for detecting synchronized data, server, and data synchronization system WO2021168654A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/076609 WO2021168654A1 (en) 2020-02-25 2020-02-25 Method and apparatus for detecting synchronized data, server, and data synchronization system
CN202080092970.2A CN114981797A (en) 2020-02-25 2020-02-25 Method and device for detecting synchronous data, server and data synchronization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/076609 WO2021168654A1 (en) 2020-02-25 2020-02-25 Method and apparatus for detecting synchronized data, server, and data synchronization system

Publications (1)

Publication Number Publication Date
WO2021168654A1 true WO2021168654A1 (en) 2021-09-02

Family

ID=77490571

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/076609 WO2021168654A1 (en) 2020-02-25 2020-02-25 Method and apparatus for detecting synchronized data, server, and data synchronization system

Country Status (2)

Country Link
CN (1) CN114981797A (en)
WO (1) WO2021168654A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006026655A2 (en) * 2004-08-31 2006-03-09 Emc Corporation Systems and methods to avoid deadlock and guarantee mirror consistency during online mirror synchronization and verification
CN101079683A (en) * 2007-06-27 2007-11-28 中国移动通信集团四川有限公司 Data consistency processing method
US8898515B1 (en) * 2012-06-28 2014-11-25 Emc International Company Synchronous replication using multiple data protection appliances across multiple storage arrays
CN104572921A (en) * 2014-12-27 2015-04-29 北京奇虎科技有限公司 Cross-datacenter data synchronization method and device
CN105589961A (en) * 2015-12-21 2016-05-18 武汉达梦数据库有限公司 Method and system for detecting data consistency of real-time synchronous system of database
CN109064248A (en) * 2018-06-25 2018-12-21 北京辰森世纪科技股份有限公司 Order data synchronous method of calibration, device and equipment
CN110413693A (en) * 2019-07-31 2019-11-05 上海英方软件股份有限公司 A kind of method of inspection and device of database real-time synchronization system data consistency

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006026655A2 (en) * 2004-08-31 2006-03-09 Emc Corporation Systems and methods to avoid deadlock and guarantee mirror consistency during online mirror synchronization and verification
CN101079683A (en) * 2007-06-27 2007-11-28 中国移动通信集团四川有限公司 Data consistency processing method
US8898515B1 (en) * 2012-06-28 2014-11-25 Emc International Company Synchronous replication using multiple data protection appliances across multiple storage arrays
CN104572921A (en) * 2014-12-27 2015-04-29 北京奇虎科技有限公司 Cross-datacenter data synchronization method and device
CN105589961A (en) * 2015-12-21 2016-05-18 武汉达梦数据库有限公司 Method and system for detecting data consistency of real-time synchronous system of database
CN109064248A (en) * 2018-06-25 2018-12-21 北京辰森世纪科技股份有限公司 Order data synchronous method of calibration, device and equipment
CN110413693A (en) * 2019-07-31 2019-11-05 上海英方软件股份有限公司 A kind of method of inspection and device of database real-time synchronization system data consistency

Also Published As

Publication number Publication date
CN114981797A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
US10348505B1 (en) Systems and techniques for validation of media data
US11086825B2 (en) Telemetry system for a cloud synchronization system
US20130297563A1 (en) Timestamp management method for data synchronization and terminal therefor
CN111177165B (en) Method, device and equipment for detecting data consistency
US11188560B2 (en) Synchronizing object in local object storage node
CN110445841B (en) Cloud disk mounting method and device for cloud physical machine and storage medium
CN111338608B (en) Distributed application development method and device, node equipment and readable storage medium
CN113448862B (en) Software version testing method and device and computer equipment
WO2019019670A1 (en) Application accessing method and device, computer apparatus, and storage medium
CN106598821B (en) Method and device for testing webpage loading speed
CN105657049A (en) Incremental data synchronization method and device and mobile terminal
CN114416883A (en) Block chain light node data synchronization method, device, equipment and readable storage medium
WO2021168654A1 (en) Method and apparatus for detecting synchronized data, server, and data synchronization system
CN112328413A (en) Application service calling method, device and system
CN109542850B (en) Method, device, equipment and medium for updating WORM attribute of file
CN111612947A (en) Method, equipment and storage medium for processing communication abnormity of intelligent lock
CN113507529B (en) Method for realizing file downloading based on Web application
CN113378022A (en) In-station search platform, search method and related device
CN111143583A (en) Method and device for monitoring data change of media database
CN107704614B (en) Notification information change method and system
CN110362534B (en) Snapshot verification method and system, electronic equipment and storage medium
WO2023005484A1 (en) User information registration method and apparatus
CN109587640B (en) Junk information identification method, terminal and computer storage medium
CN113626341A (en) Method and device for matching interface simulation message
CN117785908A (en) Method and device for executing data processing request

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20921811

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 27.01.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20921811

Country of ref document: EP

Kind code of ref document: A1