WO2020248364A1 - 数据同步方法及相关设备 - Google Patents

数据同步方法及相关设备 Download PDF

Info

Publication number
WO2020248364A1
WO2020248364A1 PCT/CN2019/101959 CN2019101959W WO2020248364A1 WO 2020248364 A1 WO2020248364 A1 WO 2020248364A1 CN 2019101959 W CN2019101959 W CN 2019101959W WO 2020248364 A1 WO2020248364 A1 WO 2020248364A1
Authority
WO
WIPO (PCT)
Prior art keywords
reconciliation data
synchronized
synchronization
time interval
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/101959
Other languages
English (en)
French (fr)
Inventor
侯丽
王从利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020248364A1 publication Critical patent/WO2020248364A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Definitions

  • This application relates to the technical field of data processing, and specifically relates to a data synchronization method and related equipment.
  • the reconciliation data synchronization method is: the first synchronization of the reconciliation data to be synchronized is performed, and the first synchronization result is obtained.
  • the first synchronization result is that the synchronization fails
  • the reconciliation data to be synchronized is synchronized at least once manually.
  • the reconciliation data synchronization method results in low efficiency of reconciliation data synchronization.
  • the embodiment of the present application provides a data synchronization method and related equipment to improve the efficiency of reconciliation data synchronization.
  • an embodiment of the present application provides a data synchronization method, and the method includes:
  • the first synchronization result is synchronization failure, acquiring second to-be-synchronized reconciliation data, where the second to-be-synchronized reconciliation data is reconciliation data that fails to be synchronized in the first to-be-synchronized reconciliation data;
  • N is an integer greater than or equal to 1.
  • an embodiment of the present application provides a data synchronization device, and the device includes:
  • the first synchronization unit is configured to perform initial synchronization on the first to-be-synchronized reconciliation data at a first set time to obtain the first synchronization result corresponding to the first to-be-synchronized reconciliation data;
  • An obtaining unit configured to obtain second to-be-synchronized reconciliation data if the first synchronization result is synchronization failure, and the second to-be-synchronized reconciliation data is a pair of the first to-be-synchronized reconciliation data that has failed to be synchronized Account data;
  • the second synchronization unit is configured to resynchronize the second to-be-synchronized reconciliation data N times to obtain a second synchronization result corresponding to the second to-be-synchronized reconciliation data, where N is an integer greater than or equal to 1 .
  • embodiments of the present application provide a server, including a processor, a memory, a communication interface, and one or more programs.
  • the one or more programs are stored in the memory and configured to be executed by the processor.
  • the aforementioned program includes instructions for executing part or all of the steps in the method described in the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a computer-readable storage medium.
  • the foregoing computer-readable storage medium is used to store a computer program, and the foregoing computer program is executed by a processor to implement the method described in the first aspect of the embodiment of the present application. Some or all of the steps described in the method.
  • the server performs at least one re-synchronization of the second to-be-synchronized reconciliation data, and the second to-be-synchronized reconciliation data It is the reconciliation data that failed to be synchronized among the first reconciliation data to be synchronized, which helps to improve the efficiency of reconciliation data synchronization.
  • FIG. 1A is a schematic flowchart of a data synchronization method provided by an embodiment of the present application
  • FIG. 1B is a schematic diagram of determining a second time interval according to an embodiment of the present application.
  • FIG. 1C is a schematic diagram of determining a third time interval provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of another data synchronization method provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another data synchronization method provided by an embodiment of the present application.
  • FIG. 4 is a block diagram of functional units of a data synchronization device provided by an embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • Electronic devices may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to wireless modems, as well as various forms of user equipment (UE), Mobile station (Mobile Station, MS), terminal device (Terminal Device, TD), etc.
  • UE user equipment
  • MS Mobile Station
  • TD Terminal Device
  • a server also called a server, is a device that provides computing services.
  • the structure of the server includes a processor, hard disk, memory, system bus, etc., and is similar to a general computer architecture.
  • it is divided into file server, database server, application server, WEB server, etc.
  • FIG. 1A is a schematic flowchart of a data synchronization method provided by an embodiment of the present application.
  • the data synchronization method includes steps 101-103, which are specifically as follows:
  • the server performs initial synchronization on the first to-be-synchronized reconciliation data, and obtains the first synchronization result corresponding to the first to-be-synchronized reconciliation data.
  • reconciliation is to check accounts, which refers to the work of checking and verifying relevant data in the account books in order to ensure the correct and reliable records of the account books.
  • One-way reconciliation such as third-party payment institutions and bank reconciliation, two-way reconciliation such as order and financial system reconciliation.
  • data synchronization means that the handheld computer can quickly realize data synchronization and information sharing with desktop computers and laptops, so that your data can maintain integrity and unity.
  • Data synchronization is achieved through various data transmission interfaces, such as a USB sync base.
  • the server performs the initial synchronization of the first to-be-synchronized reconciliation data to obtain the first synchronization result corresponding to the first to-be-synchronized reconciliation data, including:
  • the server obtains the first time interval corresponding to the first to-be-synchronized reconciliation data
  • the server sends a synchronization request carrying the first time interval to an electronic device, where the synchronization request is used to instruct the electronic device to feed back the first to-be-synchronized reconciliation data;
  • the server receives the first to-be-synchronized reconciliation data sent by the electronic device in response to the synchronization request;
  • the server obtains reference reconciliation data, where the reference reconciliation data is the reconciliation data corresponding to the first time interval stored in the server;
  • the server determines that the first synchronization result corresponding to the first to-be-synchronized reconciliation data is synchronization success;
  • the server determines that the first synchronization result corresponding to the first to-be-synchronized reconciliation data is synchronization failure.
  • the server and the electronic device have a connection relationship, that is, the electronic device can receive the synchronization request sent by the server, and the server can also receive the to-be-synchronized reconciliation data sent by the electronic device in response to the synchronization request.
  • the server performs the initial synchronization of the first to-be-synchronized reconciliation data to obtain the first synchronization result corresponding to the first to-be-synchronized reconciliation data, including:
  • the server obtains the second time interval corresponding to the first to-be-synchronized reconciliation data
  • the server sends a synchronization request 1 carrying the second time interval to the electronic device.
  • the synchronization request 1 is used to instruct the electronic device to serially or in parallel feed back M parts of the same size reconciliation data included in the first to-be-synchronized reconciliation data, M Is an integer greater than 1;
  • the server receives M parts of the same size to be synchronized reconciliation data sent by the electronic device for the synchronization request 1;
  • the server obtains the reference reconciliation data, and divides the reference reconciliation data into M partial reference reconciliation data of the same size, the reference reconciliation data is the reconciliation data corresponding to the second time interval stored in the server, and M partial reference pairs There is a one-to-one correspondence between the account data and the M parts to be synchronized with the account data;
  • the server determines that the first synchronization result corresponding to the first to-be-synchronized reconciliation data is Synchronization is successful;
  • the server determines the first synchronization result corresponding to the first to-be-synchronized reconciliation data The synchronization failed.
  • the server obtains second to-be-synchronized reconciliation data, where the second to-be-synchronized reconciliation data is the reconciliation data whose synchronization fails among the first to-be-synchronized reconciliation data .
  • the server resynchronizes the second to-be-synchronized reconciliation data N times to obtain a second synchronization result corresponding to the second to-be-synchronized reconciliation data, where N is an integer greater than or equal to 1.
  • the server resynchronizes the second to-be-synchronized reconciliation data N times in a serial manner.
  • the server resynchronizes the second to-be-synchronized reconciliation data N times to obtain the second synchronization result corresponding to the second to-be-synchronized reconciliation data, including:
  • the server performs the i-th resynchronization on the second to-be-synchronized reconciliation data to obtain the i-th synchronization result corresponding to the i-th resynchronization;
  • the server performs the (i+1)th resynchronization on the second to-be-synchronized reconciliation data to obtain the (i+1)th resynchronization corresponding to the (i+1) synchronization results;
  • the server stops resynchronizing the second to-be-synchronized reconciliation data, and obtains the Nth synchronization result corresponding to the Nth resynchronization.
  • the i is the initial value of 1, and the increment is incremented by 1.
  • the server determines that the second synchronization result corresponding to the second to-be-synchronized reconciliation data is a successful synchronization
  • the server determines that the second synchronization result corresponding to the second to-be-synchronized reconciliation data is a synchronization failure.
  • the server performs the i-th resynchronization on the second to-be-synchronized reconciliation data to obtain the i-th synchronization result corresponding to the i-th re-synchronization and the server performs the first synchronization of the first to-be-synchronized reconciliation data to obtain the
  • the implementation of the first synchronization result corresponding to the reconciliation data to be synchronized is the same, and will not be described here.
  • the server performs at least one re-synchronization of the second to-be-synchronized reconciliation data, and the second to-be-synchronized reconciliation data It is the reconciliation data that failed to be synchronized among the first reconciliation data to be synchronized, which helps to improve the efficiency of reconciliation data synchronization.
  • the method further includes:
  • the server invokes the first time interval strategy pre-stored in the server, and the first time interval strategy is used to determine when the synchronization is successful the next time the reconciliation data to be synchronized corresponds to Time interval
  • the server determines the second time interval corresponding to the third reconciliation data to be synchronized according to the first time interval policy and the first time interval, and the acquisition time corresponding to the third reconciliation data to be synchronized is the second set time
  • the second set time is later than the first set time, and the difference between the second set time and the first set time is one reconciliation data synchronization period.
  • the first reconciliation data to be synchronized is the reconciliation data to be synchronized this time
  • the third reconciliation data to be synchronized is the reconciliation data to be synchronized next time.
  • the reconciliation data synchronization period can be user-defined, for example, the reconciliation data synchronization period is 24 hours.
  • the server determining the second time interval corresponding to the third to-be-synchronized reconciliation data according to the first time interval strategy and the first time interval includes:
  • the server determines the end time of the first time interval as the start time of the second time interval corresponding to the third to-be-synchronized reconciliation data; or, the server determines the second set time as the The start time of the second time interval corresponding to the third to-be-synchronized reconciliation data;
  • the server determines the sum of the end time of the first time interval and a synchronization period of the reconciliation data as the end time of the second time interval corresponding to the third to-be-synchronized reconciliation data; or The sum of the second set time and a synchronization period of the reconciliation data is determined as the end time of the second time interval corresponding to the third reconciliation data to be synchronized.
  • FIG. 1B is a schematic diagram of determining the second time interval provided by an embodiment of the present application. Assume that the first time interval is: 2019-01-08 06:00 ⁇ 2019-01-15 06:00, the second set time is: 2019-01-15 06:00, the reconciliation data synchronization cycle is 24 hours, if the second synchronization result is that the synchronization is successful, the server will set the end time or the first time interval 2.
  • the set time (2019-01-15 06:00) is determined as the start time of the second time interval, and the end time of the first time interval is combined with a reconciliation data synchronization period or the second set time is combined with a
  • the server determines the next time interval according to the first time interval strategy and the first time interval corresponding to the reconciliation data to be synchronized this time (the first reconciliation data to be synchronized)
  • the second time interval corresponding to the reconciliation data to be synchronized (the third reconciliation data to be synchronized), so as to quickly obtain the reconciliation data to be synchronized next time according to the second time interval during the next data synchronization, which helps reduce reconciliation
  • the duration of data synchronization improves the efficiency of reconciliation data synchronization.
  • the method further includes:
  • the server invokes a second time interval strategy pre-stored in the server, and the second time interval strategy is used to determine when the synchronization fails the next time the reconciliation data to be synchronized corresponds to Time interval
  • the server determines a third time interval corresponding to the fourth reconciliation data to be synchronized according to the second time interval strategy and the first time interval, and the acquisition time corresponding to the fourth reconciliation data to be synchronized is the third set time
  • the third set time is later than the first set time, and the difference between the third set time and the first set time is one reconciliation data synchronization period.
  • the first reconciliation data to be synchronized is the reconciliation data to be synchronized this time
  • the fourth reconciliation data to be synchronized is the reconciliation data to be synchronized next time.
  • the server determining the third time interval corresponding to the fourth to-be-synchronized reconciliation data according to the second time interval strategy and the first time interval includes:
  • the server determines the start time of the first time interval as the start time of the third time interval corresponding to the fourth to-be-synchronized reconciliation data
  • the server determines the sum of the end time of the first time interval and a synchronization period of the reconciliation data as the end time of the third time interval corresponding to the fourth to-be-synchronized reconciliation data; or The sum of the third set time and a synchronization period of the reconciliation data is determined as the end time of the third time interval corresponding to the fourth to-be-synchronized reconciliation data.
  • FIG. 1C is a schematic diagram of determining the third time interval provided by an embodiment of the present application.
  • the first time interval is: 2019-01-08 06:00 ⁇ 2019-01-15 06:00
  • the third set time is: 2019-01-15 06:00
  • the reconciliation data synchronization cycle is 24 hours
  • the server will set the start time of the first time interval ( 2019-01-08 06:00) Determined as the start time of the third time interval, the end time of the first time interval and a reconciliation data synchronization period or the third set time and a reconciliation data synchronization period
  • the server when the synchronization fails, the reconciliation data is manually synchronized again at least once.
  • the server when the second synchronization result is that the synchronization fails, the server according to the second time
  • the interval strategy and the first time interval corresponding to the reconciliation data to be synchronized this time determine the third time interval corresponding to the reconciliation data to be synchronized next time (the fourth reconciliation data to be synchronized), so Improve the efficiency of exception handling; at the same time, it is convenient to quickly obtain the next reconciliation data to be synchronized according to the third time interval during the next data synchronization, which helps to reduce the time of reconciliation data synchronization and improves the reconciliation data synchronization s efficiency.
  • the method further includes:
  • the server determines the duration of the third time interval
  • the server judges whether the duration of the third time interval is greater than or equal to the preset duration
  • the server performs an early warning operation for synchronization of the reconciliation data.
  • the duration of the third time interval is the difference between the end time of the third time interval and the start time of the third time interval.
  • the preset duration can be user-defined, for example, the set duration is 10 days.
  • the reconciliation data synchronization early warning operation includes transmitting reconciliation data synchronization early warning signal or sending reconciliation data synchronization early warning information.
  • FIG. 2 is a schematic flowchart of another data synchronization method provided by an embodiment of the present application.
  • the data synchronization method includes steps 201-212, which are specifically as follows:
  • the server obtains the first time interval corresponding to the first to-be-synchronized reconciliation data.
  • the server sends a synchronization request carrying the first time interval to an electronic device, where the synchronization request is used to instruct the electronic device to feed back the first to-be-synchronized reconciliation data.
  • the server receives the first to-be-synchronized reconciliation data sent by the electronic device in response to the synchronization request.
  • the server obtains reference reconciliation data, where the reference reconciliation data is the reconciliation data corresponding to the first time interval stored in the server.
  • the server determines that the first synchronization result corresponding to the first to-be-synchronized reconciliation data is synchronization failure.
  • the server obtains second to-be-synchronized reconciliation data, where the second to-be-synchronized reconciliation data is reconciliation data that fails to be synchronized in the first to-be-synchronized reconciliation data.
  • the server performs the i-th resynchronization on the second to-be-synchronized reconciliation data, and obtains the i-th synchronization result corresponding to the i-th resynchronization.
  • the server performs the (i+1)th resynchronization on the second to-be-synchronized reconciliation data to obtain the (i+1)th resynchronization corresponding The (i+1)th synchronization result of.
  • the server stops resynchronizing the second to-be-synchronized reconciliation data, and obtains the Nth synchronization result corresponding to the Nth resynchronization.
  • the i is the initial value of 1, and the interval is 1 The incrementing integer.
  • the server determines that the second synchronization result corresponding to the second to-be-synchronized reconciliation data is successful synchronization.
  • the server invokes a first time interval strategy pre-stored in the server, where the first time interval strategy is used to determine the time interval corresponding to the reconciliation data to be synchronized next time when synchronization is successful.
  • the server determines the second time interval corresponding to the third reconciliation data to be synchronized according to the first time interval strategy and the first time interval, and the acquisition time corresponding to the third reconciliation data to be synchronized is the second setting At a fixed time, the second set time is later than the first set time, and the difference between the second set time and the first set time is one reconciliation data synchronization period.
  • FIG. 3 is a schematic flowchart of another data synchronization method provided by an embodiment of the present application.
  • the data synchronization method includes steps 301-312, which are specifically as follows:
  • the server obtains the first time interval corresponding to the first to-be-synchronized reconciliation data.
  • the server sends a synchronization request carrying the first time interval to an electronic device, where the synchronization request is used to instruct the electronic device to feed back the first to-be-synchronized reconciliation data.
  • the server receives the first to-be-synchronized reconciliation data sent by the electronic device in response to the synchronization request.
  • the server obtains reference reconciliation data, where the reference reconciliation data is the reconciliation data corresponding to the first time interval stored in the server.
  • the server determines that the first synchronization result corresponding to the first to-be-synchronized reconciliation data is synchronization failure.
  • the server obtains second to-be-synchronized reconciliation data, where the second to-be-synchronized reconciliation data is reconciliation data that fails to be synchronized in the first to-be-synchronized reconciliation data.
  • the server performs the i-th resynchronization on the second to-be-synchronized reconciliation data, and obtains the i-th synchronization result corresponding to the i-th resynchronization.
  • the server performs the (i+1)th resynchronization on the second to-be-synchronized reconciliation data to obtain the (i+1)th resynchronization corresponding The (i+1)th synchronization result of.
  • the server stops resynchronizing the second to-be-synchronized reconciliation data, and obtains the Nth synchronization result corresponding to the Nth resynchronization.
  • the i is the initial value of 1, and the interval is 1 The incrementing integer.
  • the server determines that the second synchronization result corresponding to the second to-be-synchronized reconciliation data is a synchronization failure.
  • the server invokes a second time interval strategy pre-stored in the server, where the second time interval strategy is used to determine the time interval corresponding to the reconciliation data to be synchronized next time when synchronization fails.
  • the server determines a third time interval corresponding to the fourth reconciliation data to be synchronized according to the second time interval strategy and the first time interval, and the acquisition time corresponding to the fourth reconciliation data to be synchronized is the third setting.
  • the third set time is later than the first set time, and the difference between the third set time and the first set time is one reconciliation data synchronization period.
  • FIG. 4 is a block diagram of the functional unit composition of a data synchronization device provided by an embodiment of the present application.
  • the data synchronization device 400 includes:
  • the first synchronization unit 401 is configured to perform initial synchronization on the first to-be-synchronized reconciliation data at a first set time to obtain the first synchronization result corresponding to the first to-be-synchronized reconciliation data;
  • the obtaining unit 402 is configured to obtain second to-be-synchronized reconciliation data if the first synchronization result is synchronization failure, and the second to-be-synchronized reconciliation data is the synchronization failure among the first to-be-synchronized reconciliation data Reconciliation data;
  • the second synchronization unit 403 is configured to perform N resynchronization of the second to-be-synchronized reconciliation data to obtain a second synchronization result corresponding to the second to-be-synchronized reconciliation data, where N is greater than or equal to 1. Integer.
  • the second reconciliation data to be synchronized is resynchronized at least once, and the second reconciliation data to be synchronized is The reconciliation data that failed to be synchronized in the first to-be-synchronized reconciliation data helps to improve the efficiency of reconciliation data synchronization.
  • the first synchronization unit 401 is specifically configured to:
  • the reference reconciliation data is the reconciliation data corresponding to the first time interval stored in the server
  • the size and/or content of the reference reconciliation data and the first to-be-synchronized reconciliation data are different, it is determined that the first synchronization result corresponding to the first to-be-synchronized reconciliation data is synchronization failure.
  • the second synchronization unit 403 specifically uses in:
  • the (i+1)th resynchronization is performed on the second to-be-synchronized reconciliation data to obtain the (i+1)th resynchronization corresponding to the (i+1)th resynchronization. i+1) synchronization results;
  • the i is an initial value of 1, and an incremental integer with an interval of 1. ;
  • the Nth synchronization result is synchronization failure, it is determined that the second synchronization result corresponding to the second to-be-synchronized reconciliation data is synchronization failure.
  • the foregoing data synchronization device 400 further includes:
  • the first calling unit 404 is configured to, if the second synchronization result is a successful synchronization, call a first time interval strategy pre-stored in the server, and the first time interval strategy is used to determine the next time when the synchronization is successful The time interval corresponding to the reconciliation data to be synchronized;
  • the first determining unit 405 is configured to determine, according to the first time interval strategy and the first time interval, the second time interval corresponding to the third to-be-synchronized reconciliation data, and the corresponding acquisition of the third to-be-synchronized reconciliation data
  • the time is a second set time, the second set time is later than the first set time, and the difference between the second set time and the first set time is one reconciliation data synchronization period .
  • the first determining unit 405 is specifically configured to:
  • the sum of the second set time and a synchronization period of the reconciliation data is determined as the end time of the second time interval corresponding to the third to-be-synchronized reconciliation data.
  • the foregoing data synchronization device 400 further includes:
  • the second calling unit 406 is configured to, if the second synchronization result is a synchronization failure, call a second time interval strategy pre-stored in the server, and the second time interval strategy is used to determine the next time when the synchronization fails The time interval corresponding to the reconciliation data to be synchronized;
  • the second determining unit 407 is configured to determine, according to the second time interval strategy and the first time interval, a third time interval corresponding to the fourth to-be-synchronized reconciliation data, and corresponding acquisition of the fourth to-be-synchronized reconciliation data
  • the time is the third set time
  • the third set time is later than the first set time
  • the difference between the third set time and the first set time is one reconciliation data synchronization period .
  • the second determining unit 407 is specifically configured to:
  • the sum of the third set time and one synchronization period of the reconciliation data is determined as the end time of the third time interval corresponding to the fourth to-be-synchronized reconciliation data.
  • the foregoing data synchronization device 400 further includes:
  • the third determining unit 408 is configured to determine the duration of the third time interval
  • the determining unit 409 is configured to determine whether the duration of the third time interval is greater than or equal to a preset duration
  • the execution unit 410 is configured to execute an early warning operation for synchronization of reconciliation data if the duration of the third time interval is greater than or equal to the preset duration.
  • FIG. 5 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 500 includes a processor, a memory, and a communication interface. And one or more programs, the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the following steps:
  • the first synchronization result is synchronization failure, acquiring second to-be-synchronized reconciliation data, where the second to-be-synchronized reconciliation data is reconciliation data that fails to be synchronized in the first to-be-synchronized reconciliation data;
  • N is an integer greater than or equal to 1.
  • the server performs at least one re-synchronization of the second to-be-synchronized reconciliation data, and the second to-be-synchronized reconciliation data It is the reconciliation data that failed to be synchronized among the first reconciliation data to be synchronized, which helps to improve the efficiency of reconciliation data synchronization.
  • the foregoing program includes instructions specifically for executing the following steps:
  • the reference reconciliation data is the reconciliation data corresponding to the first time interval stored in the server
  • the size and/or content of the reference reconciliation data and the first to-be-synchronized reconciliation data are different, it is determined that the first synchronization result corresponding to the first to-be-synchronized reconciliation data is synchronization failure.
  • the above procedure includes specifically performing the following Step instructions:
  • the (i+1)th resynchronization is performed on the second to-be-synchronized reconciliation data to obtain the (i+1)th resynchronization corresponding to the (i+1)th resynchronization. i+1) synchronization results;
  • the i is an initial value of 1, and an incremental integer with an interval of 1. ;
  • the Nth synchronization result is a synchronization failure, it is determined that the second synchronization result corresponding to the second to-be-synchronized reconciliation data is a synchronization failure.
  • the above program also includes instructions for performing the following steps:
  • the first time interval strategy pre-stored in the server is invoked, and the first time interval strategy is used to determine the time corresponding to the next reconciliation data to be synchronized when the synchronization is successful Interval
  • Determining a second time interval corresponding to the third to-be-synchronized reconciliation data according to the first time interval strategy and the first time interval, and the acquisition time corresponding to the third to-be-synchronized reconciliation data is a second set time,
  • the second set time is later than the first set time, and the difference between the second set time and the first set time is one reconciliation data synchronization period.
  • the above program includes instructions specifically for executing the following steps :
  • the sum of the second set time and a synchronization period of the reconciliation data is determined as the end time of the second time interval corresponding to the third to-be-synchronized reconciliation data.
  • the above program also includes instructions for performing the following steps:
  • the second time interval strategy pre-stored in the server is invoked, and the second time interval strategy is used to determine the time corresponding to the next reconciliation data to be synchronized when the synchronization fails Interval
  • Determining a third time interval corresponding to the fourth reconciliation data to be synchronized according to the second time interval strategy and the first time interval, and the acquisition time corresponding to the fourth reconciliation data to be synchronized is a third set time,
  • the third set time is later than the first set time, and the difference between the third set time and the first set time is one reconciliation data synchronization period.
  • the above program includes instructions specifically for executing the following steps :
  • the sum of the third set time and one synchronization period of the reconciliation data is determined as the end time of the third time interval corresponding to the fourth to-be-synchronized reconciliation data.
  • the above program also includes instructions for performing the following steps:
  • the reconciliation data synchronization warning operation is performed.
  • the embodiment of the present application also provides a computer-readable storage medium, which is used to store a computer program, and the above-mentioned computer program is executed by a processor to realize a part or part of any one of the methods described in the above-mentioned method embodiment.
  • the above-mentioned computer includes a server.
  • the embodiments of the present application also provide a computer program product.
  • the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program.
  • the above-mentioned computer program is operable to cause a computer to execute any of the methods described in the above-mentioned method embodiments. Part or all of the steps of the method.
  • the computer program product may be a software installation package, and the computer includes a server.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory.
  • the technical solution of the present application essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, A number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the foregoing methods of the various embodiments of the present application.
  • the aforementioned memory includes: U disk, read-only memory (ROM, Read-OMly Memory), random access memory (RAM, RaMdom Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
  • the program can be stored in a computer-readable memory, and the memory can include: flash disk , Read-only memory (English: Read-OMly Memory, abbreviation: ROM), random access device (English: RaMdom Access Memory, abbreviation: RAM), magnetic disk or CD, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请涉及数据处理技术领域的增量同步,具体涉及一种数据同步方法及相关设备,方法包括:在第一设定时刻,对第一待同步对账数据进行初次同步,得到第一待同步对账数据对应的第一同步结果;若第一同步结果为同步失败,则获取第二待同步对账数据,第二待同步对账数据为第一待同步对账数据中同步失败的对账数据;对第二待同步对账数据进行N次再次同步,得到第二待同步对账数据对应的第二同步结果,N为大于或等于1的整数。采用本申请实施例有助于提高对账数据同步的效率。

Description

数据同步方法及相关设备
本申请要求于2019年06月13日提交中国专利局、申请号为201910509890.1、申请名称为“数据同步方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,具体涉及一种数据同步方法及相关设备。
背景技术
无论是单向对账,还是双向对账均需要对账数据,因此对账数据十分重要,有必要对对账数据进行同步。目前,对账数据同步方式为:对待同步对账数据进行初次同步,得到第一同步结果,当第一同步结果为同步失败时,采用人工方式对待同步对账数据进行至少一次再次同步,这种对账数据同步方式导致对账数据同步的效率较低。
发明内容
本申请实施例提供一种数据同步方法及相关设备,用于提高对账数据同步的效率。
第一方面,本申请实施例提供一种数据同步方法,所述方法包括:
在第一设定时刻,对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果;
若所述第一同步结果为同步失败,则获取第二待同步对账数据,所述第二待同步对账数据为所述第一待同步对账数据中同步失败的对账数据;
对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果,所述N为大于或等于1的整数。
第二方面,本申请实施例提供一种数据同步装置,所述装置包括:
第一同步单元,用于在第一设定时刻,对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果;
获取单元,用于若所述第一同步结果为同步失败,则获取第二待同步对账数据,所述第二待同步对账数据为所述第一待同步对账数据中同步失败的对账数据;
第二同步单元,用于对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果,所述N为大于或等于1的整数。
第三方面,本申请实施例提供一种服务器,包括处理器、存储器、通信接口以及一个或多个程序,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行本申请实施例第一方面所述的方法中的部分或全部步骤的指令。
第四方面,本申请实施例提供一种计算机可读存储介质,上述计算机可读存储介质用于存储计算机程序,上述计算机程序被处理器执行,以实现如本申请实施例第一方面所述的方法中所描述的部分或全部步骤。
可以看出,相较于采用人工方式对待同步对账数据进行至少一次再次同步,在本申请实施例中,服务器对第二待同步对账数据进行至少一次再次同步,第二待同步对账数据为 第一待同步对账数据中同步失败的对账数据,这样有助于提高对账数据同步的效率。
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
附图说明
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。
图1A是本申请实施例提供的一种数据同步方法的流程示意图;
图1B是本申请实施例提供的一种确定第二时间区间的示意图;
图1C是本申请实施例提供的一种确定第三时间区间的示意图;
图2是本申请实施例提供的另一种数据同步方法的流程示意图;
图3是本申请实施例提供的另一种数据同步方法的流程示意图;
图4是本申请实施例提供的一种数据同步装置的功能单元组成框图;
图5是本申请实施例提供的一种服务器的结构示意图。
具体实现方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
(1)电子设备可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(Terminal Device,TD)等。
(2)服务器,也称伺服器,是提供计算服务的设备。服务器的构成包括处理器、硬盘、内存、系统总线等,和通用的计算机架构类似。在网络环境下,根据服务器提供的服务类型不同,分为文件服务器,数据库服务器,应用程序服务器,WEB服务器等。
请参阅图1A,图1A是本申请实施例提供的一种数据同步方法的流程示意图,该数据同步方法包括步骤101-103,具体如下:
101:在第一设定时刻,服务器对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果。
其中,对账就是核对账目,是指在会计核算中,为保证账簿记录正确可靠,对账簿中的有关数据进行检查和核对的工作。单向对账如第三方支付机构和银行间对账,双向对账如订单与财务系统对账。
其中,数据同步是指掌上电脑能够迅速实现与台式电脑、笔记本电脑的数据同步与信息共享,使您的数据保持完整性和统一性。数据同步是通过各种数据传输接口实现的,如USB同步底座。
在一个可能的示例中,服务器对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果,包括:
服务器获取所述第一待同步对账数据对应的第一时间区间;
服务器向电子设备发送携带所述第一时间区间的同步请求,所述同步请求用于指示所述电子设备反馈所述第一待同步对账数据;
服务器接收所述电子设备针对所述同步请求发送的所述第一待同步对账数据;
服务器获取参考对账数据,所述参考对账数据为服务器中存储的所述第一时间区间对应的对账数据;
若所述参考对账数据与所述第一待同步对账数据的大小和内容均相同,则服务器确定所述第一待同步对账数据对应的第一同步结果为同步成功;
若所述参考对账数据与所述第一待同步对账数据的大小和/或内容不同,则服务器确定所述第一待同步对账数据对应的第一同步结果为同步失败。
其中,服务器与电子设备具有连接关系,即电子设备可以接收到服务器发送的同步请求,服务器也可以接收到电子设备针对同步请求发送的待同步对账数据。
在一个可能的示例中,服务器对第一待同步对账数据进行初次同步,得到第一待同步对账数据对应的第一同步结果,包括:
服务器获取第一待同步对账数据对应的第二时间区间;
服务器向电子设备发送携带第二时间区间的同步请求1,同步请求1用于指示电子设备串行或并行反馈第一待同步对账数据包括的M个大小相同的部分待同步对账数据,M为大于1的整数;
服务器接收电子设备针对同步请求1发送的M个大小相同的部分待同步对账数据;
服务器获取参考对账数据,以及将参考对账数据划分为M个大小相同的部分参考对账数据,参考对账数据为服务器中存储的第二时间区间对应的对账数据,M个部分参考对账数据与M个部分待同步对账数据一一对应;
若M个部分待同步对账数据中的任一部分待同步对账数据与其对应的部分参考对账数据的大小和内容均相同,则服务器确定第一待同步对账数据对应的第一同步结果为同步成功;
若M个部分待同步对账数据中的任一部分待同步对账数据与其对应的部分参考对账数据的大小和/或内容不同,则服务器确定第一待同步对账数据对应的第一同步结果为同步失败。
102:若所述第一同步结果为同步失败,则服务器获取第二待同步对账数据,所述第二待同步对账数据为所述第一待同步对账数据中同步失败的对账数据。
103:服务器对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果,所述N为大于或等于1的整数。
其中,服务器对第二待同步对账数据进行N次再次同步采用串行方式。
在一个可能的示例中,服务器对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果,包括:
服务器对所述第二待同步对账数据进行第i次再次同步,得到所述第i次再次同步对应的第i个同步结果;
若所述第i个同步结果为同步失败,则服务器对所述第二待同步对账数据进行第(i+1)次再次同步,得到所述第(i+1)次再次同步对应的第(i+1)个同步结果;
直到i=N,服务器停止对所述第二待同步对账数据进行再次同步,得到第N次再次同步对应的第N个同步结果,所述i是初始值为1,以1为间隔的递增整数;
若所述第N个同步结果为同步成功,则服务器确定所述第二待同步对账数据对应的所述第二同步结果为同步成功;
若所述第N个同步结果为同步失败,则服务器确定所述第二待同步对账数据对应的所述第二同步结果为同步失败。
其中,服务器对第二待同步对账数据进行第i次再次同步,得到第i次再次同步对应的第i个同步结果的实施方式与服务器对第一待同步对账数据进行初次同步,得到第一待同步对账数据对应的第一同步结果的实施方式是相同的,在此不再叙述。
可以看出,相较于采用人工方式对待同步对账数据进行至少一次再次同步,在本申请实施例中,服务器对第二待同步对账数据进行至少一次再次同步,第二待同步对账数据为第一待同步对账数据中同步失败的对账数据,这样有助于提高对账数据同步的效率。
在一个可能的示例中,服务器对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果之后,所述方法还包括:
若所述第二同步结果为同步成功,则服务器调用所述服务器中预先存储的第一时间区间策略,所述第一时间区间策略用于当同步成功时确定下次待同步对账数据对应的时间区间;
服务器根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间,所述第三待同步对账数据对应的获取时刻为第二设定时刻,所述第二设定时刻晚于所述第一设定时刻,所述第二设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
其中,第一待同步对账数据为本次待同步对账数据,第三待同步对账数据为下次待同步对账数据。
其中,对账数据同步周期可以是用户自定义的,比如对账数据同步周期为24小时。
在一个可能的示例中,服务器根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间,包括:
服务器将所述第一时间区间的结束时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;或者,服务器将所述第二设定时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;
服务器将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻;或者,服务器将所述第二设定时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻。
举例来说,如图1B所示,图1B是本申请实施例提供的一种确定第二时间区间的示意图,假设第一时间区间为:2019-01-08 06:00~2019-01-15 06:00,第二设定时刻为:2019-01-15  06:00,对账数据同步周期为24小时,若第二同步结果为同步成功,则服务器将第一时间区间的结束时刻或第二设定时刻(2019-01-15 06:00)确定为第二时间区间的起始时刻,将第一时间区间的结束时刻与一个对账数据同步周期之和或第二设定时刻与一个对账数据同步周期之和(2019-01-15 06:00+24小时=2019-01-16 06:00)确定为第二时间区间的结束时刻,即第二时间区间为:2019-01-15 06:00~2019-01-16 06:00。
可见,在本示例中,当第二同步结果为同步成功时,服务器根据第一时间区间策略和本次待同步对账数据(第一待同步对账数据)对应的第一时间区间确定下次待同步对账数据(第三待同步对账数据)对应的第二时间区间,以便于在下次数据同步时根据第二时间区间快速获取下次待同步对账数据,这样有助于减少对账数据同步的时长,提高了对账数据同步的效率。
在一个可能的示例中,服务器对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果之后,所述方法还包括:
若所述第二同步结果为同步失败,则服务器调用所述服务器中预先存储的第二时间区间策略,所述第二时间区间策略用于当同步失败时确定下次待同步对账数据对应的时间区间;
服务器根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间,所述第四待同步对账数据对应的获取时刻为第三设定时刻,所述第三设定时刻晚于所述第一设定时刻,所述第三设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
其中,第一待同步对账数据为本次待同步对账数据,第四待同步对账数据为下次待同步对账数据。
在一个可能的示例中,服务器根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间,包括:
服务器将所述第一时间区间的起始时刻确定为所述第四待同步对账数据对应的所述第三时间区间的起始时刻;
服务器将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻;或者,服务器将所述第三设定时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻。
举例来说,如图1C所示,图1C是本申请实施例提供的一种确定第三时间区间的示意图,假设第一时间区间为:2019-01-08 06:00~2019-01-15 06:00,第三设定时刻为:2019-01-15 06:00,对账数据同步周期为24小时,若第二同步结果为同步失败,则服务器将第一时间区间的起始时刻(2019-01-08 06:00)确定为第三时间区间的起始时刻,将第一时间区间的结束时刻与一个对账数据同步周期之和或第三设定时刻与一个对账数据同步周期之和(2019-01-15 06:00+24小时=2019-01-16 06:00)确定为第三时间区间的结束时刻,即第三时间区间为:2019-01-08 06:00~2019-01-16 06:00。
可见,相较于对对账数据进行初次同步,当同步失败时采用人工方式对对账数据进行 至少一次再次同步,在本示例中,当第二同步结果为同步失败时,服务器根据第二时间区间策略和本次待同步对账数据(第一待同步对账数据)对应的第一时间区间确定下次待同步对账数据(第四待同步对账数据)对应的第三时间区间,这样实现了提高异常处理的效率;同时,以便于在下次数据同步时根据第三时间区间快速获取下次待同步对账数据,这样有助于减少对账数据同步的时长,提高了对账数据同步的效率。
在一个可能的示例中,服务器根据第二时间区间策略和第一时间区间确定第四待同步对账数据对应的第三时间区间之后,所述方法还包括:
服务器确定第三时间区间的时长;
服务器判断第三时间区间的时长是否大于或等于预设时长;
若第三时间区间的时长大于或等于预设时长,则服务器执行对账数据同步预警操作。
其中,第三时间区间的时长为第三时间区间的结束时刻与第三时间区间的起始时刻的差值。
其中,预设时长可以是用户自定义的,比如设定时长为10天。
其中,对账数据同步预警操作包括发射对账数据同步预警信号或发送对账数据同步预警信息。
与上述图1A所示的实施例一致的,请参阅图2,图2是本申请实施例提供的另一种数据同步方法的流程示意图,该数据同步方法包括步骤201-212,具体如下:
201:在第一设定时刻,服务器获取第一待同步对账数据对应的第一时间区间。
202:服务器向电子设备发送携带所述第一时间区间的同步请求,所述同步请求用于指示所述电子设备反馈所述第一待同步对账数据。
203:服务器接收所述电子设备针对所述同步请求发送的所述第一待同步对账数据。
204:服务器获取参考对账数据,所述参考对账数据为服务器中存储的所述第一时间区间对应的对账数据。
205:若所述参考对账数据与所述第一待同步对账数据的大小和/或内容不同,则服务器确定所述第一待同步对账数据对应的第一同步结果为同步失败。
206:服务器获取第二待同步对账数据,所述第二待同步对账数据为所述第一待同步对账数据中同步失败的对账数据。
207:服务器对所述第二待同步对账数据进行第i次再次同步,得到所述第i次再次同步对应的第i个同步结果。
208:若所述第i个同步结果为同步失败,则服务器对所述第二待同步对账数据进行第(i+1)次再次同步,得到所述第(i+1)次再次同步对应的第(i+1)个同步结果。
209:直到i=N,服务器停止对所述第二待同步对账数据进行再次同步,得到第N次再次同步对应的第N个同步结果,所述i是初始值为1,以1为间隔的递增整数。
210:若所述第N个同步结果为同步成功,则服务器确定所述第二待同步对账数据对应的第二同步结果为同步成功。
211:服务器调用所述服务器中预先存储的第一时间区间策略,所述第一时间区间策略 用于当同步成功时确定下次待同步对账数据对应的时间区间。
212:服务器根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间,所述第三待同步对账数据对应的获取时刻为第二设定时刻,所述第二设定时刻晚于所述第一设定时刻,所述第二设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
需要说明的是,图2所示的方法的各个步骤的具体实现过程可参见上述方法所述的具体实现过程,在此不再叙述。
与上述图1A所示的实施例一致的,请参阅图3,图3是本申请实施例提供的另一种数据同步方法的流程示意图,该数据同步方法包括步骤301-312,具体如下:
301:在第一设定时刻,服务器获取第一待同步对账数据对应的第一时间区间。
302:服务器向电子设备发送携带所述第一时间区间的同步请求,所述同步请求用于指示所述电子设备反馈所述第一待同步对账数据。
303:服务器接收所述电子设备针对所述同步请求发送的所述第一待同步对账数据。
304:服务器获取参考对账数据,所述参考对账数据为服务器中存储的所述第一时间区间对应的对账数据。
305:若所述参考对账数据与所述第一待同步对账数据的大小和/或内容不同,则服务器确定所述第一待同步对账数据对应的第一同步结果为同步失败。
306:服务器获取第二待同步对账数据,所述第二待同步对账数据为所述第一待同步对账数据中同步失败的对账数据。
307:服务器对所述第二待同步对账数据进行第i次再次同步,得到所述第i次再次同步对应的第i个同步结果。
308:若所述第i个同步结果为同步失败,则服务器对所述第二待同步对账数据进行第(i+1)次再次同步,得到所述第(i+1)次再次同步对应的第(i+1)个同步结果。
309:直到i=N,服务器停止对所述第二待同步对账数据进行再次同步,得到第N次再次同步对应的第N个同步结果,所述i是初始值为1,以1为间隔的递增整数。
310:若所述第N个同步结果为同步失败,则服务器确定所述第二待同步对账数据对应的第二同步结果为同步失败。
311:服务器调用所述服务器中预先存储的第二时间区间策略,所述第二时间区间策略用于当同步失败时确定下次待同步对账数据对应的时间区间。
312:服务器根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间,所述第四待同步对账数据对应的获取时刻为第三设定时刻,所述第三设定时刻晚于所述第一设定时刻,所述第三设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
需要说明的是,图3所示的方法的各个步骤的具体实现过程可参见上述方法所述的具体实现过程,在此不再叙述。
与上述图1A、图2和图3所示的实施例一致的,请参阅图4,图4是本申请实施例提供的一种数据同步装置的功能单元组成框图,该数据同步装置400包括:
第一同步单元401,用于在第一设定时刻,对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果;
获取单元402,用于若所述第一同步结果为同步失败,则获取第二待同步对账数据,所述第二待同步对账数据为所述第一待同步对账数据中同步失败的对账数据;
第二同步单元403,用于对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果,所述N为大于或等于1的整数。
可以看出,相较于采用人工方式对待同步对账数据进行至少一次再次同步,在本申请实施例中,对第二待同步对账数据进行至少一次再次同步,第二待同步对账数据为第一待同步对账数据中同步失败的对账数据,这样有助于提高对账数据同步的效率。
在一个可能的示例中,在对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果方面,上述第一同步单元401具体用于:
获取所述第一待同步对账数据对应的第一时间区间;
向电子设备发送携带所述第一时间区间的同步请求,所述同步请求用于指示所述电子设备反馈所述第一待同步对账数据;
接收所述电子设备针对所述同步请求发送的所述第一待同步对账数据;
获取参考对账数据,所述参考对账数据为服务器中存储的所述第一时间区间对应的对账数据;
若所述参考对账数据与所述第一待同步对账数据的大小和内容均相同,则确定所述第一待同步对账数据对应的第一同步结果为同步成功;
若所述参考对账数据与所述第一待同步对账数据的大小和/或内容不同,则确定所述第一待同步对账数据对应的第一同步结果为同步失败。
在一个可能的示例中,在对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果方面,上述第二同步单元403具体用于:
对所述第二待同步对账数据进行第i次再次同步,得到所述第i次再次同步对应的第i个同步结果;
若所述第i个同步结果为同步失败,则对所述第二待同步对账数据进行第(i+1)次再次同步,得到所述第(i+1)次再次同步对应的第(i+1)个同步结果;
直到i=N,停止对所述第二待同步对账数据进行再次同步,得到第N次再次同步对应的第N个同步结果,所述i是初始值为1,以1为间隔的递增整数;
若所述第N个同步结果为同步成功,则确定所述第二待同步对账数据对应的所述第二同步结果为同步成功;
若所述第N个同步结果为同步失败,则确定所述第二待同步对账数据对应的所述第二同步结果为同步失败。
在一个可能的示例中,上述数据同步装置400还包括:
第一调用单元404,用于若所述第二同步结果为同步成功,则调用所述服务器中预先 存储的第一时间区间策略,所述第一时间区间策略用于当同步成功时确定下次待同步对账数据对应的时间区间;
第一确定单元405,用于根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间,所述第三待同步对账数据对应的获取时刻为第二设定时刻,所述第二设定时刻晚于所述第一设定时刻,所述第二设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
在一个可能的示例中,在根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间方面,上述第一确定单元405具体用于:
将所述第一时间区间的结束时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;或者,
将所述第二设定时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;
将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻;或者,
将所述第二设定时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻。
在一个可能的示例中,上述数据同步装置400还包括:
第二调用单元406,用于若所述第二同步结果为同步失败,则调用所述服务器中预先存储的第二时间区间策略,所述第二时间区间策略用于当同步失败时确定下次待同步对账数据对应的时间区间;
第二确定单元407,用于根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间,所述第四待同步对账数据对应的获取时刻为第三设定时刻,所述第三设定时刻晚于所述第一设定时刻,所述第三设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
在一个可能的示例中,在根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间方面,上述第二确定单元407具体用于:
将所述第一时间区间的起始时刻确定为所述第四待同步对账数据对应的所述第三时间区间的起始时刻;
将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻;或者,
将所述第三设定时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻。
在一个可能的示例中,上述数据同步装置400还包括:
第三确定单元408,用于确定所述第三时间区间的时长;
判断单元409,用于判断所述第三时间区间的时长是否大于或等于预设时长;
执行单元410,用于若所述第三时间区间的时长大于或等于所述预设时长,则执行对账数据同步预警操作。
与上述图1A、图2和图3所示的实施例一致的,请参阅图5,图5是本申请实施例提供的一种服务器的结构示意图,该服务器500包括处理器、存储器、通信接口以及一个或多个程序,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行以下步骤的指令:
在第一设定时刻,对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果;
若所述第一同步结果为同步失败,则获取第二待同步对账数据,所述第二待同步对账数据为所述第一待同步对账数据中同步失败的对账数据;
对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果,所述N为大于或等于1的整数。
可以看出,相较于采用人工方式对待同步对账数据进行至少一次再次同步,在本申请实施例中,服务器对第二待同步对账数据进行至少一次再次同步,第二待同步对账数据为第一待同步对账数据中同步失败的对账数据,这样有助于提高对账数据同步的效率。
在一个可能的示例中,在对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果方面,上述程序包括具体用于执行以下步骤的指令:
获取所述第一待同步对账数据对应的第一时间区间;
向电子设备发送携带所述第一时间区间的同步请求,所述同步请求用于指示所述电子设备反馈所述第一待同步对账数据;
接收所述电子设备针对所述同步请求发送的所述第一待同步对账数据;
获取参考对账数据,所述参考对账数据为服务器中存储的所述第一时间区间对应的对账数据;
若所述参考对账数据与所述第一待同步对账数据的大小和内容均相同,则确定所述第一待同步对账数据对应的第一同步结果为同步成功;
若所述参考对账数据与所述第一待同步对账数据的大小和/或内容不同,则确定所述第一待同步对账数据对应的第一同步结果为同步失败。
在一个可能的示例中,在对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果方面,上述程序包括具体用于执行以下步骤的指令:
对所述第二待同步对账数据进行第i次再次同步,得到所述第i次再次同步对应的第i个同步结果;
若所述第i个同步结果为同步失败,则对所述第二待同步对账数据进行第(i+1)次再次同步,得到所述第(i+1)次再次同步对应的第(i+1)个同步结果;
直到i=N,停止对所述第二待同步对账数据进行再次同步,得到第N次再次同步对应的第N个同步结果,所述i是初始值为1,以1为间隔的递增整数;
若所述第N个同步结果为同步成功,则确定所述第二待同步对账数据对应的所述第二同步结果为同步成功;
若所述第N个同步结果为同步失败,则确定所述第二待同步对账数据对应的所述第二 同步结果为同步失败。
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:
若所述第二同步结果为同步成功,则调用所述服务器中预先存储的第一时间区间策略,所述第一时间区间策略用于当同步成功时确定下次待同步对账数据对应的时间区间;
根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间,所述第三待同步对账数据对应的获取时刻为第二设定时刻,所述第二设定时刻晚于所述第一设定时刻,所述第二设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
在一个可能的示例中,在根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间方面,上述程序包括具体用于执行以下步骤的指令:
将所述第一时间区间的结束时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;或者,
将所述第二设定时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;
将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻;或者,
将所述第二设定时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻。
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:
若所述第二同步结果为同步失败,则调用所述服务器中预先存储的第二时间区间策略,所述第二时间区间策略用于当同步失败时确定下次待同步对账数据对应的时间区间;
根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间,所述第四待同步对账数据对应的获取时刻为第三设定时刻,所述第三设定时刻晚于所述第一设定时刻,所述第三设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
在一个可能的示例中,在根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间方面,上述程序包括具体用于执行以下步骤的指令:
将所述第一时间区间的起始时刻确定为所述第四待同步对账数据对应的所述第三时间区间的起始时刻;
将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻;或者,
将所述第三设定时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻。
在一个可能的示例中,上述程序还包括用于执行以下步骤的指令:
确定所述第三时间区间的时长;
判断所述第三时间区间的时长是否大于或等于预设时长;
若所述第三时间区间的时长大于或等于所述预设时长,则执行对账数据同步预警操作。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,上述计算机程序被处理器执行,以实现如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括服务器。
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括服务器。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-OMly Memory)、随机存取存储器(RAM,RaMdom Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-OMly Memory,简称:ROM)、随机存取器(英 文:RaMdom Access Memory,简称:RAM)、磁盘或光盘等。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实现方式及应用范围上均会有改变之处,综上上述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种数据同步方法,其特征在于,所述方法包括:
    在第一设定时刻,对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果;
    若所述第一同步结果为同步失败,则获取第二待同步对账数据,所述第二待同步对账数据为所述第一待同步对账数据中同步失败的对账数据;
    对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果,所述N为大于或等于1的整数。
  2. 根据权利要求1所述的方法,其特征在于,所述对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果,包括:
    获取所述第一待同步对账数据对应的第一时间区间;
    向电子设备发送携带所述第一时间区间的同步请求,所述同步请求用于指示所述电子设备反馈所述第一待同步对账数据;
    接收所述电子设备针对所述同步请求发送的所述第一待同步对账数据;
    获取参考对账数据,所述参考对账数据为服务器中存储的所述第一时间区间对应的对账数据;
    若所述参考对账数据与所述第一待同步对账数据的大小和内容均相同,则确定所述第一待同步对账数据对应的第一同步结果为同步成功;
    若所述参考对账数据与所述第一待同步对账数据的大小和/或内容不同,则确定所述第一待同步对账数据对应的第一同步结果为同步失败。
  3. 根据权利要求1所述的方法,其特征在于,所述对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果,包括:
    获取所述第一待同步对账数据对应的第二时间区间;
    向电子设备发送携带所述第二时间区间的同步请求1,所述同步请求1用于指示所述电子设备串行或并行反馈所述第一待同步对账数据包括的M个大小相同的部分待同步对账数据,所述M为大于1的整数;
    接收所述电子设备针对所述同步请求1发送的M个大小相同的部分待同步对账数据;
    获取参考对账数据,以及将所述参考对账数据划分为M个大小相同的部分参考对账数据,所述参考对账数据为服务器中存储的所述第二时间区间对应的对账数据,M个部分参考对账数据与M个部分待同步对账数据一一对应;
    若所述M个部分待同步对账数据中的任一部分待同步对账数据与其对应的部分参考对账数据的大小和内容均相同,则确定所述第一待同步对账数据对应的第一同步结果为同步成功;
    若所述M个部分待同步对账数据中的任一部分待同步对账数据与其对应的部分参考对账数据的大小和/或内容不同,则确定所述第一待同步对账数据对应的第一同步结果为同步失败。
  4. 根据权利要求2或3所述的方法,其特征在于,所述对所述第二待同步对账数据进 行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果,包括:
    对所述第二待同步对账数据进行第i次再次同步,得到所述第i次再次同步对应的第i个同步结果;
    若所述第i个同步结果为同步失败,则对所述第二待同步对账数据进行第(i+1)次再次同步,得到所述第(i+1)次再次同步对应的第(i+1)个同步结果;
    直到i=N,停止对所述第二待同步对账数据进行再次同步,得到第N次再次同步对应的第N个同步结果,所述i是初始值为1,以1为间隔的递增整数;
    若所述第N个同步结果为同步成功,则确定所述第二待同步对账数据对应的所述第二同步结果为同步成功;
    若所述第N个同步结果为同步失败,则确定所述第二待同步对账数据对应的所述第二同步结果为同步失败。
  5. 根据权利要求4所述的方法,其特征在于,所述对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果之后,所述方法还包括:
    若所述第二同步结果为同步成功,则调用所述服务器中预先存储的第一时间区间策略,所述第一时间区间策略用于当同步成功时确定下次待同步对账数据对应的时间区间;
    根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间,所述第三待同步对账数据对应的获取时刻为第二设定时刻,所述第二设定时刻晚于所述第一设定时刻,所述第二设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间,包括:
    将所述第一时间区间的结束时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;或者,
    将所述第二设定时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;
    将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻;或者,
    将所述第二设定时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻。
  7. 根据权利要求4所述的方法,其特征在于,所述对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果之后,所述方法还包括:
    若所述第二同步结果为同步失败,则调用所述服务器中预先存储的第二时间区间策略,所述第二时间区间策略用于当同步失败时确定下次待同步对账数据对应的时间区间;
    根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间,所述第四待同步对账数据对应的获取时刻为第三设定时刻,所述第三设定时刻晚于所述第一设定时刻,所述第三设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间,包括:
    将所述第一时间区间的起始时刻确定为所述第四待同步对账数据对应的所述第三时间区间的起始时刻;
    将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻;或者,
    将所述第三设定时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻。
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间之后,所述方法还包括:
    确定所述第三时间区间的时长;
    判断所述第三时间区间的时长是否大于或等于预设时长;
    若所述第三时间区间的时长大于或等于所述预设时长,则执行对账数据同步预警操作。
  10. 一种数据同步装置,其特征在于,所述装置包括:
    第一同步单元,用于在第一设定时刻,对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果;
    获取单元,用于若所述第一同步结果为同步失败,则获取第二待同步对账数据,所述第二待同步对账数据为所述第一待同步对账数据中同步失败的对账数据;
    第二同步单元,用于对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果,所述N为大于或等于1的整数。
  11. 根据权利要求10所述的装置,其特征在于,在对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果方面,所述第一同步单元具体用于:
    获取所述第一待同步对账数据对应的第一时间区间;
    向电子设备发送携带所述第一时间区间的同步请求,所述同步请求用于指示所述电子设备反馈所述第一待同步对账数据;
    接收所述电子设备针对所述同步请求发送的所述第一待同步对账数据;
    获取参考对账数据,所述参考对账数据为服务器中存储的所述第一时间区间对应的对账数据;
    若所述参考对账数据与所述第一待同步对账数据的大小和内容均相同,则确定所述第一待同步对账数据对应的第一同步结果为同步成功;
    若所述参考对账数据与所述第一待同步对账数据的大小和/或内容不同,则确定所述第一待同步对账数据对应的第一同步结果为同步失败。
  12. 根据权利要求10所述的装置,其特征在于,在对第一待同步对账数据进行初次同步,得到所述第一待同步对账数据对应的第一同步结果方面,所述第一同步单元具体用于:
    获取所述第一待同步对账数据对应的第二时间区间;
    向电子设备发送携带所述第二时间区间的同步请求1,所述同步请求1用于指示所述电子设备串行或并行反馈所述第一待同步对账数据包括的M个大小相同的部分待同步对账 数据,所述M为大于1的整数;
    接收所述电子设备针对所述同步请求1发送的M个大小相同的部分待同步对账数据;
    获取参考对账数据,以及将所述参考对账数据划分为M个大小相同的部分参考对账数据,所述参考对账数据为服务器中存储的所述第二时间区间对应的对账数据,M个部分参考对账数据与M个部分待同步对账数据一一对应;
    若所述M个部分待同步对账数据中的任一部分待同步对账数据与其对应的部分参考对账数据的大小和内容均相同,则确定所述第一待同步对账数据对应的第一同步结果为同步成功;
    若所述M个部分待同步对账数据中的任一部分待同步对账数据与其对应的部分参考对账数据的大小和/或内容不同,则确定所述第一待同步对账数据对应的第一同步结果为同步失败。
  13. 根据权利要求11或12所述的装置,其特征在于,在对所述第二待同步对账数据进行N次再次同步,得到所述第二待同步对账数据对应的第二同步结果方面,所述第二同步单元具体用于:
    对所述第二待同步对账数据进行第i次再次同步,得到所述第i次再次同步对应的第i个同步结果;
    若所述第i个同步结果为同步失败,则对所述第二待同步对账数据进行第(i+1)次再次同步,得到所述第(i+1)次再次同步对应的第(i+1)个同步结果;
    直到i=N,停止对所述第二待同步对账数据进行再次同步,得到第N次再次同步对应的第N个同步结果,所述i是初始值为1,以1为间隔的递增整数;
    若所述第N个同步结果为同步成功,则确定所述第二待同步对账数据对应的所述第二同步结果为同步成功;
    若所述第N个同步结果为同步失败,则确定所述第二待同步对账数据对应的所述第二同步结果为同步失败。
  14. 根据权利要求13所述的装置,其特征在于,所述装置还包括:
    第一调用单元,用于若所述第二同步结果为同步成功,则调用所述服务器中预先存储的第一时间区间策略,所述第一时间区间策略用于当同步成功时确定下次待同步对账数据对应的时间区间;
    第一确定单元,用于根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间,所述第三待同步对账数据对应的获取时刻为第二设定时刻,所述第二设定时刻晚于所述第一设定时刻,所述第二设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
  15. 根据权利要求14所述的装置,其特征在于,在根据所述第一时间区间策略和所述第一时间区间确定第三待同步对账数据对应的第二时间区间方面,所述第一确定单元具体用于:
    将所述第一时间区间的结束时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;或者,
    将所述第二设定时刻确定为所述第三待同步对账数据对应的所述第二时间区间的起始时刻;
    将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻;或者,
    将所述第二设定时刻与一个所述对账数据同步周期之和确定为所述第三待同步对账数据对应的所述第二时间区间的结束时刻。
  16. 根据权利要求13所述的装置,其特征在于,所述装置还包括:
    第二调用单元,用于若所述第二同步结果为同步失败,则调用所述服务器中预先存储的第二时间区间策略,所述第二时间区间策略用于当同步失败时确定下次待同步对账数据对应的时间区间;
    第二确定单元,用于根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间,所述第四待同步对账数据对应的获取时刻为第三设定时刻,所述第三设定时刻晚于所述第一设定时刻,所述第三设定时刻与所述第一设定时刻的差值为一个对账数据同步周期。
  17. 根据权利要求16所述的装置,其特征在于,在根据所述第二时间区间策略和所述第一时间区间确定第四待同步对账数据对应的第三时间区间方面,所述第二确定单元具体用于:
    将所述第一时间区间的起始时刻确定为所述第四待同步对账数据对应的所述第三时间区间的起始时刻;
    将所述第一时间区间的结束时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻;或者,
    将所述第三设定时刻与一个所述对账数据同步周期之和确定为所述第四待同步对账数据对应的所述第三时间区间的结束时刻。
  18. 根据权利要求13所述的装置,其特征在于,所述装置还包括:
    第三确定单元,用于确定所述第三时间区间的时长;
    判断单元,用于判断所述第三时间区间的时长是否大于或等于预设时长;
    执行单元,用于若所述第三时间区间的时长大于或等于所述预设时长,则执行对账数据同步预警操作。
  19. 一种服务器,其特征在于,包括处理器、存储器、通信接口以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-9任一项所述的方法中的部分或全部步骤的指令。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,所述计算机程序被处理器执行,以实现如权利要求1-9任一项所述的方法。
