CN109284301A - Verification of data method and device - Google Patents

Verification of data method and device Download PDF

Info

Publication number
CN109284301A
CN109284301A CN201811013273.4A CN201811013273A CN109284301A CN 109284301 A CN109284301 A CN 109284301A CN 201811013273 A CN201811013273 A CN 201811013273A CN 109284301 A CN109284301 A CN 109284301A
Authority
CN
China
Prior art keywords
record
database
memory device
time interval
difference
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.)
Pending
Application number
CN201811013273.4A
Other languages
Chinese (zh)
Inventor
王磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811013273.4A priority Critical patent/CN109284301A/en
Publication of CN109284301A publication Critical patent/CN109284301A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This specification embodiment provides a kind of verification of data method and device, comprising: according to prefixed time interval, the record of the record of primary database and standby database is synchronized to offline memory device respectively;Comparison in difference is carried out to the record of primary database and standby database in time interval same in offline memory device;The differentiation count of record is determined based on comparison in difference situation;The record that differentiation count is greater than preset threshold is determined as synchronous abnormality record.This specification embodiment, which passes through, to be spaced at regular intervals by the recording synchronism of primary database and standby database to offline memory device, to realize that verification of data in the decoupling of line service, avoids verification of data from impacting in line service;Comparison in difference is carried out by the record to primary database in offline memory device and standby database, comparison in difference result is accumulated, when there is comparing difference in a record continuous several times, really its there are synchronous abnormalities, data synchronization delay problem during verification of data is avoided, rate of false alarm is reduced.

Description

