A kind of information processing method based on 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 Internet of Things.
Background technology
Internet of Things is a kind of special network, and it combines the internet of information age and traditional object
Come so that object becomes intelligent main body, and calculating and storage resource of the application of daily life by internet, becomes more
Plus convenience and high-efficiency, trigger the major transformation in internet and the big field of practical application two.As Internet technology increasingly incorporates
To traditional application, Internet of Things is also increasingly taken seriously, and technology of Internet of things also more and more appears in various business applications
In, greatly improve the efficiency and commercial profit of enterprise.
It is exactly to set up the Item Information that can be realized in a global range Real-Time Sharing that Internet of Things, which sets up initial purpose,
Network so that article positioning in the world, tracking and other information inquiry etc. are realized under existing the Internet architecture
Target.Internet of Things is exactly a huge information sharing and information exchange network, it is intended to provide more horn of plenty and convenient for people
Information service.The characteristics of due to Internet of Things itself, what its scale can be bigger than existing internet is more, and it is by the information content of generation
It is big also to well imagine.Therefore, under Internet of Things application environment, how efficiently, reliably organize and storage information, and be user
It is a urgent problem to be solved to provide easily information service;Meanwhile, how effective body is carried out to the node in Internet of Things
Part certification, improves the security of data information transfer, is also an important problem.
The content of the invention
It is a primary object of the present invention to realize reading, the forwarding of article or the data message of service in Internet of Things, and
Safe transmission of the data message between multiple Internet of things node.At a kind of information based on Internet of Things
Reason method.
Technical scheme is as follows:
A kind of information processing method based on Internet of Things, the Internet of Things include RFID tag, RFID reader and
Multiple network nodes;The network node for being directly connected to the RFID reader is referred to as A class nodes, will be not directly connected described
The network node of RFID reader is referred to as B class nodes, it is characterised in that:
Article or the coding information of service in the RFID tag storage Internet of Things;
The RFID reader reads the data message in the RFID tag, and the data message read is sent to
One A class node;
The A classes node enters the data message received from the RFID reader after row format conversion, is forwarded
To a B class node;
The B classes node stores the data message from the A classes node;Also, the B classes node can read other
The data message stored in B class nodes.
Preferably, after the data message that the RFID reader reads in the RFID tag, and it will read
The data message taken is sent to before an A class node, it is necessary first to judge the A class nodes that the RFID reader is connectable to
Quantity;
If the quantity is 1, directly determine that the A classes node, as the target A class nodes of data information transfer, is uploaded and worked as
The data message that preceding RFID reader is read;
If the quantity is more than 1, one of A classes node is selected in the following manner as data information transfer
Target A class nodes, upload the data message that current RFID reader is read, comprise the following steps that:
Step S1, selects the test data s of regular length;Time threshold t1, time threshold t2 are set;
Step S2, each A classes node being connectable to for current RFID reader performs step S2.1 and step successively
Rapid S2.2, specifically:
Step S2.1, the test data s is sent to current A classes node, is obtained current A classes node and is started to receive data
Response time t;
Step S2.2, records current A classes node from starting to receive the test data s up to completing the test data s
All transmit consumed data transmission period Δ t;
Step S3, judges in the A class nodes that current RFID reader is connectable to, if the response of all A classes nodes
Time t is all higher than or equal to the time threshold t2;
If so, performing step S4;
Otherwise, A class node of response time t more than or equal to the time threshold t2 is rejected;Then judge now whether
An only remaining A class node;If so, the A class nodes then are defined as into target A class nodes, terminate;
Step S4, judges in the A class nodes that current RFID reader is connectable to, if the data of all A classes nodes
Transmission time Δ t is all higher than or equal to the time threshold t1;
If so, performing step S5;
Otherwise, the A class nodes that data transmission period Δ t is more than or equal to the time threshold t1 are rejected;Then this is judged
When whether an only remaining A class node;If so, the A class nodes then are defined as into target A class nodes, terminate;
Step S5, calculates the response time t of remaining all A classes nodes arithmetic mean of instantaneous value t_avg;And calculate residue
All A classes nodes data transmission period Δ t arithmetic mean of instantaneous value Δ t_avg;
Step S6, for remaining each A classes node, calculates the generalized time parameter value t ' of the A class nodes, specifically successively
Calculation formula is as follows:
T '=λ * | t-t_avg |1/2*log2|1+Δt-Δt_avg|
Wherein, λ is constant set in advance;
Step S7, in remaining all A classes nodes, a minimum selection generalized time parameter value t ' A class node will
It is defined as target A class nodes.
Preferably, after the RFID reader determines target A class nodes, in addition it is also necessary in the RFID reader and institute
State and carry out authentication between target A class nodes;Assuming that the computer being directly connected to the RFID reader or other calculating
The entitled node R 1 of terminal, the entitled node R 2 of the target A class nodes, then authentication process itself is as follows:
Step U1, node R 2 generates a random number Q, sends it to node R 1;
Step U2, node R 1 is received after the random number Q of the generation of node R 2, one private key Ks of generation and two public key Ka and
Kb;
Wherein, (Ka)2+(Kb)2=Q2;
Then, public key Ka and Kb are returned to node R 2 by node R 1;
Step U3, node R 2 is 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 node
R1;
Step U4, node R 1 is decrypted using private key Ks to the encryption data E (Ka) and E (Kb) that receive, if decrypted result
All it is Q, then authentication passes through, shows that normal data transfer can be carried out between node R 1 and node R 2;Otherwise, identity is tested
Card failure, terminates communication;
Step U5, if above-mentioned authentication process itself fails, reselects a target A class node, performs above-mentioned step
Rapid U1~step U4, until determine one can be by the target A class nodes of authentication, to realize the biography of the data message
It is defeated.
Preferably, between the RFID reader and the target A class nodes after completion authentication, the RFID
The data message read is sent to the target A class nodes by reader in the following manner, specifically:
For the RFID reader:
The RFID reader performs following operate before the data message read to be sent to target A class nodes:
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=[log2(k1)], symbol [] represents interception integer part computing;
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 target A class nodes jointly;
Wherein, the control information includes referential integrity check value H1 and k1 and k3 value;
For the target A class nodes:
Target A class nodes are received after the data message and control information of the RFID reader, perform following operate:
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 is deposited the data message by completeness check
Store up the target A class nodes;Otherwise, the data message is abandoned, and transmission again is sent to the RFID reader and referred to
Order.
Preferably, each B classes node itself has adjacent access information list, for by directly connecting
B classes node accesses other B class nodes;
The adjacent access information list includes herein below:
(1) title for the B class nodes being directly connected to current B classes node;
(2) physical address for the B class nodes being directly connected to current B classes node, IP address;
(3) port numbers for the B class nodes being directly connected to current B classes node;
(4) network bandwidth between current B classes node and directly connected B class nodes;
(5) the average connection setup time between current B classes node and directly connected B class nodes;
(6) the successful connection probability between current B classes node and directly connected B class nodes;
(7) the data transfer integrity probability between current B classes node and directly connected B class nodes;
When one, which originates B class nodes b1, needs to access in network one with the target B class node bn of its indirect connection,
Perform following operate:
Step A1, the starting B class nodes b1 is set to by current B classes node initializing;
Step A2, inquires about all B class sections directly connected in current B classes node b1 adjoining access information list
Point;
If it find that the target B classes node bn, then return;
Otherwise, current B classes node is set to each B class section for being directly connected to the starting B class nodes b1 successively
Point;Correspondingly, couple each current B classes node execution step A3 being directly connected to the starting B class nodes b1;
Step A3, the adjoining access information for inquiring about the B class nodes being directly connected to current B classes node using recursive algorithm is arranged
Table, if it find that the target B classes node bn, then recurrence return.
Preferably, if there is k bar access path L1, L2 ... between starting B class node b1 and target B class nodes bn,
Lk, wherein, k is greater than 1 positive integer, then the step of selecting optimal access path is as follows:
Step B1, calculates the summation W ' of the network bandwidth between each two B class nodes in access path L1, L2 ..., Lk respectively
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 B class number of nodes that the connection number in an access path is defined as in the access path subtracts 1;
Step B2, calculates the connection setup time that is averaged in access path L1, L2 ..., Lk between each two B class nodes respectively
Summation T ' 1, T ' 2 ..., 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 phase in Lk between each two B class nodes
Multiply, obtain every access path connects into power C1, C2 ..., Ck;
Step B4, respectively by access path L1, L2 ..., the data transfer integrity in Lk between each two B class nodes is general
Rate is multiplied, and obtains data transfer the percentage of head rice I1, I2 ..., Ik of every access path;
Step 5, according to the data obtained in above-mentioned steps, access path L1, L2 ..., Lk overall merit are calculated 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.
Compared with prior art, there is advantages below in technical scheme:
First, there is provided convenient for the information that technical scheme efficiently, reliably can be organized and store in Internet of Things
Internet of Things information service;
Second, technical scheme has used the safe practice of identity-based checking and data integrity verifying,
Substantially increase the safety and reliability of data transfer;
3rd, technical scheme is combined various for the selection course of distributed routed path in Internet of Things
Factor, optimizes Path selection.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, institute in being described below to the embodiment of the present invention
The accompanying drawing needed to use is briefly described, it should be apparent that, drawings in the following description are only some implementations of the present invention
Example, for those of ordinary skill in the art, without having to pay creative labor, can also be according to the accompanying drawing
Obtain other accompanying drawings.
Fig. 1 is the system construction drawing according to the embodiment of the present invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Complete conveys to those skilled in the art.
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 Internet of Things, the Internet of Things include RFID tag,
RFID reader and multiple network nodes;The network node for being directly connected to the RFID reader is referred to as A class nodes, will
The network node for the RFID reader that is not directly connected is referred to as B class nodes, it is characterised in that:
Article or the coding information of service in the RFID tag storage Internet of Things;
The RFID reader reads the data message in the RFID tag, and the data message read is sent to
One A class node;
The A classes node enters the data message received from the RFID reader after row format conversion, is forwarded
To a B class node;
The B classes node stores the data message from the A classes node;Also, the B classes node can read other
The data message stored in B class nodes.
Preferably, after the data message that the RFID reader reads in the RFID tag, and it will read
The data message taken is sent to before an A class node, it is necessary first to judge the A class nodes that the RFID reader is connectable to
Quantity;
If the quantity is 1, directly determine that the A classes node, as the target A class nodes of data information transfer, is uploaded and worked as
The data message that preceding RFID reader is read;
If the quantity is more than 1, one of A classes node is selected in the following manner as data information transfer
Target A class nodes, upload the data message that current RFID reader is read, comprise the following steps that:
Step S1, selects the test data s of regular length;Time threshold t1, time threshold t2 are set;
Step S2, each A classes node being connectable to for current RFID reader performs step S2.1 and step successively
Rapid S2.2, specifically:
Step S2.1, the test data s is sent to current A classes node, is obtained current A classes node and is started to receive data
Response time t;
Step S2.2, records current A classes node from starting to receive the test data s up to completing the test data s
All transmit consumed data transmission period Δ t;
Step S3, judges in the A class nodes that current RFID reader is connectable to, if the response of all A classes nodes
Time t is all higher than or equal to the time threshold t2;
If so, performing step S4;
Otherwise, A class node of response time t more than or equal to the time threshold t2 is rejected;Then judge now whether
An only remaining A class node;If so, the A class nodes then are defined as into target A class nodes, terminate;
Step S4, judges in the A class nodes that current RFID reader is connectable to, if the data of all A classes nodes
Transmission time Δ t is all higher than or equal to the time threshold t1;
If so, performing step S5;
Otherwise, the A class nodes that data transmission period Δ t is more than or equal to the time threshold t1 are rejected;Then this is judged
When whether an only remaining A class node;If so, the A class nodes then are defined as into target A class nodes, terminate;
Step S5, calculates the response time t of remaining all A classes nodes arithmetic mean of instantaneous value t_avg;And calculate residue
All A classes nodes data transmission period Δ t arithmetic mean of instantaneous value Δ t_avg;
Step S6, for remaining each A classes node, calculates the generalized time parameter value t ' of the A class nodes, specifically successively
Calculation formula is as follows:
T '=λ * | t-t_avg |1/2*log2|1+Δt-Δt_avg|
Wherein, λ is constant set in advance;
Step S7, in remaining all A classes nodes, a minimum selection generalized time parameter value t ' A class node will
It is defined as target A class nodes.
Preferably, after the RFID reader determines target A class nodes, in addition it is also necessary in the RFID reader and institute
State and carry out authentication between target A class nodes;Assuming that the computer being directly connected to the RFID reader or other calculating
The entitled node R 1 of terminal, the entitled node R 2 of the target A class nodes, then authentication process itself is as follows:
Step U1, node R 2 generates a random number Q, sends it to node R 1;
Step U2, node R 1 is received after the random number Q of the generation of node R 2, one private key Ks of generation and two public key Ka and
Kb;
Wherein, (Ka)2+(Kb)2=Q2;
Then, public key Ka and Kb are returned to node R 2 by node R 1;
Step U3, node R 2 is 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 node
R1;
Step U4, node R 1 is decrypted using private key Ks to the encryption data E (Ka) and E (Kb) that receive, if decrypted result
All it is Q, then authentication passes through, shows that normal data transfer can be carried out between node R 1 and node R 2;Otherwise, identity is tested
Card failure, terminates communication;
Step U5, if above-mentioned authentication process itself fails, reselects a target A class node, performs above-mentioned step
Rapid U1~step U4, until determine one can be by the target A class nodes of authentication, to realize the biography of the data message
It is defeated.
Preferably, between the RFID reader and the target A class nodes after completion authentication, the RFID
The data message read is sent to the target A class nodes by reader in the following manner, specifically:
For the RFID reader:
The RFID reader performs following operate before the data message read to be sent to target A class nodes:
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=[log2(k1)], symbol [] represents interception integer part computing;
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 target A class nodes jointly;
Wherein, the control information includes referential integrity check value H1 and k1 and k3 value;
For the target A class nodes:
Target A class nodes are received after the data message and control information of the RFID reader, perform following operate:
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 is deposited the data message by completeness check
Store up the target A class nodes;Otherwise, the data message is abandoned, and transmission again is sent to the RFID reader and referred to
Order.
Preferably, each B classes node itself has adjacent access information list, for by directly connecting
B classes node accesses other B class nodes;
The adjacent access information list includes herein below:
(1) title for the B class nodes being directly connected to current B classes node;
(2) physical address for the B class nodes being directly connected to current B classes node, IP address;
(3) port numbers for the B class nodes being directly connected to current B classes node;
(4) network bandwidth between current B classes node and directly connected B class nodes;
(5) the average connection setup time between current B classes node and directly connected B class nodes;
(6) the successful connection probability between current B classes node and directly connected B class nodes;
(7) the data transfer integrity probability between current B classes node and directly connected B class nodes;
When one, which originates B class nodes b1, needs to access in network one with the target B class node bn of its indirect connection,
Perform following operate:
Step A1, the starting B class nodes b1 is set to by current B classes node initializing;
Step A2, inquires about all B class sections directly connected in current B classes node b1 adjoining access information list
Point;
If it find that the target B classes node bn, then return;
Otherwise, current B classes node is set to each B class section for being directly connected to the starting B class nodes b1 successively
Point;Correspondingly, couple each current B classes node execution step A3 being directly connected to the starting B class nodes b1;
Step A3, the adjoining access information for inquiring about the B class nodes being directly connected to current B classes node using recursive algorithm is arranged
Table, if it find that the target B classes node bn, then recurrence return.
Preferably, if there is k bar access path L1, L2 ... between starting B class node b1 and target B class nodes bn,
Lk, wherein, k is greater than 1 positive integer, then the step of selecting optimal access path is as follows:
Step B1, calculates the summation W ' of the network bandwidth between each two B class nodes in access path L1, L2 ..., Lk respectively
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 B class number of nodes that the connection number in an access path is defined as in the access path subtracts 1;
Step B2, calculates the connection setup time that is averaged in access path L1, L2 ..., Lk between each two B class nodes respectively
Summation T ' 1, T ' 2 ..., 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 phase in Lk between each two B class nodes
Multiply, obtain every access path connects into power C1, C2 ..., Ck;
Step B4, respectively by access path L1, L2 ..., the data transfer integrity in Lk between each two B class nodes is general
Rate is multiplied, and obtains data transfer the percentage of head rice I1, I2 ..., Ik of every access path;
Step 5, according to the data obtained in above-mentioned steps, access path L1, L2 ..., Lk overall merit are calculated 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.
Embodiment of above is merely to illustrate the present invention, and not limitation of the present invention, about the common of technical field
Technical staff, without departing from the spirit and scope of the present invention, can also make a variety of changes and modification, therefore all
Equivalent technical scheme falls within scope of the invention, and scope of patent protection of the invention should be defined by the claims.