PCT/CN2019/101959 2019-06-13 2019-08-22 数据同步方法及相关设备 Ceased WO2020248364A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910509890.1A CN110225119B (zh) 2019-06-13 2019-06-13 数据同步方法及相关设备
CN201910509890.1 2019-06-13

Publications (1)

Publication Number Publication Date
WO2020248364A1 true WO2020248364A1 (zh) 2020-12-17

Family

ID=67816827

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101959 Ceased WO2020248364A1 (zh) 2019-06-13 2019-08-22 数据同步方法及相关设备

Country Status (2)

Country Link
CN (1) CN110225119B (zh)
WO (1) WO2020248364A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114328733A (zh) * 2021-12-29 2022-04-12 观源(上海)科技有限公司 一种基于区块链的数据同步方法及其系统
CN114650219A (zh) * 2020-12-18 2022-06-21 上海蓝云网络科技有限公司 一种数据同步服务的监测方法及装置
CN119383716A (zh) * 2024-10-25 2025-01-28 中移物联网有限公司 信息处理方法、装置、设备、介质及程序产品

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114255029A (zh) * 2020-09-22 2022-03-29 腾讯科技(深圳)有限公司 一种记录调整方法、装置、设备及计算机可读存储介质
CN114422527B (zh) * 2021-12-31 2024-05-28 支付宝(杭州)信息技术有限公司 一种区块同步方法、装置、电子设备和存储介质
CN117290435B (zh) * 2022-06-16 2025-08-22 深圳市腾讯计算机系统有限公司 数据对账处理方法、装置、计算机设备和存储介质
CN117390112A (zh) * 2022-07-04 2024-01-12 腾讯科技(深圳)有限公司 数据同步方法、装置、存储介质及计算机设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2309389A1 (en) * 2009-10-09 2011-04-13 Amadeus s.a.s Delivery with reconciliation on client side
CN103237075A (zh) * 2013-04-24 2013-08-07 广州市动景计算机科技有限公司 一种数据同步方法、装置及系统
CN105282253A (zh) * 2015-11-04 2016-01-27 湖南御家科技有限公司 一种数据单据同步方法及系统
CN107590207A (zh) * 2017-08-24 2018-01-16 阿里巴巴集团控股有限公司 数据同步方法及装置、电子设备
CN109561126A (zh) * 2017-09-27 2019-04-02 北京国双科技有限公司 一种数据同步方法和装置、存储介质、处理器
CN109587192A (zh) * 2017-09-28 2019-04-05 北京国双科技有限公司 数据同步方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130046732A1 (en) * 2011-08-17 2013-02-21 Hsin-Ti Chueh Data synchronization management methods and systems
CN105450682B (zh) * 2014-08-08 2019-12-06 阿里巴巴集团控股有限公司 一种用于数据同步保存、向客户端同步数据的方法、装置和系统
MX374337B (es) * 2015-05-07 2025-03-06 Kodiak Networks Inc Sistema y metodo para la sincronizacion de datos
CN107302591A (zh) * 2017-07-31 2017-10-27 广东欧珀移动通信有限公司 数据同步方法、装置、存储介质以及电子设备
CN109525347B (zh) * 2017-09-19 2019-11-22 比亚迪股份有限公司 时间同步方法和装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2309389A1 (en) * 2009-10-09 2011-04-13 Amadeus s.a.s Delivery with reconciliation on client side
CN103237075A (zh) * 2013-04-24 2013-08-07 广州市动景计算机科技有限公司 一种数据同步方法、装置及系统
CN105282253A (zh) * 2015-11-04 2016-01-27 湖南御家科技有限公司 一种数据单据同步方法及系统
CN107590207A (zh) * 2017-08-24 2018-01-16 阿里巴巴集团控股有限公司 数据同步方法及装置、电子设备
CN109561126A (zh) * 2017-09-27 2019-04-02 北京国双科技有限公司 一种数据同步方法和装置、存储介质、处理器
CN109587192A (zh) * 2017-09-28 2019-04-05 北京国双科技有限公司 数据同步方法及装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650219A (zh) * 2020-12-18 2022-06-21 上海蓝云网络科技有限公司 一种数据同步服务的监测方法及装置
CN114328733A (zh) * 2021-12-29 2022-04-12 观源(上海)科技有限公司 一种基于区块链的数据同步方法及其系统
CN119383716A (zh) * 2024-10-25 2025-01-28 中移物联网有限公司 信息处理方法、装置、设备、介质及程序产品
CN119383716B (zh) * 2024-10-25 2025-10-31 中移物联网有限公司 信息处理方法、装置、设备、介质及程序产品

