CN104809250A - Loose type data consistency checking method - Google Patents

Loose type data consistency checking method Download PDF

Info

Publication number
CN104809250A
CN104809250A CN201510254790.0A CN201510254790A CN104809250A CN 104809250 A CN104809250 A CN 104809250A CN 201510254790 A CN201510254790 A CN 201510254790A CN 104809250 A CN104809250 A CN 104809250A
Authority
CN
China
Prior art keywords
data
value
tables
proof test
test value
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.)
Granted
Application number
CN201510254790.0A
Other languages
Chinese (zh)
Other versions
CN104809250B (en
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.)
New Continent Digital Technology Co., Ltd.
Original Assignee
Fujian Newland Computer 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 Fujian Newland Computer Co Ltd filed Critical Fujian Newland Computer Co Ltd
Priority to CN201510254790.0A priority Critical patent/CN104809250B/en
Publication of CN104809250A publication Critical patent/CN104809250A/en
Application granted granted Critical
Publication of CN104809250B publication Critical patent/CN104809250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to a loose type data consistency checking method. The method comprises the following steps: a data receiver stores a received data table and marks the received data table as an unchecked data table, and the data table has time information; the data receiver receives data consistency checking information and extracts the stored data table according to the data consistency checking information, and the data in the data table is generated into a check value by a preset check value generating method; a corresponding data table is extracted from a data generator according to the time information of the data table in the previous step, and a check value II is generated by the preset check value generating method; the data generator obtains the check value I and checks whether the check value I is consistent with the check value II or not; if yes, the data table of the data receiver is marked as the checked data table; if not, the transmission of the data table corresponding to the time information is wrong. The sequence of the data tables does not need to be distinguished, the real-time data checking is carried out, and the error rate is low.

Description