Verification of data method and device
Technical field
This application involves Internet technical field more particularly to a kind of verification of data method and devices.
Background technique
Currently, many application scenarios are related to the comparison of integrality and consistency between more parts of data, for example, from one When database (referred to as " primary database ") carries out Data Migration to another database (referred to as " standby database "), to ensure data Consistency needs to check the data in primary database and standby database.
However, can not accomplish all the time since the data in database are dynamic changes from primary database and standby number The data obtained according to library are completely the same, unless stopping writing, take the operating for stopping writing into and going and checking and certainly will will affect regular traffic.Cause This, needs to propose a kind of verification of data method, to ensure to check data in not traffic affecting.
Summary of the invention
The purpose of this specification embodiment is to provide a kind of verification of data method and device, and this specification embodiment is in this way It realizes:
In a first aspect, providing a kind of verification of data method, which comprises
According to prefixed time interval, the record of the record of primary database and standby database is synchronized to offline storage respectively and is set It is standby;
The record of primary database and standby database in same time interval in the offline memory device is carried out respectively Comparison in difference;
Based on comparison in difference situation, the differentiation count of record is determined, the differentiation count is for indicating that corresponding record connects It is continuous the number of comparing difference occur;
The record that differentiation count is greater than preset threshold is determined as synchronous abnormality record, the preset threshold is positive integer.
Second aspect, provides a kind of verification of data device, and described device includes:
Synchronization module is used for according to prefixed time interval, and the record of the record of primary database and standby database is same respectively It walks to offline memory device;
Comparison module, for respectively to the primary database and standby data in same time interval in the offline memory device The record in library carries out comparison in difference;
Determining module is calculated, for being based on comparison in difference situation, determines that the differentiation count of record, the differentiation count are used for Indicate that the number of comparing difference continuously occurs in corresponding record;
Exception record determining module, the record for differentiation count to be greater than preset threshold are determined as synchronous abnormality record, The preset threshold is positive integer.
The third aspect provides a kind of electronic equipment, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed It manages device and executes following operation:
According to prefixed time interval, the record of the record of primary database and standby database is synchronized to offline storage respectively and is set It is standby;
The record of primary database and standby database in same time interval in the offline memory device is carried out respectively Comparison in difference;
Based on comparison in difference situation, the differentiation count of record is determined, the differentiation count is for indicating that corresponding record connects It is continuous the number of comparing difference occur;
The record that differentiation count is greater than preset threshold is determined as synchronous abnormality record, the preset threshold is positive integer.
Fourth aspect, provides a kind of computer storage medium, and the computer-readable recording medium storage one or more A program, one or more of programs are when the electronic equipment for being included multiple application programs executes, so that the electronics is set It is standby to execute following operation:
According to prefixed time interval, the record of the record of primary database and standby database is synchronized to offline storage respectively and is set It is standby;
The record of primary database and standby database in same time interval in the offline memory device is carried out respectively Comparison in difference;
Based on comparison in difference situation, the differentiation count of record is determined, the differentiation count is for indicating that corresponding record connects It is continuous the number of comparing difference occur;
The record that differentiation count is greater than preset threshold is determined as synchronous abnormality record, the preset threshold is positive integer.
By the technical solution of above this specification embodiment offer as it can be seen that in this specification embodiment, by every certain Time interval, periodically by the recording synchronism of the record of primary database and standby database to offline memory device, to realize data core To with the decoupling in line service, avoid verification of data from impacting in line service;By to master data in offline memory device The record of library and standby database carries out comparison in difference, comparison in difference result is accumulated, when a record continuous several times compare When difference, really its there are synchronous abnormalities, avoid data synchronization delay problem during verification of data, reduce rate of false alarm.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only The some embodiments recorded in this specification, for those of ordinary skill in the art, in not making the creative labor property Under the premise of, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow chart of the verification of data method of one embodiment of this specification;
Fig. 2 is the application scenario diagram of the verification of data method of one embodiment of this specification;
Fig. 3 is the application scenario diagram of the verification of data method of another embodiment of this specification;
Fig. 4 is the structural schematic diagram of the verification of data device of one embodiment of this specification;
Fig. 5 is the structural schematic diagram of the electronic equipment of one embodiment of this specification.
Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification, below in conjunction with this explanation Attached drawing in book embodiment is clearly and completely described the technical solution in this specification embodiment, it is clear that described Embodiment be only this specification a part of the embodiment, instead of all the embodiments.The embodiment of base in this manual, this This all should belong in field those of ordinary skill every other embodiment obtained without making creative work The range of specification protection.
This specification embodiment provides a kind of verification of data method and device.
The some concepts being related in this specification embodiment are explained first below.
Record: database is made of tables of data, and the column of tables of data are known as " field " or " field ", and the row of tables of data is known as " record " generally comprises a plurality of record in database.The data for including in every record belong to state type data.
State type data: refer to that data only have a and can dynamically update, such as the balance information of account, transaction, which occurs, then to be needed It updates.
Verification: a kind of comparing means refer to and are compared between two parts of data, it is ensured that data consistency.
Off-line data: referring to that data are synchronized to off-line files or offline warehouse by certain technology, this data be called from Line number evidence.
Synchronization delay: data, which synchronize, can not accomplish 100% Perfect Time, for state type data, due to data one Directly changing, therefore there may be inconsistent situations for more parts of data of synchronizing moment.
Next a kind of verification of data method provided this specification embodiment is introduced.
Fig. 1 is the flow chart of the verification of data method of one embodiment of this specification, as shown in Figure 1, this method can be with The following steps are included: step 102, step 104, step 106 and step 108, wherein
In a step 102, according to prefixed time interval, the record of primary database and the record of standby database is synchronous respectively To offline memory device.
In this specification embodiment, primary database and standby database are master-slave relationship.
In this specification embodiment, online service equipment where primary database is two differences with offline memory device Equipment;Online service equipment where standby database is two different equipment from offline memory device.
In this specification embodiment, prefixed time interval can be 1 hour, 1 day, 12 hours, 30 minutes, 5 minutes or 1 point Clock.To take into account synchronizing frequency and checking the balance of frequency, it is preferable that prefixed time interval is 1 hour.
It, can be according to prefixed time interval, by the whole records and standby database of primary database in this specification embodiment Whole records be synchronized to offline memory device respectively.
In one example, prefixed time interval is 1 hour, every 1 hour, by whole recording synchronisms in primary database To corresponding offline memory device, by whole recording synchronisms in standby database to corresponding offline memory device.
It, can be according to prefixed time interval, by main number in order to reduce the synchronous workload of data in this specification embodiment The note that the record and standby database having differences according to library relative to previous interval have differences relative to previous interval Record is synchronized to offline memory device respectively.
In one example, prefixed time interval be 1 hour, every 1 hour, by primary database from upper one hour to Changed recording synchronism is to corresponding offline memory device between hour, will be in standby database from upper one hour to this hour Between changed recording synchronism to corresponding offline memory device.
In this specification embodiment, offline memory device be used for the record of primary database and standby database synchronization (i.e. from Line number evidence) it is stored.For storing the offline memory device of the synchronous recording of primary database, and for storing standby database The offline memory device of synchronous recording can be same storage equipment, or two different storage equipment.
At step 104, respectively to the primary database in time interval same in offline memory device and for database Record carries out comparison in difference.
In this specification embodiment, records for each of every hyposynchronous primary database and standby database, carry out Comparison in difference.It is recorded for every, each time comparison in difference, the comparison in difference result that can all generate the record is (i.e. consistent Or inconsistent).
In this specification embodiment, according to prefixed time interval, whole by primary database are recorded and for database All record the master data that will be spaced at the same time in offline memory device in the case where being synchronized to offline memory device respectively Whole records of library and standby database carry out comparison in difference.
In one example, prefixed time interval is 1 hour, there is 3 records in primary database and standby database, every Include the transactions balances information of an account in record, on 2 24th, 2,018 16 points, 3 in primary database records are same Offline memory device is walked, by 3 recording synchronisms in standby database to offline memory device, correspondingly, offline memory device 3 records of middle primary database are as shown in table 1:
Record number Account Remaining sum Time Remarks Account state
1 20880001 100 2018-02-24 15:00:01 Deposit OK
2 20880002 111 2018-02-24 15:00:01 Deposit OK
3 20880003 112 2018-02-24 15:00:01 Deposit OK
Table 1
3 records of standby database are as shown in table 2 in offline memory device:
Record number Account Remaining sum Time Remarks Account state
1 20880001 100 2018-02-24 15:00:01 Deposit OK
2 20880002 110 2018-02-24 15:00:02 Deposit OK
3 20880003 111 2018-02-24 15:00:02 Deposit OK
Table 2
While the reason of generating the above difference is primary database and standby database in phase, transaction is also occurring, account Number Transaction Information modified always, can not accomplish real-time update.
3 records of 3 records of primary database in offline memory device and standby database are subjected to comparison in difference, are obtained Comparison result such as table 3:
Table 3
For this record of account " 20880001 ", comparison result is " consistent ", that is, difference is not present;For account " 20880002 " this record, comparison result is " inconsistent ", that is, is had differences;For account " 20880003 ", this is recorded, Comparison result is " inconsistent ", that is, is had differences.Similarly, by hour next in offline memory device (i.e. on 2 24th, 2018 16. -17 points) 3 records in interior primary database are compared with for 3 records in database.
In this specification embodiment, according to prefixed time interval, primary database is existed relative to previous interval The record that the record of difference and standby database have differences relative to previous interval is synchronized to offline memory device respectively In the case of, by the record of primary database in offline memory device and standby database being had differences relative to previous interval into Row comparison in difference.
In step 106, it is based on comparison in difference situation, determines the differentiation count of record, wherein the differentiation count is used for table Show that the number of comparing difference continuously occurs in corresponding record.
In this specification embodiment, following differentiation count mode can be used:
Exist if the same of primary database and standby database in offline memory device in same time interval records Difference then carries out the differentiation count of the record to add 1;
If the same record of primary database and standby database in offline memory device in same time interval is not present Difference, then the differentiation count of the record remains unchanged.
In one example, using above-mentioned differentiation count mode, differentiation count is carried out to the comparison result of table 3, if 3 The differentiation count initial value of account is 0, then comparison result is " consistent ", poor for this record of account " 20880001 " Different counting remains unchanged, and differentiation count is still 0;For this record of account " 20880002 ", comparison result is " inconsistent ", poor Different counting carries out adding 1, and differentiation count becomes 1;For this record of account " 20880003 ", comparison result is " inconsistent ", poor Different counting carries out adding 1, and differentiation count becomes 1;This relatively obtains differentiation count result as shown in table 4.
Table 4
In this specification embodiment, the comparison in difference of every record can be counted as a result, according to the comparison in difference knot of the record Fruit determines the differentiation count of the record.
For example, being recorded for one, if the first time comparison in difference result of the record is consistent, second of comparison in difference As a result to be inconsistent, then its differentiation count is 1;If the first time comparison in difference result of the record be it is inconsistent, second Comparison in difference result is consistent, then its differentiation count is 1;If the first time comparison in difference result of the record be it is inconsistent, Second of comparison in difference result is inconsistent, then its differentiation count is 2.
In step 108, the record that differentiation count is greater than preset threshold is determined as synchronous abnormality record, wherein this is pre- If threshold value is positive integer.
In this specification embodiment, preset threshold can be 1,2,3 or 4 etc..
In one example, preset threshold 1, if this record of account " 20880002 ", twice in succession all than less Unanimously, i.e., its differentiation count is 2, then this record is determined as synchronous abnormality record by account " 20880002 ".
In this specification embodiment, the problem of finding synchronous abnormality in time for the ease of operation maintenance personnel, in above-mentioned steps 108 Following steps can also be increased later:
Export message notifying, wherein the message notifying is for prompting synchronous abnormality to record.
In this specification embodiment, the sides such as desktop prompting message, transmission short message, mail, sending alarm sound can be passed through Formula prompts the record of operation maintenance personnel synchronous abnormality, so that operation maintenance personnel takes corresponding processing strategie in time.
Understand for the ease of the technical solution on the whole to this specification embodiment, from the angle of database, knot It closes Fig. 2 above step 102 to 108 is described, as shown in Fig. 2, at interval of prefixed time interval, by the note in primary database Record is synchronized to corresponding offline storehouse,, will when being checked by the recording synchronism in standby database to corresponding offline storehouse The record of primary database and the record of database standby in offline storehouse carry out comparison in difference in offline storehouse, obtain final checked result.
From the angle of executing subject, above step 102 to 108 is described in conjunction with Fig. 3, as shown in figure 3, the applied field It include: online service equipment 310, online service equipment 320, offline memory device 330, offline memory device 340 and core in scape To equipment 350, wherein be stored with primary database in online service equipment 310, standby data are stored in online service equipment 320 Library, offline memory device 330 are used to store the off-line data (i.e. the synchronous record of primary database) of primary database, and offline storage is set Standby 340 for storing the off-line data (i.e. for the record of database synchronization) of standby database, and checking apparatus 350 is used for from depositing offline The off-line data of the off-line data that primary database is read in equipment 330 and offline memory device 340 and standby database is stored up, and to it Comparison in difference is carried out, checked result is obtained.
As seen from the above-described embodiment, in the embodiment, by being spaced at regular intervals, periodically by the record of primary database Recording synchronism with standby database is to offline memory device, to realize that verification of data in the decoupling of line service, avoids data core It is impacted to in line service;Diversity ratio is carried out by the record to primary database in offline memory device and standby database Compared with, comparison in difference result is accumulated, when there is comparing difference in a record continuous several times, really its there are synchronous abnormalities, keep away Exempt from data synchronization delay problem during verification of data, reduces rate of false alarm.
Fig. 4 is the structural schematic diagram of the verification of data device of one embodiment of this specification, as shown in figure 4, in one kind In Software Implementation, verification of data device 400 may include: synchronization module 401, comparison module 402, count determining module 403 and exception record determining module 404, wherein
Synchronization module 401, for according to prefixed time interval, the record of the record of primary database and standby database to be distinguished It is synchronized to offline memory device;
Comparison module 402, for respectively to primary database in same time interval in the offline memory device and standby The record of database carries out comparison in difference;
Determining module 403 is counted, for being based on comparison in difference situation, determines the differentiation count of record, the differentiation count For indicating that the number of comparing difference continuously occurs in corresponding record;
Exception record determining module 404, the record for differentiation count to be greater than preset threshold are determined as synchronous abnormality note Record, the preset threshold are positive integer.
As seen from the above-described embodiment, in the embodiment, by being spaced at regular intervals, periodically by the record of primary database Recording synchronism with standby database is to offline memory device, to realize that verification of data in the decoupling of line service, avoids data core It is impacted to in line service;Diversity ratio is carried out by the record to primary database in offline memory device and standby database Compared with, comparison in difference result is accumulated, when there is comparing difference in a record continuous several times, really its there are synchronous abnormalities, keep away Exempt from data synchronization delay problem during verification of data, reduces rate of false alarm.
Optionally, as one embodiment, the synchronization module 401 may include:
Recording synchronism submodule, for according to prefixed time interval, primary database to be existed relative to previous interval The record that the record of difference and standby database have differences relative to previous interval is synchronized to offline memory device respectively.
Optionally, as one embodiment, the counting determining module 403 may include:
Counting submodule, if for primary database and standby data in same time interval in the offline memory device The same record in library has differences, then carries out adding 1 to the differentiation count of the record;
If the same record of primary database and standby database in the offline memory device in same time interval is not It has differences, then the differentiation count of the record remains unchanged.
Optionally, as one embodiment, verification of data device 400 can also include:
Output module, for exporting message notifying, the message notifying is for prompting the synchronous abnormality to record.
Optionally, as one embodiment, the prefixed time interval is 1 hour, 1 day, 12 hours, 30 minutes, 5 minutes Or 1 minute.
Fig. 5 is the structural schematic diagram of the electronic equipment of one embodiment of this specification, as shown in figure 5, in hardware view, The electronic equipment includes processor, optionally further comprising internal bus, network interface, memory.Wherein, memory may include Memory, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile deposit Reservoir (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that it Hardware required for his business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA (Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always Line etc..Only to be indicated with a four-headed arrow in Fig. 5, it is not intended that an only bus or a type of convenient for indicating Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layer Verification of data device is formed on face.Processor executes the program that memory is stored, and is specifically used for executing following operation:
According to prefixed time interval, the record of the record of primary database and standby database is synchronized to offline storage respectively and is set It is standby;
The record of primary database and standby database in same time interval in the offline memory device is carried out respectively Comparison in difference;
Based on comparison in difference situation, the differentiation count of record is determined, the differentiation count is for indicating that corresponding record connects It is continuous the number of comparing difference occur;
The record that differentiation count is greater than preset threshold is determined as synchronous abnormality record, the preset threshold is positive integer.
Optionally, described according to prefixed time interval as one embodiment, by the record of primary database and standby database Record be synchronized to offline memory device respectively, comprising:
According to prefixed time interval, the record and standby database that primary database is had differences relative to previous interval The record having differences relative to previous interval is synchronized to offline memory device respectively.
Optionally, described to be based on comparison in difference situation as one embodiment, determine the differentiation count of record, comprising:
If the same of primary database and standby database in the offline memory device in same time interval records It has differences, then the differentiation count of the record is carried out adding 1;
If the same record of primary database and standby database in the offline memory device in same time interval is not It has differences, then the differentiation count of the record remains unchanged.
Optionally, as one embodiment, it is determined as synchronous different in the record that differentiation count is greater than preset threshold Often after the step of record, further includes:
Message notifying is exported, the message notifying is for prompting the synchronous abnormality to record.
Optionally, as one embodiment, the prefixed time interval is 1 hour, 1 day, 12 hours, 30 minutes, 5 minutes Or 1 minute.
The method that verification of data device disclosed in the above-mentioned embodiment illustrated in fig. 5 such as this specification executes can be applied to handle In device, or realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.It is realizing In the process, each step of the above method can pass through the integrated logic circuit of the hardware in processor or the instruction of software form It completes.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processor, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device are divided Vertical door or transistor logic, discrete hardware components.It may be implemented or execute and is in this specification embodiment disclosed Each method, step and logic diagram.General processor can be microprocessor or the processor be also possible to it is any conventional Processor etc..The step of method in conjunction with disclosed in this specification embodiment, can be embodied directly in hardware decoding processor execution Complete, or in decoding processor hardware and software module combine execute completion.Software module can be located at random storage Device, flash memory, read-only memory, this fields such as programmable read only memory or electrically erasable programmable memory, register at In ripe storage medium.The storage medium is located at memory, and processor reads the information in memory, completes in conjunction with its hardware The step of stating method.
The method that the electronic equipment can also carry out Fig. 1, and realize the function of verification of data device embodiment shown in Fig. 1, Details are not described herein for this specification embodiment.
This specification embodiment additionally provides a kind of computer readable storage medium, the computer-readable recording medium storage One or more programs, the one or more program include instruction, and the instruction is when by the portable electric including multiple application programs When sub- equipment executes, the method that the portable electronic device can be made to execute embodiment illustrated in fig. 1, and be specifically used for executing following Method:
According to prefixed time interval, the record of the record of primary database and standby database is synchronized to offline storage respectively and is set It is standby;
The record of primary database and standby database in same time interval in the offline memory device is carried out respectively Comparison in difference;
Based on comparison in difference situation, the differentiation count of record is determined, the differentiation count is for indicating that corresponding record connects It is continuous the number of comparing difference occur;
The record that differentiation count is greater than preset threshold is determined as synchronous abnormality record, the preset threshold is positive integer.
In short, being not intended to limit the protection of this specification the foregoing is merely the preferred embodiment of this specification Range.For all spirit in this specification within principle, any modification, equivalent replacement, improvement and so on should be included in this Within the protection scope of specification.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.

Claims (12)

1. a kind of verification of data method, which comprises
According to prefixed time interval, the record of the record of primary database and standby database is synchronized to offline memory device respectively;
Difference is carried out to the record of primary database and standby database in same time interval in the offline memory device respectively Compare;
Based on comparison in difference situation, the differentiation count of record is determined, the differentiation count is for indicating that corresponding record continuously goes out The number of existing comparing difference;
The record that differentiation count is greater than preset threshold is determined as synchronous abnormality record, the preset threshold is positive integer.
2. according to the method described in claim 1, described according to prefixed time interval, by the record of primary database and standby database Record be synchronized to offline memory device respectively, comprising:
According to prefixed time interval, the record that primary database is had differences relative to previous interval is opposite with standby database It is synchronized to offline memory device respectively in the record that previous interval has differences.
3. determining the differentiation count of record according to the method described in claim 1, described be based on comparison in difference situation, comprising:
Exist if the same of primary database and standby database in the offline memory device in same time interval records Difference then carries out the differentiation count of the record to add 1;
If the same record of primary database and standby database in the offline memory device in same time interval is not present Difference, then the differentiation count of the record remains unchanged.
4. according to the method described in claim 1, being determined as synchronous different in the record that differentiation count is greater than preset threshold Often after the step of record, further includes:
Message notifying is exported, the message notifying is for prompting the synchronous abnormality to record.
5. method according to any one of claims 1 to 4, the prefixed time interval is 1 hour, 1 day, 12 hours, 30 Minute, 5 minutes or 1 minute.
6. a kind of verification of data device, described device include:
Synchronization module, for according to prefixed time interval, the record of the record of primary database and standby database to be synchronized to respectively Offline memory device;
Comparison module, for respectively to the primary database in same time interval in the offline memory device and for database Record carries out comparison in difference;
Determining module is counted, for being based on comparison in difference situation, determines the differentiation count of record, the differentiation count is for indicating Continuously there is the number of comparing difference in corresponding record;
Exception record determining module, the record for differentiation count to be greater than preset threshold is determined as synchronous abnormality record, described Preset threshold is positive integer.
7. device according to claim 6, the synchronization module, comprising:
Recording synchronism submodule, for according to prefixed time interval, primary database to be had differences relative to previous interval Record and the record that is had differences relative to previous interval of standby database be synchronized to offline memory device respectively.
8. device according to claim 6, the counting determining module, comprising:
Counting submodule, if for the primary database in same time interval in the offline memory device and for database Same record has differences, then carries out adding 1 to the differentiation count of the record;
If the same record of primary database and standby database in the offline memory device in same time interval is not present Difference, then the differentiation count of the record remains unchanged.
9. device according to claim 6, described device further include:
Output module, for exporting message notifying, the message notifying is for prompting the synchronous abnormality to record.
10. the prefixed time interval is 1 hour, 1 day, 12 hours, 30 according to claim 6 to 9 described in any item devices Minute, 5 minutes or 1 minute.
11. a kind of electronic equipment, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the processor when executed Execute following operation:
According to prefixed time interval, the record of the record of primary database and standby database is synchronized to offline memory device respectively;
Difference is carried out to the record of primary database and standby database in same time interval in the offline memory device respectively Compare;
Based on comparison in difference situation, the differentiation count of record is determined, the differentiation count is for indicating that corresponding record continuously goes out The number of existing comparing difference;
The record that differentiation count is greater than preset threshold is determined as synchronous abnormality record, the preset threshold is positive integer.
12. a kind of computer storage medium, the computer-readable recording medium storage one or more program, it is one or Multiple programs are when the electronic equipment for being included multiple application programs executes, so that the electronic equipment executes following operation:
According to prefixed time interval, the record of the record of primary database and standby database is synchronized to offline memory device respectively;
Difference is carried out to the record of primary database and standby database in same time interval in the offline memory device respectively Compare;
Based on comparison in difference situation, the differentiation count of record is determined, the differentiation count is for indicating that corresponding record continuously goes out The number of existing comparing difference;
The record that differentiation count is greater than preset threshold is determined as synchronous abnormality record, the preset threshold is positive integer.
CN201811013273.4A 2018-08-31 2018-08-31 Verification of data method and device Pending CN109284301A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811013273.4A CN109284301A (en) 2018-08-31 2018-08-31 Verification of data method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811013273.4A CN109284301A (en) 2018-08-31 2018-08-31 Verification of data method and device

Publications (1)

Publication Number Publication Date
CN109284301A true CN109284301A (en) 2019-01-29

Family

ID=65183386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811013273.4A Pending CN109284301A (en) 2018-08-31 2018-08-31 Verification of data method and device

Country Status (1)

Country Link
CN (1) CN109284301A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008252A (en) * 2019-03-12 2019-07-12 阿里巴巴集团控股有限公司 Verification of data method and device
CN110059077A (en) * 2019-04-19 2019-07-26 深圳乐信软件技术有限公司 A kind of verification of data method, apparatus, equipment and storage medium
CN110245166A (en) * 2019-05-21 2019-09-17 阿里巴巴集团控股有限公司 Verification of data method and device
CN111930842A (en) * 2020-08-10 2020-11-13 中国工商银行股份有限公司 Data checking method and device
CN112905602A (en) * 2021-03-26 2021-06-04 掌阅科技股份有限公司 Data comparison method, computing device and computer storage medium
WO2022199009A1 (en) * 2021-03-26 2022-09-29 北京市商汤科技开发有限公司 Reconciliation method and apparatus for synchronous data, and device, medium and program
CN116991470A (en) * 2023-09-26 2023-11-03 云账户技术(天津)有限公司 Method, device, computer equipment and storage medium for inspecting environment configuration data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136276A (en) * 2011-12-02 2013-06-05 阿里巴巴集团控股有限公司 System, method and device of verification of data
CN104252481A (en) * 2013-06-27 2014-12-31 阿里巴巴集团控股有限公司 Dynamic check method and device for consistency of main and salve databases
CN104750703A (en) * 2013-12-26 2015-07-01 ***通信集团天津有限公司 Method and device for improving data accuracy
CN105117435A (en) * 2015-08-07 2015-12-02 北京思特奇信息技术股份有限公司 Dynamic data consistency comparison method and system
CN105989089A (en) * 2015-02-12 2016-10-05 阿里巴巴集团控股有限公司 Data comparison method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136276A (en) * 2011-12-02 2013-06-05 阿里巴巴集团控股有限公司 System, method and device of verification of data
CN104252481A (en) * 2013-06-27 2014-12-31 阿里巴巴集团控股有限公司 Dynamic check method and device for consistency of main and salve databases
CN104750703A (en) * 2013-12-26 2015-07-01 ***通信集团天津有限公司 Method and device for improving data accuracy
CN105989089A (en) * 2015-02-12 2016-10-05 阿里巴巴集团控股有限公司 Data comparison method and device
CN105117435A (en) * 2015-08-07 2015-12-02 北京思特奇信息技术股份有限公司 Dynamic data consistency comparison method and system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008252A (en) * 2019-03-12 2019-07-12 阿里巴巴集团控股有限公司 Verification of data method and device
CN110008252B (en) * 2019-03-12 2023-10-27 创新先进技术有限公司 Data checking method and device
CN110059077A (en) * 2019-04-19 2019-07-26 深圳乐信软件技术有限公司 A kind of verification of data method, apparatus, equipment and storage medium
CN110245166A (en) * 2019-05-21 2019-09-17 阿里巴巴集团控股有限公司 Verification of data method and device
CN110245166B (en) * 2019-05-21 2023-09-26 创新先进技术有限公司 Data checking method and device
CN111930842A (en) * 2020-08-10 2020-11-13 中国工商银行股份有限公司 Data checking method and device
CN111930842B (en) * 2020-08-10 2024-02-09 中国工商银行股份有限公司 Data checking method and device
CN112905602A (en) * 2021-03-26 2021-06-04 掌阅科技股份有限公司 Data comparison method, computing device and computer storage medium
WO2022199009A1 (en) * 2021-03-26 2022-09-29 北京市商汤科技开发有限公司 Reconciliation method and apparatus for synchronous data, and device, medium and program
CN116991470A (en) * 2023-09-26 2023-11-03 云账户技术(天津)有限公司 Method, device, computer equipment and storage medium for inspecting environment configuration data

Similar Documents

Publication Publication Date Title
CN109284301A (en) Verification of data method and device
US20200293549A1 (en) Blockchain-based data processing method and device
US11036562B2 (en) Streaming data distributed processing method and device
CN110162662B (en) Verification method, device and equipment for data records in block chain type account book
CN108846749A (en) A kind of sliced transaction execution system and method based on block chain technology
US20200201560A1 (en) Data storage method, apparatus, and device for multi-layer blockchain-type ledger
CN109391480A (en) A kind of date storage method, device and electronic equipment
CN110020846B (en) Transfer service processing method and system
CN109934712B (en) Account checking method and account checking device applied to distributed system and electronic equipment
CN110046994B (en) Method and system for accepting block link deposit certificate transaction
TW202042095A (en) Alliccount checking system, method and device based on an alliance chain and electronic equipmentance chain-based account checking method and apparatus, and electronic device
CN111506580B (en) Transaction storage method based on centralized block chain type account book
CN110389989B (en) Data processing method, device and equipment
CN110019502A (en) Synchronous method, Database Systems and equipment between primary database and standby database
CN107967173A (en) A kind of methods, devices and systems of scheduling of resource
CN110442481A (en) Method for processing business, Service Component container and electronic equipment
CN110020741A (en) The method, apparatus and electronic equipment of data prediction
WO2020133069A1 (en) Data processing method and apparatus for block chain
CN110489418B (en) Data aggregation method and system
CN110942314A (en) Abnormal account supervision method and device
CN111464319B (en) Transaction storage and signature verification method based on centralized block chain type account book
CN111913807B (en) Event processing method, system and device based on multiple storage areas
CN110689418B (en) Bill generation method and device
CN110046194A (en) A kind of method, apparatus and electronic equipment of expanding node relational graph
CN108710658A (en) A kind of storage method and device of data record

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201009

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

Applicant after: Innovative advanced technology Co.,Ltd.

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

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201009

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

Applicant after: Advanced innovation technology Co.,Ltd.

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

Applicant before: Alibaba Group Holding Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190129