Also Published As

Publication number Publication date
CN110225119A (zh) 2019-09-10
CN110225119B (zh) 2022-09-16

Similar Documents

Publication Publication Date Title
WO2020248364A1 (zh) 数据同步方法及相关设备
US11086825B2 (en) Telemetry system for a cloud synchronization system
US8370591B2 (en) Method and apparatus for automatic snapshot
CN104376127B (zh) 一种数据操作方法及装置
US12216544B2 (en) Data replication method, apparatus, and system
US8032352B2 (en) Device, system, and method of storage controller simulating data mirroring
US20230072125A1 (en) Data reading method, apparatus, and non-transitory computer readable medium
EP3447631B1 (en) Writing trajectory synchronization method and system for multiple clients
CN106980625A (zh) 一种数据同步方法、装置及系统
CN111338834B (zh) 数据存储方法和装置
WO2020151181A1 (zh) 基于区块链的跨平台数据更新方法、装置和计算机设备
US20160156734A1 (en) Control system and method for cache coherency
CN111475388A (zh) 数据推送的测试方法、装置、计算机设备及存储介质
CN115913742A (zh) 单向数据传输方法及系统、外网客户端
CN114827967B (zh) 软件更新方法、蓝牙设备及存储介质
CN108494828A (zh) 一种节点数据的更新方法、介质、装置和计算设备
CN108460047A (zh) 数据同步方法及设备
CN108768573B (zh) 一种时钟同步方法及装置
CN110334000A (zh) 一种基于mock技术的测试方法
CN111026810B (zh) 数据同步方法、装置及存储介质
CN115442418A (zh) 接入会议系统的方法、装置、设备以及存储介质
CN114564540A (zh) 一种数据多机房同步方法、装置、设备及存储介质
CN119739580B (zh) 接口幂等性测试的方法、计算设备和计算机可读存储介质
US20260099511A1 (en) Data synchronization method and apparatus, device, and storage medium
CN117093274A (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: 19932869

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19932869

Country of ref document: EP

Kind code of ref document: A1