A kind of loose formula data consistency verification method
Technical field
The present invention relates to database maintenance technology, particularly the loose formula data consistency verification method of one.
Background technology
In the application of database technology, when multiple memory device, terminal room carry out data Replica, normally directly to read from the memory device of source after data by intermediate storage medium or the network storage on object memory device.Data may be there are and be tampered or the situation such as loss in data in actual transmissions process.Therefore, when backing up the data in database, need to verify the integrality of data, to guarantee the security of data.
In order to verify the integrality of data, the method adopted at present mainly contains:
1, comparison database size: the data bulk of data-base recording is compared, or the size of data file is compared.
2, check code is calculated to every bar database record, and whether twin check code is consistent.
In such scheme, by respectively the data in source memory device and object memory device being carried out consistency checking after completing data Replica, this consistency comparison method needs first data to be read out respectively, therefore under the application scenarios of mass data processing, the problems such as data transfer overhead is large, verification time delay is large can be there is, be not suitable for the process carrying out mass data.
The calculating of check code can well check that whether the record of active and standby database is consistent, but there is a lot of data check algorithm on the market for the priority of tables of data at present, ordinal position between ranks requires strict, namely active and standby data line or when being listed in calculating position inconsistent, just there will be the situation that proof test value is inconsistent.Therefore, need the more easy proof test value generating algorithm of one, the sequencing of tables of data can be ignored, the sequencing of data line or row, make proof test value generating mode more flexible, and make data check than more convenient.
Summary of the invention
The object of the present invention is to provide and a kind ofly can not distinguish the order of tables of data row, column and often open the sequencing of tables of data, real time data verification can be carried out to tables of data, the data consistency verification method that data transmission is fast, error rate is little.
Following technical scheme is present invention employs in order to solve the problems of the technologies described above, a kind of loose formula data consistency verification method is provided, comprise the steps: that data receiver stores received tables of data and is labeled as not verify, described tables of data carries temporal information; When receiving consistency verification of data, extracting the tables of data that data receiver stores, generating proof test value I according to the verification value generation method preset of data acquisition in tables of data; Temporal information according to the tables of data of previous step extracts corresponding data table from data genaration side, and adopts the verification value generation method preset to generate proof test value II; Data genaration side obtains proof test value I, and whether check described proof test value I, proof test value II consistent, if consistent, the described tables of data of flag data take over party, for verify, if inconsistent, then judges the tables of data error of transmission of this temporal information.
Also comprise: data genaration side obtains tables of data transmitting fault information, initiates more New function, calls the tables of data of the inconsistent temporal information of described inspection.
Described default proof test value generating algorithm comprises:
S001: obtain the numerical value A in tables of data xy; S002: cumulative described numerical value A xyobtain proof test value N1; S003: get each numerical value A xyabsolute value, if A xy≠ 0, then get A xyj power after on the occasion of and cumulative, obtain proof test value N2; The interior every line number value sum P of the table that fetches data xif, P x≠ 0, then get p xk power after cumulative each value, obtain proof test value N3; S004: every columns value sum Q in the table that fetches data yif, Q y≠ 0, then get Q yl power after cumulative each value, obtain proof test value N4.
Wherein, the data of described data receiver's real-time reception data genaration side transmission.
The present invention also discloses a kind of loose formula consistency verification of data device, comprising: data receiver's storage unit, stores the tables of data that receives and be labeled as not verify, and described tables of data is marked with temporal information; First verification control module, when receiving consistency verification of data, extracts the tables of data that data receiver stores, and generates proof test value I according to the verification value generation method preset of data acquisition in tables of data; Second verification control module, the temporal information according to the tables of data of the first verification control module extracts corresponding data table from data genaration side, and adopts the verification value generation method preset to generate proof test value II; Data genaration side's verification unit, obtains proof test value I, checks described proof test value I, whether unanimously to test value II, if consistent, the described tables of data of data receiver be labeled as and verify, if inconsistent, then judge the tables of data error of transmission of this temporal information.
Also comprise data genaration side's updating block, obtain tables of data transmitting fault information, initiate more New function, call the tables of data of the inconsistent temporal information of described inspection.
Wherein, described first verifies control module, the second verification control module includes numerical value acquisition subelement, proof test value N1 obtains subelement, proof test value N2 obtains subelement, proof test value N3 acquisition subelement, proof test value N4 obtain subelement: numerical value obtains the numerical value A in subelement acquisition tables of data xy; Proof test value N1 obtains subelement and to add up described numerical value A xyobtain proof test value N1; Proof test value N2 obtains subelement, gets each numerical value A xyabsolute value, if A xy≠ 0, then get A xyj power after on the occasion of and cumulative, obtain proof test value N2; Proof test value N3 obtains subelement, every line number value sum P in the table that fetches data xif, P x≠ 0, then get p xk power after cumulative each value, obtain proof test value N3; Proof test value N4 obtains subelement, every columns value sum Q in the table that fetches data yif, Q y≠ 0, then get Q yl power after cumulative each value, obtain proof test value N4.
Wherein, tables of data real-time Transmission between described data genaration side and data receiver.
The present invention also discloses a kind of loose formula consistency verification of data system, comprises above-described loose formula consistency verification of data device.
The invention has the beneficial effects as follows:
One, the method can be applicable to verification that is long-range, data correctness after synchronization of data in heterogeneous database, system database data table related as at different levels in highway synchronously contrasts, the synchronous consistency desired result of various cache database, the synchronous consistency desired result of platform data etc., it has wide range of applications.
What two, the method can be real-time carries out data check to the tables of data of specifying, in real time, reliably, conveniently.
Three, adopt said method to carry out consistency verification of data can not distinguishing rows verify in real time with the sequencing of row, the sequencing of often opening tables of data, and can the simultaneously accuracy of data in checking data table in the process of verification, improve the accuracy of data transmission, prevent data packetloss.
Accompanying drawing explanation
Figure 1 shows that the schematic diagram of the tables of data A of loose formula data verification method of the present invention;
Figure 2 shows that the schematic diagram of the tables of data B of loose formula data verification method of the present invention;
Figure 3 shows that the process flow diagram of loose formula data verification method of the present invention;
Figure 4 shows that the schematic diagram of loose formula data calibration device of the present invention.
Embodiment
By describing technology contents of the present invention, structural attitude in detail, realized object and effect, accompanying drawing is coordinated to be explained in detail below in conjunction with embodiment.
Consult Fig. 3, the invention discloses a kind of loose formula data consistency verification method, comprise the steps:
S100: data receiver receives the tables of data that data genaration side sends;
S200: data receiver stores the tables of data that receives and is labeled as and do not verify, and described tables of data is marked with temporal information; Described data receiver can be the end points etc. that the system databases at different levels of highway are relevant, and the storage modes such as the storage of memory device, storage array, cloud, storing software can be adopted after take over party receives tables of data to carry out tables of data storage.When data table memory, for the data in this tables of data or tables of data increase by a special field to mark this tables of data for not verify, this special field can adopt letter, numerical value, special symbol etc., data wherein in tables of data can be numeric type, alpha type, character type etc., in computing machine, dissimilar data Binary Conversion is formed the numerical value that can distinguish of computing machine thus facilitates and follow-uply perform verification.Data in described tables of data with do not verify mark and decollator can be set therebetween distinguish data in tables of data and mark with this.The temporal information that tables of data comprises can be the time period, as carried mark: first time period, the second time period ... the N time period etc.; The temporal information that temporal information can carry for system, as can be only data send time initial time or the termination time; Temporal information can also compare as employing lexicographic ordering labelled notation, numerical value sequence number for simple time mark, distinguishes the sequencing of tables of data transmission with this.
S300: initiate consistency verification of data information by inner or external control unit outside, the initiation of consistency verification of data can be initiated by data genaration side or data receiver, or performs this process by exterior terminal, equipment, system, cloud server etc. by wired or wireless mode transmission instruction.Now carry out consistency verification of data by indication information prompting user, indication information can adopt instruction sound or pilot lamp etc. to indicate simultaneously.Consistency verification of data can verify for the tables of data of a certain special time period, can carry out verifying for total data table and also can verify for partial data table, different consistency verification of data orders will carry out data check for different tables of data.
S400: when data receiver receives consistency verification of data information, the tables of data stored according to consistency verification of data information extraction, generates proof test value I according to the verification value generation method preset of the data acquisition in tables of data;
In above-mentioned steps, the consistency verification of data initiated can only verify for partial data table, therefore extract the tables of data that stores of data receiver according to temporal information, as extract transmission from sometime tables of data, sometime before tables of data or a few row data etc. in which tables of data or a certain tables of data.Described proof test value I can be proof test value group, the proof test value group formed as adopted N number of proof test value.In one embodiment of the present invention, adopt 4 proof test values, described default verification value generation method preferably can in the following way:
S001: obtain the numerical value A in tables of data xy; Data in the tables of data that data receiver receives can be numeric type, character type, alpha type etc., computer system is all adopt binary coding store data, if the data of verification are character type, letter character etc., then first obtain binary coding, be converted to the numerical value of 10 systems again, and then obtain the numerical value of data in tables of data; If the data in described tables of data are numeric type, then directly can obtain the numerical value A of data in tables of data xy.
S002: cumulative described numerical value A xyobtain proof test value N1; Be A see the numerical value of tables of data in accompanying drawing 1,2, Fig. 1 11, A 12, A 13, A 21, A 22, A 23, then by each numerical value A 12, A 13, A 21, A 22, A 23cumulative, obtain proof test value N1, repeat no more by that analogy.The method is adopted to obtain proof test value N1 too for multiple tables of data.
S003: get each numerical value A xyabsolute value, if A xy≠ 0, then get A xyj power after on the occasion of and cumulative, obtain proof test value N2; Detailed, be A see the numerical value of tables of data in accompanying drawing 1,2, Fig. 1 11, A 12, A 13, A 21, A 22, A 23if, A 11=0, A 12, A 13, A 21, A 22, A 23≠ 0, then get remaining each numerical value A 12, A 13, A 21, A 22, A 23j power after on the occasion of and obtain proof test value N2 by cumulative for the above results; If A 11, A 12, A 13, A 22, A 23≠ 0, A 21=0, then the numerical value of several non-zero is got after J power on the occasion of, and obtain proof test value N2 by cumulative for the above results.Repeat no more by that analogy.Preferably, the value of described J can be J=2j or 1/2j, j ≠ 0, described data are uncoupled several side or open even number root after obtain proof test value.
S004: every line number value sum P in the table that fetches data xif, P x≠ 0, then get p xk power after cumulative each value, obtain proof test value N3; Concrete, calculate each line number value sum P of described numerical value x(x=1,2,3,4 ...), if P x≠ 0, then get P xk power after cumulative each value, obtain proof test value N3; As the tables of data in Fig. 1, its each line number value sum P 1=A 11+ A 12+ A 13, P 2=A 21+ A 22+ A 23, P 3=A 31+ A 32+ A 33if P 1, P 2, P 3≠ 0, then get P respectively 1, P 2, P 3k power after cumulative each value, if P 1=0, P 2, P 3≠ 0, then get P respectively 2, P 3k power after cumulative each value, obtain proof test value N3.If P 1, P 2, P 3=0, then get row proof test value N3=0.Preferably, the value of K is K=2k+1 or 1/ (2k+1), k ≠ 0, obtains proof test value after the numerical value of often going in tables of data is got odd number power or opened odd-times root.
S005: every columns value sum Q in the table that fetches data yif, Q y≠ 0, then get Q yl power after cumulative each value, obtain proof test value N4.Calculate each columns value sum Q of described numerical value y(y=1,2,3,4 ...), if Q y≠ 0, then get Q yl power after cumulative each value, obtain proof test value N4.As the tables of data in Fig. 1, its each columns value sum Q 1=A 11+ A 21+ A 31, Q 2=A 21+ A 22+ A 32, Q 3=A 13+ A 23+ A 33+if, Q 1, Q 2, Q 3≠ 0, then get Q respectively 1, Q 2, Q 3l power after cumulative each value, if Q 1=0, Q 2, Q 3≠ 0, then get Q respectively 2, Q 3l power after cumulative each value, obtain proof test value N3.If Q 1, Q 2, Q 3=0, then get proof test value N4=0.Preferably, L=2l+1 or 1/ (2l+1), l ≠ 0.
As above, the obtain manner of tables of data proof test value will be described in detail below:
Mode one, N1 are by all numerical value of cumulative data table; Calculate the 2j power of the absolute value of each numerical value of described numerical value, and the numerical value after getting 2j power that adds up, obtain proof test value N2; Calculate (2k+1) power of each line number value sum of described numerical value, and each value after getting (2k+1) power that adds up obtains proof test value N3; Calculate (2l+1) power of each columns value sum of described numerical value, and each value after getting (2l+1) power that adds up obtains proof test value N4.
Mode two, N1 are all numerical value of cumulative data table;
Calculate each numerical value A of described numerical value xyabsolute value, work as A xywhen ≠ 0, get A xy1/2j power after get on the occasion of (namely open after 2j power just several), cumulatively open each value after power, obtain proof test value N2; See Fig. 1, if A 11=0, its remainder values is non-zero numerical value, then not to A 11get the calculating of 1/2j power, and remaining numerical value in tables of data is opened root accordingly, get just several calculating, each value after above-mentioned calculating is cumulative is proof test value N2.
Calculate each line number value sum P of described numerical value x(x=1,2,3,4 ...), if P x≠ 0, then get P x=1/ (2k+1), after (k ≠ 0) power, cumulative each value, obtains proof test value N3.Get P in this process x=1/ (2k+1) namely represents P xopen (2k+1) power, if P x=0, then extracting operation is not carried out to it.P xnamely N3 is obtained after each value after evolution is cumulative.
Calculate each columns value sum Q of described numerical value y(y=1,2,3,4 ...), if Q y≠ 0, then get Q y=1/ (2l+1), after (1 ≠ 0) power, cumulative each value, obtains proof test value N4.Get Q in this process y=1/ (2l+1) namely represents Q yevolution, if Q y=0, then extracting operation is not carried out to it.Q ynamely N4 is obtained after each value after evolution is cumulative.
Mode three: N1 is by all numerical value of cumulative data table;
Calculate each numerical value A of described numerical value xyabsolute value, work as A xywhen ≠ 0, get A xy1/2j power after cumulative each value, obtain proof test value N2; See Fig. 1, if A 11=0, its remainder values is non-zero numerical value, then not to A 11get the calculating of 1/2j power, and cumulative each value after remaining numerical value in tables of data being got 1/2j power, the accumulated value of each value is proof test value N2.
Calculate (2k+1) power of each line number value sum of described numerical value, and each value after getting (2k+1) power that adds up obtains proof test value N3;
Calculate each columns value sum Q of described numerical value y(y=1,2,3,4 ...), if Q y≠ 0, then get Q y=1/ (2l+1), after (1 ≠ 0) power, cumulative each value, obtains proof test value N4.Get Q in this process y=1/ (2l+1) namely represents Q yevolution, if Q y=0, then extracting operation is not carried out to it.Q ynamely N4 is obtained after each value after evolution is cumulative.
Mode one, two, three is only the value mode illustrating N1, N2, N3, N4 in the present invention, and described N1, N2, N3, N4 value mode can carry out permutation and combination according to actual conditions.
In a specific embodiment, the number of described tables of data, according to the needs of actual conditions, can choose at random, and described N value is greater than 0.As half tables of data can be selected, a tables of data or arbitrarily multiple tables of data.
Embodiment below for two tables of data generation data check values is described:
Be 3 row see Table A shown in Fig. 1, figure, 3 row; Be 2 row see showing B shown in Fig. 2, figure, 2 row; Obtain Fig. 1, data in 2 shown two tables of data, the data of supposing in these two tables of data are value type, then directly obtain the numerical value in tables of data, and carry out the correlated process obtaining proof test value.In a practical situation, data in described tables of data can be numeric type, character type, alpha type etc., computer system is all adopt binary coding store data, if the data of verification are character type, letter character etc., then first obtain binary coding, be converted to the numerical value of 10 systems again, obtain the numerical value of data in tables of data; If the data in described tables of data are numeric type, then directly can obtain the numerical value of data in tables of data.In order to calculate the proof test value of these 2 tables of data, in present embodiment, desirable J=1/2, K=1/3, L=1/3.J, K, L get other numerical value does not affect realization of the present invention equally.
In order to obtain proof test value N1, the numerical value in cumulative two tables of data, that is:
N1=A11+A12+A13+A21+A22+A23+A31+A32+A33+B11+B12+B21+B22;
In order to obtain proof test value N2,2 powers of opening calculating the absolute value of each numerical value of described numerical value are got just several (namely getting 1/2 power), and the numerical value after opening power that adds up, that is:
N2=POWER(ABS(A11),1/2)+POWER(ABS(A12),1/2)+POWER(ABS(A13),1/2)+POWER(ABS(A21),1/2)+POWER(ABS(A22),1/2)+POWER(ABS(A23),/2)+POWER(ABS(A31),1/2)+POWER(ABS(A32),1/2)+POWER(ABS(A33),1/2)+POWER(ABS(B11),1/2)+POWER(ABS(B12),1/2)+POWER(ABS(B22),1/2)+POWER(ABS(B23),1/2);
In order to obtain proof test value N3, what calculate each line number value sum of described numerical value opens 3 powers, and it is cumulative, that is: N3=POWER (A11+A12+A13,1/3)+POWER (A21+A22+A23,1/3)+POWER (A31+A32+A33,1/3)+POWER (B11+B12,1/3)+POWER (B21+B22,1/3);
In order to obtain proof test value N4, what calculate each columns value sum of described numerical value opens 3 powers, and the numerical value after getting 1/3 power that adds up, that is:
N4=POWER(A11+A21+A31,1/3)+POWER(A12+A22+A32,1/3)+POWER(A13+A23+A33,1/3)+POWER(B11+B21,1/3)+POWER(B12+B22,1/3);
In order to accurately judge from described proof test value the data that back up, transmit whether exist and be tampered or the situation of information dropout, the number of significant digit of described proof test value is retained multidigit, if there is small change in the data in tables of data, namely determine by proof test value, in some embodiments, the number of significant digit of described proof test value N1 is M1 position after radix point; The number of significant digit of described proof test value N2 is M2 position after radix point; The number of significant digit of described proof test value N3 is M3 position after radix point; The number of significant digit of described proof test value N4 is M4 position after radix point.Wherein, the value of number of significant digit M1, M2, M3, M4 can be identical or different, concrete needs according to practical application the size choosing M1, M2, M3, M4 value.For the situation of two tables of data in above-mentioned embodiment, getting M1, M2, M3, M4 is 9.
Proof test value acquisition methods as above, in present embodiment, no matter all obtain 4 proof test values for how many tables of data, and the data genaration in proof test value foundation tables of data, only need can conclude whether data have in the process of transmission according to verification when carrying out data check and occur to leak biography, wrong biography, data-bag lost etc.
S500: the temporal information of above-mentioned tables of data is sent to data genaration side by data receiver;
S600: extract corresponding data table from data genaration side according to described temporal information, and adopt the verification value generation method preset to generate proof test value II; Described data genaration side extracts corresponding tables of data according to described temporal information, and adopts identical verification value generation method to generate proof test value II with step S400.The proof test value generated according to described verification value generation method in step S600 is N1 ', N2 ', N3 ', N4 '.
S700: data receiver sends proof test value I to data genaration side, this process can be carried out with in step S500, the synchronous the latter of the transmission of temporal information is asynchronous.
Whether S800: data genaration side obtains proof test value I, check described proof test value I, proof test value II consistent, if consistent, the described tables of data of flag data take over party, for verify, if inconsistent, then judges the tables of data error of transmission of this temporal information.Whether unanimously proof test value I, proof test value II are carried out comparison data one by one, if consistent, by the list notation of data receiver's corresponding data for verify, this mark does not verify mark execution by removing, and can save storage space by the method, and simple to operate.The described mark that verified can also adopt other predetermined special characters to mark to play the mistake distinguishing tables of data.To be judged as that conforming tables of data can prevent from carrying out Data duplication operation after marking, reduce system redundancy, improve the efficiency of data verification.Secondly, in traditional approach, generally tables of data and proof test value are made up of data genaration side and are sent to data receiver simultaneously afterwards, verify by after data receiver's calculation check value, which easily causes proof test value to be lost, proof test value is not corresponding with corresponding tables of data, the sequencing of tables of data must be distinguished, the sequencing of data line data rows carries out the verification of tables of data, trivial operations workload is large, present embodiment is only by proof test value I returned data generation side, the proof test value II generated by data genaration side and proof test value I compares, can be at any time, at random, random carries out consistency verification of data, data line need not be distinguished, data rows, the sequencing of tables of data, the time of data transmission need not be distinguished, the least unit that a data of a business module can be calculated as data check, greatly reduce the transmission of data in database synchronization process.
Described loose formula data consistency verification method also comprises S900: data genaration side obtains tables of data transmitting fault information, and initiate more New function, calling data table is verified as the tables of data of inconsistent temporal information.By which, can the information of real-time update loading error occurring, thus the accuracy of the information of raising.Carrying out tables of data consistency desired result process as above equally by verifying as after inconsistent tables of data upgrades, guaranteeing the consistance of transmitted data with this.
One preferred embodiment in, it is different from above-mentioned embodiment and is the data that described data receiver's real-time reception data genaration side sends.What the data sent data genaration side were real-time is transferred to data receiver, and data receiver initiates consistency verification of data according to the instruction received, and which can improve the efficiency of data transmission, verification.
Consult Fig. 4, the present invention also discloses a kind of loose formula consistency verification of data device, this device comprises data genaration side and data receiver, described data genaration can arrange the second data transceiving unit, data receiver can arrange the first data transceiving unit, first data transceiving unit, the transmission of tables of data etc. is carried out between second data transceiving unit, therebetween the transmission of data can adopt wired mode to transmit, wireless way for transmitting, wired transmission mode can adopt the combination in any of known wire communication to provide, include but not limited to Ethernet, USB, RS/232 and RS/485.Wireless way for transmitting can adopt any one combination of following communication mode, includes but not limited to: at least one agreement at least one in IEEE802.11/802.15/802.16 communication protocol, at least one agreement in HSPA/GSM/GPRS/EDGE communication protocol, TDMA agreement, UMTS agreement, LTE protocol and/or CDMA/1xEV-D0 communication protocol race.Described first data transceiving unit, the second data transceiving unit can use the realizations such as integration module, special purpose interface, special circuit, its accessible site also can adopt independently module/unit in the inside of data genaration side or data receiver, as as described in the first data transceiving unit can be integrated with data receiver's storage unit, namely adopt the memory module of onboard data transfer function.The second same data transceiving unit also can adopt identical vibrational power flow in data genaration side, does not repeat them here.
Data genaration side described in described loose formula consistency verification of data device and data transmit-receive side comprise:
Data receiver's storage unit, stores the tables of data that receives and is labeled as and do not verify, and described tables of data carries temporal information.This data receiver's storage unit can adopt built-in storage unit, storage array etc. or external memory device, the modes such as cloud storage, equipment as utilized electric energy mode to store information: various storer (RAM, ROM etc.), magnetic energy mode is utilized to store the equipment of information: tape, core memory, magnetic bubble memory, USB flash disk etc., optical mode is utilized to store the equipment of information: CD or DVD, the equipment that utilizes magneto-optic mode to store information is as magneto-optic disk, special storage system: for the specific information system of data backup or disaster tolerance, express network is utilized to carry out the storage information equipment of big data quantity.As mentioned above, described storage unit can the interface, module, array etc. of the wired or wireless transmission of onboard data, thus makes can carry out data transmission between data receiver and data genaration side.
First verification control module, when first verification unit of data receiver receives consistency verification of data information, according to the corresponding tables of data that consistency verification of data information extraction data receiver storage unit stores, generate proof test value I according to the verification value generation method preset of the data acquisition in tables of data; The data acquisition that first verification control module extracts in tables of data generates proof test value I with the verification value generation method preset, and the proof test value I generated can be stored in identical storage area or different storage areas from tables of data.Received consistency verification of data information sends by data receiver, the inner integrated units/modules in data genaration side, also receives external control system/device/device initializes data consistency desired result by wired or wireless mode.As consistency verification of data information can directly be sent by the first verification control module, the consistency verification of data information that first verification control module is initiated only can carry out consistency desired result for the tables of data of a certain special part, and the instruction according to this consistency verification of data information in the process of therefore proof test value generation performs.While initiation consistency verification of data, data check is carried out by indicating module prompting is current, this indicating module can adopt instruction sound, pilot lamp etc., pilot lamp can adopt different colours, the light signal of difformity or different shading value, the information pointing out arbitrarily user, when employing pilot lamp, adoptable smooth carrier comprises LED, laser diode, miniature bulb etc., even also can increase the structural member making light form definite shape, as lens etc., more concentrate to make prompting light and be easy to distinguish, the optical information of different colours can be used, difform optical information, the optical information of different bright dark degree, the color of light can also adopt the combination of seven-colour-light or seven-colour-light, different colours can be selected or use same color to change its shading value as prompting.
Second verification control module, the temporal information according to the tables of data of the first verification control module extracts corresponding data table from data genaration side, and adopts the verification value generation method preset to generate proof test value II; Second verification control module and first verifies control module and adopts identical verification value generation method, extracts same tables of data generate proof test value II according to temporal information.The generation of proof test value I, proof test value II does not affect by the sequencing of data line, data rows and tables of data, and can detect the change, loss etc. of data in tables of data according to the value of the two, can the accuracy of monitoring data transmission.
Data genaration side's verification unit, obtains proof test value I, and checking value I, whether consistent, if unanimously, the described tables of data of data receiver be labeled as and verify, if inconsistent, then mark the tables of data error of transmission of this temporal information if testing value II.
In above-mentioned embodiment, proof test value I, proof test value II can be proof test value group, and the demand that can use according to reality generates N (N >=1) individual proof test value.In this embodiment, verified by data genaration side's verification unit, data receiver only needs proof test value I to be transmitted back to data genaration side, this process does not require its corresponding tables of data one_to_one corresponding of proof test value I, priority order in proof test value I transmitting procedure does not affect the use of proof test value I, and therefore its randomness is stronger, and operability is good, can comparatively mini system redundancy greatly, increase work efficiency.
In embodiment as above, described loose formula consistency verification of data device also comprises data genaration side's updating block, and it initiates more New function according to tables of data transmitting fault information, calls the tables of data of described temporal information.Data Update is directly initiated according to the result of verification in side, data genaration side, be different from after traditional consistency verification of data equipment is asked by data receiver and carry out Data Update again, the update request initiated by data receiver may cause solicited message to bag etc. equally, and therefore operability, reliability are low.Comparatively speaking present embodiment initiates Data Update by data genaration side, and its unfailing performance is good, and efficiency is high, program saving.Tables of data after renewal adopts loose formula data consistency verification method as above to carry out consistency verification of data equally, ensure that tables of data is transmitted accurate, reliable.
Preferably, the generation of proof test value can take following mode, and the first verification control module, the second verification control module include numerical value acquisition subelement, proof test value N1 obtains subelement, proof test value N2 obtains subelement, proof test value N3 obtains subelement, proof test value N4 obtains subelement: numerical value obtains the numerical value A in subelement acquisition tables of data xy; Proof test value N1 obtains subelement and to add up described numerical value A xyobtain proof test value N1; Proof test value N2 obtains subelement, gets each numerical value A xyabsolute value, if A xy≠ 0, then get A xyj power after on the occasion of and cumulative, obtain proof test value N2; Proof test value N3 obtains subelement, every line number value sum P in the table that fetches data xif, P x≠ 0, then get p xk power after cumulative each value, obtain proof test value N3; Proof test value N4 obtains subelement, every columns value sum Q in the table that fetches data yif, Q y≠ 0, then get Q yl power after cumulative each value, obtain proof test value N4.
In order to ensure that data can real-time update, meet the demand of application in real time, tables of data real-time Transmission between described data genaration side and data receiver.
The present invention also discloses a kind of loose formula consistency verification of data system, comprises above-described loose formula consistency verification of data device.This loose formula consistency verification of data system can be each level system of highway.
Loose formula data consistency verification method of the present invention, Apparatus and system can be applicable to verification that is long-range, data correctness after synchronization of data in heterogeneous database, system database data table related as at different levels in highway synchronously contrasts, the synchronous consistency desired result of various cache database, the synchronous consistency desired result of platform data etc., it has wide range of applications; Can be real-time data check is carried out to the tables of data of specifying, in real time, reliable, convenient; Can not distinguishing rows verify in real time with the sequencing of row, the sequencing of often opening tables of data, and can the accuracy of data in checking data table simultaneously in the process of verification, improve the accuracy of data transmission, prevent data packetloss.
The embodiment of the loose formula data consistency verification method of the present invention is only described in upper; not thereby the scope of the claims of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (9)

