Background technology
The general fit calculation pattern is embedded into equipment in the various environment of people's life, make communication service and other various calculating focusing on people and message reference service all become possibility at any time and any place, various computing equipments provides the service of hommization more for the user by global network.General calculation entironment has characteristics such as mobility, plant capacity are limited, network service narrow bandwidth, autonomous service.
In general calculation entironment, data handling procedure mainly comprises data acquisition, transfer of data, three aspects of data processing.How to reduce data, the balancing network energy consumption of transmission, make the whole network energy consumption more even, the key that will become and accelerate data processing speed, prolongs network life cycle.
Based on the data processing control method under the general calculation entironment of mobile agent, in network data transmission, the whole network is carried out grid to be divided, in grid, utilize the mechanism of sub-clustering and take effectively to transmit data path, can reduce needs data quantity transmitted, effectively solve network energy and consume uneven problem, improve network data processing speed, prolong network life cycle.
Mobile proxy technology is just being brought into play more and more important effect calculating in based on network distribution in this computer nowadays mainstream technology field.On the one hand, mobile proxy technology provides effective way for solving new Distributed Application problem; On the other hand, mobile proxy technology provides rational conceptual model for the characteristics of studying distributed computing system all-sidedly and accurately.Mobile proxy technology be solve complicated, dynamically, a kind of brand-new calculating means used of distributed intelligence, be essentially different with traditional network calculations pattern.Mobile agent has characteristics such as mobility, independence, opening, adaptivity, concurrency, and mobile proxy technology is applied under the general calculation entironment, and the various resources and the information of management and use system are effectively carried out more intelligentized data processing.
The most basic thought of general fit calculation is that people-oriented, and needing to behave provides autonomous service.The equipment that general calculation entironment relates to is ever-changing, distributes on the space and disperses, and these equipment also may move on physical space.Therefore, the data type that needs to handle varies, and data volume also may be very big.Therefore, need more intelligent means minimizing network data processing amount, improve the network response speed, for the user provides more intelligent transparent service.
Traditional device data visit and processing mode mainly contain Client (C/S model) and Web browser/server mode (B/S pattern).C/S model is a client and the server pattern that directly links to each other, and needs special client and human intervention, a little less than the distributed function, can not reflect the up-to-date information of data source fast; The B/S pattern is the browser/server pattern, must use browser to connect network and could use the B/S terminal, can not satisfy the needs of general calculation entironment transparent service whenever and wherever possible.Therefore, need a kind of data processing method that is more suitable for general calculation entironment of research.
Summary of the invention
Technical problem: the purpose of this invention is to provide a kind of general computation data processing control method based on mobile agent, reduce network data transmission and treating capacity, improve the robustness of network, prolong network life cycle, improve the network response speed, for the user provides effective transparent service.
Technical scheme: the purpose of this invention is to provide the situation that a kind of general calculation entironment is a wireless sensor network.In this case, wireless network data sensing node relative position after deployment no longer changes, and can know the geographical position of oneself, and each node all has ID in the unique net, all nodes have identical primary power, the dump energy information that each node can both perception oneself.In the network data processing process, be uniform grid according to area dividing at first with network, each grid is one bunch, and bunch interior nodes own finished the energy that once transmits data and consumed as bunch head and estimated that each node is according to estimated value and the independently elected bunch head of self-energy supposing; After bunch capitiform became, other nodes were established to the shortest path of bunch head according to shortest path first in bunch, and forming with bunch head is the shortest path tree of root node, sets up the clustering architecture of each bunch; In the network data processing process, the user is submitted to the base station with data processing request, and the base station produces the data processing mobile agent, distributes the data processing mobile agent to bunch head of each bunch afterwards; After bunch head of each bunch is received the data processing mobile agent, the data processing mobile agent preserve according to self to bunch in the shortest path of other nodes move all nodes in arrival bunch.The data processing mobile agent carries out data acquisition, transmission and the processing in the network, thereby realizes the intelligent data process control method under the general calculation entironment.
One, architecture
In the transfer of data and processing controls scheme based on mobile agent, network architecture can be divided into three parts: base station server, grid, bunch.
Provide the explanation of several concrete parts below:
Base station server: mainly by the physical equipment in the general calculation entironment with provide the application software of service to form.
Base station server is responsible for receiving from the user's data inquiry or is handled request, and is in charge of data source, assigns and the management mobile agent, and the receiving terminal is inserted.Base station server mainly comprises parts such as management system, data processing and mobile agent platform.
Management system is in charge of the access of data source and terminal equipment, communication network, grid system;
Data processing section is responsible for the data of the leader cluster node that receives are carried out final data fusion and processing;
Mobile agent platform provides the context of mobile agent work, is responsible for generation, assignment and the destruction task of mobile agent, and user's inquiry or data processing request is converted into the mobile agent internal language;
Grid: the general calculation entironment network area is divided into uniform grid cell, is that unit sets up bunch with each grid cell.Undertaken alternately by each bunch head and base station server.
Bunch: the structure that at first will set up bunch.In each grid cell, set up bunch head, form a clustering architecture.After bunch capitiform becomes, other nodes then be bunch in ordinary node.All nodes can carry out alternately in bunch.
Two, method flow
Data processing and control scheme based on mobile agent of the present invention, based on mobile proxy technology, adopt the method for dividing grid and sub-clustering, can greatly reduce the energy that network data transmission amount and data processing consume, be easy to expansion, have features such as mobility, intelligent and independence, save network energy, for the data processing of carrying out more efficiently under the general calculation entironment provides new thinking.Concrete realization flow is as described below:
1.) at first the general calculation entironment network is divided into even cell,
2.) in each uniform grid cell lattice, the structure of setting up bunch;
2.1) node in each grid cell lattice, at first estimation own as bunch the time finish the communication energy wastage in bulk or weight E of a secondary data
1, again according to self dump energy E
2, establishing and sending amount of information is k bit, E
ElecExpression transmits and receives the power consumption of every transmission of circuit and the bit of recruiting unit, and unit is joule/bit, and a represents emission amplifier with the every bit unit of transfer square metre energy that is consumed, and unit is J/ (bitm
2), N is neighbours' number of leader cluster node, d is bunch distance of head distance child node farthest, then an E
2For:
E
2=2×E
elec×k+2a×k×d
2+N×E
elec×k;
With E
2/ E
1Value minimum as a bunch selection principle, form bunch head, other nodes and the base station of bunch head in the cell of place sends broadcast, message content comprises the information such as node number of bunch head;
2.2) after bunch capitiform became, other nodes in each cell were then as ordinary node, ordinary node is with the information such as node number of the form notice bunch head oneself that sends broadcast;
2.3) after bunch head receives the information of each node, be root with bunch head, set up the shortest path tree that comprises all nodes in the cell, make that each internodal transmission range is the shortest;
3. after) message of bunch head is received in the base station, the information such as node number of bunch head are registered;
3.1) user sends data processing request to the base station;
3.2) base station handles request with user data and be converted into the mobile agent internal language, distribute data retrieval and handle mobile agent to bunch head of registered data source by mobile agent platform;
4.) receive data retrieval and handle bunch head of mobile agent, to bunch in ordinary node distribute data retrieval and handle mobile agent.Data retrieval and processing mobile agent duplicate and move according to the shortest path tree structure, finally arrive all the data perception device nodes in this bunch;
4.1) move to the data retrieval of bunch interior nodes and handle mobile agent and the local information management system carries out alternately, retrieve and deal with data, and data processed result is sent to leader cluster node;
4.2) leader cluster node carries out data fusion by data processing module, and the result is sent to the base station, at set intervals or each take turns after data processing finishes, produce a new round bunch head;
5.) base station turns back to user terminal with data processed result;
6.) afterwards, the data processing mobile agent will reside in the data perception device node, until cancelling.
Beneficial effect: of the present invention based in the data processing and control scheme under the general calculation entironment of mobile agent, adopt the mechanism of grid, sub-clustering and utilize mobile agent to carry out transfer of data and processing, use the characteristics such as intelligent, independence of mobile agent, not only can reduce network data processing amount and amount of calculation, greatly alleviated general calculation entironment network data processing pressure, it is intelligent to make that also the general calculation entironment data handling procedure has more.Specifically, method of the present invention has following beneficial effect:
(1) of the present invention based on the data processing and control scheme under the general calculation entironment of mobile agent in, utilize grid that wireless sensor network is divided, in grid cell, adopt the method for sub-clustering, make that the distribution of bunch head is more even, network energy consumption is more even, has prolonged network life cycle;
(2) bunch in, setting up with bunch head is the shortest path tree type set of node structure of root, has reduced data quantity transmitted in the network data transmission process, has alleviated network data transmission pressure;
(3) utilize mobile agent to carry out transfer of data.Because mobile agent has characteristics such as intelligent, independence, communicates with form of message between the mobile agent, makes to have more flexibility and intelligent between the equipment alternately.
(4) in data handling procedure, can adopt different mobile agents to handle.Because the different mobile agent division of labor are clear and definite, function singleness, task is clear and definite, conveniently adds the mobile agent of other functions, meets the thought of through engineering approaches software development.
(5) data handling utility all is separate, be independent of each other, and each data handling procedure can adopt the diverse ways strategy separately, carries out algorithm optimization etc., has the independent property of height.
Embodiment
For convenience of description, suppose that following data handling utility is arranged.
Make up a general calculation entironment, this environment arranged by wireless sensor network, and is uniform grid cell with area dividing.
Utilization is as follows based on the data processing method of the transfer of data of mobile agent and processing controls scheme:
Step 1: when initial, the identical E of each node energy of wireless sensor network
1, in each grid cell, finish the communication energy wastage in bulk or weight E of a data transfer when each node is estimated it as leader cluster node
2, promptly each leader cluster node will receive from the base station and once prepare the transmission notification of information, is transmitted to child node then and once (is provided with C child node), and this moment is be as the criterion from its distance child node information of receiving farthest (establishing maximum distance is d); Anti-process be the information with all child nodes collect carry out data fusion after, hand to base-station node again.Therefore, a whole process bunch hair send information 2 times, receives information C+1 time.If sending amount of information is k bit, and with maximum quantity counting child node, i.e. C=N-1 (N is neighbours' number of leader cluster node) in addition, then total communication energy consumption of leader cluster node is:
E
2=2×E
elec×k+2a×k×d
2+N×E
elec×k;
Wherein, E
ElecExpression transmits and receives the power consumption of every transmission of circuit and the bit of recruiting unit, and unit is joule/bit (J/bit), and a represents emission amplifier with the every bit unit of transfer square metre energy that is consumed, and unit is J/ (bitm
2);
A bunch selection principle is: (1) considers E
2/ E
1Value; (2) at E
2/ E
1Under the situation about equating, the node number smaller is preferential;
After producing bunch head, bunch head other node broadcasts in base station and grid are elected as the message of bunch head, and the information such as node number of other nodes transmissions oneself are to a bunch head in bunch, and report adds this bunch;
Afterwards, be root node with the leader cluster node, set up the tree type node cluster that comprises other all nodes in the grid cell; Between each node,, determine neighbor node numbering and internodal distance by the mutual photos and sending messages between neighbor node; Each node is preserved the numbering of neighbor node and the information such as distance that arrive each neighbor node, set up shortest path tree by internodal distance and according to the Dijskra algorithm at last, this shortest path tree is root with the leader cluster node, and comprise every other node in the grid cell, make that each internodal transmission range is the shortest;
Step 2: the message of each bunch head is received in the base station, and the information such as node number of each bunch head are registered;
Step 3: the user utilizes mobile device to send data query or handle request to the base station, after the base station receives this request, distributes the data processing mobile agent to each leader cluster node;
Step 4: after a bunch head was received the data processing mobile agent, mobile agent duplicated, and moved all the data perception nodes in arriving grid cell afterwards according to the structure of shortest path tree;
Step 5: arrive the data processing mobile agent meeting autonomous operation of data perception intranodal, carry out carrying out data acquisition alternately with the local information management system.Mobile agent in the different nodes is undertaken alternately by mutual transmission message, and the return data result is to leader cluster node;
Step 6: after leader cluster node is received the data processed result that bunch interior nodes sends over, carry out data fusion by data processing module, and the result after the data fusion is sent to the base station, at set intervals or each take turns after data processing finishes, produce a new round bunch head;
Step 7: data processing is carried out after receiving the next data processed result of each bunch hair again in the base station, at last data processed result is turned back to user terminal;
Step 8: afterwards, the data processing mobile agent resides in the data perception equipment, in case retrieve the information that satisfies condition, will carry out data processing and the data after handling are sent to bunch head in this bunch.Bunch head carries out sending the result to base station after corresponding data handles.During this time, base station server can be according to new user's request, and the search condition of change retrieval mobile agent is until cancelling.