Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method and a system for managing a distributed service network, which can solve the problems of a gateway server bottleneck, a large network overhead, and the like in the distributed service network management.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method of distributed service network management, the method comprising:
the network management server creates and issues a mobile network management agent process to one or more peer devices in the distributed service network;
and the mobile network management agent unit of the peer-to-peer equipment executes the network management task according to the mobile network management agent process, reports the task execution result and migrates the mobile network management agent process according to the address information of the next hop peer-to-peer equipment generated in the network management task execution process.
Further, the network management server creates a mobile network management agent process as follows:
the network management server creates a mobile network management agent process according to an instruction input by a user, wherein the created mobile network management agent process comprises a network management task, peer equipment for executing the network management task, an execution strategy of the network management task and a migration rule of the mobile network management agent process.
Further, after the network management server creates the mobile network management agent process, the method further comprises: and the network management server sets the life cycle of the mobile network management agent process.
Further, before the mobile network management agent unit executes the network management task, the method further includes:
the mobile network management agent unit recovers the state of the mobile network management agent process in the running environment of the mobile network management agent process, judges whether the peer-to-peer equipment is the peer-to-peer equipment which executes the network management task in the mobile network management agent process, and if so, executes the network management task; if not, inquiring and acquiring the address information of the next hop peer-to-peer equipment, and migrating the mobile network management agent process to the next hop peer-to-peer equipment.
Here, the reporting task execution result is:
the mobile network management agent unit judges whether the network management task is finished or not, if not, judges whether the intermediate task execution result needs to be reported or not, and if so, reports the intermediate task execution result to the network management server;
and when the network management task is judged to be finished, the mobile network management agent unit reports the final task execution result to the network management server.
A distributed service network management system, including peer devices that form a distributed service network, further comprising: a network management server; wherein,
the network management server is used for creating and transmitting the mobile network management agent process to one or more peer devices in the distributed service network;
the peer device further comprises a mobile network management agent unit, which is used for executing network management tasks according to the received mobile network management agent process, reporting task execution results, and migrating the mobile network management agent process according to the address information of the next hop peer device generated in the network management task execution process.
Further, the network management server is specifically configured to create a mobile network management agent process according to an instruction input by a user, where the created mobile network management agent process includes a network management task, a peer device for executing the network management task, an execution policy of the network management task, and a migration rule of the mobile network management agent process.
Further, the network management server is further configured to set a lifetime of the mobile network management agent process.
Further, the mobile network management agent unit further comprises: the system comprises a running environment module, a network management function execution module, a next hop generation module, a rule and policy module, a migration execution module and a network interface module; wherein,
the running environment module is used for recovering the state of the mobile network management agent process in the running environment of the mobile agent process;
the network management function executing module is used for judging whether the peer-to-peer equipment is the peer-to-peer equipment executing the network management task in the mobile network management agent process, and if not, triggering the next hop generating module;
the next hop generation module is used for inquiring and acquiring the address information of the next hop peer-to-peer equipment migrated by the mobile network management agent process according to the migration rule of the mobile network management agent process and the execution strategy of the network management task in the rule and strategy module;
and the migration execution module is used for migrating the mobile network management agent process to the peer equipment corresponding to the next hop of peer equipment address information through a network interface module.
Here, the network management function execution module is further configured to determine whether the current network management task is finished, and if not, determine whether to report an intermediate task execution result according to a rule and an execution policy of the network management task in the policy module; if so, reporting the intermediate task execution result to a network management server through the network interface module; and when the network management task is judged to be finished, reporting the final task execution result to a network management server through a network interface module.
The invention creates and issues the mobile network management agent process through the network management server, and migrates the mobile network management agent process in the network management task execution process, thereby avoiding the bottleneck problem of the network management server caused by the interaction between the network management server and a large number of managed devices and the task issued by the network management server and the managed devices, and simultaneously reducing the network burden and other problems caused by the network management interaction.
Detailed Description
A Mobile Agent (Mobile Agent) technology belongs to the field of artificial intelligence. Mobility agents are occurrences where a surrogate or other program performs some task, which can autonomously move from one host to another in the network system in charge, the program being able to choose when and where to move; on move, the program can suspend its execution as required, then move to an earlier place in the network to begin or continue its execution, and finally return results and messages. The mobile agent has the characteristics of Mobility (Mobility), Autonomy (Autonomy), sociality (Social Ability), Intelligence (Intelligence) and the like.
At present, in the service management on the distributed self-organizing network such as cloud computing and P2P, higher and higher requirements are put forward on the service network management by factors such as network topology variability and elasticity, and the application of the mobile agent technology to the service management on the distributed self-organizing network such as cloud computing and P2P can be considered. The mobile agent has the characteristics of mobility, autonomy, sociality, intelligence and the like, so that the network management server can be prevented from issuing tasks to a large number of managed devices at the same time.
The basic idea of the invention is as follows: the network management server creates and issues a mobile network management agent process to one or more peer devices in the distributed service network; and the mobile network management agent unit of the peer-to-peer equipment executes the network management task according to the mobile network management agent process, reports the task execution result and migrates the mobile network management agent process according to the address information of the next hop peer-to-peer equipment generated in the network management task execution process.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings by way of examples.
Fig. 2 shows an implementation flow of the distributed service management method of the present invention, and as shown in fig. 2, the method includes the following steps:
step 201, a network management server creates and issues a mobile network management agent process to one or more peer devices;
in this step, the network management server creates a mobile network management agent process according to the instruction input by the user, wherein the created mobile network management agent process comprises information such as a network management task, peer-to-peer equipment for executing the network management task, an execution strategy of the network management task, and a migration rule of the mobile network management agent process; the execution strategy of the network management task comprises whether to report an intermediate task execution result of the network management task to a network management server or not, whether to execute migration of a mobile network management agent process or not and the like; the migration rule of the mobile network management agent process comprises a generation rule and a process migration rule of the address information of the next hop peer-to-peer equipment of the mobile network management agent process (for example, whether the mobile network management agent process is recovered to execute or is re-executed on the next hop peer-to-peer equipment, and the like);
the network management server can issue the mobile network management agent process to a plurality of peer-to-peer devices in the distributed service network, which is determined according to the nature of the network management task to be executed, for example, one network management task may need to monitor a certain user according to the user requirement, when the access point of the user can only be determined as the peer-to-peer device of a certain area, the network management server can issue the mobile network management agent process to at least one peer-to-peer device of the area, when the certain mobile network management agent process is triggered, the user monitoring task is started to be executed; or, the network management server may also issue the mobile network management agent process to a designated peer device, and then issue the mobile network management agent process to other peer devices through the designated peer device, for example, when the access point of the user can be determined as a certain peer device, the network management server issues the mobile network management agent process to the access peer device a of the user through the mobile network management agent process, and then issues the mobile network management agent process to the peer device B through the access peer device a along with the service path and the like of the user, specifically, the peer device a may route the mobile network management agent process to the peer device B through its own service unit network management interface.
The step may further include that the network management server sets a lifetime of the mobile network management agent process after the created mobile network management agent process, for example, by setting a timer and specifying that when the timer is triggered, if the mobile network management agent process is not triggered, the mobile network management agent process is automatically deleted.
Step 202, a mobile network management agent unit of the peer-to-peer device executes a network management task, reports a task execution result, and migrates the mobile network management agent process according to the address information of the next hop peer-to-peer device generated in the network management task execution process;
specifically, a mobile network management agent process is triggered on the peer device, a mobile network management agent unit executes a network management task, reports an execution result, and dynamically generates next-hop peer device address information according to an execution strategy of the network management task created by a network management server and a migration rule of the mobile network management agent process in the network management task execution process so as to realize the migration of the mobile network management agent process;
when the network management task execution strategy specifies that the intermediate task execution result needs to be reported, the mobile network management agent unit reports the intermediate task execution result to the network management server when the network management task is executed on the intermediate peer-to-peer equipment; otherwise, the mobile network management agent unit reports the final task execution result to the network management server after the network management task is completely executed;
in addition, after receiving the task execution result reported by the mobile network management agent unit, the network management server summarizes the task execution result and presents the task execution result to the user or logs in the network management log.
Fig. 3 shows an implementation process for executing network management tasks in the distributed service management method of the present invention, and as shown in fig. 3, the implementation process includes the following steps:
step 301, peer-to-peer equipment receives a mobile network management agent process;
here, when the peer device receives the mobile network management agent process, the mobile network management agent unit of the peer device recovers the state of the mobile network management agent process in the running environment of the mobile network management agent process; in this step, the mobile network management agent process may be from a network management server or from a previous hop peer device.
Step 302, the mobile network management agent unit judges whether the local peer device is the peer device executing the network management task, if yes, step 303 is executed, otherwise, step 308 is executed;
the step can further improve the accuracy of the mobile network management agent unit to execute the network management task, and prevent the possible situations of error migration and the like of the mobile network management agent process; specifically, the mobile network management agent unit judges whether the local peer device is the peer device executing the network management task by comparing whether the local peer device information is consistent with the peer device information executing the network management task.
Step 303, the mobile network management agent unit executes the required network management task and saves the task execution result;
generally, the mobile network management proxy unit performs the execution of the network management task by calling a series of service unit network management interfaces provided by the service unit of the peer device.
Step 304, the mobile network management agent unit judges whether the network management task is finished, if so, step 305 is executed; otherwise, go to step 306;
here, the mobile network management agent unit determines whether the current network management task is finished by checking a migration rule of the mobile network management agent process created by the network management server, and if the migration rule of the mobile network management agent process specifies that the current network management task does not need to be migrated, the current network management task is finished, and specifically, the current network management task does not need to be migrated by querying a service module network management interface of a service module of the local peer device, so as to finish the current network management task.
Step 305, after the network management task is finished, the mobile network management agent unit reports the final task execution result to the network management server;
in addition, in this step, the mobile network management agent unit may further delete the mobile network management agent process.
Step 306, the mobile network management agent unit judges whether to report the intermediate task execution result according to the execution strategy of the network management task, if so, step 307 is executed, otherwise, step 308 is executed;
step 307, the mobile network management agent unit reports the intermediate task execution result to the network management server, namely the execution result of the network management task on the local peer device;
step 308, the mobile network management agent unit inquires the address information of the next hop peer-to-peer device;
specifically, in this step, the mobile network management agent unit may query, through a local service module network management interface of the peer device itself, address information of a next hop peer device to which the mobile network management agent process migrates, where the address information of the next hop peer device is obtained by dynamically generating, by the mobile network management agent process, in a network management task execution process according to an execution policy of the network management task and a migration rule of the mobile network management agent process.
Step 309, the mobile network management agent unit migrates the mobile network management agent process to the peer device of the next hop.
Fig. 4 shows an implementation flow of a specific embodiment of the distributed service management method of the present invention, as shown in fig. 4, in this embodiment, a peer device further includes a mobile network management proxy unit, a service unit, and a distributed network layer unit, and in this embodiment, the distributed network layer unit of the peer device is specifically a P2P functional unit implemented by using a P2P technology; the embodiment comprises the following steps:
step 401 to step 402, the network management server receives an instruction input by a user, creates a mobile network management agent process, and sends the mobile network management agent process to corresponding peer equipment;
specifically, in this step, the network management server creates a mobile network management agent process according to an instruction input by a user, where the created mobile network management agent process includes information such as a network management task, peer devices for executing the network management task, an execution policy of the network management task, and a migration rule of the mobile network management agent process; the execution strategy of the network management task can specifically specify how to report the execution result of the network management task in the process of executing the network management task by the mobile network management agent process;
the network management server can issue the mobile network management agent process to a plurality of peer-to-peer devices in the distributed service network, which is determined according to the nature of the network management task to be executed, for example, one network management task may need to monitor a certain user according to the user requirement, when the access point of the user can only be determined as the peer-to-peer device of a certain area, the network management server can issue the mobile network management agent process to at least one peer-to-peer device of the area, when the certain mobile network management agent process is triggered, the user monitoring task is started to be executed; or, the network management server may also issue the mobile network management agent process to a designated peer device, and then issue the mobile network management agent process to other peer devices through the designated peer device, for example, when the access point of the user can be determined as a certain peer device, the network management server issues the mobile network management agent process to the access peer device a of the user through the mobile network management agent process, and then issues the mobile network management agent process to the peer device B through the access peer device a along with the service path and the like of the user, specifically, the peer device a may route the mobile network management agent process to the peer device B through its own service unit network management interface.
Step 403, the peer device 1 locally recovers the mobile network management agent process state, and the mobile network management agent unit judges that the obtained peer device 1 is a peer device executing the network management task and executes the network management task;
step 404, the mobile network management agent unit judges that the network management task is not finished;
step 405, the mobile network management agent unit further determines whether the network management task needs to report the intermediate task execution result; if so, go to step 406, otherwise, go to step 407;
step 406, the mobile network management agent unit reports the intermediate task execution result, namely the execution result of the network management task on the peer device 1, to the network management server;
step 407, the mobile network management agent unit inquires the address information of the next hop peer-to-peer device migrated by the mobile network management agent process of the service unit network management interface provided by the local service unit;
step 408, the service unit further queries and obtains address information of the next hop peer device through the P2P functional unit;
step 409, the service unit returns the address information of the next hop peer-to-peer device to the mobile network management agent unit;
step 410, the mobile network management agent unit migrates the mobile network management agent process to the peer device of the next hop according to the address information of the peer device of the next hop, in this embodiment, the peer device of the next hop is represented by the peer device 2;
step 411, the peer device 2 locally recovers the mobile network management agent process state, and the mobile network management agent unit judges that the obtained peer device 2 is a peer device executing the network management task and executes the network management task;
step 412, the mobile network management agent unit judges that the network management task is finished;
step 413, the mobile network management agent unit reports the final execution result of the network management task to the network management server, and the network management server summarizes the intermediate task execution result and the final task execution result reported by the mobile network management agent unit, and presents the result to the user or logs in the network management log.
Fig. 5 shows the architecture of the distributed traffic management system of the present invention, which, as shown in fig. 5, comprises: a network management server and a plurality of peer devices forming a distributed service network; specifically, peer devices are organized by distributed algorithms, such as Chord, constellation, etc., that can indiscriminately perform one or more traffic handling functions; wherein,
the network management server is used for creating and transmitting the mobile network management agent process to one or more peer devices in the distributed service network;
the peer device further comprises a mobile network management agent unit, which is used for executing network management tasks according to the received mobile network management agent process, reporting task execution results, and migrating the mobile network management agent process according to the address information of the next hop peer device generated in the network management task execution process.
Further, the network management server is specifically configured to create a mobile network management agent process according to an instruction input by a user, where the created mobile network management agent process includes a network management task, a peer device for executing the network management task, an execution policy of the network management task, and a migration rule of the mobile network management agent process.
Further, the network management server is further configured to set a lifetime of the mobile network management agent process.
The distributed service network management system will be further explained with reference to the structure of the peer device in the system shown in fig. 5 and the structure of the mobile network management proxy unit in the peer device shown in fig. 7, which are shown in fig. 6.
As shown in fig. 6, the peer device further includes: a mobile network management agent unit 61, a service unit network management interface 62, a service unit 63, and a distributed network layer unit 64; wherein,
the mobile network management agent unit 61 is specifically configured to receive a mobile network management agent process, maintain an operating environment of the mobile network management agent process, recover or maintain a state of the mobile network management agent process, execute a network management task, and report a task execution result according to an execution policy of the network management task in the mobile network management agent process;
a service unit network management interface 62, which is provided for one or more interfaces called by the mobile network management agent unit 61, so that the mobile network management agent unit 61 completes the execution of network management task according to the calling corresponding interface; generally, the service unit network management interface 62 is defined and implemented by a network management system and a service unit 63, for example, when the mobile network management agent unit 61 needs to count Session numbers of Session control Protocol (SIP) service users of a certain peer device, the SIP service unit network management interface needs to be called to obtain a statistical value of the number of users;
a service unit 63, configured to be responsible for specific service processing of the peer device, and provide specific implementation of the service unit network management interface 62, including an inquiry interface for providing address information of the next hop peer device of the route to the mobile network management agent unit 61; typically, one or more types of service units 63 may coexist in a peer device depending on the functionality of the distributed service network.
The distributed network layer unit 64 is responsible for maintaining a distributed service network, providing functions of routing, storage, positioning and the like, forms peer devices into a logically interconnected overlay network by running related distributed algorithms and protocols, such as Chord, constellation and the like, and can deploy different service functions, such as services of VoIP, streaming media, content distribution and the like, on the distributed network layer unit 64.
Referring to fig. 7, the mobile network management agent unit 61 further includes: a running environment module 611, a network management function execution module 612, a next hop generation module 613, a rule and policy module 614, a migration execution module 615, and a network interface module 616; wherein,
the running environment module 611 is configured to recover the state of the mobile network management agent process in the mobile agent process running environment; the mobile network management agent process is responsible for providing a running environment required by the mobile network management agent process and starting or recovering the mobile network management agent process;
the network management function executing module 612 is configured to execute a network management task, and determine whether to report a task execution result to the network management server according to a rule and a task result reporting policy in the network management task execution policy in the policy module 614; specifically, it is determined whether the peer device is a peer device executing the network management task in the mobile network management agent process, if not, the next hop generation module 613 is triggered; if yes, calling a relevant interface provided by the service unit network management interface 62 to execute a network management task;
the next hop generation module 613 is configured to invoke a routing query interface provided by the service unit network management interface 62 according to the migration rule of the mobile network management agent process and the execution policy of the network management task in the rule and policy module 614, and query and acquire address information of the next hop peer device migrated by the mobile network management agent process;
a migration executing module 615, configured to migrate the mobile network management agent process to the peer device corresponding to the next hop peer device address information through a network interface module 616; and the system is also used for taking charge of the suspension of the mobile network management agent process and the storage of related state data.
The network management function executing module 612 is further configured to determine whether the network management task is finished, and if not, determine whether to report an intermediate task execution result according to a rule and an execution policy of the network management task in the policy module 614; if necessary, the intermediate task execution result is reported to the network management server through the network interface module 616; if not, triggering a next hop generation module 613 to inquire and acquire the address information of the next hop peer device migrated by the mobile network management agent process;
the migration executing module 615 is further configured to migrate the mobile network management agent process to the peer device corresponding to the next-hop peer device address information through the network interface module 616.
The network management function executing module 612 is further configured to report a final task executing result to the network management server through the network interface module 616 when the network management task is determined to be finished.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.