1. a loose formula data consistency verification method, is characterized in that comprising the steps:
Data receiver stores the tables of data that receives and is labeled as and do not verify, and described tables of data carries temporal information;
Data receiver receives consistency verification of data information, the tables of data stored according to consistency verification of data information extraction, and the verification value generation method preset of data acquisition in described tables of data is generated proof test value I;
Temporal information according to previous step tables of data extracts corresponding data table from data genaration side, and adopts the verification value generation method preset to generate proof test value II;
Data genaration side obtains proof test value I, and whether check described proof test value I, proof test value II consistent, if consistent, the described tables of data of flag data take over party, for verify, if inconsistent, then judges tables of data error of transmission corresponding to this temporal information.
2. loose formula data consistency verification method according to claim 1, is characterized in that: also comprise data genaration side and obtain tables of data transmitting fault information, initiate more New function, call the tables of data of the inconsistent temporal information of described inspection.
3. loose formula data consistency verification method according to claim 2, is characterized in that:
Described default proof test value generating algorithm comprises:
S001: obtain the numerical value A in tables of data xy;
S002: cumulative described numerical value A xyobtain proof test value N1; Get each numerical value A xyabsolute value, if A xy≠ 0, then get A xyj power after on the occasion of and cumulative, obtain proof test value N2;
S003: every line number value sum P in the table that fetches data xif, P x≠ 0, then get p xk power after cumulative each value, obtain proof test value N3;
S004: every columns value sum Q in the table that fetches data yif, Q y≠ 0, then get Q yl power after cumulative each value, obtain proof test value N4.
4. according to the loose formula data consistency verification method shown in claim 3, it is characterized in that: the data that described data receiver's real-time reception data genaration side sends.
5. a loose formula consistency verification of data device, is characterized in that comprising:
Data receiver's storage unit, stores the tables of data that receives and is labeled as and do not verify, and described tables of data carries temporal information;
First verification control module, when receiving consistency verification of data, extracts the tables of data that data receiver stores, and generates proof test value I according to the verification value generation method preset of data acquisition in tables of data;
Second verification control module, the temporal information according to the tables of data of the first verification control module extracts corresponding data table from data genaration side, and adopts the verification value generation method preset to generate proof test value II;
Data genaration side's verification unit, obtains proof test value I, checks described proof test value I, whether unanimously to test value II, if consistent, the described tables of data of data receiver be labeled as and verify, if inconsistent, then mark the tables of data error of transmission corresponding to this temporal information.
6. loose formula consistency verification of data device according to claim 5, is characterized in that:
Also comprise data genaration side's updating block, according to tables of data transmitting fault information, initiate more New function, call the tables of data of the inconsistent temporal information of described inspection.
7. loose formula consistency verification of data device according to claim 6, is characterized in that: described first verification control module, the second verification control module include numerical value acquisition subelement, proof test value N1 obtains subelement, proof test value N2 obtains subelement, proof test value N3 obtains subelement, proof test value N4 obtains subelement:
Numerical value obtains the numerical value A in subelement acquisition tables of data xy;
Proof test value N1 obtains subelement and to add up described numerical value A xyobtain proof test value N1;
Proof test value N2 obtains subelement, gets each numerical value A xyabsolute value, if A xy≠ 0, then get A xyj power after on the occasion of and cumulative, obtain proof test value N2;
Proof test value N3 obtains subelement, every line number value sum P in the table that fetches data xif, P x≠ 0, then get p xk power after cumulative each value, obtain proof test value N3;
Proof test value N4 obtains subelement, every columns value sum Q in the table that fetches data yif, Q y≠ 0, then get Q yl power after cumulative each value, obtain proof test value N4.
8. loose formula consistency verification of data device according to claim 7, is characterized in that:
Tables of data real-time Transmission between described data genaration side and data receiver.
9. a loose formula consistency verification of data system, is characterized in that: comprise the loose formula consistency verification of data device described in 5-8 any one.
CN201510254790.0A 2015-05-19 2015-05-19 A kind of loose formula data consistency verification method Active CN104809250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510254790.0A CN104809250B (en) 2015-05-19 2015-05-19 A kind of loose formula data consistency verification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510254790.0A CN104809250B (en) 2015-05-19 2015-05-19 A kind of loose formula data consistency verification method

Publications (2)

Publication Number Publication Date
CN104809250A true CN104809250A (en) 2015-07-29
CN104809250B CN104809250B (en) 2018-08-03

Family

ID=53694072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510254790.0A Active CN104809250B (en) 2015-05-19 2015-05-19 A kind of loose formula data consistency verification method

Country Status (1)

Country Link
CN (1) CN104809250B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649333A (en) * 2015-10-29 2017-05-10 阿里巴巴集团控股有限公司 Method and device for consistency testing of field sequence
CN108763291A (en) * 2018-04-16 2018-11-06 北京奇艺世纪科技有限公司 A kind of data managing method, device and electronic equipment
CN109064248A (en) * 2018-06-25 2018-12-21 北京辰森世纪科技股份有限公司 Order data synchronous method of calibration, device and equipment
CN110621011A (en) * 2019-09-12 2019-12-27 北京方研矩行科技有限公司 OTA firmware upgrading method and system based on Bluetooth device end
CN110806948A (en) * 2019-10-31 2020-02-18 上海集成电路研发中心有限公司 Data verification method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102354292A (en) * 2011-09-21 2012-02-15 国家计算机网络与信息安全管理中心 Method and system for checking consistency of records in master and backup databases
WO2014108083A1 (en) * 2013-01-11 2014-07-17 Tencent Technology (Shenzhen) Company Limited Method and device for verifying consistency of data of master device and slave device
CN103957080A (en) * 2014-04-30 2014-07-30 浙江中控技术股份有限公司 Data integrity checking method and system
CN104008158A (en) * 2014-05-27 2014-08-27 青岛海信移动通信技术股份有限公司 Data verification method, verification device and mobile terminal
CN104504347A (en) * 2015-01-20 2015-04-08 网易宝有限公司 Data consistency matching processing method and device
CN104579558A (en) * 2014-12-05 2015-04-29 苏州沃斯麦机电科技有限公司 Method for detecting integrity in data transmission process

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102354292A (en) * 2011-09-21 2012-02-15 国家计算机网络与信息安全管理中心 Method and system for checking consistency of records in master and backup databases
WO2014108083A1 (en) * 2013-01-11 2014-07-17 Tencent Technology (Shenzhen) Company Limited Method and device for verifying consistency of data of master device and slave device
CN103957080A (en) * 2014-04-30 2014-07-30 浙江中控技术股份有限公司 Data integrity checking method and system
CN104008158A (en) * 2014-05-27 2014-08-27 青岛海信移动通信技术股份有限公司 Data verification method, verification device and mobile terminal
CN104579558A (en) * 2014-12-05 2015-04-29 苏州沃斯麦机电科技有限公司 Method for detecting integrity in data transmission process
CN104504347A (en) * 2015-01-20 2015-04-08 网易宝有限公司 Data consistency matching processing method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649333A (en) * 2015-10-29 2017-05-10 阿里巴巴集团控股有限公司 Method and device for consistency testing of field sequence
CN106649333B (en) * 2015-10-29 2021-12-10 阿里巴巴集团控股有限公司 Method and device for detecting consistency of field sequence
CN108763291A (en) * 2018-04-16 2018-11-06 北京奇艺世纪科技有限公司 A kind of data managing method, device and electronic equipment
CN108763291B (en) * 2018-04-16 2021-04-30 北京奇艺世纪科技有限公司 Data management method and device and electronic equipment
CN109064248A (en) * 2018-06-25 2018-12-21 北京辰森世纪科技股份有限公司 Order data synchronous method of calibration, device and equipment
CN110621011A (en) * 2019-09-12 2019-12-27 北京方研矩行科技有限公司 OTA firmware upgrading method and system based on Bluetooth device end
CN110621011B (en) * 2019-09-12 2022-11-04 北京方研矩行科技有限公司 OTA firmware upgrading method and system based on Bluetooth device side
CN110806948A (en) * 2019-10-31 2020-02-18 上海集成电路研发中心有限公司 Data verification method and device
CN110806948B (en) * 2019-10-31 2024-02-02 上海集成电路研发中心有限公司 Data verification method and device

