CN105072618B - Data reliability guard method based on check code in wireless sensor network - Google Patents
Data reliability guard method based on check code in wireless sensor network Download PDFInfo
- Publication number
- CN105072618B CN105072618B CN201510432030.4A CN201510432030A CN105072618B CN 105072618 B CN105072618 B CN 105072618B CN 201510432030 A CN201510432030 A CN 201510432030A CN 105072618 B CN105072618 B CN 105072618B
- Authority
- CN
- China
- Prior art keywords
- binstr
- binary string
- data
- character
- string
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/10—Integrity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/12—Detection or prevention of fraud
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Abstract
The invention discloses the data reliability guard methods based on check code in a kind of wireless sensor network.By source node gathered data, reserved data condition code is compared after character grouping, obtains corresponding data significance level, and be converted to binary number;Check number is obtained using check code calculation formula, watermark information is generated in conjunction with hash function, the transmission of unsigned character string is converted to after embedded watermark.After base-station node receives data and is converted to binary number, related data is obtained using separation algorithm, if watermark information is able to verify that unanimously data are completely reliable, and extracts data;Otherwise data degree of belief is obtained using degree of belief calculation formula.If data degree of belief is more than the degree of belief threshold value that prestores, data reliability meets preset standard, can extract data, otherwise abandons the packet.The present invention can judge whether data under any circumstance are lost or altered, and in conjunction with actual conditions restoring data information, effectively avoid retransmitting, and play the role of saving energy consumption, extend network lifecycle.
Description
Technical field
The invention belongs to wireless sensor network data security fields, and in particular to be based in a kind of wireless sensor network
The data reliability guard method of check code.
Background technology
Wireless sensor network (Wireless Sensor Network, WSN) is made of a large amount of sensor nodes, association
Make ground perception, acquisition, processing and transmission data, completes every preplanned mission.Due to finite energy, environmental change, punching in network
The many factors such as prominent interference may all lead to not obtain authentic data.But wireless sensor network is mainly data-centered,
By the analysis to data, obtain event handling as a result, therefore data accurate and it is reliable whether will directly affect and whether make
Correct decisions.How to build a reliability model for wireless sensor network is to ensure wireless sensor network security needs
The matter of utmost importance of solution.
For integrity problem possessed by wireless sensor network, existing technology is mainly the following scheme:
Purohit N, Varadwaj P, Tokekar S.Reliability analysis of wireless
sensor network[C]//Proceeding of 16th IEEE International Conference on
Networks, 2008. assume a wireless sensor network with n identical sensor nodes and a Sink node,
Each sensor node is equipped with X sensor.A time A defined in text, indicates at least one sensor node at least
One sensor can perceive environment and the data perceived can be transferred to server by Sink node, and event A occurs
Probability be exactly the wireless sensor network reliability.But this text only considered the connection between wireless sensor network node
Property, without problem under the covering in view of wireless sensor network.
Shrestha A, Liudong X, Hong L.Modeling and evaluating the reliability
of wireless sensor networks[C]//Proceedings of Reliability and
Maintainability Symposium, RAMS ' 07,2007:186-191. considering a kind of wireless sensor network of clustering architecture
Network, the reliability for defining wireless sensor network are each points in monitoring area at least by K coverage, also, this K
At least there is a path probability for leading to Sink node in each in a node.Consider during reliable model is established
Common cause failure factor, has used simplified binary decision drawing method.Although between the node for considering wireless sensor network in person
Connecting line and coverage, but finally it has been merely given as the wireless sensor network reliability model based on covering clustering architecture.
Yousefi H, Mizanian K, Jahangir A H.Modeling and evaluating the
reliability of cluster-based wireless sensor networks[C]//Proceeding of 24th
IEEE International Conference on Advanced Information Networking and
Application (AINA), 2010:827-834. establishes based on K node covering, Joint failure and path failure can between node
By property model.The reliability of wireless sensor network defined in text is the probability of Sink node successful probe event, that is, respectively
The data that the probability of a leader cluster node detection event polymerize with leader cluster node are successfully transferred to the probability product of Sink node, and cluster
Head node detection event itself is and covers related function, and it is K node covering to be defined as source cluster, and cluster head has successfully received
The probability of at least K packet.The function expression of above 3 parts has been found out in text respectively, and has been finally obtained based on the wireless of cluster
Sensor network reliability model.
The above method can effectively wireless sensor network reliability, improve the safety of network, but for tool
Volume data is difficult to accomplish low consumption and low delay in practice it is difficult to ensure that safety.
Invention content
The shortcomings that it is a primary object of the present invention to overcome the prior art with it is insufficient, provide in a kind of wireless sensor network
Data reliability guard method based on check code can accurately be provided data integrity by digital watermark and utilize school
Code is tested according to the practical degree of belief verify data reliability of data, to more know precisely the correctness of data, and data are believed
Appoint in degree tolerance interval, network overhead can be reduced, plays the role of saving energy consumption.
The purpose of the present invention is realized by the following technical solution:Check code is based in a kind of wireless sensor network data
Data reliability guard method, which is characterized in that in the wireless sensor network be equipped with several sensor nodes, institute
It states sensor node and is divided into base-station node and source node, can preset degree of belief threshold value Y in base-station node in communication range at it
And pre-stored data condition code in source node;
One, data generation step is as follows:
1) each source node is to gathered data around it;
2) it according to gathered data, is grouped in such a way that each two character is a character grouping, and by gathered data
With pre-stored data condition code compare, obtain its corresponding 1 significance level Boolean, if wherein the significance level Boolean be 1, generation
Table is important, if the significance level Boolean is 0, represents inessential;
3) it according to gathered data, is optimized in a manner of removing 8 bit first place redundancies 0 corresponding to every character,
I.e. each character representation is 7 bits;
4) it is grouped according to each character, its corresponding 1 significance level Boolean is stored in grouping below, generates 15 characters
It is grouped binary string group_binstr;
5) according to grouping binary string group_binstr, all characters grouping binary string is merged, word is generated
Accord with binary string char_binstr=∑s group_binstr;
Two, check code generation step is as follows:
1) binary string group_binstr is grouped according to the character generated in step 1, is calculated using check number public
Formula can obtain each corresponding check number groupchecknum of character grouping institute.The check number calculation formula is as follows:
Wherein groupchecknum indicates that the corresponding check number of character grouping binary string institute, Weight indicate character
Weights, CharNum indicate verification manifold;
2) according to each character grouping corresponding check number groupchecknum of institute, with each check number with corresponding 4 two
The mode that system number is replaced, generates corresponding check code binary string groupcheck_binstr;
Three, watermark generation step is as follows:
1) corresponding check code in binary string group_binstr and step 2 is grouped according to the character in step 1
Binary string groupcheck_binstr is merged into link binary string mergegroup_binstr={ group_
Binstr, groupcheck_binstr };
2) according to link binary string mergegroup_binstr, by all character block chaining binary strings
Mergegroup_binstr merges, and generates and merges binary string merge_binstr=∑s mergegroup_binstr;
3) according to binary string merge_binstr is merged, 16 are generated using hash function F (merge_binstr)
Watermark information binary string wminfo_binstr;
Four, character switch process is as follows:
1) according to watermark information binary string in merging binary string merge_binstr in step 3 and step 3
Wminfo_binstr is merged into data binary string data_binstr={ merge_binstr, wminfo_binstr };
2) according to data binary string data_binstr, supplied by the way of 1 using in its tail portion so that data two into
The length of number string data_binstr processed meets 8 multiple, and then generates safe binary string security_binstr;
3) according to safe binary string security_binstr, 1 is converted to without symbol word with every 8 bit
Symbol mode generates security string security_uchar;
Five, steps are as follows for data separating:
1) base-station node receives the security string that each source node is sent, and is converted into reception binary string
receive_binstr;
2) according to binary string receive_binstr is received, using data separating algorithm, can must detach character two into
Number string sepchar_binstr processed detaches significance level binary string sepimport_binstr, detaches check code binary system
Number string sepcheck_binstr and separation watermark information binary string sepwminfo_binstr.Wherein data separating algorithm
It is as follows:
A) according to receive binary string receive_binstr length, if its length divided by 19 remainder be 0, do not locate
Reason, otherwise removal receive the partial data that binary string receive_binstr tail lengths are remainder;
B) from last 16 information of binary string receive_binstr extractions is received, which is that watermark is believed
Breath is stored in separation watermark information binary string sepwminfo_binstr;
C) preceding 14 information is extracted in every 19 from reception binary string receive_binstr, which is character
Information, and be stored in separation watermark information binary string sepchar_binstr;
D) preceding 15th information is extracted in every 19 from reception binary string receive_binstr, which attaches most importance to
Degree information is wanted, and is stored in separation significance level binary string sepimport_binstr;
E) from 4 information after binary string receive_binstr is extracted in every 19 are received, which is verification
Code information, and be stored in separation check code binary string sepcheck_binstr;
F) output separation watermark information binary string sepwminfo_binstr, detaches watermark information binary string
Sepchar_binstr detaches significance level binary string sepimport_binstr, detaches check code binary string
sepcheck_binstr;
3) according to separation character binary string sepchar_binstr, significance level binary string is detached
Sepimport_binstr and separation check code binary string sepcheck_binstr, is merged into mask data binary number
String sepdata_binstr;
4) it according to mask data binary string sepdata_binstr, utilizes hash function F (sepdata_binstr)
Generate 16 data watermark binary string datawminfo_binstr;
Six, steps are as follows for data check:
1) according to data watermark binary string datawminfo_binstr in step 5 and according to detaching watermark in step 5
Information binary string sepwminfo_binstr carries out contrast verification, if identical, it is reliably errorless to receive data, otherwise
It is unreliable wrong to receive data;
If 2) receive data it is errorless, according in step 5 detach character binary string sepchar_binstr, with
The mode added 10 before every 7 restores character ASCII character, and thus restoring data;
If 3) reception data are wrong, according to separation character binary string sepchar_binstr and step in step 5
Significance level binary string sepimport_binstr is detached in five, and 1 important two is trailed with every 7 character binary strings
The mode of system number string generates binary string waitcheck_binstr to be verified;
4) according to binary string waitcheck_binstr to be verified, divided in such a way that every 15 character is one group
Group obtains being grouped binary string groupwaitcheck_binstr to be tested, i.e. waitcheck_binstr=∑s
groupwaitcheck_binstr;
5) according to being grouped data groupwaitcheck_binstr to be tested, using check number calculation formula in step 2,
The corresponding check number groupwaitchecknum of each grouping institute can be obtained;
6) obtained check number groupwaitchecknum is grouped according to each character, with each check number with corresponding 4
The mode that bit is replaced generates check code binary string groupfinishcheck_binstr;
7) according in check code binary string groupfinishcheck_binstr, step 5 detach check code two into
Significance level binary string sepimport_binstr is detached in number string sepcbeck_binstr processed and step 5, utilizes letter
Appoint degree computational algorithm, calculates degree of belief X.Degree of belief computational algorithm is as follows:
A) initialization degree of belief X is 100, and the number NUM1 of significance level 1 is 0, and the number NUM0 of significance level 0 is 0;
B) traversal separation significance level binary string sepimport_binstr, if significance level is 1, significance level
1 number NUM1 adds 1, if significance level is 0, the number NUM0 of significance level 0 adds 1;
C) successively twin check code binary string groupfinishcheck_binstr and separation check code binary number
String sepcheck_binstr do not handled if identical, if differ and corresponding significance level be 1, X subtract 1.0/
NUM1*75, if differ and corresponding significance level be 0, X subtract 1.0/NUM0*25;
D) output degree of belief X;
8) according to degree of belief X is calculated and the degree of belief threshold value Y that prestores, if X is not less than Y, the influence journey that data are destroyed
Degree is little, and reliability is in tolerance interval, according to detaching character binary string sepchar_binstr in step 5, with
The mode added 10 before every 7 restores character ASCII character, and thus restoring data, otherwise abandons the data.
Compared with prior art, the beneficial effects of the invention are as follows:Present invention is generally directed to the numbers in wireless sensor network
According to integrality and reliability, it is proposed that a kind of data reliability guard method based on check code.The present invention is by digital watermarking skill
Art and check code technology are combined, and are formed an efficient data safety and are ensured algorithm, can judge number under any circumstance
According to whether losing or altering, to ensure the correct reliable of data.The present invention, can be according to the number that prestores in the case where data are wrong
Data degree of belief is calculated in conjunction with data actual conditions according to condition code and degree of belief threshold value, if being higher than pre-stored threshold values, is restored
Data information efficiently avoids retransmitting, and plays the role of saving energy consumption, extends Network morals.
Description of the drawings
Fig. 1 is source node data process flowchart in the present invention;
Fig. 2 is base-station node data handling procedure flow chart in the present invention;
Fig. 3 is source node insertion watermark and check code process schematic in the present invention;
Fig. 4 is that base-station node is verified and restoring data process schematic in the case where no data destroys in the present invention;
Fig. 5 is that base-station node is verified and restoring data process schematic in the case where there is data corruption in the present invention.
Specific implementation mode
Below in conjunction with the embodiment of the present invention and attached drawing, technical solution in the embodiment of the present invention carries out clear, complete
Ground describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on this
Embodiment in invention, every other reality obtained by those of ordinary skill in the art without making creative efforts
Example is applied, shall fall within the protection scope of the present invention.
It please refers to Fig.1 and Fig. 2, in the embodiment of the present invention, the number based on check code in a kind of wireless sensor network data
According to frequency converter method, which is characterized in that be equipped with several sensor nodes, the biography in the wireless sensor network
Sensor node is divided into base-station node and source node, degree of belief threshold value Y and source can be preset in base-station node in communication range at it
Pre-stored data condition code in node;
One, data generation step is as follows:
1) each source node is to gathered data around it;
2) it according to gathered data, is grouped in such a way that each two character is a character grouping, and by gathered data
With pre-stored data condition code compare, obtain its corresponding 1 significance level Boolean, if wherein the significance level Boolean be 1, generation
Table is important, if the significance level Boolean is 0, represents inessential;
3) it according to gathered data, is optimized in a manner of removing 8 bit first place redundancies 0 corresponding to every character,
I.e. each character representation is 7 bits;
4) it is grouped according to each character, its corresponding 1 significance level Boolean is stored in grouping below, generates 15 characters
It is grouped binary string group_binstr;
5) according to grouping binary string group_binstr, all characters grouping binary string is merged, word is generated
Accord with binary string char_binstr=∑s group_binstr;
Two, check code generation step is as follows:
1) binary string group_binstr is grouped according to the character generated in step 1, is calculated using check number public
Formula can obtain each corresponding check number groupchecknum of character grouping institute.The check number calculation formula is as follows:
Wherein groupchecknum indicates that the corresponding check number of character grouping binary string institute, Weight indicate character
Weights, CharNum indicate verification manifold;
2) according to each character grouping corresponding check number groupchecknum of institute, with each check number with corresponding 4 two
The mode that system number is replaced, generates corresponding check code binary string groupcheck_binstr;
Three, watermark generation step is as follows:
1) corresponding check code in binary string group_binstr and step 2 is grouped according to the character in step 1
Binary string groupcheck_binstr is merged into link binary string mergegroup_binstr={ group_
Binstr, groupcheck_binstr };
2) according to link binary string mergegroup_binstr, by all character block chaining binary strings
Mergegroup_binstr merges, and generates and merges binary string merge_binstr=∑s mergegroup_binstr;
3) according to binary string merge_binstr is merged, 16 are generated using hash function F (merge_binstr)
Watermark information binary string wminfo_binstr;
Four, character switch process is as follows:
1) according to watermark information binary string in merging binary string merge_binstr in step 3 and step 3
Wminfo_binstr is merged into data binary string data_binstr={ merge_binstr, wminfo_binstr };
2) according to data binary string data_binstr, supplied by the way of 1 using in its tail portion so that data two into
The length of number string dada_binstr processed meets 8 multiple, and then generates safe binary string security_binstr;
3) according to safe binary string security_binstr, 1 is converted to without symbol word with every 8 bit
Symbol mode generates security string security_uchar;
Five, steps are as follows for data separating:
1) base-station node receives the security string that each source node is sent, and is converted into reception binary string
receive_binstr;
2) according to binary string receive_binstr is received, using data separating algorithm, can must detach character two into
Number string sepchar_binstr processed detaches significance level binary string sepimport_binstr, detaches check code binary system
Number string sepcheck_binstr and separation watermark information binary string sepwminfo_binstr.Wherein data separating algorithm
It is as follows:
A) according to receive binary string receive_binstr length, if its length divided by 19 remainder be 0, do not locate
Reason, otherwise removal receive the partial data that binary string receive_binstr tail lengths are remainder;
B) from last 16 information of binary string receive_binstr extractions is received, which is that watermark is believed
Breath is stored in separation watermark information binary string sepwminfo_binstr;
C) preceding 14 information is extracted in every 19 from reception binary string receive_binstr, which is character
Information, and be stored in separation watermark information binary string sepchar_binstr;
D) preceding 15th information is extracted in every 19 from reception binary string receive_binstr, which attaches most importance to
Degree information is wanted, and is stored in separation significance level binary string sepimport_binstr;
E) from 4 information after binary string receive_binstr is extracted in every 19 are received, which is verification
Code information, and be stored in separation check code binary string sepcheck_binstr;
F) output separation watermark information binary string sepwminfo_binstr, detaches watermark information binary string
Sepchar_binstr detaches significance level binary string sepimport_binstr, detaches check code binary string
sepcheck_binstr;
3) according to separation character binary string sepchar_binstr, significance level binary string is detached
Sepimport_binstr and separation check code binary string sepcheck_binstr, is merged into mask data binary number
String sepdata_binstr;
4) it according to mask data binary string sepdata_binstr, utilizes hash function F (sepdata_binstr)
Generate 16 data watermark binary string datawminfo_binstr;
Six, steps are as follows for data check:
1) according to data watermark binary string datawminfo_binstr in step 5 and according to detaching watermark in step 5
Information binary string sepwminfo_binstr carries out contrast verification, if identical, it is reliably errorless to receive data, otherwise
It is unreliable wrong to receive data;
If 2) reception data are errorless, according to character binary string sepchar_binstr is detached in step 5, convert
For character string, i.e. restoring data;
If 3) reception data are wrong, according to separation character binary string sepchar_binstr and step in step 5
Significance level binary string sepimport_binstr is detached in five, and 1 important two is trailed with every 7 character binary strings
The mode of system number string generates binary string waitcheck_binstr to be verified;
4) according to binary string waitcheck_binstr to be verified, divided in such a way that every 15 character is one group
Group obtains being grouped binary string groupwaitcheck_binstr to be tested, i.e. waitcheck_binstr=∑s
groupwaitcheck_binstr;
5) according to being grouped data groupwaitcheck_binstr to be tested, using check number calculation formula in step 2,
The corresponding check number groupwaitchecknum of each grouping institute can be obtained;
6) obtained check number groupwaitchecknum is grouped according to each character, with each check number with corresponding 4
The mode that bit is replaced generates check code binary string groupfinishcheck_binstr;
7) according in check code binary string groupfinishcheck_binstr, step 5 detach check code two into
Significance level binary string sepimport_binstr is detached in number string sepcheck_binstr processed and step 5, utilizes letter
Appoint degree computational algorithm, calculates degree of belief X.Degree of belief computational algorithm is as follows:
A) initialization degree of belief X is 100, and the number NUM1 of significance level 1 is 0, and the number NUM0 of significance level 0 is 0;
B) traversal separation significance level binary string sepimport_binstr, if significance level is 1, significance level
1 number NUM1 adds 1, if significance level is 0, the number NUM0 of significance level 0 adds 1;
C) successively twin check code binary string groupfinishcheck_binstr and separation check code binary number
String sepcheck_binstr do not handled if identical, if differ and corresponding significance level be 1, X subtract 1.0/
NUM1*75, if differ and corresponding significance level be 0, X subtract 1.0/NUM0*25;
D) output degree of belief X;
8) according to degree of belief X is calculated and the degree of belief threshold value Y that prestores, if X is not less than Y, the influence journey that data are destroyed
Degree is little, and reliability is in tolerance interval, according to the character binary string sepchar_ isolated in step 5
Binstr, is converted to character string, i.e. restoring data, otherwise abandons the data.
Referring to Fig. 3, in the embodiment of the present invention, source node data processing procedure, the specific steps are:
1) source node gathered data is helloworld, is divided in such a way that each two character is a character grouping
Group, as { he, ll, ow, or, ld }, with pre-stored data condition code compare, corresponding importance Boolean be 1,1,1,1,
1};
2) gathered data be converted to binary string 01101000,01100101,01101100,01101100,
01101111,01110111,01101111,01110010,01101100,01100100 }, to remove corresponding to every character 8
The mode of binary number first place redundancy 0 optimizes, and its corresponding 1 significance level Boolean is stored in grouping below, generates
15 characters are grouped binary string, then all characters grouping binary string is merged, and generate character binary string char_
Binstr=11,010,001,100,101 1,11,011,001,101,100 1,11,011,111,110,111 1,11,011,111,110,010 1,
11011001100100 1};
3) binary string group_binstr is grouped according to the character generated in step 1, is calculated using check number public
Formula can obtain the corresponding check number { 6,7, Isosorbide-5-Nitrae, 3 } of each character grouping institute, be replaced with corresponding 4 bit with each check number
The mode changed, generate corresponding check code binary string groupcheck_binstr=0110,0111,0001,0100,
0011};
4) binary string group_binstr and corresponding check code binary string are grouped according to character
Groupcheck_binstr is merged into link binary string mergegroup_binstr={ 110100011001011
0110,110,110,011,011,001 0111,110,111,111,101,111 0001,110,111,111,100,101 0100,
110110011001001 0011};
5) according to binary string merge_binstr is merged, 16 watermark informations two are generated using hash function MD5 ()
System number string wminfo_binstr={ 0000100010100000 };
6) it according to binary string merge_binstr and watermark information binary string wminfo_binstr is merged, closes
And at data binary string data_binstr=1101000110010110110,1101100110110010111,
1101111111011110001,1101111111001010100,1101100110010010011,
0000100010100000};
7) according to data binary string data_binstr, polishing 8 generates safe binary string security_
Binstr=11010001,10010110,11011011,00110110,01011111,01111111,01111000,
11101111,11100101,01001101,10011001,00100110,00010001,0,100,000 1 };8) according to safety two
System number string security_binstr generates security string in such a way that every 8 bit is converted to 1 unsigned character
Security_uchar={ Cha_ x lutetiums M□A};
9) security string is sent to base-station node by source node.
Referring to Fig. 4, in the embodiment of the present invention, base-station node is verified in the case where data are without destruction and restoring data mistake
Journey is as follows:
1) base-station node receives data, be converted into receive binary string receive_binstr=11010001,
10010110,11011011,00110110,01011111,01111111,01111000,11101111,11100101,
01001101,10011001,00100110,00010001,01000001 };
2) according to binary string receive_binstr is received, using data separating algorithm, can must detach character two into
Number string sepchar_binstr=processed 1101000,1100101,1101100,1101100,1101111,1110111,
1101111,1110010,1101100,1100100 }, separation significance level binary string sepimport_binstr=1,
1,1,1,1 }, detach check code binary string sepcheck_binstr={ 0110,0111,0001,0100,0011 } and divide
From watermark information binary string sepwminfo_binstr={ 0000100010100000 };
3) according to separation character binary string sepchar_binstr, significance level binary string is detached
Sepimport_binstr and separation check code binary string sepcheck_binstr, is merged into mask data binary number
String generates 16 data watermark binary string datawminfo_binstr=using hash function MD5 ()
{0000100010100000};
4) according to data watermark binary string datawminfo_binstr and separation watermark information binary string
Sepwminfo_binstr is verified, it is found that the two is identical, then passes through and detach character binary string sepchar_
Binstr restores character ASCII character in a manner of adding 10 before every 7, and thus restoring data is
{helloworld}。
Referring to Fig. 5, in the embodiment of the present invention, base-station node verification and restoring data mistake in the case where data have destruction
Journey is as follows:
1) base-station node receives data, be converted into receive binary string receive_binstr=11010101,
10011110,11011011,00110110,01011111,01111111,01111000,11101111,11100101,
01001101,10011001,00100110,00010001,01000001 };
2) according to binary string receive_binstr is received, using data separating algorithm, can must detach character two into
Number string sepchar_binstr=processed 1101010,1100111,1101100,1101100,1101111,1110111,
1101111,1110010,1101100,1100100 }, separation significance level binary string sepimport_binstr=1,
1,1,1,1 }, detach check code binary string sepcheck_binstr={ 0110,0111,0001,0100,0011 } and divide
From watermark information binary string sepwminfo_binstr={ 0000100010100000 };
3) according to separation character binary string sepchar_binstr, significance level binary string is detached
Sepimport_binstr and separation check code binary string sepcheck_binstr, is merged into mask data binary number
String generates 16 data watermark binary string datawminfo_binstr=using hash function MD5 ()
{1010101000001000};
4) according to data watermark binary string datawminfo_binstr and separation watermark information binary string
Sepwminfo_binstr is verified, and both finds to differ, then it is wrong to receive data, then detaches character binary string
Sepchar_binstr and separation significance level binary string sepimport_binstr, with every 7 character binary strings
The mode for trailing 1 important binary string, generates binary string waitcheck_binstr=to be verified
110101011001111,110110011011001,110111111101111,110111111100101,
110110011001001};
5) it according to binary string waitcheck_binstr to be verified, is verified in such a way that every 15 character is one group
Number calculation formula, can obtain the corresponding check number { 3,7, Isosorbide-5-Nitrae, 3 } of each grouping institute, then with each check number with corresponding 4 two into
The mode that number processed is replaced, generation check code binary string groupfinishcheck_binstr=0011,0111,0001,
0100,0011 };
6) according to check code binary string groupfinishcheck_binstr, separation check code binary string
Sepcheck_binstr and separation significance level binary string sepimport_binstr, utilizes degree of belief computational algorithm, meter
It is 85% to calculate degree of belief X;
7) it is 75% according to the degree of belief X and degree of belief threshold value Y that prestores is calculated, it is known that if X is more than Y X and is not less than Y, count
It is little according to the influence degree being destroyed, and reliability passes through separation character binary string sepchar_ in tolerance interval
Binstr restores character ASCII character in a manner of adding 10 before every 7, and thus restoring data is
{jglloworld}。
Present invention is generally directed to the data integrities and reliability in wireless sensor network, it is proposed that one kind is based on verification
The data reliability guard method of code.Digital watermark technology and check code technology are combined by the present invention, form one efficiently
Data safety ensures algorithm, can judge whether data under any circumstance are lost or altered, to ensure the correct of data
Reliably.The present invention, can be according to pre-stored data condition code and degree of belief threshold value, in conjunction with the practical feelings of data in the case where data are wrong
Condition calculates data degree of belief, if being higher than pre-stored threshold values, restoring data information efficiently avoids retransmitting, and plays saving consumption
The effect of energy, extends Network morals.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie
In the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power
Profit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent requirements of the claims
Variation is included within the present invention.
In addition, it should be understood that although this specification is described in terms of embodiments, but not each embodiment is only wrapped
Containing an independent technical solution, this description of the specification is merely for the sake of clarity, and those skilled in the art should
It considers the specification as a whole, the technical solutions in the various embodiments may also be suitably combined, forms those skilled in the art
The other embodiment being appreciated that.
Claims (1)
1. the data reliability guard method based on check code in a kind of wireless sensor network data, which is characterized in that described
Wireless sensor network in be equipped with several sensor nodes, the sensor node is divided into base-station node and source node,
Pre-stored data condition code in degree of belief threshold value Y and source node can be preset in base-station node in communication range at it;
One, data generation step is as follows:
1) each source node is to gathered data around it;
2) it according to gathered data, is grouped in such a way that each two character is a character grouping, and by gathered data and in advance
Deposit data condition code compare, obtain its corresponding 1 significance level Boolean, if wherein the significance level Boolean be 1, represent weight
It wants, if the significance level Boolean is 0, represents inessential;
3) it according to gathered data, is optimized in a manner of removing 8 bit first place redundancies 0 corresponding to every character, i.e., often
A character representation is 7 bits;
4) it is grouped according to each character, its corresponding 1 significance level Boolean is stored in grouping below, generate 15 character groupings
Binary string group_binstr;
5) according to grouping binary string group_binstr, all characters grouping binary string is merged, character two is generated
System number string char_binstr=∑s group_binstr;
Two, check code generation step is as follows:
It 1) can using check number calculation formula according to the character grouping binary string group_binstr generated in step 1
Obtain the corresponding check number groupchecknum of each character grouping institute;The check number calculation formula is as follows:
Wherein groupchecknum indicates that the corresponding check number of character grouping binary string institute, Weight indicate character weights,
CharNum indicates verification manifold;
2) according to each character grouping corresponding check number groupchecknum of institute, with corresponding 4 binary systems of each check number
The mode that number is replaced, generates corresponding check code binary string groupcheck_binstr;
Three, watermark generation step is as follows:
1) according in step 1 character grouping binary string group_binstr and step 2 in corresponding check code two into
Number string groupcheck_binstr processed, be merged into link binary string mergegroup_binstr=group_binstr,
groupcheck_binstr};
2) according to link binary string mergegroup_binstr, by all character block chaining binary strings
Mergegroup_binstr merges, and generates and merges binary string merge_binstr=∑s mergegroup_binstr;
3) according to binary string merge_binstr is merged, 16 watermarks are generated using hash function F (merge_binstr)
Information binary string wminfo_binstr;
Four, character switch process is as follows:
1) according to watermark information binary string in merging binary string merge_binstr in step 3 and step 3
Wminfo_binstr is merged into data binary string data_binstr={ merge_binstr, wminfo_binstr };
2) it according to data binary string data_binstr, is supplied by the way of 1 using in its tail portion so that data binary number
The length of string data_binstr meets 8 multiple, and then generates safe binary string security_binstr;
3) according to safe binary string security_binstr, 1 unsigned character side is converted to every 8 bit
Formula generates security string security_uchar;
Five, steps are as follows for data separating:
1) base-station node receives the security string that each source node is sent, and is converted into and receives binary string receive_
binstr;
2) character binary number can must be detached using data separating algorithm according to reception binary string receive_binstr
String sepchar_binstr, detaches significance level binary string sepimport_binstr, detaches check code binary string
Sepcheck_binstr and separation watermark information binary string sepwminfo_binstr;Wherein data separating algorithm is as follows:
A) according to receive binary string receive_binstr length, if its length divided by 19 remainder be 0, do not handle,
Otherwise removal receives the partial data that binary string receive_binstr tail lengths are remainder;
B) from last 16 information of binary string receive_binstr extractions is received, which is watermark information, will
It is stored into separation watermark information binary string sepwminfo_binstr;
C) preceding 14 information is extracted in every 19 from reception binary string receive_binstr, which is that character is believed
Breath, and be stored in separation watermark information binary string sepchar_binstr;
D) preceding 15th information is extracted in every 19 from reception binary string receive_binstr, which is important journey
Information is spent, and is stored in separation significance level binary string sepimport_binstr;
E) from 4 information after binary string receive_binstr is extracted in every 19 are received, which believes for check code
Breath, and be stored in separation check code binary string sepcheck_binstr;
F) output separation watermark information binary string sepwminfo_binstr, detaches watermark information binary string
Sepchar_binstr detaches significance level binary string sepimport_binstr, detaches check code binary string
sepcheck_binstr;
3) according to separation character binary string sepchar_binstr, separation significance level binary string sepimport_
Binstr and separation check code binary string sepcheck_binstr, is merged into mask data binary string sepdata_
binstr;
4) it according to mask data binary string sepdata_binstr, is generated using hash function F (sepdata_binstr)
16 data watermark binary string datawminfo_binstr;
Six, steps are as follows for data check:
1) according to data watermark binary string datawminfo_binstr in step 5 and according to detaching watermark in step 5
Information binary string sepwminfo_binstr carries out contrast verification, if identical, it is reliably errorless to receive data, otherwise
It is unreliable wrong to receive data;
2) if it is errorless to receive data, according to character binary string sepchar_binstr is detached in step 5, at every 7
The mode added 10 before restores character ASCII character, and thus restoring data;
3) if it is wrong to receive data, detached in character binary string sepchar_binstr and step 5 according in step 5
Significance level binary string sepimport_binstr is detached, 1 important binary system is trailed with every 7 character binary strings
The mode of number string, generates binary string waitcheck_binstr to be verified;
4) it according to binary string waitcheck_binstr to be verified, is grouped, obtains in such a way that every 15 character is one group
To grouping binary string groupwaitcheck_binstr to be tested, i.e. waitcheck_binstr=∑s
groupwaitcheck_binstr;
5) it can be obtained using check number calculation formula in step 2 according to grouping data groupwaitcheck_binstr to be tested
Each corresponding check number groupwaitchecknum of grouping institute;
6) obtained check number groupwaitchecknum is grouped according to each character, with each check number with corresponding 4 two
The mode that system number is replaced generates check code binary string groupfinishcheck_binstr;
7) according to separation check code binary number in check code binary string groupfinishcheck_binstr, step 5
Significance level binary string sepimport_binstr is detached in string sepcheck_binstr and step 5, utilizes degree of belief
Computational algorithm calculates degree of belief X;Degree of belief computational algorithm is as follows:
A) initialization degree of belief X is 100, and the number NUM1 of significance level 1 is 0, and the number NUM0 of significance level 0 is 0;
B) traversal separation significance level binary string sepimport_binstr, if significance level is 1, significance level 1
Number NUM1 adds 1, if significance level is 0, the number NUM0 of significance level 0 adds 1;
C) successively twin check code binary string groupfinishcheck_binstr and separation check code binary string
Sepcheck_binstr is not handled if identical, if differ and corresponding significance level be 1, X subtract 1.0/
NUM1*75, if differ and corresponding significance level be 0, X subtract 1.0/NUMO*25;
D) output degree of belief X;
8) according to degree of belief X is calculated and the degree of belief threshold value Y that prestores, if X is not less than Y, the influence degree that data are destroyed is not
Greatly, and reliability is in tolerance interval, according to character binary string sepchar_binstr is detached in step 5, with every
The mode added 10 before 7 restores character ASCII character, and thus restoring data, otherwise abandons the data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510432030.4A CN105072618B (en) | 2015-07-17 | 2015-07-17 | Data reliability guard method based on check code in wireless sensor network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510432030.4A CN105072618B (en) | 2015-07-17 | 2015-07-17 | Data reliability guard method based on check code in wireless sensor network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105072618A CN105072618A (en) | 2015-11-18 |
CN105072618B true CN105072618B (en) | 2018-08-24 |
Family
ID=54501870
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510432030.4A Active CN105072618B (en) | 2015-07-17 | 2015-07-17 | Data reliability guard method based on check code in wireless sensor network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105072618B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106887038A (en) * | 2017-02-20 | 2017-06-23 | 张光辉 | A kind of orthopaedics inside-fixture formation system and method |
CN106686006A (en) * | 2017-03-01 | 2017-05-17 | 湖南财政经济学院 | Big data implementation control system based on Internet network security |
CN111767250A (en) * | 2020-06-10 | 2020-10-13 | 钛星投资(深圳)有限公司 | Decentralized storage method, downloading method and storage system |
CN112533207B (en) * | 2021-02-05 | 2021-05-07 | 浙江地芯引力科技有限公司 | Data verification method, device and system of wireless sensor |
CN113259936B (en) * | 2021-04-19 | 2022-05-03 | 中山大学 | High-reliability radio frequency hidden watermark signal authentication method and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101877723A (en) * | 2010-06-18 | 2010-11-03 | 中兴通讯股份有限公司 | Wireless sensor network node remote update system, method and equipment |
CN102395162A (en) * | 2011-11-02 | 2012-03-28 | 上海电机学院 | Method and system for transmitting multihop wireless sensor network data |
-
2015
- 2015-07-17 CN CN201510432030.4A patent/CN105072618B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101877723A (en) * | 2010-06-18 | 2010-11-03 | 中兴通讯股份有限公司 | Wireless sensor network node remote update system, method and equipment |
CN102395162A (en) * | 2011-11-02 | 2012-03-28 | 上海电机学院 | Method and system for transmitting multihop wireless sensor network data |
Non-Patent Citations (2)
Title |
---|
Reliability Analysis of Wireless Sensor Network;Neetesh Purohit等;《IEEE》;20081231;1-6 * |
Reliable Cooperative Communications Based on Random Network Coding in Multi-Hop Relay WSNS;LIU Xingcheng等;《IEEE SENSORS JOURNAL》;20140831;第14卷(第8期);2514-2523 * |
Also Published As
Publication number | Publication date |
---|---|
CN105072618A (en) | 2015-11-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105072618B (en) | Data reliability guard method based on check code in wireless sensor network | |
CA2558671A1 (en) | Centrally controlled distributed marking of content | |
CN103428227B (en) | Based on the IP conceal communication method of Huffman coding | |
CN104486304B (en) | A kind of wireless sensor network data method for security protection based on digital watermarking | |
CN106682534A (en) | Method and device for verifying data integrity in data migration process | |
CN110493227A (en) | A kind of data frame transmission method and system | |
KR102539421B1 (en) | Apparatus for one-way data transmission, apparatus for one-way data reception, and one-way data transmission method for using the same | |
CN109360143A (en) | A kind of digital watermark embedding and extracting method and system for big data | |
CN108063986A (en) | Frame number bearing method, the apparatus and system of multichannel passive optical network | |
CN107210755B (en) | FEC decoding device and method | |
CN101316227B (en) | Method and device for detecting ACK/NACK information in high-speed packet access | |
CN104281627B (en) | A kind of method of data reporting processing result, system and track of issues device | |
CN104579557A (en) | Data integrity transmission method among multiple nodes | |
Gao et al. | Data authentication for wireless sensor networks with high detection efficiency based on reversible watermarking | |
CN107276683B (en) | Decoding method, sending method and device of underwater sound signal | |
US9158871B2 (en) | Graph modeling systems and methods | |
CN116915519B (en) | Method, device, equipment and storage medium for tracing data stream | |
CN113765883B (en) | Industrial control network honeypot identification method based on successive probability discrimination algorithm | |
JP2001007860A (en) | Method for providing tag to special data packet and method for detecting the special data packet | |
CN105872003A (en) | Data processing method, device and system based on P2P (Peer-to-Peer) network | |
JP2010199651A (en) | Duplicated address detection system, transmission device, and receiving device | |
CN109783569A (en) | A kind of account book recording method, device and terminal device based on block chain | |
US20190392158A1 (en) | Message emission method, receiving method, emitting device, receiving device and associated communication system | |
CN105099607A (en) | Fault tolerance method and apparatus for microwave transmission | |
CN109995742A (en) | Network flow watermark and its detection method based on packet interval |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |