The wireless body area network image data transmission method that a kind of packet loss is controlled
Technical field
The present invention relates to wireless communication field, more particularly, the present invention relates to a kind of data that via node is received according to priority and network Packet Error Ratio, control the wireless body area network image data transmission method of packet loss.
Background technology
Along with development and the progress of medical skill, the average life span of the mankind constantly increases, the increase of the aged in thing followed society, the proportion of population structure the elderly is increasing, but carry out treatment next to the skin according to traditional approach in the past to the elderly cannot meet, so Tele medicine is following important channel of old man being carried out to health monitoring, it is also the important development direction of following medical treatment development.Wireless body area network is an emerging technology in recent years, enjoy domestic and international concern, wireless body area network is the important expansion of wireless sensor network, by the biosensor of monitoring human information is arranged in human peripheral or body with wearing mode or the mode that implants, composition body area network.Biosensor can the body temperature of monitoring human, blood pressure, brain wave, even action etc.Moreover can also utilize Sensor monitoring human peripheral environmental index, as temperature, humidity etc.Collected information is sent to long-range server by the transducer be arranged in human body, by server to the data analysis process received.Every physical signs that sensor measurement obtains can pass through body area network, be sent to data processing centre, by effectively processing collected valid data and integrating, doctor or related personnel is enable to judge the physiological status of human body timely, even action etc.But need the relative physiologic index of monitoring, also different at different time, so when needs gather a certain sensing data, its accuracy must be ensured, meet quality of service requirement.ARC and FEC two kinds of fault recovering mechanism, are all difficult to meet adaptive network demand, cause network resources waste.Marinkovic proposes the fault recovering mechanism utilizing network code as wireless body area network, but this mechanism does not have the division of priority, each packet may have mistake and distortion, or important data are lost in transmitting procedure, cannot be adaptive to network and applied environment.
Summary of the invention
An object of the present invention is to solve at least the problems referred to above and/or defect, and the advantage will illustrated after at least one is provided.
A further object of the invention is to provide a kind of fault-tolerance of effective raising wireless body area network, determines the function of the sensor node in wireless body area network, via node, base station, and provides co-operating mode between modules; Determine that via node carries out the strategy of network code; system is according to actual needs by real-time for data prioritization and more protection divides the data of priority into; and can according to the Packet Error Ratio of current wireless body area network; via node is made to formulate adaptive coding strategy according to data priority; and in a base station the data decode received can be recovered initial data; the decoded data distortion that base station is obtained is few, and at the bottom of packet loss, network error recovery capability is strong.
In order to realize, according to these objects of the present invention and other advantage, the invention provides the wireless body area network image data transmission method that a kind of packet loss is controlled.Wireless body area network comprise for image data n sensor node, receive image data and the base station of the via node of coding and final received code data, method of the present invention comprises the following steps:
Be set in the priority data in the image data of each sensor node in the generation;
Each via node is responsible for the part in n sensor node, and described via node is set within a generation, is responsible for the sensor node that gathers priority data at the most;
The Packet Error Ratio of current wireless body area network is detected in base station: if Packet Error Ratio is less than predetermined value, then via node is to wherein a the image data direct coding received, and to all the other image data received between two XOR encode; If Packet Error Ratio is more than or equal to predetermined value, then via node image data direct coding that wherein b is received, and to all the other image data received between two XOR encode, and if having priority data in the image data that this via node receives, then extra this priority data and other data XOR are carried out redundancy encoding;
Base station receives all direct codings, XOR coding and redundancy encoding, and these codings are carried out calculating decoding, to obtain the controlled data transmission method of packet loss by the matrix of n X n.
Preferably, wherein, packet loss controls below 1%, and predetermined value is 21%.
Preferably, wherein, the data collected by each sensor node send to two via nodes respectively, namely send to responsible via node and all the other via nodes one of them, final all via nodes receive 2n image data bag altogether; And each via node only sends the redundant decode relevant to the sensor node that it is responsible for base station.
Preferably, wherein, each via node part be responsible in n sensor node is a part of dividing equally, and namely hypothesis has m via node, then each via node is responsible for n/m sensor node; And the described data collected by each sensor node send to two via nodes to be uniform distribution respectively, namely each via node receives the data that 2n/m sensor node gathers.
Preferably, wherein, described a is 1, and described b is 2.
Preferably, wherein, if Packet Error Ratio is less than predetermined value, via node when XOR is encoded between two to all the other image data received, meets following two conditions: one, the group/cording quantity of XOR is that 2n/m subtracts a between two; Two, first to encode the XOR between image data and the carefree image data of this via node that this via node is responsible for, then the XOR between the image data that this via node is responsible for of encoding, or the XOR between the carefree image data of this via node.
Preferably, wherein, if Packet Error Ratio is more than or equal to predetermined value, via node to wherein two receive image data direct coding time, these two are encoded directly in image data, have one for priority data.
Preferably, wherein, if Packet Error Ratio is more than or equal to predetermined value, via node when XOR is encoded between two to all the other image data received, meets following three conditions: one, the group/cording quantity of XOR is that 2n/m subtracts b between two; Two, first to encode the XOR between image data and the carefree image data of this via node that this via node is responsible for, then the XOR between the image data that this via node is responsible for of encoding, or the XOR between the carefree image data of this via node; If have priority data in the image data that three these via nodes receive, then this priority data does not participate in the coding of XOR between two.
Preferably, wherein, the quantity of additionally this priority data and other data XOR being carried out redundancy encoding is: if Packet Error Ratio is between 21% to 28%, then quantity is 1; Packet Error Ratio is between 28% to 32%, then quantity is that 2n/m subtracts 4; Packet Error Ratio is between 32% to 37%, then quantity is that 2n/m subtracts 3; Packet Error Ratio is between 37% to 41%, then quantity is that 2n/m subtracts 2; Packet Error Ratio is between more than 41% time, then quantity is that 2n/m subtracts 1, and wherein each interval is not containing higher limit; And other data described are except this priority data, other data that this via node receives.
Preferably, wherein, base station carry out calculate decoding method be:
Step one, to n sensor node numbering, then give the image data of each sensor node with identical number record;
Step 2, insert in n X n matrix receive all direct codings, XOR coding and redundancy encoding, the method for inserting is: direct coding inserts clinodiagonal, position be its numbering position; XOR coding inserts matrix, the position of the numbering of position corresponding to two image data of this XOR of generation coding; Redundancy encoding inserts matrix, the position of the numbering of position corresponding to two image data of this redundancy encoding of generation; All the other vacant locations fill out 0;
Step 3, this n X n matrix is transformed to upper triangular matrix, transform method is:
Take clinodiagonal as axle, data fusion in lower triangular matrix is entered upper triangular matrix, its fusion method is: if the data symmetry in lower triangular matrix is 0 to the data of the position in upper triangular matrix, then substitute 0 of this position in upper triangular matrix by the data in lower triangular matrix, if the data symmetry in lower triangular matrix is not 0 to the data of the position in upper triangular matrix, then retain the data of this position in upper triangular matrix;
If the data in step 4, clinodiagonal are non-vanishing, then be relevant position the image data of sensor node to numbering, if be zero, then by relevant position along clinodiagonal and be not all 0 along two that file line are positioned on same row numerical value carries out XOR, matrix is inserted using operation values as the value of this relevant position, iterate execution step 4, until 0 in clinodiagonal all substituted, or until iteration terminates.
The present invention at least comprises following beneficial effect: because the coded system of via node to be selected in base station of the present invention by the Packet Error Ratio situation detecting current wireless body area network, effectively can utilize Internet resources, improve the fault-tolerance of wireless body area network; Again because the coded system of via node of the present invention and the decode operation of base station combine; make when network environment is poor; via node the data higher to priority can carry out the correlative coding of redundancy; reduce the packet loss of priority higher data; enable the significant data that more protection priority is higher, reach application necessary requirement.When priority higher data packet loss reduces, because data have relevance after coding, the packet loss of other data also can significantly reduce, the initial data distortion that transmission is obtained afterwards that is also improved of the overall fault-tolerance of network is few, at the bottom of packet loss, network error recovery capability is strong, is more conducive to being applied in the wireless body area network of Multi-source multi-relay, can improves the service quality of user better.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the controlled wireless body area network image data transmission method of a kind of packet loss of the present invention;
Fig. 2 is the network topological diagram of sensor node in one embodiment of the present of invention, via node and base station composition.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail, can implement according to this with reference to specification word to make those skilled in the art.
Fig. 1 shows according to way of realization of the present invention, wireless body area network comprise for image data n sensor node, receive image data and the base station of the via node of coding and final received code data; Base station is detected the Packet Error Ratio of current wireless body area network and is fed back to via node, via node makes the data after different coding strategy transfer encodings to base station in different Packet Error Ratio situation, and then the data received are carried out calculating decoding and obtained desired data or initial data by base station.
Fig. 2 shows the network topological diagram of sensor node in one embodiment of the present of invention, via node and base station composition.Suppose following situation: wireless body area network is sensor node, via node, the network of base station three-decker, wherein ground floor is 12 sensor node S1 ~ S12, and the second layer is four via node R1 ~ R4, and third layer is base station MS; The packet that wherein transducer S1 ~ S12 sends also is P1 ~ P12 respectively.
Be set in the priority data in the image data of each sensor node in the generation, namely at one time in the cycle each sensor node image data in priority data;
Each via node is responsible for the part in 12 sensor nodes, and described via node is set within a generation, is responsible for the sensor node that gathers priority data at the most;
If Packet Error Ratio is less than predetermined value, then via node image data direct coding that wherein a is received, and to all the other image data received between two XOR encode; If Packet Error Ratio is more than or equal to predetermined value, then via node image data direct coding that wherein b is received, and to all the other image data received between two XOR encode, and if having priority data in the image data that this via node receives, then extra this priority data and other data XOR are carried out redundancy encoding;
Base station receives all direct codings, XOR coding and redundancy encoding, and these codings are carried out calculating decoding, to obtain the controlled data transmission method of packet loss by the matrix of 12X 12.
The packet loss of such scheme controls below 1%, and predetermined value is 21%.
In such scheme, each via node is responsible for the part in 12 sensor nodes, and via node is set within a generation, being responsible for an a kind of implementation gathering the sensor node of priority data is at the most: the data collected by each sensor node send to two via nodes respectively, namely send to responsible via node and all the other via nodes one of them, final all via nodes receive 24 image data bags altogether; And each via node only sends the redundant decode relevant to the sensor node that it is responsible for base station.
In such scheme, a kind of implementation of the part that each via node is responsible in 12 sensor nodes is: each via node part be responsible in 12 sensor nodes is a part of dividing equally, namely hypothesis has 4 via nodes, then each via node is responsible for 3 sensor nodes; And the described data collected by each sensor node send to two via nodes to be uniform distribution respectively, namely each via node receives the data that 6 sensor nodes gather.Such as, with the method for salary distribution shown in Fig. 2 for: S1 ~ S3 transducer institute image data bag P1 ~ P3 sends to via node R1, R2; S4 ~ S6 transducer institute image data bag P4 ~ P6 sends to via node R2, R3; S7 ~ S9 transducer institute image data bag P7 ~ P9 sends to via node R3, R4; S10 ~ S12 transducer institute image data bag P10 ~ P12 sends to via node R4, R1; Each via node is responsible for the part in 12 sensor nodes, and via node is set within a generation, be responsible for the sensor node that gathers priority data at the most, namely shown in Figure 2, R1 is responsible for S1, S2, S3, and R2 is responsible for S4, S5, S6, and R3 is responsible for S, 7, S8, S9, R4 is responsible for S10, S11, S12.
A in such scheme can be 1, and b can be 2.
If Packet Error Ratio is less than predetermined value in such scheme, via node when XOR is encoded between two to all the other image data received, meets following two conditions: one, the group/cording quantity of XOR is 5 between two; Two, first to encode the XOR between image data and the carefree image data of this via node that this via node is responsible for, then the XOR between the image data that this via node is responsible for of encoding, or the XOR between the carefree image data of this via node.Its working method is: when the Packet Error Ratio that current wireless body area network is detected in base station is less than 21%, the coded system that via node adopts according to Packet Error Ratio is:
When Packet Error Ratio is less than 21%, the coding strategy of each via node is as table 1:
Table 1
If Packet Error Ratio is more than or equal to predetermined value in such scheme, via node to wherein two receive image data direct coding time, these two are encoded directly in image data, have one for priority data.
If Packet Error Ratio is more than or equal to predetermined value in such scheme, via node when XOR is encoded between two to all the other image data received, meets following three conditions: one, the group/cording quantity of XOR is 4 between two; Two, first to encode the XOR between image data and the carefree image data of this via node that this via node is responsible for, then the XOR between the image data that this via node is responsible for of encoding, or the XOR between the carefree image data of this via node; If have priority data in the image data that three these via nodes receive, then this priority data does not participate in the coding of XOR between two.Its working method is: when the Packet Error Ratio that current wireless body area network is detected in base station is more than or equal to 21%, suppose transducer S
2and S
8send packet P
2and P
8for priority higher data bag, then its redundant data packets is
with
the coded system that via node Non-redundant data bag adopts is:
Via node sends the number P of Redundant coded data bag
nepformula:
Redundancy encoding bag number P
nepbe 2 each via node coding strategy as shown in table 2, redundancy encoding bag number P
nepbe 3 each via node coding strategy as shown in table 3.
Table 2
Table 3
Extra a kind of implementation of this priority data and other data XOR being carried out the quantity of redundancy encoding in such scheme is: if Packet Error Ratio is between 21% to 28%, then quantity is 1; Packet Error Ratio is between 28% to 32%, then quantity is 2; Packet Error Ratio is between 32% to 37%, then quantity is 3; Packet Error Ratio is between 37% to 41%, then quantity is 4; Packet Error Ratio is between more than 41% time, then quantity is 5, and wherein each interval is not containing higher limit; And other data described are except this priority data, other data that this via node receives.
In such scheme base station carry out calculate decoding a kind of implementation be:
Step one, to 12 sensor nodes numbering, then give the image data of each sensor node with identical number record;
Step 2, insert in 12X 12 matrix receive all direct codings, XOR coding and redundancy encoding, the method for inserting is: direct coding inserts clinodiagonal, position be its numbering position; XOR coding inserts matrix, the position of the numbering of position corresponding to two image data of this XOR of generation coding; Redundancy encoding inserts matrix, the position of the numbering of position corresponding to two image data of this redundancy encoding of generation; All the other vacant locations fill out 0;
Step 3, be upper triangular matrix by this 12X 12 matrixing, transform method is:
Take clinodiagonal as axle, data fusion in lower triangular matrix is entered upper triangular matrix, its fusion method is: if the data symmetry in lower triangular matrix is 0 to the data of the position in upper triangular matrix, then substitute 0 of this position in upper triangular matrix by the data in lower triangular matrix, if the data symmetry in lower triangular matrix is not 0 to the data of the position in upper triangular matrix, then retain the data of this position in upper triangular matrix;
If the data in step 4, clinodiagonal are non-vanishing, then be relevant position the image data of sensor node to numbering, if be zero, then by relevant position along clinodiagonal and be not all 0 along two that file line are positioned on same row numerical value carries out XOR, matrix is inserted using operation values as the value of this relevant position, iterate execution step 4, until 0 in clinodiagonal all substituted, or until iteration terminates.
According to the present invention, when network environment is poor, via node the data higher to priority can carry out the correlative coding of redundancy, reduces the packet loss of priority higher data, enables to reach application necessary requirement.When priority higher data packet loss reduces, because data have relevance after coding, the packet loss of other data also can significantly reduce, and the overall fault-tolerance of network is also improved.Show in emulation experiment, according to the present invention, when Packet Error Ratio reaches 42%, priority higher data still can meet the requirement that packet loss is less than 1%, and the fault-tolerance of overall network also improves about 50% than existing method.
Although embodiment of the present invention are open as above, but it is not restricted to listed in specification and execution mode utilization, it can be applied to various applicable the field of the invention completely, for those skilled in the art, can easily realize other amendment, therefore do not deviating under the universal that claim and equivalency range limit, the present invention is not limited to specific details and illustrates here and the legend described.