Method for guaranteeing quality of service of wireless multimedia sensor network based on mobile agent
The present invention is a kind of wireless multimedia sensor network (WMSNs based on mobile agent (Mobile Agent); Wireless Multimedia Sensor Networks) service quality (QoS; Quality ofService) support method; Be mainly used in solve wireless multimedia sensor network when occurrence node lost efficacy based on the QoS security problem of mobile agent, belong to network service quality safeguards technique field.
Background technology
Wireless multimedia sensor network (Wireless Multimedia Sensor Networks; WMSNs) be at traditional wireless sensor networks (Wireless Sensor Networks; WSNs) introduced a kind of novel sensor network of multimedia messages perceptional functions such as audio frequency, video, image on the basis, its node generally is equipped with CMOS camera, mini microphone and other has the transducer of simple environmental data collection function.They generally are laid in the unattended environment; Multimedia messages (audio frequency and video, image, scalar data etc.) in cooperation ground perception, collection and the processing overlay area; Send to the observer; Realizing environment measuring comprehensively and effectively, independently accomplish the task of appointment, is the responsive distributed ad-hoc wireless net of a kind of energy consumption.
Compare with the traditional WSNs that only has simple environmental data collection function; Multimedia messagess such as the audio frequency that WMSNs ability perception information amount is abundant, video, image; Can realize fine granularity, the precisely environmental monitoring of information; Can be widely used in fields such as battlefield visual control, environmental monitoring, security monitoring, traffic monitoring, Smart Home, health care, have huge using value.
WMSNs organically combines advantages such as advantage such as the self-organizing of WSNs, unattended operation and multimedia technology perceptible medium are abundant; Possess on the one hand the self-organizing, multi-hop route of traditional WSNs, common feature such as resource-constrained; Distribute in energy consumption on the other hand, (Quality of Service, QoS) aspects such as requirement, sensing model have significant personalization features to service quality.
Because need a large amount of multi-medium data of transmission in the WMSNs network, therefore the QoS to network has higher requirement.But the limited reality of node resource in the WMSNs network (bandwidth, equivalent etc.) makes that the realization of its QoS is more difficult.
To the path QoS problem of WMSNs, mainly be at present from ensureing real-time, reliability and three aspects of MULTIPLE PARAMETERS CONSTRAINT of transmission, taking the QoS safeguard.
(1) real-time safeguard
The real-time guarantee can be divided into network resource reservation based on moving speed and Business Stream Differentiated Services.The former requester network situation before the routing comprises whether network is congested, the number, residue energy of node etc. of reservation stream on the path, has only when network can provide real-time to guarantee, just sets up route, realizes end-to-end transmission.The latter is based on classification ground data streams, and different types of data flows (audio frequency, video, scalar) sexual demand according in fact the time is divided into different brackets, correspondingly provides different bandwidth, time delay, shake to guarantee.
(2) reliability safeguard
Event driven service has proposed very high requirement for reliability of data transmission, and the poor stability of Radio Link, so the route reliability of WMSNs is an important directions.Usually utilize the redundancy of node mulitpath to be provided or every hop node is set up Reliability Estimation mechanism to guarantee communication reliability and to realize NLB.
(3) the integrated measure of multi-parameter
The service that WMSNs provides has polytype, and the standard of weighing every type of service QoS also is not quite similar.The integrated measure of multi-parameter is that use is united in the multiple measure of front, to support the multiple parameter request of QoS.
In WMSNs, the node bandwidth resource was just limited originally, if distribute for each Media Stream carries out resource reservation, will exhaust network bandwidth resources very soon, was unfavorable for the business expansion of WMSNs.And the method for the Differentiated Services of Business Stream relates to the specific qos requirement that different business flows, and makes to deal with comparatively complicacy.And the method for multipath can ensure the reliability in path, but As time goes on, and when a link takes place when unreachable, the previous replacement path of finding also might be unreachable.Therefore need after node lost efficacy on the path, initiate route discovery procedure again.
And above these mechanism all are to consider how to ensure for data flow provides QoS in advance, and all do not consider in time to find the path problems that accord with Q oS requires again under the situation that the network node of WMSNs lost efficacy.Therefore WMSNs presses for a kind of mechanism, under the situation that network node lost efficacy, finds the new path of satisfying qos requirement fast, ensures the normal transmission of data in the network.
Summary of the invention
Technical problem: the purpose of this invention is to provide a kind of method for guaranteeing quality of service of wireless multimedia sensor network based on mobile agent; Solve when node in the wireless multimedia sensor network takes place to lose efficacy; Find the alternative route that satisfies service quality fast, ensure the service quality problem of transfer of data.The method that the application of the invention proposes can be found to satisfy the alternative route of service quality fast, thereby ensure data flow under the requirement of satisfying service quality, normal transmission under the prerequisite of wireless multimedia sensor network node resource that practices every conceivable frugality.
Technical scheme: in the method for guaranteeing quality of service of wireless multimedia sensor network based on mobile agent of the present invention; Management node is found to lead to when on the path of purpose sensor node node failure being arranged in network; To generate route mobile agent (Route Mobile Agent at management node; RMA), to the migration of destination node direction forward, its objective is the path of finding that new accord with Q oS requires.
The step of the forward migration of route mobile agent is following:
Step 1: generate the route mobile agent at management node.The current data that reads the route mobile agent flows needed qos parameter, and is stored in the routing information Path that satisfies qos requirement in the management node before, is stored in the memory space of oneself.
Step 2: the route mobile agent reads the sign of present node, judges whether present node is exactly last node among the Path, if then change step 16, otherwise change step 3.
Step 3: the route mobile agent reads Path information, obtains the node of next jumping.And detect this node and whether lost efficacy.If do not lose efficacy, then move to next-hop node, forward step 3 then to.Otherwise, forward step 4 to.
Step 4: the next-hop node in Path lost efficacy.The route mobile agent generates service quality and guarantees that (QoS Mobile Agent QMA), and is provided with a stand-by period T to mobile agent.
Step 5: service quality assurance mobile agent and route mobile agent are mutual, read the sign of the next-hop node of failure node among the Path, and this node identification is identified DID (DestinationIDentifier) as destination node.The qos parameter information of reading data flow in addition, and set a migration number of times threshold values G, and jumping figure hop=0, with these information stores in the memory space of oneself.
Step 6: service quality guarantees that mobile agent compares jumping figure hop and threshold values G, if hop>G then will ownly remove from present node, otherwise forwards step 7. to
Step 7: read the sign and the parameter information of present node, store in the memory space of oneself from last hop node to present node.The sign and the destination node sign of present node are compared,, then forward step 13 to if present node is a destination node.Otherwise, forward step 8 to.
Step 8: service quality guarantees that mobile agent is sought and finds that having the number of the node of neighbouring relations with current sensor node is M (getting rid of a last hop node).
Step 9: service quality guarantees mobile agent, analyzes the link between this M adjacent node and the present node, whether satisfies the requirement of the QoS of its storage, and obtains the individual adjacent node that satisfies the link relation of N (getting rid of a last hop node).If N=0, service quality assurance mobile agent will own be removed from present node.Otherwise forward 10 to.
Step 10: service quality guarantees that mobile agent is N part with self-replication, removes from current sensor node automatically then.
Step 11: newly-generated N service quality guarantees mobile agent, moves to separately respectively on corresponding N the adjacent sensor node.
Step 12: each service quality guarantees mobile agent after migration arrives next node, and hop adds 1 with jumping figure, forwards step 6 to.
Step 13: service quality guarantees that mobile agent successfully finds the path that arrives destination node and satisfy qos requirement, and service quality guarantees mobile agent according to the routing information in the memory space of oneself, the node migration to current route mobile agent place.
Step 14: the route mobile agent is at T in the time; Discovery has service quality to guarantee that mobile agent successfully moves, and is then mutual with it, obtain from the present node to Path between the next-hop node of failure node; Satisfy the path of QoS, and this path is stored in the memory space of oneself.Otherwise forward step 18 to.
Step 15: the migration of the next-hop node of route mobile agent failure node in Path, arrive this node after, change step 2.
Step 16: the route mobile agent arrives the finish node among the Path, according to the routing information in the own memory space, moves to start node.
Step 17: the route mobile agent arrives start node, and is mutual with start node, upgrades the routing information of start node.
Step 18: the route mobile agent does not find the new path that arrives destination node and satisfy qos requirement, starts the discovery in path fully again.
Beneficial effect: the purpose of this invention is to provide a kind ofly, solved wireless multimedia sensor network when occurrence node lost efficacy, the problem that satisfies the QoS transmission of its data flow based on method mobile agent, that ensure wireless multimedia sensor network QoS.The method that the application of the invention proposes when the wireless multimedia sensor network occurrence node lost efficacy again, generates the route mobile agent at management node.This mobile agent will along before occurrence node lost efficacy and move in the path of satisfying QoS, when arriving failure node previous dive node, create a plurality of service quality and guarantee mobile agents.These service quality guarantee that mobile agent will and satisfy in the path of QoS to occurrence node inefficacy before, and the migration of the next-hop node of failure node is sought from failure node previous dive node to the path of satisfying QoS the failure node next-hop node.Service quality guarantees mobile agent after finding the path of walking around failure node and satisfying QoS then, to the previous dive node remigration of failure node, and tells the route mobile agent with this routing information.Then migration forward of route mobile agent then if also find failure node, will be handled according to the method for front, up to arriving destination node.After arriving destination node, the route mobile agent will turn back to start node according to the migration of former road, and will seek the new routing information that satisfies qos requirement that obtains and pass to start node.Start node is information in view of the above, carries out the renewal in path.
Do like this, on the one hand, only original QoS path is repaired, walk around failure node, improved the efficient of path discovery, reduced the resource consumption of network; On the other hand, make full use of the advantage of mobile agent, ensured the QoS of data transmission in network apace.
Bandwidth requirement is low: based on the wireless multimedia sensor network method for ensuring service quality of mobile agent; Use mobile agent to seek the path of satisfying qos requirement; Need be on network round-trip transmission lot of data repeatedly, only need the less relatively single of mobile agent in network of scale to come and go migration.
Energy consumption is low: finding the process in the new path of satisfying qos requirement, only is the reparation of satisfying the qos requirement path to original
Efficient is high: finding the process in the new path of satisfying qos requirement, only is the reparation of satisfying the qos requirement path to original, only need seek at failure node
Support heterogeneous network: wireless multimedia sensor network is a heterogeneous network.Wireless multimedia sensor network method for ensuring service quality based on mobile agent; When occurrence node lost efficacy; Use mobile agent to seek the new new path of satisfying qos requirement, and mobile agent can be supported in associative operations such as migration and processing in the heterogeneous network well.
Adaptability: based on the wireless multimedia sensor network method for ensuring service quality of mobile agent; In the time of can guaranteeing that the wireless multimedia sensor network node takes place to lose efficacy; In time find the new path of satisfying qos requirement, thereby guarantee that data flow is transmitted with qos requirement in the wireless multimedia sensor network.This method also has excellent adaptability to common wireless sensor network, can guarantee the QoS transmission in the common wireless sensor network effectively.
Extensibility is good: based on the wireless multimedia sensor network method for ensuring service quality of mobile agent; Lost efficacy in occurrence node; It is new when satisfying the path of qos requirement to use mobile agent to seek; Service quality guarantees that mobile agent moves with the similar mode that floods, and its scope is controlled in the subrange of failure node, can not take the resource of network in a large number.Therefore, when sharply increase, the rapid expansion of network size take place the interstitial content of wireless multimedia sensor network, still can support and guarantee the QoS of network well.
Description of drawings
Fig. 1 is the wireless multimedia sensor network structure chart
Fig. 2 is based on mobile agent wireless multimedia sensor network method for ensuring service quality overall construction drawing
Fig. 3 is the sketch map in the new path of satisfying qos requirement
Fig. 4 is the migration flow chart of route mobile agent
Fig. 5 is the migration flow chart that service quality guarantees mobile agent
Embodiment
One, architecture
Based on the wireless multimedia sensor network method for ensuring service quality of mobile agent, be when wireless multimedia sensor node breaks down or lost efficacy, satisfy a kind of method in the new path of qos requirement with the quick discovery of less cost again.This method is the basis with the path of satisfying qos requirement of occurrence node inefficacy before; Use mobile agent near failure node, to seek the path of walking around failure node; Thereby to the original path that causes the entire path inefficacy owing to node failure; Repair partly, thereby, find to satisfy the new route of qos requirement fast in time with less cost.This method bandwidth requirement is low, and energy consumption is little, and efficient is high, support heterogeneous network, extensibility is good.Wherein, start node, destination node, route mobile agent, service quality guarantee that mobile agent is the main function components that realizes this method, below just several concrete parts are provided explanation:
Start node: start node is exactly general wireless multimedia sensor node, and it is transmitted it according to the qos requirement of data flow.When start node is found the path of data flow, during the whole piece path failure, it can initiate the process that the QoS path is sought again, just creates the route mobile agent because occur node failure on it.Just it can create the route mobile agent, service quality guarantees the agency.
Destination node: start node also is general wireless multimedia sensor node, but it refers in particular to last node on the path of being set out by start node herein.It is the finish node that start node is found the process of seeking in new QoS path, also is that the migration of route mobile agent arrives node farthest.
Route mobile agent generator: route mobile agent generator is present in each wireless multimedia sensor node, is used for generating the route mobile agent at local node.Be provided with route mobile agent generator in the start node.
Service quality guarantees the mobile agent generator: service quality guarantees that the mobile agent generator is present in each wireless multimedia sensor node, is used for generating service quality at local node and guarantees the mobile agent generator.
The static agency of node: a kind of static agency resides in the node and can not in network, move.Node-agent is present in each node of wireless multimedia sensor network.Node-agent is that route mobile agent, service quality guarantee that mobile agent and intra-node carry out mutual interface.Mobile agent, service quality guarantee the information of mobile agent through the static proxy access node of node, and the routing information that obtains is passed to intra-node through the static agency of node, make things convenient for the renewal of node to routing information.
Route mobile agent: a kind of mobile agent.After the start node discovery is satisfied the path failure of qos requirement by start node to destination node, create by route mobile agent generator at start node.The route mobile agent is preserved the routing information of qos parameter, original QoS of satisfying.And the route mobile agent reaches a node every, just this nodal information is stored in the memory space of oneself.
Service quality guarantees mobile agent: a kind of mobile agent.The route mobile agent arrive original satisfy failure node in the QoS path on during a hop node, guarantee that by service quality the mobile agent generator creates.Service quality guarantees mobile agent, is destination node with the next-hop node of failure node in original QoS path, preserves information such as generating nodal information, migration number of times threshold values, migration number of times.And every reach a node after, with the information stores of this node in the memory space of oneself.
Two, method flow
When start node is found to lead in the path of destination node; Because after node failure occurring and causing entire path to lose efficacy; With the route mobile agent generator that starts this intranodal, generating a starting point is this node, and last node of path is the route mobile agent of destination node.At start node, the route mobile agent generates and is following with the mutual flow process of start node:
(1) route mobile agent generator generates the route mobile agent, this route mobile agent with this node as start node, with last node of inefficacy path as destination node.
(2) the static agency of node in route mobile agent and the start node is mutual, reads the information of start node, and it is stored in the memory space of oneself.
(3) the static agency of node in route mobile agent and the start node is mutual, reads the QoS routing information that lost efficacy before, and it is stored in the memory space of oneself.
(4) the static agency of node in route mobile agent and the start node is mutual, reads the parameter information of qos requirement, and it is stored in the memory space of oneself.
(5) the route mobile agent moves to the destination node direction along inefficacy QoS path.
The route mobile agent is stored in the memory space, and previous QoS path of losing efficacy to the migration of destination node direction, everyly reaches an intermediate node, and the interaction flow between intermediate node and the route mobile agent is following:
(1) the static agency of node of route mobile agent and current arrival intranodal is mutual, reads the information of present node, and judges that whether present node is exactly last node in the QoS path of losing efficacy.If then jump to step (9), otherwise jump to step (2).
(2) the static agency of node of route mobile agent and current arrival intranodal is mutual, reads the information of present node, and stores in the memory space of oneself.
(3) the static agency of node of route mobile agent and current arrival intranodal is mutual; Whether judge the failure node in the inefficacy QoS path, be exactly the next-hop node of present node, if; Then jump to step (4); Otherwise, continue to move to next-hop node, and jump to step (1) along inefficacy QoS path.
(4) migration of route mobile agent arrives in the inefficacy QoS path previous dive node of failure node.Static agency is mutual for the node of route mobile agent and current arrival intranodal, makes the service quality of present node guarantee that service quality of mobile agent generator establishment guarantees mobile agent.This service quality guarantees that the start node of mobile agent is the previous node of failure node, and destination node is the next node of failure node in the QoS path.
(5) newly-generated service quality guarantees mobile agent to the destination node migration of setting, seek the path that accord with Q oS requires after, get back to the node that it is created.
(6) service quality guarantees that mobile agent and route mobile agent are mutual, and the local path of seeking of avoiding failure node and satisfying QoS is passed to the route mobile agent.
(7) the route mobile agent guarantees the routing information (that arrives soon after disregards) that mobile agent provides according to the service quality of first arrival, and the QoS routing information in the memory space is upgraded.
(8) the route mobile agent continues to move to the destination node direction according to the QoS routing information after upgrading.Jump to step (1)
(9) the route mobile agent has arrived destination node, and is mutual with the static agency of node of destination node, upgrades destination node satisfies QoS to start node new routing information.
(10) the route mobile agent returns to the migration of start node direction, and finally turns back to start node along Yuan Lu.
(11) the route mobile agent arrives start node, and is mutual with the static agency of node of start node, with seeking the new path that obtains, upgrades the QoS routing information of start node to destination node.
Service quality guarantees mobile agent in inefficacy QoS path, in the process of failure node next node direction migration, everyly reaches a node, and is following with the interaction flow of this node:
(1) service quality guarantees mobile agent in inefficacy QoS path, on the previous node of failure node, guarantees that by service quality the establishment of mobile agent maker obtains.
(2) service quality guarantees that mobile agent is a start node to create node, is destination node with first normal node behind the failure node in the inefficacy QoS path, and in its memory space the qos requirement parameter of storing path.
(3) service quality guarantees mobile agent setting migration number of times threshold values, and migration number of times record value (initial value is 0).
(4) service quality guarantees that the node-agent of mobile agent and present node is mutual, and the information of present node is saved in the memory space of oneself.
(5) service quality guarantees that mobile agent is mutual with the node-agent of present node, discovery and this node exist neighbouring relations and between link satisfy the adjacent node of qos requirement.
(6) service quality guarantees that mobile agent creates an own clone respectively for each satisfactory node, oneself removes from present node then.
(7) each clone creates the service quality that obtains and guarantees mobile agent, and the adjacent node to correspondence moves respectively.
(8) service quality guarantees mobile agent after arriving new node, will move the number of times record and add 1, and with migration number of times threshold values relatively, if surpass threshold values, then will own node removing from current place.Otherwise, mutual with the node-agent of present node, judge whether present node is destination node, if destination node then jumps to step (9).Otherwise, jump to step (4).
(9) service quality guarantees that the mobile agent migration arrives destination node, will turn back to the node that original service quality assurance mobile agent is created according to former road according to the routing information of seeking in the memory space, i.e. the previous dive node of failure node.
(10) service quality guarantees that the mobile agent migration gets back to the node at route mobile agent place, and to move standby mutual with route, passes to the route mobile agent with seeking the routing information that obtain new avoid failure node and satisfy QoS.So far, service quality guarantees mobile agent completion mission, from node, removes automatically.