A kind of information processing method based on wireless Internet of Things
Technical field
The present invention relates to internet of things field, more particularly to a kind of information processing method based on wireless Internet of Things.
Background technology
Internet of Things is the extension and extension of internet, and the network is that " all things on earth " connect into one is controllable, safe in this world
Information network, can be applied to all trades and professions.Usually, Internet of Things is more understood to the equipment tissue networking of all trades and professions
Network, i.e. end Network, these end Networks are connected to internet by appropriate mode again, realize in network any time, appoint
Where put between people and thing, the communication between thing and thing, realize acquisition of information, equipment control etc..
The end Network of wireless Internet of Things is different with traditional the Internet architecture.It is provided with traditional internet substantial amounts of
Communicated between gateway and router, network node by gateway and router.In the end wireless network of wireless Internet of Things
In, wireless network node equipment may all very littles, pass through wireless connection, the work(of wireless node apparatus between wireless network node
Rate, disposal ability are all very limited, network size dynamic change.In addition, under many applicable cases, in the wireless network of end,
Reliability, accuracy and the security requirement that radio node communicates are very high, and validity, real-time to data transfer etc. is required
Can suitably it relax.
So far, not yet there is a kind of information processing method for more efficiently, being accurately directed to wireless Internet of Things.
The content of the invention
The present invention is aiming at the weak point in above-mentioned background technology, and a kind of letter based on wireless Internet of Things proposed
Processing method is ceased, it has higher security and efficiency.The purpose of the present invention is achieved by the following technical measures.
A kind of information processing method based on wireless Internet of Things, the wireless Internet of Things includes multiple wireless sensor nodes
Point, a resource information forwarding server and multiple P2P wireless terminals, it is characterised in that:
Each wireless sensor node gathers article or the data message of service in the wireless Internet of Things, and by collection
Data message is sent to resource information forwarding server;
From the data message received from the wireless sensor node is identified the resource information forwarding server
Reason and security filtering, and the data message is forwarded to a P2P wireless terminal;
Each P2P wireless terminal receptions simultaneously store the data message that the resource information forwarding server is forwarded;Also,
The P2P wireless terminals can read the data message stored in other P2P wireless terminals.
Further, the data message gathered is sent into the resource information in each wireless sensor node to forward
Before server, in addition it is also necessary to carry out authentication between the wireless sensor node and the resource information forwarding server;
Assuming that the computer or the entitled R1 of other computing terminals that are directly connected to the wireless sensor node, the resource information turn
The entitled R2 of server is sent out, then authentication process itself is as follows:
Step U1, R2 one random number Q of generation, sends it to R1;
Step U2, R1 are received after the random number Q of R2 generations, one private key Ks of generation and two public keys Ka and Kb;
Wherein, (Ka)2+(Kb)2=Q2;
Then, public key Ka and Kb are returned to R2 by R1;
Step U3, R2 are verified after receiving public key Ka and Kb to it;
If (Ka)2+(Kb)2≠Q2, then authentication failure, termination communication;
Otherwise, Q is encrypted using public key Ka and Kb respectively, encryption data E (Ka) and E (Kb) is sent to R1;
Step U4, R1 are decrypted using private key Ks to the encryption data E (Ka) and E (Kb) that receive, if decrypted result is all
Q, then authentication passes through, and shows that normal data transfer can be carried out between R1 and R2;Otherwise, authentication fails, and terminates
Communication.
Further, authentication is completed between the wireless sensor node and the resource information forwarding server
Afterwards, the data message of collection is sent to the resource information forwarding in the following manner and serviced by the wireless sensor node
Device, specifically:
For the wireless sensor node:
The wireless sensor node is held before the data message of collection is sent into the resource information forwarding server
Row is following to be operated:
Step M1, three sections, respectively subdata information info1, subdata information are divided into by the data message
Info2 and subdata information info3, the length of above-mentioned three cross-talks data message is respectively k1 bytes, k2 bytes, k3 bytes;
Above-mentioned three cross-talks data message is arranged into engagement in order can obtain the data message;
Wherein, k2>K1+k3, and k3>k1;
Step M2, engagement is arranged by subdata information info1 and subdata information info3 in order, obtains verification data
Information;
Step M3, calculates the MD5 values of the verification data information, obtains referential integrity check value H1;
Step M4, the data message and control information are sent to the resource information forwarding server jointly;
Wherein, the control information includes referential integrity check value H1 and k1 and k3 value;
For the resource information forwarding server:
The resource information forwarding server receives data message and control information from the wireless sensor node
Afterwards, following operate is performed:
Step N1, extracts the starting k1 bytes and last position k3 bytes of the data message, arrangement engagement, is treated in order
Check information;
Step N2, calculates the MD5 values of the information to be verified, obtains actual integrity check value H2;
Step N3 is complete by the reference in the control information for calculating the actual integrity check value H2 and reception obtained
Property check value H1 is compared;If both are identical, the data message passes through completeness check;Otherwise, the number is abandoned
It is believed that breath, and send transmission instruction again to the wireless sensor node.
Further, each P2P wireless terminals itself have an adjacent access information list, for by directly
The P2P wireless terminals of connection access other P2P wireless terminals;
The adjacent access information list includes herein below:
(1) address for the P2P wireless terminals being directly connected to current P2P wireless terminals;
(2) network bandwidth between current P2P wireless terminals and directly connected P2P wireless terminals;
(3) the average connection setup time between current P2P wireless terminals and directly connected P2P wireless terminals;
(4) the successful connection probability between current P2P wireless terminals and directly connected P2P wireless terminals;
(5) data transfer integrity between current P2P wireless terminals and directly connected P2P wireless terminals is general
Rate;
Originated when one P2P wireless terminals b1 need to access in network one it is wireless with the target P2P of its indirect connection
During terminal bn, following operate is performed:
Step A1, is the starting P2P wireless terminals b1 by current P2P wireless terminals Initialize installation;
Step A2, inquires about all P2P directly connected in current P2P wireless terminals b1 adjoining access information list
Wireless terminal;
If it find that the target P2P wireless terminal bn, then return;
Otherwise, successively by current P2P wireless terminals be set to the starting P2P wireless terminals b1 be directly connected to it is each
Individual P2P wireless terminals;Correspondingly, pair each current P2P wireless terminal being directly connected to the starting P2P wireless terminals b1
Perform step A3;
Step A3, the adjacent of P2P wireless terminals being directly connected to current P2P wireless terminals is inquired about using recursive algorithm and is visited
Information list is asked, if it find that the target P2P wireless terminal bn, then recurrence return.
Further, if there is k bar access path between starting P2P wireless terminals b1 and target P2P wireless terminals bn
L1, L2 ..., Lk, wherein, k is greater than 1 positive integer, then the step of selecting optimal access path is as follows:
Step B1, calculates in access path L1, L2 ..., Lk the total of the network bandwidth between each two P2P wireless terminals respectively
And W ' 1, W ' 2 ..., W ' k;
According to the connection number in every access path L1, L2 ..., Lk, the averaging network bandwidth of every access path is calculated
W1, W2 ..., Wk;
Wherein, the P2P wireless terminal quantity that the connection number in an access path is defined as in the access path subtracts 1;
Step B2, calculates average connection foundation between each two P2P wireless terminals in access path L1, L2 ..., Lk respectively
The summation T ' 1, T ' 2 ... of time, T ' k;
According to the connection number in every access path L1, L2 ..., Lk, when the total connection for calculating every access path is set up
Between T1, T2 ..., Tk;
Step B3, respectively by access path L1, L2 ..., the successful connection probability in Lk between each two P2P wireless terminals
It is multiplied, obtain every access path connects into power C1, C2 ..., Ck;
Step B4, respectively by access path L1, L2 ..., the data transfer in Lk between each two P2P wireless terminals is complete
Property probability multiplication, obtains the data transfer percentage of head rice I1 of every access path, I2 ..., Ik;
Step B5, according to the data obtained in above-mentioned steps, calculates access path L1, L2 ..., Lk overall merit respectively
Parameter Ф 1, Ф 2 ..., Ф k, the maximum access path of selection assessment parameter value are used as optimal access path;Specifically, visit
Ask the way footpath Li assessment parameter Ф i calculation formula it is as follows:
Ф i=lg (Wi+1)/lg (Ti+1) * (3Ci+2Ii)2;
Wherein, i is positive integer, and 1≤i≤k.
Further, when it is determined that after the target P2P wireless terminal bn, in the starting P2P wireless terminals b1 and mesh
Before carrying out data transmission between mark P2P wireless terminals bn, in addition to authentication process itself, it is specific as follows:
Step V1, bn one random number R of generation, sends it to b1;
Step V2, b1 are received after the random number R of bn generations, one private key Ks of generation and two public keys Kp1 and Kp2;
Wherein, (Kp1)2+(Kp2)2=R2;
Then, public key Kp1 and Kp2 are returned to bn by b1;
Step V3, bn is verified after receiving public key Kp1 and Kp2 to it, if (Kp1)2+(Kp2)2≠R2, then identity test
Card failure, terminates communication;Otherwise, R is encrypted using public key Kp1 and Kp2 respectively, by encryption data E (Kp1) and E (Kp2)
It is sent to b1;
Step V4, b1 are decrypted using private key Ks to the encryption data E (Kp1) and E (Kp2) that receive, if decrypted result is all
It is R, then authentication passes through, shows that normal data transfer can be carried out between b1 and bn;Otherwise, authentication fails, eventually
Only communicate.
Compared with prior art, there is advantages below in technical scheme:
First, technical scheme has used the safe practice of identity-based checking and data integrity verifying,
Substantially increase data acquisition end in wireless Internet of Things, between server end and P2P wireless terminals data transfer security
And reliability;
Second, technical scheme is combined for the selection course of distributed routed path in wireless Internet of Things
Various factors so that the Path selection in wireless Internet of Things is more reasonable.
Brief description of the drawings
Technical scheme is further detailed below in conjunction with the accompanying drawings.In the accompanying drawings, identical accompanying drawing is used
Mark represents identical functional module.The accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to this
The limitation of invention.
Fig. 1 shows system construction drawing according to an embodiment of the invention.
Embodiment
By the detailed description of hereafter preferred embodiment, various other advantages and benefit are for ordinary skill
Personnel will be clear understanding.The description is only the general introduction of technical solution of the present invention, in order to better understand the present invention
Technological means, and can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature
It can be become apparent with advantage.
Fig. 1 is the system construction drawing according to the embodiment of the present invention.
Shown in reference picture 1, a kind of information processing method based on wireless Internet of Things, the wireless Internet of Things includes multiple
Wireless sensor node, a resource information forwarding server and multiple P2P wireless terminals, it is characterised in that:
Each wireless sensor node gathers article or the data message of service in the wireless Internet of Things, and by collection
Data message is sent to resource information forwarding server;
From the data message received from the wireless sensor node is identified the resource information forwarding server
Reason and security filtering, and the data message is forwarded to a P2P wireless terminal;
Each P2P wireless terminal receptions simultaneously store the data message that the resource information forwarding server is forwarded;Also,
The P2P wireless terminals can read the data message stored in other P2P wireless terminals.
Further, the data message gathered is sent into the resource information in each wireless sensor node to forward
Before server, in addition it is also necessary to carry out authentication between the wireless sensor node and the resource information forwarding server;
Assuming that the computer or the entitled R1 of other computing terminals that are directly connected to the wireless sensor node, the resource information turn
The entitled R2 of server is sent out, then authentication process itself is as follows:
Step U1, R2 one random number Q of generation, sends it to R1;
Step U2, R1 are received after the random number Q of R2 generations, one private key Ks of generation and two public keys Ka and Kb;
Wherein, (Ka)2+(Kb)2=Q2;
Then, public key Ka and Kb are returned to R2 by R1;
Step U3, R2 are verified after receiving public key Ka and Kb to it;
If (Ka)2+(Kb)2≠Q2, then authentication failure, termination communication;
Otherwise, Q is encrypted using public key Ka and Kb respectively, encryption data E (Ka) and E (Kb) is sent to R1;
Step U4, R1 are decrypted using private key Ks to the encryption data E (Ka) and E (Kb) that receive, if decrypted result is all
Q, then authentication passes through, and shows that normal data transfer can be carried out between R1 and R2;Otherwise, authentication fails, and terminates
Communication.
Further, authentication is completed between the wireless sensor node and the resource information forwarding server
Afterwards, the data message of collection is sent to the resource information forwarding in the following manner and serviced by the wireless sensor node
Device, specifically:
For the wireless sensor node:
The wireless sensor node is held before the data message of collection is sent into the resource information forwarding server
Row is following to be operated:
Step M1, three sections, respectively subdata information info1, subdata information are divided into by the data message
Info2 and subdata information info3, the length of above-mentioned three cross-talks data message is respectively k1 bytes, k2 bytes, k3 bytes;
Above-mentioned three cross-talks data message is arranged into engagement in order can obtain the data message;
Wherein, k2>K1+k3, and k3>k1;
Step M2, engagement is arranged by subdata information info1 and subdata information info3 in order, obtains verification data
Information;
Step M3, calculates the MD5 values of the verification data information, obtains referential integrity check value H1;
Step M4, the data message and control information are sent to the resource information forwarding server jointly;
Wherein, the control information includes referential integrity check value H1 and k1 and k3 value;
For the resource information forwarding server:
The resource information forwarding server receives data message and control information from the wireless sensor node
Afterwards, following operate is performed:
Step N1, extracts the starting k1 bytes and last position k3 bytes of the data message, arrangement engagement, is treated in order
Check information;
Step N2, calculates the MD5 values of the information to be verified, obtains actual integrity check value H2;
Step N3 is complete by the reference in the control information for calculating the actual integrity check value H2 and reception obtained
Property check value H1 is compared;If both are identical, the data message passes through completeness check;Otherwise, the number is abandoned
It is believed that breath, and send transmission instruction again to the wireless sensor node.
Further, each P2P wireless terminals itself have an adjacent access information list, for by directly
The P2P wireless terminals of connection access other P2P wireless terminals;
The adjacent access information list includes herein below:
(1) address for the P2P wireless terminals being directly connected to current P2P wireless terminals;
(2) network bandwidth between current P2P wireless terminals and directly connected P2P wireless terminals;
(3) the average connection setup time between current P2P wireless terminals and directly connected P2P wireless terminals;
(4) the successful connection probability between current P2P wireless terminals and directly connected P2P wireless terminals;
(5) data transfer integrity between current P2P wireless terminals and directly connected P2P wireless terminals is general
Rate;
Originated when one P2P wireless terminals b1 need to access in network one it is wireless with the target P2P of its indirect connection
During terminal bn, following operate is performed:
Step A1, is the starting P2P wireless terminals b1 by current P2P wireless terminals Initialize installation;
Step A2, inquires about all P2P directly connected in current P2P wireless terminals b1 adjoining access information list
Wireless terminal;
If it find that the target P2P wireless terminal bn, then return;
Otherwise, successively by current P2P wireless terminals be set to the starting P2P wireless terminals b1 be directly connected to it is each
Individual P2P wireless terminals;Correspondingly, pair each current P2P wireless terminal being directly connected to the starting P2P wireless terminals b1
Perform step A3;
Step A3, the adjacent of P2P wireless terminals being directly connected to current P2P wireless terminals is inquired about using recursive algorithm and is visited
Information list is asked, if it find that the target P2P wireless terminal bn, then recurrence return.
Further, if there is k bar access path between starting P2P wireless terminals b1 and target P2P wireless terminals bn
L1, L2 ..., Lk, wherein, k is greater than 1 positive integer, then the step of selecting optimal access path is as follows:
Step B1, calculates in access path L1, L2 ..., Lk the total of the network bandwidth between each two P2P wireless terminals respectively
And W ' 1, W ' 2 ..., W ' k;
According to the connection number in every access path L1, L2 ..., Lk, the averaging network bandwidth of every access path is calculated
W1, W2 ..., Wk;
Wherein, the P2P wireless terminal quantity that the connection number in an access path is defined as in the access path subtracts 1;
Step B2, calculates average connection foundation between each two P2P wireless terminals in access path L1, L2 ..., Lk respectively
The summation T ' 1, T ' 2 ... of time, T ' k;
According to the connection number in every access path L1, L2 ..., Lk, when the total connection for calculating every access path is set up
Between T1, T2 ..., Tk;
Step B3, respectively by access path L1, L2 ..., the successful connection probability in Lk between each two P2P wireless terminals
It is multiplied, obtain every access path connects into power C1, C2 ..., Ck;
Step B4, respectively by access path L1, L2 ..., the data transfer in Lk between each two P2P wireless terminals is complete
Property probability multiplication, obtains the data transfer percentage of head rice I1 of every access path, I2 ..., Ik;
Step B5, according to the data obtained in above-mentioned steps, calculates access path L1, L2 ..., Lk overall merit respectively
Parameter Ф 1, Ф 2 ..., Ф k, the maximum access path of selection assessment parameter value are used as optimal access path;Specifically, visit
Ask the way footpath Li assessment parameter Ф i calculation formula it is as follows:
Ф i=lg (Wi+1)/lg (Ti+1) * (3Ci+2Ii)2;
Wherein, i is positive integer, and 1≤i≤k.
Further, when it is determined that after the target P2P wireless terminal bn, in the starting P2P wireless terminals b1 and mesh
Before carrying out data transmission between mark P2P wireless terminals bn, in addition to authentication process itself, it is specific as follows:
Step V1, bn one random number R of generation, sends it to b1;
Step V2, b1 are received after the random number R of bn generations, one private key Ks of generation and two public keys Kp1 and Kp2;
Wherein, (Kp1)2+(Kp2)2=R2;
Then, public key Kp1 and Kp2 are returned to bn by b1;
Step V3, bn is verified after receiving public key Kp1 and Kp2 to it, if (Kp1)2+(Kp2)2≠R2, then identity test
Card failure, terminates communication;Otherwise, R is encrypted using public key Kp1 and Kp2 respectively, by encryption data E (Kp1) and E (Kp2)
It is sent to b1;
Step V4, b1 are decrypted using private key Ks to the encryption data E (Kp1) and E (Kp2) that receive, if decrypted result is all
It is R, then authentication passes through, shows that normal data transfer can be carried out between b1 and bn;Otherwise, authentication fails, eventually
Only communicate.
In summary, it is only the present invention preferably embodiment, but protection scope of the present invention is not limited thereto,
Any one skilled in the art the invention discloses technical scope in, the change or replacement that can be readily occurred in,
It should all be included within the scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims
It is defined.