CN104809250B - A kind of loose formula data consistency verification method - Google Patents
A kind of loose formula data consistency verification method Download PDFInfo
- Publication number
- CN104809250B CN104809250B CN201510254790.0A CN201510254790A CN104809250B CN 104809250 B CN104809250 B CN 104809250B CN 201510254790 A CN201510254790 A CN 201510254790A CN 104809250 B CN104809250 B CN 104809250B
- Authority
- CN
- China
- Prior art keywords
- data
- value
- tables
- check value
- verification
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring 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 present invention relates to a kind of loose formula data consistency verification methods, include the following steps:Data receiver stores received data table and labeled as not verifying, and the tables of data carries temporal information;Data receiver receives consistency verification of data information, and according to the tables of data that consistency verification of data information extraction is stored, data in the tables of data are generated check value I using preset verification value generation method;Temporal information according to previous step tables of data extracts corresponding data table from data generation side, and generates check value II using preset verification value generation method;Whether data generation side obtains check value I, examine the check value I, check value II consistent, and the tables of data of flag data recipient is to have verified if consistent, if inconsistent, judges tables of data error of transmission corresponding to the temporal information.The sequencing of tables of data can not be differentiated between, the verification of progress real time data, error rate are small.
Description
Technical field
The present invention relates to database maintenance technology, more particularly to a kind of loose formula data consistency verification method.
Background technology
In the application field of database technology, when multiple storage devices, terminal room carry out data duplication, typically directly
By on intermediate storage medium or network storage to purpose storage device after reading data in the storage device of source.Data are in reality
There may be situations such as data are tampered or lose in transmission process.Therefore, it is backed up to the data in database
When, it needs to verify the integrality of data, to ensure the safety of data.
In order to which the integrality to data is verified, the method used at present mainly has:
1, compare Database size:The data bulk of data-base recording is compared, or to the size of data file
It is compared.
2, every data library is recorded and calculates check code, and whether twin check code is consistent.
In said program, by complete data replicate after respectively by the data in source storage device and purpose storage device
Consistency checking is carried out, this consistency comparison method needs first read out data respectively, therefore in mass data processing
Application scenarios under, can have the problems such as data transfer overhead is big, verification delay is big, be not suitable for carrying out the place of mass data
Reason.
The calculating of check code can be very good to check whether the record of active and standby database is consistent, but have on the market very at present
For majority according to checking algorithm for the priority of tables of data, the ordinal position between ranks requires stringent, i.e., active and standby data row or column
Position is inconsistent when calculating, and just will appear the inconsistent situation of check value.It is therefore desirable to have a kind of eased school
Value generating algorithm is tested, can ignore that the sequencing of tables of data, the sequencing of data row or column make check value generating mode
It is more flexible, and keep data check mutually convenient compared with more.
Invention content
The purpose of the present invention is to provide the elder generations of a kind of sequence that can not differentiate between tables of data row, column and every tables of data
Sequence afterwards can carry out real time data verification, the data consistency verification method that data transmission is fast, error rate is small to tables of data.
In order to solve the above-mentioned technical problem present invention employs following technical solutions, provide a kind of loose formula data consistency
Method of calibration includes the following steps:Data receiver stores received data table and labeled as not verifying, and the tables of data is taken
With temporal information;When receiving consistency verification of data, the tables of data that extraction data receiver is stored, according to tables of data
Interior data generate check value I using preset verification value generation method;The temporal information of tables of data according to previous step is from number
Corresponding data table is extracted according to generation side, and check value II is generated using preset verification value generation method;Data generation side obtains
Whether check value I examines the check value I, check value II consistent, and the tables of data of flag data recipient is if consistent
It has been verified that, if inconsistent, judge the tables of data error of transmission of the temporal information.
Further include:Data generation side obtains tables of data transmitting fault information, initiates more new function, and the inspection is called to differ
The tables of data of the temporal information of cause;
The preset verification value generation method includes:
S001:Obtain the numerical value A in tables of dataxy;S002:Add up the numerical value AxyObtain check value N1;S003:It takes every
One numerical value AxyAbsolute value, if Axy≠ 0, then take AxyJ powers after positive value and add up, obtain check value N2, wherein J be it is whole
Number;It takes in tables of data per the sum of line number value PxIf Px≠ 0, then take pxK powers after add up each value, obtain check value N3, wherein K
For integer;;S004:Take the sum of each column numerical value Q in tables of datayIf Qy≠ 0, then take QyL powers after add up each value, obtain verification
Value N4, wherein L are integer.
Wherein, the data that data receiver's real-time reception data generation side is sent.
Invention additionally discloses a kind of loose formula consistency verification of data devices, including:Data receiver's storage unit, storage
Received data table simultaneously is labeled as not verifying, and the tables of data is marked with temporal information;First verification control unit, works as reception
When to consistency verification of data, the tables of data that extraction data receiver is stored uses preset school according to data in tables of data
It tests value generation method and generates check value I;Second verification control unit, the time letter for the tables of data for verifying control unit according to first
Breath extracts corresponding data table from data generation side, and generates check value II using preset verification value generation method;Data generate
Whether square verification unit obtains check value I, examines the check value I, check value II consistent, by data receiver if consistent
The tables of data labeled as having verified, if inconsistent, judge the tables of data error of transmission of the temporal information;
Further include data generation side updating unit, obtain tables of data transmitting fault information, more new function is initiated, described in calling
Examine the tables of data of inconsistent temporal information;The first verification control unit, the second verification control unit include numerical value
Obtain subelement, check value N1 obtains subelement, check value N2 obtains subelement, check value N3 obtains subelement, check value N4
Obtain subelement:Numerical value obtains the numerical value A in subelement acquisition tables of dataxy;Check value N1 obtains subelement and adds up the numerical value
AxyObtain check value N1;Check value N2 obtains subelement, takes each numerical value AxyAbsolute value, if Axy≠ 0, then take AxyJ powers
Rear positive value simultaneously adds up, and obtains check value N2, and wherein J is integer;Check value N3 obtains subelement, takes in tables of data per line number value
The sum of PxIf Px≠ 0, then take pxK powers after add up each value, obtain check value N3, wherein K be integer;Check value N4 obtains son
Unit takes the sum of each column numerical value Q in tables of datayIf Qy≠ 0, then take QyL powers after add up each value, obtain check value N4,
Middle L is integer.
Wherein, tables of data real-time Transmission between the data generation side and data receiver.
Invention additionally discloses a kind of loose formula consistency verification of data system, including above-described loose formula data are consistent
Property calibration equipment.
The beneficial effects of the invention are as follows:
One, this method can be suitable for long-range, data correctness after synchronization of data in heterogeneous database verification, such as high speed
Highway system database data table related synchronous contrasts at different levels, it is same that various cache databases synchronize consistency desired result, platform data
Consistency desired result etc. is walked, is had wide range of applications.
Two, this method can carry out data check to specified data table in real time, in real time, reliably, conveniently.
Three, sequencing of the row with row, every data can not differentiated between by carrying out consistency verification of data using the above method
The sequencing of table is verified in real time, and during verification can simultaneously in verification data table data accuracy,
The accuracy for improving data transmission, prevents data packetloss.
Description of the drawings
Fig. 1 show the schematic diagram of the tables of data A of the loose formula data verification method of the present invention;
Fig. 2 show the schematic diagram of the tables of data B of the loose formula data verification method of the present invention;
Fig. 3 show the flow chart of the loose formula data verification method of the present invention;
Fig. 4 show the schematic diagram of the loose formula data calibration device of the present invention.
Specific implementation mode
In order to describe the technical content, the structural feature, the achieved object and the effect of this invention in detail, below in conjunction with embodiment
And attached drawing is coordinated to be explained in detail.
Refering to Fig. 3, the invention discloses a kind of loose formula data consistency verification methods, include the following steps:
S100:Data receiver receives the tables of data that data generation side is sent;
S200:Data receiver stores received data table and labeled as not verifying, and the tables of data marks having time
Information;The data receiver can be the relevant endpoint of system databases at different levels etc. of highway, and recipient receives number
Tables of data storage is carried out according to the storage modes such as storage device, storage array, cloud storage, storage software can be used after table.It is storing
When tables of data, in the tables of data or tables of data data increase a special field come mark the tables of data be do not verify,
Letter, numerical value, additional character etc. may be used in the special field, and the wherein data in tables of data can be numeric type, letter
Type, character type etc., in computer, the numerical value that different types of data Binary Conversion formation computer can be distinguished is to side
Just subsequent execution verifies.Data in the tables of data and label is not verified decollator can be set therebetween number is distinguished with this
According to the data and mark in table.The temporal information that tables of data is included can be the period, such as carry label:At the first time
Section, second time period ... N periods etc.;Temporal information can be the temporal information that system carries, and such as can be only data
Initial time when transmission or termination time;Temporal information can also be the simple time label as using lexicographic ordering labelled notation,
Numerical value serial number relatively etc., the sequencing of tables of data transmission is distinguished with this.
S300:Consistency verification of data information, the initiation of consistency verification of data are initiated by internal or external control unit
It can be initiated by data generation side or data receiver, or can be logical by exterior terminal, equipment, system, cloud server etc.
It crosses wired or wireless mode and sends the instruction execution process.It simultaneously can be by indicating information alert user at this time into line number
According to consistency desired result, instruction sound or indicator light etc. can be used to indicate in instruction information.Consistency verification of data can be directed to a certain
The tables of data of special time period is verified, you can verified for total data table also can carry out school for partial data table
It tests, different consistency verification of data orders will be directed to different tables of data and carry out data check.
S400:When data receiver receives consistency verification of data information, according to consistency verification of data information extraction
The tables of data stored generates check value I according to the data in tables of data using preset verification value generation method;
In above-mentioned steps, the consistency verification of data of initiation can be verified only for partial data table, therefore basis
The tables of data that temporal information extraction data receiver is stored, such as the extraction tables of data of transmission, certain a period of time since sometime
Between before tables of data or a few row data etc. in which tables of data or a certain tables of data.The check value I can
For check value group, the check value group such as formed using N number of check value.In one embodiment of the present invention, using 4 check values,
The preset verification value generation method preferably can be used such as under type:
S001:Obtain the numerical value A in tables of dataxy;Data in data receiver's received data table can be numeric type,
Character type, alpha type etc., computer system all be using binary coding store data, if verification data be character type,
Letter character etc., then first obtain binary coding, is reconverted into the numerical value of 10 systems, and then obtain the number of data in tables of data
Value;If the data in the tables of data are numeric type, the numerical value A of data in tables of data can be directly acquiredxy。
S002:Add up the numerical value AxyObtain check value N1;Numerical value referring to tables of data in attached drawing 1,2, Fig. 1 is A11,
A12, A13, A21, A22, A23, then by each numerical value A12, A13, A21, A22, A23It is cumulative, obtain check value N1, and so on it is no longer superfluous
It states.Similarly this method is used to obtain check value N1 for multiple tables of data.
S003:Take each numerical value AxyAbsolute value, if Axy≠ 0, then take AxyJ powers after positive value and add up, obtain school
Test value N2;Detailed, the numerical value referring to tables of data in attached drawing 1,2, Fig. 1 is A11, A12, A13, A21, A22, A23If A11=0, A12,
A13, A21, A22, A23≠ 0, then take remaining each numerical value A12, A13, A21, A22, A23J powers after positive value and by the above results
It is cumulative to obtain check value N2;If A11, A12, A13, A22, A23≠ 0, A21=0, then the numerical value of several non-zeros is taken after J powers just
Value, and the above results are added up and obtain check value N2.And so on repeat no more.Preferably, the value of the J can be J=
2j or 1/2j, j ≠ 0, the root that the data are gone to even-times side or open even number obtain check value later.
S004:It takes in tables of data per the sum of line number value PxIf Px≠ 0, then take pxK powers after add up each value, obtain verification
Value N3;Specifically, calculating the sum of each line number value of numerical value Px(x=1,2,3,4 ...), if Px≠ 0, then take PxK times
Add up each value behind side, obtains check value N3;Such as the tables of data in Fig. 1, the sum of each line number value P1=A11+A12+A13, P2=
A21+A22+A23, P3=A31+A32+A33If P1、P2、P3≠ 0, then P is taken respectively1、P2、P3K powers after add up each value, if P1=0,
P2、P3≠ 0, then P is taken respectively2、P3K powers after add up each value, obtain check value N3.If P1、P2、P3=0, then take row check value
N3=0.Preferably, the value of K is K=2k+1 or 1/ (2k+1), k ≠ 0, by numerical value often capable in tables of data take odd number power or
Person obtains check value after opening odd number th Root.
S005:Take the sum of each column numerical value Q in tables of datayIf Qy≠ 0, then take QyL powers after add up each value, obtain verification
Value N4.Calculate the sum of each columns value of numerical value Qy(y=1,2,3,4 ...), if Qy≠ 0, then take QyL powers after tire out
Add each value, obtains check value N4.Such as the tables of data in Fig. 1, the sum of each columns value Q1=A11+A21+A31, Q2=A21+A22+
A32, Q3=A13+A23+A33+, if Q1、Q2、Q3≠ 0, then Q is taken respectively1、Q2、Q3L powers after add up each value, if Q1=0, Q2、Q3
≠ 0, then Q is taken respectively2、Q3L powers after add up each value, obtain check value N3.If Q1、Q2、Q3=0, then take check value N4=0.
Preferably, L=2l+1 or 1/ (2l+1), 1 ≠ 0.
As above, the acquisition modes of tables of data check value be will be detailed below:
All numerical value that mode one, N1 pass through cumulative data table;Calculate the 2j of the absolute value of each numerical value of the numerical value
Power, and add up and take the numerical value after 2j powers, obtain check value N2;(2k+1) for calculating the sum of each line number value of the numerical value is secondary
Side, and the cumulative each value acquisition check value N3 taken after (2k+1) power;It calculates (2I+1) of the sum of each columns value of the numerical value
Power, and the cumulative each value acquisition check value N4 taken after (2I+1) power.
Mode two, all numerical value that N1 is cumulative data table;
Calculate each numerical value A of the numerical valuexyAbsolute value, work as AxyWhen ≠ 0, A is takenxy1/2j powers after take positive value (i.e.
Open just several after 2j powers), it is cumulative to open each value after power, obtain check value N2;Referring to Fig. 1, if A11=0, remainder values
For non-zero numerical value, then not to A11The calculating of 1/2j powers is taken, and remaining numerical value progress in tables of data is opened into root accordingly, is taken
Just several calculating, the cumulative as check value N2 of each value after above-mentioned calculating.
Calculate the sum of each line number value of numerical value Px(x=1,2,3,4 ...), if Px≠ 0, then take Px=1/ (2k+
1), add up after (k ≠ 0) power each value, obtains check value N3.P is taken in this processx=1/ (2k+1) is represented PxOpen (2k+
1) power, if Px=0, then extracting operation is not carried out to it.PxEach value after evolution is cumulative rear up to N3.
Calculate the sum of each columns value of numerical value Qy(y=1,2,3,4 ...), if Qy≠ 0, then take Qy=1/ (2I+
1), add up after (I ≠ 0) power each value, obtains check value N4.Q is taken in this processy=1/ (2I+1) is represented QyEvolution, if
Qy=0, then extracting operation is not carried out to it.QyEach value after evolution is cumulative rear up to N4.
Mode three:All numerical value that N1 passes through cumulative data table;
Calculate each numerical value A of the numerical valuexyAbsolute value, work as AxyWhen ≠ 0, A is takenxy1/2j powers after add up each value,
Obtain check value N2;Referring to Fig. 1, if A11=0, remainder values are non-zero numerical value, then not to A11The calculating of 1/2j powers is taken, and
Remaining numerical value in tables of data is taken into each value that adds up after 1/2j powers, the accumulated value of each value is check value N2.
(2k+1) power of the sum of each line number value of the numerical value is calculated, and the cumulative each value acquisition taken after (2k+1) power
Check value N3;
Calculate the sum of each columns value of numerical value Qy(y=1,2,3,4 ...), if Qy≠ 0, then take Qy=1/ (2I+
1), add up after (I ≠ 0) power each value, obtains check value N4.Q is taken in this processy=1/ (2I+1) is represented QyEvolution, if
Qy=0, then extracting operation is not carried out to it.QyEach value after evolution is cumulative rear up to N4.
Mode one, two, three by way of example only the present invention in N1, N2, N3, N4 value mode, described N1, N2, N3, N4
Value mode can carry out permutation and combination according to actual conditions.
In a specific embodiment, the number of the tables of data can choose at random according to the needs of actual conditions, the N values
More than 0.Half tables of data, a tables of data or multiple arbitrary tables of data such as may be selected.
The embodiment that data check value is generated below for two tables of data is described:
Referring to Fig. 1, Table A as shown in the figure is 3 rows, 3 row;Referring to Fig. 2, table B as shown in the figure is 2 rows, 2 row;Obtain Fig. 1,2 institutes
Show the data in two tables of data, it is assumed that the data in this two tables of data are value type, then directly acquire tables of data
Interior numerical value, and obtain the correlated process of check value.In a practical situation, the data in the tables of data can be numerical value
Type, character type, alpha type etc., computer system is all to store data using binary coding, if the data of verification are characters
Type, letter character etc., then first obtain binary coding, is reconverted into the numerical value of 10 systems, obtains the numerical value of data in tables of data;
If the data in the tables of data are numeric type, the numerical value of data in tables of data can be directly acquired.In order to calculate this 2 data
The check value of table in present embodiment, can use J=1/2, K=1/3, L=1/3.J, K, L, which take other numerical value equally, does not influence this
The realization of invention.
In order to obtain check value N1, the numerical value in two tables of data that add up, i.e.,:
N1=A11+A12+A13+A21+A22+A23+A31+A32+A33+B11+B12+B21+B22;
In order to obtain check value N2,2 powers of opening for calculating the absolute value of each numerical value of the numerical value take just several (take
1/2 power), and add up and open the numerical value after power, i.e.,:
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 check value N3, each of the numerical value is calculated
The sum of line number value opens 3 powers, and adds up, i.e.,: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 check value N4,3 powers of opening of the sum of each columns value of the numerical value are calculated, and add up and take 1/3 power
Numerical value afterwards, i.e.,:
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 which the data that are accurately judged to back up from the check value, transmit are with the presence or absence of being tampered or information is lost
The case where, the number of significant digit of the check value is retained into multidigit, if there are small variations for the data in tables of data, you can logical
It crosses check value to determine, in some embodiments, the number of significant digit of the check value N1 is M1 after decimal point;The verification
The number of significant digit of value N2 is M2 after decimal point;The number of significant digit of the check value N3 is M3 after decimal point;The check value
The number of significant digit of N4 is M4 after decimal point.Wherein, the value of number of significant digit M1, M2, M3, M4 can be identical or different, specifically
The size for needing to choose M1, M2, M3, M4 value according to practical application.For in the above embodiment the case where two tables of data,
Take M1, M2, M3, M4 9.
Verification value-acquiring method as described above, in present embodiment, no matter obtain 4 schools for how many tables of data
Value is tested, and check value is generated according to the data in tables of data, only need to can conclude that number according to verification when carrying out data check
Leakage biography, wrong biography, data-bag lost etc. occurs according to whether having during transmission.
S500:The temporal information of above-mentioned tables of data is sent to data generation side by data receiver;
S600:Corresponding data table is extracted from data generation side according to the temporal information, and is given birth to using preset check value
Check value II is generated at method;Corresponding tables of data, and and step are extracted according to the temporal information in the data generation side
S400 generates check value II using identical verification value generation method.It is given birth to according to the verification value generation method in step S600
At check value be N1 ', N2 ', N3 ', N4 '.
S700:Data receiver sends check value I to data generation side, which can be with temporal information in step S500
Send the asynchronous progress of synchronous the latter.
S800:Whether data generation side obtains check value I, examine the check value I, check value II consistent, if consistent
The tables of data of flag data recipient is to have verified, if inconsistent, judges the tables of data error of transmission of the temporal information.
By check value I, check value II progress, whether comparison data are consistent one by one, by data receiver's corresponding data table if consistent
Labeled as having verified, which can not verify label by removal and execute, and can save memory space by this method, and operate
Simply.The label that verified can also play the mistake for distinguishing tables of data using other scheduled spcial characters to mark.It will
It is judged as to prevent from carrying out Data duplication operation after the tables of data of consistency is marked, reduces system redundancy, improve number
According to the efficiency of verification.Secondly, it in traditional approach, after generally tables of data and check value are made of data generation side while transmitting
It to data receiver, is verified after calculating check value by data receiver, which is easy to cause check value loss, check value
The sequencing of tables of data is not corresponded to, had to differentiate between with corresponding tables of data, number of data lines carries out data according to the sequencing of row
By check value I returned datas generation side, Fang Sheng only is generated by data for the verification of table, trivial operations heavy workload, present embodiment
At check value II be compared with check value I, carry out consistency verification of data that can at any time, at random, random does not have to distinguish number
According to row, the sequencing of data row, tables of data, do not have to the time for distinguishing data transmission, it can be by a number of a business module
According to the least unit calculated as data check, greatly reduce the transmission of data in database synchronization process.
The loose formula data consistency verification method further includes S900:Data generation side obtains tables of data error of transmission letter
Breath initiates more new function, and tables of data is called to be verified as the tables of data of inconsistent temporal information.It by this way, can be real-time
The information for updating loading error occurring, to improve the accuracy of information.It will verify as same after inconsistent tables of data is updated
Tables of data consistency desired result process as described above is carried out, the consistency of transmitted data is ensured with this.
In a preferred embodiment, it is different from the above embodiment and is data receiver's real-time reception number
The data sent according to generation side.The data that data generation side is sent are transferred to data receiver in real time, data receiver according to
Consistency verification of data is initiated according to the instruction received, which can improve data transmission, the efficiency of verification.
Refering to Fig. 4, invention additionally discloses a kind of loose formula consistency verification of data device, which includes data generation side
And the second data transceiving unit can be arranged in data receiver, the data generation, the first data can be arranged in data receiver
Transmit-Receive Unit carries out the transmission of tables of data etc., data between the two between the first data transceiving unit, the second data transceiving unit
Transmission wired mode transmission, wireless way for transmitting can be used, known wire communication may be used in wired transmission mode
Arbitrary combination provides, including but not limited to Ethernet, USB, RS/232 and RS/485.Wireless way for transmitting may be used following
Any one combination of communication mode, including but not limited to:In IEEE802.11/802.15/802.16 communication protocols at least
One, at least one of HSPA/GSM/GPRS/EDGE communication protocols agreement, TDMA agreements, UMTS agreements, LTE protocol and/
Or at least one of CDMA/1xEV-D0 communication protocols race agreement.First data transceiving unit, the second data transmit-receive list
The realizations such as member usable integration module, special purpose interface, special circuit can be integrated in the interior of data generation side or data receiver
Independent module/unit can also be used in portion, and the first data transceiving unit as mentioned can be integrated with data receiver's storage unit,
Use the memory module of onboard data transfer function.Identical structure setting can also be used in same second data transceiving unit
In in data generation side, details are not described herein.
Data generation side and data transmit-receive side described in the loose formula consistency verification of data device include:
Data receiver's storage unit stores received data table and is labeled as not verifying, when the tables of data carries
Between information.Data receiver's storage unit can be used built-in storage unit, storage array etc. or external storage device,
The modes such as cloud storage, the equipment that information is such as stored in the way of electric energy:Various memory (RAM, ROM etc.), in the way of magnetic energy
The equipment for storing information:Tape, core memory, magnetic bubble memory, USB flash disk etc., the equipment for storing information using optical mode:CD
Or DVD, the equipment of information is stored in the way of magneto-optic such as:Magneto-optic disk, dedicated storage system:For data backup or disaster tolerance
Specific information system carries out the storage information equipment of big data quantity using express network.As described above, the storage unit can
Interface, module, the array etc. of the wired or wireless transmission of onboard data, so that energy between data receiver and data generation side
Enough carry out data transmission.
First verification control unit, when the first verification unit of data receiver receives consistency verification of data information
When, according to the corresponding tables of data that consistency verification of data information extraction data receiver's storage unit is stored, according to data
Data in table generate check value I using preset verification value generation method;In first verification control unit extraction tables of data
Data generate check value I using preset verification value generation method, and the check value I generated can be stored in identical with tables of data
Storage region or different storage regions.Received consistency verification of data information can pass through data receiver, data
The units/modules that generation side is internally integrated are sent out, and also can receive external control system/device/by wired or wireless way sets
Preparation plays consistency verification of data.If consistency verification of data information can directly be sent out by the first verification control unit, the first school
Consistency school can be carried out only for the tables of data of a certain special part by testing the consistency verification of data information that control unit is initiated
It tests, therefore is executed according to the instruction of the consistency verification of data information during check value generation.Initiating, data are consistent
Property verification while, can by indicating module prompt currently carry out data check, the indicating module can be used indicates sound, refer to
Show lamp etc., indicator light may be used different colours, different shape or different shading values optical signal, be that arbitrary can prompt user
Information, adoptable smooth carrier includes LED, laser diode, small bulbs etc. when using indicator light, or even can also be increased
Add the structural member for making light form definite shape, such as lens, so that it is easily recognizable to prompt light more to concentrate, different face can be used
The optical information of the optical information of color, optical information of different shapes, different bright dark degree, the color of light can also use seven-colour-light or
The combination of seven-colour-light can be selected different colours or change its shading value as prompt using same color.
Second verification control unit, the temporal information for the tables of data for verifying control unit according to first are carried from data generation side
Corresponding data table is taken, and check value II is generated using preset verification value generation method;Second verification control unit and the first school
It tests control unit and uses identical verification value generation method, extracting same tables of data according to temporal information generates check value II.
The generation of check value I, check value II are not influenced by the sequencing of data line, data row and tables of data, and according to the two
Value can be capable of the accuracy of monitoring data transmission with variation, the loss etc. of data in detection data table.
Data generation side verification unit, obtains check value I, checking value I, whether consistent, the general if consistent that tests value II
The tables of data of data receiver, if inconsistent, marks the tables of data error of transmission of the temporal information labeled as having verified.
In the above embodiment, check value I, check value II can be check value group, can generate N according to the demand of actual use
(N >=1) a check value.In the embodiment, verified by data generation side verification unit, data receiver only needs high-ranking officers
It tests value I and is transmitted back to data generation side, which does not require its corresponding tables of data of check value I to correspond, check value I transmission
Priority order in the process does not influence the use of check value I, therefore its randomness is stronger, and operability is good, can be greatly
Compared with mini system redundancy, working efficiency is improved.
In embodiment as described above, the loose formula consistency verification of data device further include data generation side more
New unit initiates more new function, calls the tables of data of the temporal information according to tables of data transmitting fault information.Data are given birth to
Result at square side according to verification directly initiates data update, is different from traditional consistency verification of data equipment and passes through data
Data update is carried out again after recipient's request, and the update request initiated by data receiver is equally possible to cause solicited message to packet
Deng, therefore operability, reliability are low.In comparison present embodiment initiates data update by data generation side, can
It is good by performance, efficient, program saving.Updated tables of data is equally using loose formula consistency verification of data as described above
Method carries out consistency verification of data, ensure that the accurate, reliable of tables of data transmission.
Preferably, the generation of check value can take following mode, the first verification control unit, the second verification control unit
Include that numerical value obtains subelement, check value N1 obtains subelement, check value N2 obtains subelement, check value N3 acquisition are single
Member, check value N4 obtain subelement:Numerical value obtains the numerical value A in subelement acquisition tables of dataxy;It is tired that check value N1 obtains subelement
Add the numerical value AxyObtain check value N1;Check value N2 obtains subelement, takes each numerical value AxyAbsolute value, if Axy≠ 0, then
Take AxyJ powers after positive value and add up, obtain check value N2;Check value N3 obtains subelement, takes in tables of data per line number value
The sum of PxIf Px≠ 0, then take pxK powers after add up each value, obtain check value N3;Check value N4 obtains subelement, evidence of fetching
The sum of each column numerical value Q in tableyIf Qy≠ 0, then take QyL powers after add up each value, obtain check value N4.
In order to ensure data can real-time update, meet the needs of applying in real time, the data generation side and data receiver
Tables of data real-time Transmission between side.
Invention additionally discloses a kind of loose formula consistency verification of data system, including above-described loose formula data are consistent
Property calibration equipment.The loose formula consistency verification of data system can be highway systems at different levels.
The loose formula data consistency verification method of the present invention, apparatus and system can be suitable for long-range, isomeric data
Library data synchronize the verification of rear data correctness, various such as highway system database data table related synchronous contrasts at different levels
Cache database synchronizes consistency desired result, platform data synchronizes consistency desired result etc., has wide range of applications;It can be right in real time
Specified data table carries out data check, in real time, reliably, conveniently;Sequencing of the row with row, every tables of data can not differentiated between
Sequencing verified in real time, and during verification can simultaneously in verification data table data accuracy, carry
The accuracy of high data transmission, prevents data packetloss.
The embodiment of the upper loose formula data consistency verification method of the only present invention, is not intended to limit the present invention's
The scope of the claims, it is every using equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, or directly or
Other related technical areas are used in indirectly, are included within the scope of the present invention.
Claims (5)
1. a kind of loose formula data consistency verification method, it is characterised in that include the following steps:
Data receiver stores received data table and labeled as not verifying, and the tables of data carries temporal information;
Data receiver receives consistency verification of data information, the data stored according to consistency verification of data information extraction
Data in the tables of data are generated check value I by table using preset verification value generation method;
Temporal information according to previous step tables of data extracts corresponding data table from data generation side, and uses preset check value
Generation method generates check value II;
Whether data generation side obtains check value I, examine the check value I, check value II consistent, and flag data connects if consistent
The tables of data of debit is to have verified, if inconsistent, judges tables of data error of transmission corresponding to the temporal information;
Further include that data generation side obtains tables of data transmitting fault information, initiate more new function, calls the inspection inconsistent
The tables of data of temporal information;
The preset verification value generation method includes:
S001:Obtain the numerical value A in tables of dataxy;
S002:Add up the numerical value AxyObtain check value N1;Take each numerical value AxyAbsolute value, if Axy≠ 0, then take AxyJ times
Positive value behind side simultaneously adds up, and obtains check value N2, and wherein J is integer;
S003:It takes in tables of data per the sum of line number value PxIf Px≠ 0, then take PxK powers after add up each value, obtain check value
N3, wherein K are integer;
S004:Take the sum of each column numerical value Q in tables of datayIf Qy≠ 0, then take QyL powers after add up each value, obtain check value
N4, wherein L are integer.
2. according to loose formula data consistency verification method shown in claim 1, it is characterised in that:The data receiver is real
When receive the data that data generation sides sends.
3. a kind of loose formula consistency verification of data device, it is characterised in that including:
Data receiver's storage unit, stores received data table and labeled as not verifying, the tables of data carries having time
Information;
First verification control unit, when receiving consistency verification of data, the tables of data that extraction data receiver is stored, according to
Check value I is generated using preset verification value generation method according to data in tables of data;
Second verification control unit, the temporal information for the tables of data for verifying control unit according to first extract phase from data generation side
Tables of data is answered, and check value II is generated using preset verification value generation method;
Whether data generation side verification unit obtains check value I, examines the check value I, check value II consistent, if consistent
By the tables of data of data receiver labeled as having verified, if inconsistent, the tables of data corresponding to the temporal information is marked
Error of transmission;
Further include data generation side updating unit, according to tables of data transmitting fault information, initiates more new function, call the inspection
The tables of data of inconsistent temporal information;The first verification control unit, the second verification control unit include that numerical value obtains
Subelement, check value N1 obtain subelement, check value N2 obtains subelement, check value N3 obtains subelement, check value N4 is obtained
Subelement:
Numerical value obtains the numerical value A in subelement acquisition tables of dataxy;
Check value N1 obtains subelement and adds up the numerical value AxyObtain check value N1;
Check value N2 obtains subelement, takes each numerical value AxyAbsolute value, if Axy≠ 0, then take AxyJ powers after positive value simultaneously
It is cumulative, check value N2 is obtained, wherein J is integer;
Check value N3 obtains subelement, takes in tables of data per the sum of line number value PxIf Px≠ 0, then take PxK powers after add up it is each
Value, obtains check value N3, and wherein K is integer;
Check value N4 obtains subelement, takes the sum of each column numerical value Q in tables of datayIf Qy≠ 0, then take QyL powers after add up it is each
Value, obtains check value N4, and wherein L is integer.
4. loose formula consistency verification of data device according to claim 3, it is characterised in that:The data generation side with
Tables of data real-time Transmission between data receiver.
5. a kind of loose formula consistency verification of data system, it is characterised in that:Including the loose formula data described in 3-4 any one
Consistency desired result device.
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 CN104809250A (en) | 2015-07-29 |
CN104809250B true 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) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106649333B (en) * | 2015-10-29 | 2021-12-10 | 阿里巴巴集团控股有限公司 | Method and device for detecting consistency of field sequence |
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 |
CN110621011B (en) * | 2019-09-12 | 2022-11-04 | 北京方研矩行科技有限公司 | OTA firmware upgrading method and system based on Bluetooth device side |
CN110806948B (en) * | 2019-10-31 | 2024-02-02 | 上海集成电路研发中心有限公司 | Data verification method and device |
Citations (6)
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 |
-
2015
- 2015-05-19 CN CN201510254790.0A patent/CN104809250B/en active Active
Patent Citations (6)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN104809250A (en) | 2015-07-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104809250B (en) | A kind of loose formula data consistency verification method | |
US10006963B2 (en) | Packet tracking in a verification environment | |
CN106126722B (en) | A kind of prefix compound tree and design method based on verifying | |
CN109949111A (en) | Electronic bill mark distributing method, electronic bill generation method, apparatus and system | |
CN103178998B (en) | A kind of measuring and control data transmission method and device | |
CN109561106B (en) | Ship communication message real-time analysis and filtering method | |
CN103036739B (en) | Formalization method for verification and performance analysis of high reliable communication system | |
WO2022063223A1 (en) | Data verification method, apparatus, and system | |
US20200295874A1 (en) | Check code processing method, electronic device and storage medium | |
CN103441861B (en) | A kind of data record generation method and device | |
CN101400043B (en) | Method and system for consistency comparison of front-background data in mobile communication system | |
CN106294040A (en) | The acquisition methods of optical module status information and device | |
US8681812B2 (en) | Method and device for analyzing transaction propagation in a multiprotocol network of a system on chip | |
CN109951366A (en) | A kind of Modbus RTU bus control unit and control method | |
CN110096413A (en) | A kind of disk localization method, system and electronic equipment and storage medium | |
CN109299193A (en) | Method of data synchronization and relevant device | |
CN106802865B (en) | Response simulator and method for software test | |
CN111935767B (en) | Network simulation system | |
CN104780123A (en) | Network packet receiving and sending processing device and design method thereof | |
CN110297926B (en) | On-orbit configuration method of satellite-borne image processing device | |
CN116956801A (en) | Chip verification method, device, computer equipment and storage medium | |
CN115470125B (en) | Log file-based debugging method, device and storage medium | |
CN105306265B (en) | A kind of data packet method for tracing for switch system simulating, verifying | |
CN111966734A (en) | Data processing method and electronic equipment of spreadsheet combined with RPA and AI | |
US20140180662A1 (en) | Radio frequency communication simulation |
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 |