WO2021168654A1 - Procédé et appareil de détection de données synchronisées, serveur, et système de synchronisation de données - Google Patents

Procédé et appareil de détection de données synchronisées, serveur, et système de synchronisation de données 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
English (en)
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 CN202080092970.2A priority Critical patent/CN114981797A/zh
Priority to PCT/CN2020/076609 priority patent/WO2021168654A1/fr
Publication of WO2021168654A1 publication Critical patent/WO2021168654A1/fr

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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Les modes de réalisation de la présente invention concernent un procédé et un appareil de détection de données synchronisées, un serveur, et un système de synchronisation de données. Le procédé comprend : l'obtention d'un temps cible correspondant à une détection de données ; l'obtention de premières données et de secondes données, les premières données étant les données parmi des données synchronisées stockées dans une extrémité source pour lesquelles le temps de mise à jour correspondant est le temps cible, et les secondes données étant les données parmi des données synchronisées dans une extrémité cible pour lesquelles le temps de mise à jour correspondant est le temps cible, les données synchronisées stockées dans l'extrémité source sont les données synchronisées vers l'extrémité cible, et les données synchronisées stockées dans l'extrémité cible sont les données synchronisées à partir de l'extrémité source ; et la réalisation de la détection de données sur les premières données et les secondes données. Selon le procédé, des premières données et des secondes données servant de parties à détecter peuvent être déterminées sur la base d'un temps de mise à jour dans un processus de détection de données synchronisées qui sont synchronisées de l'extrémité source à l'extrémité cible, de sorte à réduire la quantité de données détectées à plusieurs reprises et à réduire les coûts de vérification.
PCT/CN2020/076609 2020-02-25 2020-02-25 Procédé et appareil de détection de données synchronisées, serveur, et système de synchronisation de données WO2021168654A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080092970.2A CN114981797A (zh) 2020-02-25 2020-02-25 检测同步数据的方法、装置、服务器以及数据同步系统
PCT/CN2020/076609 WO2021168654A1 (fr) 2020-02-25 2020-02-25 Procédé et appareil de détection de données synchronisées, serveur, et système de synchronisation de données

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/076609 WO2021168654A1 (fr) 2020-02-25 2020-02-25 Procédé et appareil de détection de données synchronisées, serveur, et système de synchronisation de données

Publications (1)

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

Family

ID=77490571

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/076609 WO2021168654A1 (fr) 2020-02-25 2020-02-25 Procédé et appareil de détection de données synchronisées, serveur, et système de synchronisation de données

Country Status (2)

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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006026655A2 (fr) * 2004-08-31 2006-03-09 Emc Corporation Systemes et procedes pour eviter l'interblocage et garantir la coherence de miroirs lors de la synchronisation et la verification en ligne de miroirs
CN101079683A (zh) * 2007-06-27 2007-11-28 中国移动通信集团四川有限公司 数据一致性处理方法
US8898515B1 (en) * 2012-06-28 2014-11-25 Emc International Company Synchronous replication using multiple data protection appliances across multiple storage arrays
CN104572921A (zh) * 2014-12-27 2015-04-29 北京奇虎科技有限公司 一种跨数据中心的数据同步方法和装置
CN105589961A (zh) * 2015-12-21 2016-05-18 武汉达梦数据库有限公司 一种数据库实时同步系统数据一致性的检测方法及系统
CN109064248A (zh) * 2018-06-25 2018-12-21 北京辰森世纪科技股份有限公司 订单数据同步的校验方法、装置及设备
CN110413693A (zh) * 2019-07-31 2019-11-05 上海英方软件股份有限公司 一种数据库实时同步系统数据一致性的检验方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006026655A2 (fr) * 2004-08-31 2006-03-09 Emc Corporation Systemes et procedes pour eviter l'interblocage et garantir la coherence de miroirs lors de la synchronisation et la verification en ligne de miroirs
CN101079683A (zh) * 2007-06-27 2007-11-28 中国移动通信集团四川有限公司 数据一致性处理方法
US8898515B1 (en) * 2012-06-28 2014-11-25 Emc International Company Synchronous replication using multiple data protection appliances across multiple storage arrays
CN104572921A (zh) * 2014-12-27 2015-04-29 北京奇虎科技有限公司 一种跨数据中心的数据同步方法和装置
CN105589961A (zh) * 2015-12-21 2016-05-18 武汉达梦数据库有限公司 一种数据库实时同步系统数据一致性的检测方法及系统
CN109064248A (zh) * 2018-06-25 2018-12-21 北京辰森世纪科技股份有限公司 订单数据同步的校验方法、装置及设备
CN110413693A (zh) * 2019-07-31 2019-11-05 上海英方软件股份有限公司 一种数据库实时同步系统数据一致性的检验方法及装置

Also Published As

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

Similar Documents

Publication Publication Date Title
US10560261B1 (en) Systems and techniques for capture of trusted media data
US11086825B2 (en) Telemetry system for a cloud synchronization system
US20130297563A1 (en) Timestamp management method for data synchronization and terminal therefor
CN111177165B (zh) 数据一致性检测的方法、装置及设备
US11188560B2 (en) Synchronizing object in local object storage node
CN113448862B (zh) 软件版本测试方法、装置及计算机设备
WO2019019670A1 (fr) Procédé et dispositif d'accès à une application, appareil informatique et support d'informations
CN106598821B (zh) 网页加载速度的测试方法及装置
CN105657049A (zh) 一种增量数据同步方法、装置和移动终端
CN114416883A (zh) 区块链轻节点数据同步方法、装置、设备及可读存储介质
WO2021168654A1 (fr) Procédé et appareil de détection de données synchronisées, serveur, et système de synchronisation de données
CN112328413A (zh) 应用服务的调用方法、装置及系统
CN109542850B (zh) 一种文件的worm属性更新方法、装置、设备及介质
CN113507529B (zh) 基于Web应用实现文件下载的方法
CN111400327B (zh) 一种数据同步方法、装置、电子设备及存储介质
CN111143583A (zh) 一种媒体数据库数据变化监听方法以及监听装置
CN113378022A (zh) 一种站内搜索平台、搜索方法和相关装置
CN107704614B (zh) 一种通知信息变更方法及系统
CN110362534B (zh) 一种快照验证方法、系统及电子设备和存储介质
WO2023005484A1 (fr) Procédé et appareil d'enregistrement d'informations d'utilisateur
CN111352992B (zh) 数据一致性检测方法、装置及服务器
CN109587640B (zh) 一种垃圾信息识别方法、终端和计算机存储介质
CN107222522B (zh) 移动存储方法
CN113626341A (zh) 匹配接口模拟报文的方法及装置
CN117785908A (zh) 数据处理请求执行方法及装置

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