Also Published As

Publication number Publication date
CN104809250B (en) 2018-08-03

Similar Documents

Publication Publication Date Title
CN104809250A (en) Loose type data consistency checking method
CN109561106B (en) Ship communication message real-time analysis and filtering method
CN103178998B (en) A kind of measuring and control data transmission method and device
CN103441861B (en) A kind of data record generation method and device
CN105091927A (en) All-liquid-crystal automobile instrument automatic test platform
CN104537102B (en) A kind of positive geocoding service method and system for obtaining longitude and latitude
CN101400043B (en) Method and system for consistency comparison of front-background data in mobile communication system
CN109656767A (en) A kind of acquisition methods, system and the associated component of CPLD status information
CN109445837A (en) A kind of dissemination method and equipment of application program
CN103530211A (en) PCIE loop back self-test method based on UVM platform
CN110868458B (en) Communication method and device for stable control system
US8681812B2 (en) Method and device for analyzing transaction propagation in a multiprotocol network of a system on chip
CN106802865B (en) Response simulator and method for software test
CN104135476B (en) A kind of communication protocol conversion method, apparatus and system
CN111935767B (en) Network simulation system
CN104780123A (en) Network packet receiving and sending processing device and design method thereof
CN103457957B (en) A kind of network penetration test macro and method with adaptation function
CN103812730A (en) Multiple cell TTCN (Tree and Tabular Combined Notation) protocol conformance test platform system
CN105160124A (en) Overhead simulation system and method for optical transport network
CN105447251A (en) Transaction type excitation based verification method
CN109286923B (en) Communication method based on Bluetooth
CN104378174A (en) Communication data package check method based on grinding machine system
CN106789296B (en) A kind of processing system and method for station institute's terminal remote signalling and the configuration of line switching signal
CN102722592A (en) Universal digital information recording device and method
CN103840900A (en) Communication link test system and method for radar responder

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 350000 No. 1 Rujiangxi Road, Mawei District, Fuzhou City, Fujian Province

Patentee after: New Continent Digital Technology Co., Ltd.

Address before: 350000 No. 1 Rujiangxi Road, Mawei District, Fuzhou City, Fujian Province

Patentee before: Fujian Newland Computer Co., Ltd.

CP01 Change in the name or title of a patent holder