CN106131106B - The network-building method and device of a kind of thin cloud component-based, thin cloud - Google Patents
The network-building method and device of a kind of thin cloud component-based, thin cloud Download PDFInfo
- Publication number
- CN106131106B CN106131106B CN201610399012.5A CN201610399012A CN106131106B CN 106131106 B CN106131106 B CN 106131106B CN 201610399012 A CN201610399012 A CN 201610399012A CN 106131106 B CN106131106 B CN 106131106B
- Authority
- CN
- China
- Prior art keywords
- node
- micro cloud
- component
- micro
- cloud
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 84
- 241000854291 Dianthus carthusianorum Species 0.000 claims abstract description 201
- 230000006870 function Effects 0.000 claims description 243
- 230000006855 networking Effects 0.000 claims description 34
- 238000005304 joining Methods 0.000 claims description 29
- 238000005457 optimization Methods 0.000 claims description 23
- 238000012544 monitoring process Methods 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 15
- 230000003993 interaction Effects 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 12
- 238000005315 distribution function Methods 0.000 claims description 6
- 238000003860 storage Methods 0.000 claims description 4
- 230000004913 activation Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 34
- 238000004891 communication Methods 0.000 description 24
- 238000012790 confirmation Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 6
- 230000008901 benefit Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000009826 distribution Methods 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 101000912561 Bos taurus Fibrinogen gamma-B chain Proteins 0.000 description 1
- 230000003213 activating effect Effects 0.000 description 1
- 230000000712 assembly Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000006378 damage Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1059—Inter-group management mechanisms, e.g. splitting, merging or interconnection of groups
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the invention discloses a kind of thin clouds component-based, the network-building method and device of thin cloud, the thin cloud includes a thin cloud leader cluster node and multiple general nodes, thin cloud leader cluster node and general node include functional module relevant to mobile cloud computing system: thin cloud cluster head service module function and general node serve functional module, and the general node serve functional module of thin cloud leader cluster node and general node is in state of activation, the thin cloud cluster head service module function of thin cloud leader cluster node is active, the thin cloud cluster head service module function of general node is in unactivated state;The described method includes: any one node in mobile system for cloud computing is as one using itself as the target thin cloud of thin cloud leader cluster node, and it is interacted with first node, when the total capacity of first node is less than the total capacity of the target thin cloud, which is added the target thin cloud as the general node in the target thin cloud.The load of thin cloud can be reduced using present example.
Description
Technical Field
The invention relates to the technical field of mobile cloud computing, in particular to a component-based micro-cloud and micro-cloud networking method and device.
Background
The number of intelligent Mobile devices is greatly increased and the performances of the intelligent Mobile devices such as the Processing capability of a Central Processing Unit (CPU), the network connection capability, and the sensing capability are improved, so that people can use more Mobile devices to access a network and obtain services, and the MCC (Mobile Cloud Computing) becomes a mainstream Mobile application solution. However, limitations in the computing power, battery life, etc. of mobile devices make it difficult for the mobile devices to meet the computing needs of some compute-intensive applications. Therefore, a solution scheme that a mobile device unloads a task with higher computational complexity to a remote cloud data center and returns a computation result to the mobile device is proposed; however, the cloud data center is usually far away from the mobile device, and needs to be connected through a high-latency wide area network, so that the mobile device cannot quickly obtain a required computing result, and therefore, a solution based on cloud data center offloading is difficult to meet the requirements of real-time applications.
In order to solve the problem of real-time computing efficiency of mobile cloud computing, the technical personnel in the field propose the concept of micro cloud, which refers to trusted computers which are located near mobile users and rich in computing resources. The mobile device may uninstall its own applications onto the virtual machine by instantiating a user virtual machine in the cloudlet. While micro-clouds solve the latency problem in mobile cloud computing, the following challenges still exist with micro-cloud based mobile cloud computing solutions: firstly, each mobile device generally adopts a greedy mechanism to unload computing tasks to a micro cloud adjacent to the mobile device, and the unloading of a large number of tasks causes a high load of the micro cloud itself, so that the overall optimization of the whole mobile cloud computing network is not achieved; secondly, the micro cloud unloading scheme based on the virtual machine enables the load of the micro cloud to be large due to large unloading granularity.
Disclosure of Invention
The embodiment of the invention aims to provide a micro cloud based on components, a micro cloud networking method and a device, and the load of the micro cloud is reduced by adopting a dynamic micro cloud networking method.
In a first aspect, to achieve the above object, an embodiment of the present invention discloses a component-based cloudlet, including:
the system comprises a micro cloud cluster head node and a plurality of general nodes, wherein the nodes are communicated with each other, the micro cloud cluster head node and the general nodes comprise two functional modules related to a mobile cloud computing system, the functional modules are respectively a micro cloud cluster head service functional module and a general node service functional module, the general node service functional modules of the micro cloud cluster head node and the general node are in an activated state, the micro cloud cluster head service functional module of the micro cloud cluster head node is in an activated state, and the micro cloud cluster head service functional module of the general node is in an inactivated state;
the general node service function module comprises: a node agent function sub-module, an equipment monitoring function sub-module and an assembly management function sub-module, wherein,
the node agent functional submodule is used for controlling the interaction of information and the interaction of data information;
the device monitoring function sub-module is used for monitoring the current resource state of the node;
the component management function submodule is used for managing all application program components of the node per se and call relations among the application program components and comprises a component registry, wherein the component registry is used for storing call information of the application program components of the node per se, and the call information comprises the call relations, parameters, return values and estimated completion time;
the micro cloud cluster head service function module comprises a node management function sub-module, an assembly registration function sub-module, a decision function sub-module and an allocation function sub-module, wherein,
the node management function submodule is used for managing addition and removal of a common node and combination of two micro clouds; storing the equipment information of all nodes and the current resource state information;
the component registration function sub-module is used for storing application program component calling information of all nodes, wherein the calling information comprises calling relations, parameters, return values and estimated completion time;
the decision function submodule is used for determining an optimal component deployment result according to the current resource state information stored by the node management function submodule;
and the distribution function submodule is used for distributing the application program components according to the optimal component deployment result determined by the decision function submodule.
In a second aspect, to achieve the above object, an embodiment of the present invention further discloses a micro cloud networking method, which is applied to a mobile cloud computing system, where the mobile cloud computing system includes at least two nodes, each node includes two function modules related to the mobile cloud computing system, and each function module is a micro cloud cluster head service function module and a general node service function module, and both the micro cloud cluster head service function module and the general node service function module are in an activated state; the method comprises the following steps:
any node in the at least two nodes is determined as a micro cloud cluster head node of the target micro cloud;
the micro cloud cluster head node broadcasts a broadcast discovery packet for discovering other nodes;
receiving a micro cloud capability query request and first information sent by a first node, wherein the first node is a node that receives the broadcast discovery packet, and the first information includes: capability information, current resource state information and available component service information of the first node;
sending second information to the first node, the second information comprising: the capability information of the target micro cloud, the current resource state information and the available component service information;
judging whether the total capacity of the target micro-cloud is not less than the capacity of the first node;
if yes, under the conditions that a joining request of the first node is received and the first node is allowed to join the target micro cloud, the first node is joined into the target micro cloud, and the operation step of broadcasting a broadcast discovery packet for discovering other nodes is continuously executed; the current micro cloud cluster head service function module of the first node is in an inactivated state;
if not, sending a joining request to the first node; under the condition that the joining permission information sent by the first node is received, deactivating a micro cloud cluster head service function module of a micro cloud cluster head node of the target micro cloud; adding the nodes included by the target micro cloud into the first node to generate a new micro cloud; and the micro cloud cluster head node of the new micro cloud is the first node, and the operation step of broadcasting the broadcast discovery packet for discovering other nodes is continuously executed.
Optionally, the method further includes:
receiving third information sent by the first micro cloud, wherein the third information comprises: capability information of the first cloudlet, current resource state information and component service information which can be provided;
calculating the total capacity of the first micro cloud according to the third information;
judging whether the total capacity of the current micro-cloud is not less than the total capacity of the first micro-cloud;
if so, after receiving a micro cloud merging request sent by the first micro cloud, calculating a first resource average utilization rate of the current micro cloud, a second resource average utilization rate of the first micro cloud, and a third resource average utilization rate of a new micro cloud generated after the first micro cloud is added;
judging whether the third average utilization rate of the resources is smaller than the first average utilization rate of the resources and the second average utilization rate of the resources at the same time;
if so, determining the micro cloud cluster head node of the current micro cloud as the micro cloud cluster head node of the combined micro cloud; merging the first cloudlet with the current cloudlet.
Optionally, the total capacity of the cloudiness is calculated according to the following formula:
wherein P is the total capacity of the micro cloud, N is the number of nodes in the micro cloud,is a node viE.g. the total capability of V, V is the union of all nodes in the micro cloud, is a node viThe number of the cores of (a) is,for the computing power of each core, MviIs a node viThe memory of (a) is provided,is a node viα, β and gamma are weighting coefficients, and α + β + gamma is 1;
calculating the average utilization rate of the resources of the micro cloud according to the following formula:
wherein, the usage-A is the average utilization rate of the resources of the micro cloud,is a node viE.g. the utilization rate of V, V is the union of all nodes in the micro cloud, c belongs to C, C is all the components running on the node, including the application components to be run by the node and the application components unloaded by other nodes, freqcFor the frequency called by the component c, cu is the CPU used by the component c, mu is the memory used by the component c, nu is the bandwidth consumption caused by the component c, α ', β', γ 'are weighting coefficients, α' + β '+ γ' ═ 1.
Optionally, the method further includes:
calculating the average resource utilization rate of the current micro cloud and the resource cooperative sharing degree of each general node, wherein the general nodes are other nodes except the micro cloud cluster head node in the current micro cloud;
judging whether the average resource utilization rate of the current micro cloud is greater than a preset threshold value or not;
and if so, removing the general node corresponding to the calculated minimum resource collaborative sharing value.
Optionally, the method further includes:
receiving a removal request sent by a target general node, wherein the removal request is sent when the signal strength of an access network of the target general node is lower than a preset threshold value and broadcast discovery packets of other micro clouds are received, and the general node is other nodes except the micro cloud cluster head node in the current micro cloud;
removing the target generic node.
Optionally, removing the generic node includes:
judging whether an application program component is unloaded to the removed general node or not in the current micro cloud;
if not, judging whether a first component exists or not, wherein the first component is an application program component of the removed general node unloaded to other general nodes in the current micro cloud; if yes, judging whether a function on the first component is executing; if a function is executing, judging whether the execution time of the function is not greater than a preset first threshold value; if not, removing the removed general node after receiving a message of completing the execution of the function sent by other general nodes; if so, notifying the removed generic node to cause the removed generic node to re-instantiate the first component and synchronize function execution state; removing the removed general node;
if so, judging whether a function is executed on a second component, wherein the second component is an application program component of other general nodes in the current micro cloud unloaded to the removed general node; if not, removing the removed general node; if so, judging whether the execution time of the function is not greater than a preset second threshold value; if not, removing the removed general node after receiving a message that the function execution sent by the removed general node is completed; if so, notifying other generic nodes on the removed generic node to uninstall the application component to cause the other generic nodes to re-instantiate the second component and synchronize function execution state; removing the removed general node.
Optionally, the method further includes:
receiving join request information sent by general nodes in other micro clouds, wherein the join request information comprises the capability of the general nodes and join reasons, and the join reasons are that the general nodes passively join the current micro cloud due to the mobility of the general nodes;
and adding the general node into the current micro cloud.
Optionally, the method further includes:
receiving an unloading request based on an application program component sent by a general node in the current micro cloud, wherein the general node is other nodes except the micro cloud cluster head node in the current micro cloud;
determining a target unloading node according to the current resource state information and the component state information of all the general nodes in the current micro cloud;
sending the determined identification information of the target uninstalling node to a general node needing to uninstall the application program component; and sending the identification information of the general node needing to uninstall the application program component to the target uninstalling node, so that the general node needing to uninstall the application program component uninstalls the application program component needing to be uninstalled to the target uninstalling node.
In a third aspect, to achieve the above object, an embodiment of the present invention further discloses a micro-cloud networking device, which is applied to a mobile cloud computing system, where the mobile cloud computing system includes at least two nodes, each of the nodes includes two function modules related to the mobile cloud computing system, and each of the function modules is a micro-cloud cluster head service function module and a general node service function module, and the micro-cloud cluster head service function module and the general node service function module are both in an activated state; the device comprises:
the determining module is used for determining a self node as a micro cloud cluster head node of a target micro cloud by any node of the at least two nodes;
a broadcasting module, configured to broadcast, by the micro cloud cluster head node, a broadcast discovery packet for discovering other nodes;
a receiving module, configured to receive a micro cloud capability query request and first information sent by a first node, where the first node is a node that receives the broadcast discovery packet, and the first information includes: capability information, current resource state information and available component service information of the first node;
a sending module, configured to send second information to the first node, where the second information includes: the capability information of the target micro cloud, the current resource state information and the available component service information;
the first judgment module is used for judging whether the total capacity of the target micro cloud is not less than the capacity of the first node;
the first processing module is used for adding the first node into the target micro cloud and continuing to execute the broadcasting module under the conditions that a joining request of the first node is received and the first node is allowed to join the target micro cloud when the total capacity of the target micro cloud is judged to be not less than the capacity of the first node; the current micro cloud cluster head service function module of the first node is in an inactivated state;
the second processing module is used for sending a joining request to the first node when the total capacity of the target micro-cloud is judged to be smaller than the capacity of the first node; under the condition that the joining permission information sent by the first node is received, deactivating a micro cloud cluster head service function module of a micro cloud cluster head node of the target micro cloud; adding the nodes included by the target micro cloud into the first node, generating a new micro cloud, and continuously executing the broadcast module; wherein the micro cloud cluster head node of the new micro cloud is the first node.
Optionally, the apparatus further comprises:
a third information receiving module, configured to receive third information sent by the first clout, where the third information includes: capability information of the first cloudlet, current resource state information and component service information which can be provided;
the first computing module is used for computing the total capacity of the first micro cloud according to the third information;
the second judgment module is used for judging whether the total capacity of the current micro-cloud is not less than the total capacity of the first micro-cloud;
the third processing module is used for calculating the average utilization rate of the first resources of the current micro cloud, the average utilization rate of the second resources of the first micro cloud and the average utilization rate of the third resources of a new micro cloud generated after the first micro cloud is added after a micro cloud merging request sent by the first micro cloud is received when the total capacity of the current micro cloud is judged to be not less than the total capacity of the first micro cloud;
a third determining module, configured to determine whether the third average usage rate of the resource is smaller than the first average usage rate of the resource and the second average usage rate of the resource at the same time;
the fourth processing module is configured to determine a micro cloud cluster head node of a current micro cloud as a micro cloud cluster head node of a merged micro cloud when it is determined that the third average utilization rate of the resources is smaller than the first average utilization rate of the resources and the second average utilization rate of the resources at the same time; merging the first cloudlet with the current cloudlet.
Optionally, the total capacity of the cloudiness is calculated according to the following formula:
wherein P is the total capacity of the micro cloud, N is the number of nodes in the micro cloud,is a node viE.g. the total capability of V, V is the union of all nodes in the micro cloud, is a node viThe number of the cores of (a) is,for the computing power of each core, MviIs a node viThe memory of (a) is provided,is a node viα, β and gamma are weighting coefficients, and α + β + gamma is 1;
calculating the average utilization rate of the resources of the micro cloud according to the following formula:
wherein, the usage-A is the average utilization rate of the resources of the micro cloud,is a node viE.g. the utilization rate of V, V is the union of all nodes in the micro cloud, c belongs to C, C is all the components running on the node, including the application components to be run by the node and the application components unloaded by other nodes, freqcFor the frequency called by the component c, cu is the CPU used by the component c, mu is the memory used by the component c, and nu is the bandwidth consumption caused by the component c, α ', β', γ 'are weighting coefficients, α' + β '+ γ' ═ 1.
Optionally, the apparatus further comprises:
the second computing module is used for computing the total capability of the current micro cloud and the resource cooperative sharing degree of each common node, wherein the common nodes are other nodes except the micro cloud cluster head node in the current micro cloud;
the fourth judging module is used for judging whether the average resource utilization rate of the current micro cloud is greater than a preset threshold value or not;
and the first removing module is used for removing the common node corresponding to the minimum resource collaborative sharing value obtained by calculation when the average resource utilization rate of the current micro cloud is judged to be greater than a preset threshold value.
Optionally, the apparatus further comprises:
a removal request receiving module, configured to receive a removal request sent by a target general node, where the removal request is sent when an access network signal strength of the target general node is lower than a preset threshold and a broadcast discovery packet of another micro cloud is received, and the general node is another node in the current micro cloud except for the micro cloud cluster head node;
and the second removing module is used for removing the target general node.
Optionally, the first removing module or the second removing module is specifically configured to:
judging whether an application program component is unloaded to the removed general node or not in the current micro cloud;
if not, judging whether a first component exists or not, wherein the first component is an application program component of the removed general node unloaded to other general nodes in the current micro cloud; if yes, judging whether a function on the first component is executing; if a function is executing, judging whether the execution time of the function is not greater than a preset first threshold value; if not, removing the removed general node after receiving a message of completing the execution of the function sent by other general nodes; if so, notifying the removed generic node to cause the removed generic node to re-instantiate the first component and synchronize function execution state; removing the removed general node;
if so, judging whether a function is executed on a second component, wherein the second component is an application program component of other general nodes in the current micro cloud unloaded to the removed general node; if not, removing the removed general node; if so, judging whether the execution time of the function is not greater than a preset second threshold value; if not, removing the removed general node after receiving a message that the function execution sent by the removed general node is completed; if so, notifying other generic nodes on the removed generic node to uninstall the application component to cause the other generic nodes to re-instantiate the second component and synchronize function execution state; removing the removed general node.
Optionally, the apparatus further comprises:
the system comprises a joining request information receiving module, a joining request information receiving module and a joining request information sending module, wherein the joining request information comprises the capability of a general node and a joining reason, and the joining reason is that the general node passively joins in the current micro cloud due to the mobility of the general node;
and the adding module is used for adding the general node into the current micro cloud.
Optionally, the apparatus further comprises:
the unloading request receiving module is used for receiving an unloading request based on an application program component, which is sent by a general node in the current micro cloud, wherein the general node is other nodes except the micro cloud cluster head node in the current micro cloud;
the target unloading node determining module is used for determining a target unloading node according to the current resource state information and the component state information of all the general nodes in the current micro cloud;
the identification information sending module is used for sending the identification information of the determined target unloading node to a general node needing to unload the application program component; and sending the identification information of the general node needing to uninstall the application program component to the target uninstalling node, so that the general node needing to uninstall the application program component uninstalls the application program component needing to be uninstalled to the target uninstalling node.
In summary, according to the component-based micro cloud and micro cloud networking method and device provided by the embodiment of the present invention, an application component is taken as an offload granularity, and when an application runs, the application component is dynamically offloaded to other devices in the micro cloud according to an optimal policy, so that compared with offloading based on a virtual machine, the flexibility is better, the load and communication bandwidth overhead of the micro cloud are reduced, and global optimization and dynamic load balancing are facilitated; a large amount of idle user equipment around the micro cloud is also included in the micro cloud as a part of computing resources, idle edge computing resources can be efficiently utilized, self-organizing networking of the micro cloud can be optimized by dynamically discovering, expanding and combining the micro cloud, the problem of large load of the traditional micro cloud caused by greedy unloading of a mobile node is solved, and meanwhile, the resource utilization rate of the whole micro cloud is improved; compared with the traditional mobile cloud computing method for unloading tasks to a remote cloud data center, the micro cloud computing method has the advantages that a large amount of backbone network bandwidth is occupied, the micro cloud computing method is closer to users, delay is small, and unloading of the tasks and obtaining of computing results are faster.
Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a component-based micro-cloud architecture according to an embodiment of the present invention;
fig. 2 is an information flow interaction relationship diagram between functional modules in a component-based micro cloud according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a networking method for a cloudlet according to an embodiment of the present invention;
fig. 4 is an application scenario diagram of an offload policy optimization algorithm according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating a solution space reduction of an offload policy optimization algorithm according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a cloudlet networking device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a component-based micro cloud and a micro cloud networking method and device, and the invention is described in detail through specific embodiments.
Fig. 1 is a schematic structural diagram of a component-based cloudlet according to an embodiment of the present invention, and it should be noted that fig. 1 only shows one general node in the cloudlet, and does not limit that the component-based cloudlet according to the embodiment of the present invention only includes one general node.
As shown in FIG. 1, an embodiment of the present invention provides a component-based cloudlet, comprising:
the system comprises a micro cloud cluster head node and a plurality of general nodes, wherein the nodes are communicated with each other, the micro cloud cluster head node and the general nodes comprise two functional modules related to a mobile cloud computing system, namely a micro cloud cluster head service functional module 200 and a general node service functional module 100, the micro cloud cluster head node and the general node service functional module 100 of the general nodes are in an activated state, the micro cloud cluster head service functional module 200 of the micro cloud cluster head node is in an activated state, and the micro cloud cluster head service functional module 100 of the general nodes is in an inactivated state;
it should be noted that the micro cloud includes two types of nodes, one is a micro cloud cluster head node, and the other is a general node, and the nodes may communicate with each other. Any one node comprises two functional modules related to a mobile cloud computing networking system, namely a micro cloud cluster head service functional module 200 and a general node service functional module 100. The two functional modules are activated and deactivated according to the current state of the node. That is, in the micro cloud cluster head node, the functional modules related to the mobile cloud computing system, which are activated and function, are the micro cloud cluster head service functional module 200 and the general node functional module 100; in the general node, the functional module that is activated and functions serves only the general node as the functional module 100. The micro cloud cluster head node serves as a host of the micro cloud, and can be fixed equipment or mobile equipment.
The general node service function module 100 includes: a node agent function sub-module 101, a device monitoring function sub-module 102, and a component management function sub-module 103, wherein,
the node agent function sub-module 101 is used for controlling information interaction and data information interaction;
specifically, the node agent function sub-module 101 is configured to interact with control information of the micro cloud cluster head service function module 200 and interact with data information of other general node service function modules 100; meanwhile, the application program component calling information of the component management function sub-module 103 and the device resource capability information of the device monitoring function sub-module 102 are sent to the node management function sub-module 201 of the micro cloud cluster head node 200.
In the micro-cloud based on components, data streams are divided into a control plane and a data plane, wherein the data streams of the control plane are used for dynamic networking of adding and removing general nodes in the micro-cloud, combination between the two micro-clouds and the like and related control information interaction during resource optimization; the data plane is mainly responsible for the interaction of call data between application program components located on various nodes, that is, the transmission of call redirection, call parameters and return values is completed between the general node service function modules 100. The interaction relationship between the data plane and the control plane in the micro cloud is shown in fig. 2.
The device monitoring function sub-module 102 is configured to monitor a current resource state of a node of the device monitoring function sub-module;
specifically, the device monitoring function sub-module 102 is responsible for monitoring the utilization rate of the remaining hardware resources of the device, such as the computing resources, memory, network bandwidth, and the like of the CPU, and these pieces of information are sent to the micro cloud cluster head service function module 200 and used by the decision function sub-module 203 for the component optimization deployment policy.
The component management function sub-module 103 is configured to manage all application components of the self node and call relationships among the application components, and includes a component registry, where the component registry is configured to store application component call information of the self node, where the call information includes call relationships, parameters, return values, and estimated completion time;
specifically, the component management function sub-module 103 is configured to manage all application components in the node, and store a call relationship between the application components. When a user starts an application program, the operating system creates a component manager for the application program, the application program registers all components thereof at the component manager and generates a corresponding component registry, and meanwhile, the call relationship, the parameter information, the return value information and the estimated execution time among the components of the application program are stored in the generated component registry, and the registry is simultaneously synchronous with the component registration function sub-module 202 in the micro cloud cluster head service function module 200; when calling occurs between application program components, a caller sends a request to the component management function submodule 103 of the general node service function module 100 of the node, the component management function submodule 103 finds the requested component in the generated component registry and forwards the calling request to the component, and if the called component runs locally, the calling is a local calling; if the component is offloaded to other nodes in the present cloudlet according to some optimized component deployment policy, the call request will be redirected to the corresponding other nodes by the component management function sub-module 103.
The micro cloud cluster head service function module 200 includes a node management function sub-module 201, a component registration function sub-module 202, a decision function sub-module 203, and an allocation function sub-module 204, wherein,
the node management function sub-module 201 is configured to manage addition and removal of a general node, merging between two clouts, and storing device information and current resource state information of all nodes;
specifically, as an important component of the micro cloud cluster head service function module 200, the node management function sub-module 201 is configured to manage addition and removal of a general node, a merging process between two micro clouds, and receive and store device information and resource state information of the node, which are sent by each general node and monitored by the device monitoring function sub-module 102.
The component registration function sub-module 202 is configured to store application component calling information of all nodes, where the calling information includes a calling relationship, a parameter, a return value, and an estimated completion time;
specifically, the component registration function sub-module 202 is configured to store application component state information of all nodes belonging to the micro cloud, where the application component state information is a union of component information of the component management function sub-modules 103 of all nodes belonging to the micro cloud. The present clout can provide all component services listed in the registry to all nodes to which the present clout belongs through the component registration function sub-module 202.
The decision function sub-module 203 is configured to determine an optimal component deployment result according to the current resource state information stored in the node management function sub-module 201;
specifically, the decision function sub-module 203 performs optimization according to the resource state information of all nodes in the current clout provided by the node management function sub-module 201, the related information of all application program components provided by the component registration function sub-module 202, and the current deployment state information of the application program components, based on a specific optimization target and algorithm, to obtain a globally optimized deployment configuration result of the application program components based on the clout, and sends the optimal deployment result of the components to the allocation function sub-module 204.
The distribution function sub-module 204 is configured to distribute the application components according to the optimal component deployment result determined by the decision function sub-module 203;
specifically, when a micro cloud includes a plurality of nodes, the distribution function sub-module 204 is configured to perform an optimal component distribution result, that is, uninstalling an application component; when the component management function sub-module 103 of a node needs to execute a remote call, the distribution function sub-module 204 instantiates the requested application component on the corresponding target node according to the global optimization deployment of the clout given by the decision function sub-module 203, and returns the address of the target node to the requesting node, so as to establish a relationship between the requesting node and the target node, and call the application component.
In summary, in the micro cloud provided in the embodiment of the present invention, the application component is taken as the offload granularity, and when the application runs, the application component is dynamically offloaded to other devices in the micro cloud according to the optimal policy, so that compared with offloading based on a virtual machine, the flexibility is better, the load and communication bandwidth overhead of the micro cloud are reduced, and global optimization and dynamic load balancing are facilitated; a large number of idle user equipment around the micro cloud are classified into the micro cloud as a part of computing resources, so that the idle edge computing resources can be efficiently utilized, the problem of large traditional micro cloud load caused by greedy unloading of the mobile node is solved, and the backbone network load caused by unloading of tasks to a core network is reduced.
Corresponding to the above component-based cloudlet, an embodiment of the present invention further provides a cloudlet networking method, which is applied to a mobile cloud computing system, where the mobile cloud computing system includes at least two nodes, where the nodes include two functional modules related to the mobile cloud computing system, and are respectively a cloudlet head service functional module 200 and a general node service functional module 100, and the cloudlet head service functional module 200 and the general node service functional module 100 are both in an activated state; as shown in fig. 3, the method includes:
s201, determining a self node as a micro cloud cluster head node of a target micro cloud by any one of the at least two nodes;
s202, broadcasting a broadcast discovery packet for discovering other nodes by the micro cloud cluster head node;
s203, receiving a micro cloud capability query request and first information sent by a first node, where the first node is a node that receives the broadcast discovery packet, and the first information includes: capability information, current resource state information and available component service information of the first node;
s204, sending second information to the first node, where the second information includes: the capability information of the target micro cloud, the current resource state information and the available component service information;
s205, judging whether the total capacity of the target micro cloud is not less than the total capacity of the first node; if yes, executing S206, otherwise, executing S207;
s206, joining the first node to the target cloudlet under the condition that the joining request of the first node is received and the first node is allowed to join the target cloudlet, and returning to S202; wherein, the current micro cloud cluster head service function module 200 of the first node is in an inactive state;
s207, sending a joining request to the first node; deactivating the micro cloud cluster head service function module 200 of the micro cloud cluster head node of the target micro cloud in the case of receiving the join permission information sent by the first node; adding the nodes included by the target micro cloud into the first node to generate a new micro cloud; and returning to the step S202, wherein the micro cloud cluster head node of the new micro cloud is the first node.
Specifically, interaction between nodes based on a micro cloud cluster head may occur in the micro cloud networking process, and a device having the function module 200 for activating the micro cloud cluster head service is defined as a micro cloud cluster head host (simply referred to as a host). When the mobile cloud computing system is initialized, all nodes are initialized to be micro cloud cluster head nodes, namely each node is provided with an activated micro cloud cluster head service function module 200 and a general node service function module 100; the mobility of the nodes may cause frequent merging between the micro-clouds and removal of a general node between the nodes, and in order to avoid the above situation, after initialization, the micro-cloud hosted by the node only includes one device of the node. When a node interacts with a certain micro cloud cluster head node and the communication stability and the computing performance of the node are weaker than those of the micro cloud cluster head node, the node is degraded into a common node from a micro cloud cluster head host, namely the micro cloud cluster head service function module 200 is deactivated and added into a micro cloud.
In the initialization process of the mobile cloud computing system, any one node may run the initialization process of the micro cloud cluster head service function module 200 and the general node service function module 100. After the initialization process of each node is completed, the dynamic networking process of the micro cloud is started. In the networking process, according to the functions of the nodes, the micro cloud cluster head service function module 200 or the general node service function module 100 is correspondingly activated, wherein when the nodes are micro cloud cluster head nodes or separate nodes, the micro cloud cluster head service function module 200 and the general node service function module 100 in the nodes are both in an activated state; when the node is a general node in the micro cloud, only the general node service function module 100 is in an activated state, and the micro cloud cluster head service function module 200 is in a deactivated state.
The initialization process of the general node service function module 100 includes the initialization processes of the node agent function sub-module 101, the device monitoring function sub-module 102, and the component management function sub-module 103. Specifically, the method comprises the steps of initializing parameters of a node agent function sub-module 101, initializing parameters of an equipment monitoring function sub-module 102, and initializing parameters of a component management function sub-module 103; the device monitoring function sub-module 102 monitors resource states of the node devices in real time, including the use conditions of resources such as the computing power, the memory, the network bandwidth and the like of the CPU, and collects the state information of each resource to the node agent function sub-module 101; judging whether each current application program can be divided into components according to the component management function sub-module 103, obtaining parameters such as parameter size and return value size of functions in the components corresponding to the application program for the divided application programs, evaluating the running time and cost of the functions in the application program components, generating a component registry based on the node, and summarizing the evaluation results to the node agent function sub-module 101.
The initialization process of the micro cloud cluster head service function module 200 includes a parameter initialization process of a node management function sub-module 201, a component registration function sub-module 202, a decision function sub-module 203, and an allocation function sub-module 204. When only one node exists in the micro cloud, the initialization process of the micro cloud cluster head service function module 200 is firstly performed, then the initialization process of the general node service function module 100 of the node is performed, after the general node service function module 100 is initialized, the general node service function module 100 of the node sends the relevant information of the application program component to the micro cloud cluster head service function module 200 of the node, and the micro cloud cluster head service function module 200 of the node completes the component registry generation and component deployment process of the node.
After the initialization process of the nodes is completed, each node becomes a target micro cloud with the node of the node as a micro cloud cluster head node. The micro cloud cluster head service function module 200 starts to periodically broadcast a broadcast discovery packet for discovering other nodes to the nodes around the micro cloud cluster head service function module; and after the node completes the initialization process, the node can receive and monitor the broadcast discovery packet sent to the node by the surrounding micro cloud or the node. The broadcast discovery packet includes a source address, a destination address (broadcast address) of the target micro cloud cluster head node, an identifier of the target micro cloud, and current resource state information of the target micro cloud, where the identifier of the target micro cloud may be an address of the target micro cloud.
When the first node receives the broadcast discovery packet, it indicates that the first node has discovered a target micro-cloud that can join and acquire the service. The first node can query the capability and the state of the target micro cloud by sending a micro cloud capability query request, wherein first information corresponding to the micro cloud capability query request comprises current capability information, current resource state information and available component service information of the first node; after receiving the micro cloud capability query request message of the first node, the micro cloud cluster head node of the target micro cloud also sends second information corresponding to the micro cloud capability query message to the first node, wherein the second information contains capability information of the target micro cloud, current resource state information and component service information which can be provided. After the capability information of the first node is obtained, the micro cloud cluster head node of the target micro cloud can judge the total capability of the target micro cloud and the total capability of the first node; if the total capacity of the target micro-cloud is less than the total capacity of the first node, the micro-cloud cluster head node of the target micro-cloud sends a join request to the first node, the first node determines whether to allow the target micro cloud to join according to the current resource state information of the target micro cloud and the available component service information, if the current resource state information and the available component service information of the target micro cloud meet the requirements of the first node, the first node sends join permission information to a micro cloud cluster head node of the target micro cloud, after the micro cloud cluster head node of the target micro cloud receives the join permission information, the micro cloud cluster head service function module 200 of the micro cloud cluster head node of the target micro cloud is deactivated to become a general node to join the first node, adding a general node included by the target micro cloud into the first node to generate a new micro cloud, wherein a micro cloud cluster head node of the new micro cloud is the first node; if the current resource state information of the target micro cloud and/or the available component service information do not meet the requirements of the first node, the first node may send joining rejection information to the micro cloud cluster head node of the target micro cloud, and reject the target micro cloud to join the first node.
In practical application, whether the micro cloud is allowed to join or not can be judged according to the average utilization rate of the resources of the micro cloud. Specifically, after the micro cloud cluster head node of the target micro cloud sends the join request to the first node, the first node calculates the average resource utilization rate of the first node and the average resource utilization rate of the target micro cloud according to the current resource state information of the first node and the target micro cloud and the available component service information, and calculates the average resource utilization rate of a new micro cloud generated after the target micro cloud is added. If the average resource utilization rate of the new micro cloud generated after the target micro cloud is added is smaller than the average resource utilization rate of the first node and the average resource utilization rate of the target micro cloud, the first node allows the target micro cloud to join; and if the average resource utilization rate of the new micro cloud generated after the target micro cloud is added is not less than the average resource utilization rate of the first node or the average resource utilization rate of the target micro cloud, the first node does not allow the target micro cloud to join.
Similarly, if the total capacity of the first node is less than the total capacity of the target clout, the first node may send a join request to the clout cluster head node of the target clout, the clout cluster head node of the target clout determines whether to allow the first node to join according to the current resource state information of the first node and the component service information that can be provided, if the current resource state information of the first node and the component service information that can be provided meet the requirement of the target clout, the clout cluster head node of the target clout sends join-allowing information to the first node, and after receiving the join-allowing information, the first node deactivates the clout cluster head service function module 200 of the first node to be a general node, joins the target clout, and generates a new clout; if the current resource state information of the first node and/or the available component service information do not meet the requirements of the target cloudlet, the cloudlehead node of the target cloudlet may send join rejection information to the first node.
Under the condition that a target cloudlet contains a plurality of general nodes after passing through the networking process, each general node to which the target cloudlet belongs transmits the summarized device resource state information and application program component information to the cloudlet cluster head service function module 200 of the target cloudlet through the general node service function module 100. The device information is transmitted to the node management function sub-module 201, and the component information is transmitted to the component registration function sub-module 202. The node management function sub-module 201 completes management of device resource information based on all nodes in the target clout, and the component registration function sub-module 202 completes generation of information of all application components that can be provided in the target clout.
It should be noted that, whenever a node in the micro cloud changes or a provided component changes, the content of the component registry needs to be updated, and in order to enable the micro cloud to provide a continuously updated component registry, the component registration function sub-module 202 collects component registration change messages and resource status messages of the nodes belonging to the micro cloud, so as to maintain the latest component registry information and minimize the overhead caused by the interaction information.
It should be noted that the first node determines whether to allow the target clout to join according to a decision criterion, or the cloudlehead node of the target cloudlet determines whether to allow the first node to join according to a decision criterion, and a specific decision criterion may be according to different optimization objectives and policies, which is not limited herein. It should be noted that after the first node joins the target clout and before deciding to leave the target clout, the broadcast packets from other clouts will not be processed.
Further, based on the embodiment shown in fig. 3, the method for networking a cloudlet according to the embodiment of the present invention further includes:
receiving third information sent by the first micro cloud, wherein the third information comprises: capability information of the first cloudlet, current resource state information and component service information which can be provided;
calculating the total capacity of the first micro cloud according to the third information;
judging whether the total capacity of the current micro-cloud is not less than the total capacity of the first micro-cloud;
if so, after receiving a micro cloud merging request sent by the first micro cloud, calculating a first resource average utilization rate of the current micro cloud, a second resource average utilization rate of the first micro cloud, and a third resource average utilization rate of a new micro cloud generated after the first micro cloud is added;
judging whether the third average utilization rate of the resources is smaller than the first average utilization rate of the resources and the second average utilization rate of the resources at the same time;
if so, determining the micro cloud cluster head node of the current micro cloud as the micro cloud cluster head node of the combined micro cloud; merging the first cloudlet with the current cloudlet.
Specifically, the new cloudlet generated in the embodiment shown in fig. 3 is used as the current cloudlet, and the merging process between the two cloudlets may also occur between the current cloudlet and the other cloudlets.
The merging of any two micro clouds includes the following three stages: namely a micro cloud discovery phase, a micro cloud capability comparison phase and a micro cloud merging phase.
The first phase is a micro-cloud discovery phase. If the current micro cloud has the requirement of expansion, the micro cloud cluster head node of the current micro cloud broadcasts a micro cloud broadcast discovery message, if the micro cloud cluster head node of the first micro cloud receives the message, the fact that a nearby micro cloud is found is meant to be found, if other micro clouds receiving the discovery message also have the requirement of expanding computing capacity, the micro cloud cluster head node of the first micro cloud tries to establish connection with the current micro cloud sending the micro cloud broadcast discovery message, the micro cloud broadcast discovery message is also sent to the micro cloud cluster head node of the current micro cloud, the micro cloud cluster head nodes of the two micro clouds establish connection, and the micro cloud capability comparison stage is entered.
The second phase is a micro cloud capability comparison phase. In this stage, the two micro cloud cluster head nodes respectively send micro cloud capability query information to each other, where the information includes capability information of the micro cloud, current resource state information, and component service information that can be provided. And after receiving the micro cloud capability query information, the two micro cloud cluster head nodes respectively calculate the total capability of the micro cloud of the other side according to the micro cloud capability query information and enter a micro cloud merging stage.
The third stage is a micro-cloud merging stage. If the micro cloud cluster head node of the first micro cloud judges that the total capacity of the self micro cloud is smaller than that of the current micro cloud, the first micro cloud sends micro cloud merging request information to the current micro cloud, after the current micro cloud receives the micro cloud merging request, the first resource average utilization rate of the current micro cloud, the second resource average utilization rate of the first micro cloud and the third resource average utilization rate of a new micro cloud generated after the first micro cloud is added are calculated. If the micro cloud cluster head node of the current micro cloud judges that the third resource average utilization rate is smaller than the first resource average utilization rate and the second resource average utilization rate at the same time, micro cloud combination confirmation information is sent to the first micro cloud; after receiving the merging confirmation information of the micro cloud cluster head node of the current micro cloud, the micro cloud cluster head node of the first micro cloud sends micro cloud merging notification information to other general nodes in the self micro cloud to notify the general node to which the node belongs of the node to merge the information such as the address of the micro cloud cluster head node of the current micro cloud and the identification of the current micro cloud, the general node of the self micro cloud establishes association with the micro cloud cluster head node of the current micro cloud, and meanwhile, the micro cloud cluster head of the first micro cloud deactivates the micro cloud cluster head service function module 200 thereof to degenerate into the general node in the current micro cloud. The micro cloud cluster head node of the current micro cloud merges the received contents in the node management function sub-module 201 and the component registration function sub-module 202 of the first micro cloud with the contents of the micro cloud, meanwhile, refreshes the relevant module settings of the micro cloud again, then starts the decision function sub-module 203, obtains a new component optimized distribution result, and distributes the application program components according to the new optimized distribution result. If the micro cloud cluster head node of the current micro cloud judges that the third resource average utilization rate is not less than the first resource average utilization rate or the second resource average utilization rate, the micro cloud cluster head node of the current micro cloud is not merged with the first micro cloud, the micro cloud cluster head node of the current micro cloud can send merging rejection information to the micro cloud cluster head node of the first micro cloud, and the micro cloud merging process fails.
It should be noted that, if the total capability of the cloud cluster head node of the current cloud is determined to be smaller than the total capability of the first cloud, the current cloud sends a cloud merging request message to the first cloud to request merging, and the process of determining whether to merge by the first cloud may refer to the third stage, which is not described herein again.
In the process of networking the micro clouds and combining the two micro clouds, the formula used by the micro cloud computing total capacity or the total capacities of the other micro clouds is as follows:
wherein P is the total capacity of the micro cloud, N is the number of nodes in the micro cloud,is a node viE.g. the total capability of V, V is the union of all nodes in the micro cloud, is a node viThe number of the cores of (a) is,for the computing power of each core, MviIs a node viThe memory of (a) is provided,is a node viα, β and gamma are weighting coefficients, and α + β + gamma is 1.
For a certain function executed in an application program component, a certain amount of overhead of a CPU and a memory is caused, and if the function belongs to a component which is unloaded to other nodes in the micro cloud, bandwidth is consumed by transferring parameters and return values.
Setting an application component cjBy another application component ciCalls, the frequency of calls beingCalling a function M in the component, wherein the function M belongs to M (wherein M is a set of all functions of all components in the micro cloud), and setting the function M to generate a certain CPU usage loadmThe number of instructions of the function is used to determine the number of instructions that will result in additional memory usage, the size of which is memmAnd has a parameter arg and a return value res, respectively of size argm、resmAnd the function uses call in one invocation of the application componentmNext, the process is carried out. This component c is obtained according to the above definitionjThe CPU usage of (1) is: CU ═ Σm∈Mloadm·callm(ii) a The memory usage is: MU ═ Σm∈Mmemm(ii) a If component cjAnd component ciNot on the same node, the bandwidth consumption between nodes is NU ═ Σm∈M(argm+resm)·callm(ii) a Then the resource usage on that node is C belongs to C, C is all components running on the node, including components of an application program to be run by the node and components unloaded by other nodes, α ', β' and gamma 'are weighting coefficients, α' + β '+ gamma' is 1, and then the average utilization rate of resources of the whole micro cloud is And N is the number of nodes in the micro cloud.
It should be noted that, for the average resource utilization of the entire cloudlets, each cloudlet may set a threshold, and when the average resource utilization is greater than the threshold, the cloudlet will not broadcast the cloudlet broadcast discovery message any more, that is, will not be discovered and merged by other cloudlets any more.
Further, based on the embodiment shown in fig. 3, the method for networking a cloudlet according to the embodiment of the present invention further includes:
calculating the total capacity of the current micro cloud and the resource cooperative sharing degree of each common node, wherein the common nodes are other nodes except the micro cloud cluster head node in the current micro cloud;
judging whether the average resource utilization rate of the current micro cloud is greater than a preset threshold value or not;
and if so, removing the general node corresponding to the calculated minimum resource collaborative sharing value.
Specifically, the new micro cloud generated in the embodiment shown in fig. 3 is used as the current micro cloud, the micro cloud cluster head node of the current micro cloud may periodically calculate the average resource utilization rate of the local micro cloud and the resource collaborative sharing degree (NRCSD) of each general node in the local micro cloud, if the remaining hardware resources such as computing and storage are insufficient due to a large number of offload tasks of the executed application components in the current micro cloud, so that when the average resource utilization rate of the current micro cloud is greater than a preset threshold, the micro cloud cluster head node selects a general node with the minimum resource collaborative sharing degree based on a policy of the mobile node NRCSD, the micro cloud cluster head node sends a removal request message to the removed general node, and requests the general node to exit the local micro cloud, and the general node sends a removal confirmation message to the micro cloud cluster head node and exits the micro cloud. This removal process is referred to as an active removal process.
It should be noted that, after the general node is removed, the self micro cloud cluster head service function module needs to be activated and initialized, and the general node becomes a micro cloud cluster head node.
In particular, each node in the micro cloud maintains a resource co-sharing value NRCSDvIt is initialized to 0, if a certain node viTo another node vjUninstalling a component c, then each time the function m in c is at node vjWhen the computer is executed, the computer executes the program,the resource overhead value of the function m corresponding to the component c is reduced while at the same timeIncreasing a resource cost value corresponding to the function m of the component c; on the contrary, if the node vjTo node viUninstalling a component c, then each time the function m in c is in the device viWhen the computer is executed, the computer executes the program,need to be reduced at the same timeAnd (4) increasing. And selecting the node with the minimum resource collaborative sharing value each time the micro cloud needs to remove a certain node. A typical situation is that if a malicious node repeatedly issues an offload request, then as the request is issued, the resource co-sharing value of the node will decrease according to the resource overhead value of each offload request, and the malicious node will be most likely to be removed. The embodiment of the invention provides two resource collaborative sharing values NRCSDvThe method of (3).
The method comprises the following steps: if node viTo node vjUninstalled a component c, then whenever the function m in c is at node vjWhen executing, node viResource collaboration ofValue of shareMinus the actual occupied resource η (m, c, v) unloaded this timei,vj) Node vjResource co-sharing degree value ofPlus the actual occupied resource η (m, c, v) unloaded this timei,vj),
η(m,c,vi,vj)=u·loadm·freqc+t·memm+w·(argm+resm)·freqcWherein u, t and w are weighting coefficients, and u + t + w is 1.
The second method comprises the following steps: if node viTo node vjUninstalled a component c, then whenever the function m in c is at node vjWhen executing, node viResource co-sharing degree value ofMinus the actual occupied resource usage η' (m, c, v) unloaded this timei,vj) Node vjResource co-sharing degree value ofPlus the actual occupied resource η' (m, c, v) unloaded this timei,vj),
Where u ', t', w 'are weighting coefficients, and u' + t '+ w' ═ 1.
The second calculation method of the resource collaborative sharing value enables the node with weaker performance to maintain a certain resource collaborative sharing value, namely when the node with weaker performance unloads the task to other nodes, the load caused by the task from the mobile application is not too large, namely the numerator in the formula is small, so the decrement of the resource collaborative sharing value is also small; when there is a task to be offloaded to a node with weak performance by other nodes, the increment of the resource cooperative sharing value is large because the mobile device generally has weak performance, that is, the denominator in the above formula is small. Thus, although the node with weaker performance mostly unloads the tasks to other nodes and receives the tasks unloaded by other nodes, the resource cooperative sharing value of a normal node is maintained at a certain level and cannot be easily removed because the decrement of the resource cooperative sharing value is small and the increment is large each time.
For the node with stronger performance, the increment of the resource cooperative sharing value is very small and the decrement is very large, but the node with stronger performance rarely unloads tasks to other nodes and hardly unloads the tasks to the node with weaker performance, so the resource cooperative sharing value of the node with stronger performance is always maintained in a higher state, and the micro cloud cluster head node does not need to be worried about removing the node.
Further, based on the embodiment shown in fig. 3, the method for networking a cloudlet according to the embodiment of the present invention further includes:
receiving a removal request sent by a target general node, wherein the removal request is sent when the signal strength of an access network of the target general node is lower than a preset threshold value and broadcast discovery packets of other micro clouds are received, and the general node is other nodes except the micro cloud cluster head node in the current micro cloud;
removing the target generic node.
Specifically, the new micro cloud generated in the embodiment shown in fig. 3 is used as the current micro cloud, when a network signal of the general node accessing the current micro cloud is degraded to a set threshold value due to mobility of the general node in the current micro cloud, the general node cannot maintain working in the current micro cloud, the general node sends node removal request information to the micro cloud cluster head node, and after the micro cloud cluster head node receives a removal request of the general node, the micro cloud cluster head node sends removal confirmation information to the general node and removes the general node, where this removal process is also referred to as a passive removal process. Further, the process of removing the general node specifically includes:
judging whether an application program component is unloaded to the removed general node or not in the current micro cloud;
if not, judging whether a first component exists or not, wherein the first component is an application program component of the removed general node unloaded to other general nodes in the current micro cloud; if yes, judging whether a function on the first component is executing; if a function is executing, judging whether the execution time of the function is not greater than a preset first threshold value; if not, removing the removed general node after receiving a message of completing the execution of the function sent by other general nodes; if so, notifying the removed generic node to cause the removed generic node to re-instantiate the first component and synchronize function execution state; removing the removed general node;
if so, judging whether a function is executed on a second component, wherein the second component is an application program component of other general nodes in the current micro cloud unloaded to the removed general node; if not, removing the removed general node; if so, judging whether the execution time of the function is not greater than a preset second threshold value; if not, removing the removed general node after receiving a message that the function execution sent by the removed general node is completed; if so, notifying other generic nodes on the removed generic node to uninstall the application component to cause the other generic nodes to re-instantiate the second component and synchronize function execution state; removing the removed general node.
It should be noted that when a general node is determined to be removed, the node is called a child. The procedure of removing the abandon son is divided into three situations that the abandon son has the application program components to be unloaded to other nodes in the micro cloud, other nodes in the micro cloud unload the application program components to the abandon son, and no application program components are unloaded on the abandon son.
If no application components within the cloudlet are uninstalled on the discard, the mobile node is directly removed.
When the abandon son has the application program component to be unloaded to other nodes in the micro cloud, the micro cloud cluster head node monitors the execution state of the application program component through the component management function submodule 103 on the abandon son, if the application program component has a certain function to execute, if the execution time of the function is not greater than a threshold value T (which can be defined as the duration of switching from the determination to the switching completion), the function is executed completely, the result is returned to the abandon son, the abandon son is removed again, and the component unloaded to other nodes is destroyed; if the execution time of the function is greater than the threshold value T, before the son is removed, the micro cloud cluster head node firstly indicates the son to re-instantiate the unfinished application program assembly, and meanwhile synchronizes the execution state of the function, and after the son is removed, the application program assemblies unloaded to other nodes are destroyed; when the function in the application program assembly is not in a running state on the abandon son, the application program assembly is directly destroyed, and the abandon son is removed.
For the case where other nodes in the cloudlet uninstall the application component onto the son, the following steps will occur: if the execution time is not greater than the threshold value T, after the execution is finished and the result is returned to the relevant nodes in the micro cloud, the abandon son destroys the application program assembly and is removed; if the function execution time is larger than the threshold value T, notifying other nodes unloading the application program assembly to the abandon son so as to enable the other nodes to re-instantiate the application program assembly and synchronize the function execution state; if no function in the unloaded component on the abandon is in a running state, the micro cloud cluster head node informs the abandon to directly destroy the application program component, and then the micro cloud cluster head node directly removes the abandon.
Further, based on the embodiment shown in fig. 3, the method for networking a cloudlet according to the embodiment of the present invention further includes:
receiving join request information sent by general nodes in other micro clouds, wherein the join request information comprises the capability of the general nodes and join reasons, and the join reasons are that the general nodes passively join the current micro cloud due to the mobility of the general nodes;
and adding the general node into the current micro cloud.
Specifically, the network signal of the general node accessing to the current micro cloud is degraded, and when the network signal strength is lower than a preset threshold value, the general node starts to receive and process broadcast discovery packets sent by other micro clouds; when the general node receives broadcast discovery packets of other micro clouds, the general node can obtain the current resource state information of the other micro clouds; the general node compares the received resource state information of each micro cloud discovery packet, selects the micro cloud with the best resource capacity, sends micro cloud adding request information to the micro cloud, and identifies that the adding reason is passive adding in the adding request; the micro cloud cluster head node of the micro cloud sends a join confirmation message to the general node, and the general node sends a removal request to the micro cloud cluster head node of the current micro cloud so as to enable the micro cloud cluster head node of the current micro cloud to remove the general node; the general node finishes the process of leaving from the current micro cloud and passively joining in the micro cloud, and enters the micro cloud to receive the micro cloud service.
Further, based on the embodiment shown in fig. 3, the method for networking a cloudlet according to the embodiment of the present invention further includes:
receiving an unloading request based on an application program component sent by a general node in the current micro cloud, wherein the general node is other nodes except the micro cloud cluster head node in the current micro cloud;
determining a target unloading node according to the current resource state information and the component state information of all the general nodes in the current micro cloud;
sending the determined identification information of the target uninstalling node to a general node needing to uninstall the application program component; and sending the identification information of the general node needing to uninstall the application program component to the target uninstalling node, so that the general node needing to uninstall the application program component uninstalls the application program component needing to be uninstalled to the target uninstalling node.
Specifically, after a node is added into the current micro cloud, in order to ensure that all nodes in the micro cloud are in a normal working state, micro cloud cluster head nodes and general nodes will periodically interact with micro cloud member keep-alive messages. Within the micro cloud, a general node can receive services of other nodes in the micro cloud and can provide services to other nodes in the micro cloud, and the services provided/received by the mobile node include but are not limited to uninstalling application component services.
Here, the node to be served is defined as an unloading node, and some components of a running application program which can be decomposed into components in the node are unloaded to other nodes in the micro cloud, and the other nodes are called target unloading nodes.
A general node service function module 100 of an offload node sends an offload request based on an application component to a micro cloud cluster head service function module 200 of a micro cloud cluster head node; after the micro cloud cluster head node receives the unloading request, according to the current resource state information and the component state information of all the general nodes in the current micro cloud, the decision function sub-module 203 judges and gives the unloading scheme of the unloading request, and sends unloading notification information to notify the unloading scheme to a target unloading node in the micro cloud; the micro cloud cluster head node sends unloading confirmation information to the unloading node, and a component management function sub-module 103 of the unloading node sends unloading input parameter information of a component to be unloaded to a target unloading node; the distribution function sub-module 204 in the micro cloud cluster head service function module 200 instantiates a corresponding application component on the target offload node and completes the operation of the synchronous running state, which is the running state of the application component running on the offload node. Thus, when the application on the offload node runs to a certain time and needs to call a package and/or class and/or function in the application component offloaded to the target offload node, the component management function sub-module 103 of the offload node redirects the call to the target offload node while sending certain parameters (such as initialization parameters of the class, call parameters of the function, and the like) to the target offload node, and after redirection by the offload node, the target offload node executes the call request, and after obtaining the running result, the target offload node sends component offload output parameter information corresponding to the application component to the offload node, and returns the running result to the offload node.
It should be noted that, in the micro cloud, after the call is completed, the target offload node does not destroy the offloaded application component, and the destruction is controlled and executed by the micro cloud cluster head service function module 200. Generally, after the micro cloud cluster head service function module 200 makes a decision again, if the application component uninstalling scheme is changed, the target uninstalling node destroys the application component.
By applying the networking method of the micro cloud provided by the embodiment of the invention, the application program component is taken as the unloading granularity, and the application program component is dynamically unloaded to other equipment in the micro cloud according to the optimal strategy when the application program runs, so that the method has better flexibility compared with the unloading based on a virtual machine, reduces the load and communication bandwidth overhead of the micro cloud, and is beneficial to global optimization and dynamic load balancing; a large amount of idle user equipment around the micro cloud is also included in the micro cloud as a part of computing resources, idle edge computing resources can be efficiently utilized, self-organizing networking of the micro cloud can be optimized by dynamically discovering, expanding and combining the micro cloud, the problem of large load of the traditional micro cloud caused by greedy unloading of a mobile node is solved, and meanwhile, the resource utilization rate of the whole micro cloud is improved; compared with the traditional mobile cloud computing method for unloading tasks to a remote cloud data center, the micro cloud computing method has the advantages that a large amount of backbone network bandwidth is occupied, the micro cloud computing method is closer to users, delay is small, and unloading of the tasks and obtaining of computing results are faster.
In addition, each node in the micro cloud may offload any application component that needs to be run to another node in the micro cloud, and what the decision function sub-module 203 needs to optimize is what node runs what application component. Assuming that the set of all application program components needing to be operated in a certain micro cloud is C, the number of the application program components is W, and the micro cloud has N nodes in total, any one component CiE C, i 1,2 … W, there are at most N possible nodes that can be offloaded, then the number of feasible solutions to the problem will be in terms of O (N)W) Is increasing. To find an optimal solution in such a huge solution space is time-consuming, and for this reason, the embodiment of the present invention further provides an offloading optimization strategy for an application component based on a communication range of a mobile node, where the optimization strategy can significantly reduce the offloading solution space and improve the efficiency of an offloading optimization allocation algorithm.
Since each component ciE C, i is 1,2 … W, it is possible to be unloaded to any node in the cloudiness, and actually, at any time, the unloading node can only unload the application components that it needs to run to the target unloading node within its own communication range, so it can be seen that the number N of the unloaded candidate nodes can be optimized, and thus, the number of nodes that can be solved is exponentially reduced, which will bring about a great improvement in system performance.
The scenario shown in fig. 4 is that a gray circle represents a micro cloud cluster head node, a larger circle represents a communication range of the micro cloud cluster head node, a node corresponding to a square represents an unloading node that needs to unload an application component, a smaller circle represents a communication range of the unloading node, a node corresponding to a triangle represents a general node in the communication range of the micro cloud cluster head node and the unloading node, and a node corresponding to a pentagon represents a general node in the communication range of the micro cloud cluster head node but not in the communication range of the unloading node. In the component uninstalling allocation algorithm without considering the optimization strategy, all nodes in the micro cloud are target uninstalling nodes, in the optimization uninstalling strategy algorithm based on the communication range of the mobile node, a component can only be uninstalled to nodes which are both in the management range of the micro cloud and in the communication range of the uninstalling nodes, and in fig. 4, a node corresponding to a square can only uninstall its own application component to nodes corresponding to a triangle and a circle, but not to nodes corresponding to the pentagons.
The amount of reduction in solution space for the target offload node by the mobile node's communication range-based application component offload optimization strategy is demonstrated below.
In the scenario shown in fig. 4, it is assumed that the number of nodes in a certain area in the entire scenario is subject to a Poisson Point Process (Poisson Point Process), which is hereinafter referred to as PPP for short, that is, PPP is used for short
Where D represents a region, | D | represents the area of the region D, λ represents the mean of the number of nodes in a unit area, and λ | D | is the mean of the number of nodes in the region D.
If the communication range of the micro cloud cluster head node is R, the communication range of the micro cloud cluster head node, namely the area in the micro cloud coverage range, is pi R2Then the size of the solution space of the algorithm without taking into account the optimization strategy is (λ x π R)2)MWhere M is the number of total components.
If the communication range of any general node is r, the area of the overlapped part of the communication range of the micro cloud cluster head node and the communication range of the any general node is S, and the average number of the nodes in the overlapped part is SThe number is λ × S, that is, the number of target offload nodes selectable by the application component on any general node is λ × S, so that the size of the solution space of the algorithm for the offload policy optimization based on the communication range of the mobile node is (λ × S)M。
To obtain S, a coordinate system may be established, as shown in fig. 5, where O is the position of the micro cloud cluster head node, a is the position of the unloading node, a large circle with O as the center of circle is the communication range of the micro cloud cluster head node, a small circle with a as the center of circle is the communication range of the unloading node, a rectangular plane coordinate system is established with the position of the center of circle O of the large circle as the origin and the line OA as the x axis, and then the area of the overlapped portion of the two circles is S. When the small circle completely enters the large circle, S ═ pi r2If the overlap area is maximized, the size of the algorithm solution space for optimization of the offloading policy based on the communication range of the mobile node can be reduced to at least (λ x π r)2)MThat is, the lower bound of the performance improvement of the algorithm isIt can be seen that when the total number of application program components in the present cloudlet is large, the algorithm performance is improved more significantly.
In addition, the embodiment of the present invention further provides a format of the interactive information in the micro cloud networking method, wherein the general information format includes a message type, a sender ID, a receiver ID, a micro cloud ID, a message load, and the like, and the specific format is shown in table 1:
TABLE 1
The message types of the interaction information include: broadcast discovery messages, micro cloud capability query messages, node join request messages, node join confirmation messages, micro cloud member keep-alive messages, component unload request messages, component unload confirmations, component unload notification messages, component unload input parameter messages, component unload output parameter messages, micro cloud merge request messages, micro cloud merge confirmation messages, micro cloud merge rejection messages, micro cloud merge notification messages, micro cloud allocation messages, node removal request messages, node removal confirmation messages.
The format of the broadcast discovery message is shown in table 2:
TABLE 2
The format of the micro cloud capability query message is shown in table 3:
TABLE 3
The format of the node join request message is shown in table 4:
TABLE 4
The format of the node join acknowledgement message is shown in table 5:
TABLE 5
The format of the micro cloud member keep-alive message is shown in table 6:
TABLE 6
Micro cloud member keep-alive | Sender ID | Receiver ID | Associated micro cloud ID |
The format of the component offload request message is shown in table 7:
TABLE 7
The format of the component uninstall acknowledge message is shown in table 8:
TABLE 8
The format of the component offload notification message is shown in table 9:
TABLE 9
Component offload notification | Sender ID | Receiver ID | Specific information of notification |
The format of the component offload input parameter message is shown in table 10:
watch 10
Component offload input parameters | Sender ID | Receiver ID | Offloaded component ID | Specific parameters of input |
The format of the component offload output parameter message is shown in table 11:
TABLE 11
Component offload output parameters | Sender ID | Receiver ID | Offloaded component ID | Specific parameters of the output |
The format of the micro cloud merge request message is shown in table 12:
TABLE 12
The format of the micro cloud merge confirm message is shown in table 13:
watch 13
Micro cloud merge validation | Sender ID | Receiver ID | Micro cloud ID of sender |
The format of the micro-cloud merge reject message is shown in table 14:
TABLE 14
Micro cloud merge rejection | Sender ID | Receiver ID | Micro cloud ID of sender |
The format of the micro-cloud merge notification message is shown in table 15:
watch 15
Micro-cloud merged notifications | Sender ID | Merged new cloudlet ID | Merged new micro cloud cluster head node ID |
The format of the micro cloud allocation message is shown in table 16:
TABLE 16
Micro cloud component allocation | Sender ID | Receiver ID | Component allocation policy information |
The format of the node removal request message (passive removal) is shown in table 17:
TABLE 17
The format of the node removal request message (active removal) is shown in table 18:
watch 18
The format of the node removal acknowledgement message is shown in table 19:
watch 19
Removal confirmation | Sender ID | Receiver ID | Micro-cloud ID to remove a node | Returned parameters |
Corresponding to the above method embodiment, the embodiment of the present invention further provides a micro cloud networking device, which is applied to a mobile cloud computing system, where the mobile cloud computing system includes at least two nodes, the nodes include two functional modules related to the mobile cloud computing system, and the two functional modules are respectively a micro cloud cluster head service functional module 200 and a general node service functional module 100, and the micro cloud cluster head service functional module 200 and the general node service functional module 100 are both in an activated state; as shown in fig. 6, the apparatus includes:
a determining module 301, configured to determine, as a micro cloud cluster head node of a target micro cloud, a self node of any one of the at least two nodes;
a broadcasting module 302, configured to broadcast, by the micro cloud cluster head node, a broadcast discovery packet for discovering other nodes;
a receiving module 303, configured to receive a micro cloud capability query request and first information sent by a first node, where the first node is a node that receives the broadcast discovery packet, and the first information includes: capability information, current resource state information and available component service information of the first node;
a sending module 304, configured to send second information to the first node, where the second information includes: the capability information of the target micro cloud, the current resource state information and the available component service information;
a first judging module 305, configured to judge whether a total capacity of the target cloudlet is not less than a capacity of the first node;
a first processing module 306, configured to, when it is determined that the total capacity of the target micro-cloud is not less than the capacity of the first node, join the first node to the target micro-cloud and continue to execute the broadcasting module 302 when receiving a join request of the first node and allowing the first node to join the target micro-cloud; wherein, the current micro cloud cluster head service function module 200 of the first node is in an inactive state;
a second processing module 307, configured to send a join request to the first node when it is determined that the total capacity of the target cloudlet is smaller than the capacity of the first node; deactivating the micro cloud cluster head service function module 200 of the micro cloud cluster head node of the target micro cloud in the case of receiving the join permission information sent by the first node; adding the nodes included in the target micro cloud into the first node, generating a new micro cloud, and continuing to execute the broadcasting module 302; wherein the micro cloud cluster head node of the new micro cloud is the first node.
By applying the networking device of the micro cloud provided by the embodiment of the invention, the application program component is taken as the unloading granularity, and the application program component is dynamically unloaded to other equipment in the micro cloud according to the optimal strategy when the application program runs, so that the networking device has better flexibility compared with the unloading based on a virtual machine, reduces the load and communication bandwidth overhead of the micro cloud, and is beneficial to global optimization and dynamic load balancing; a large amount of idle user equipment around the micro cloud is also included in the micro cloud as a part of computing resources, idle edge computing resources can be efficiently utilized, self-organizing networking of the micro cloud can be optimized by dynamically discovering, expanding and combining the micro cloud, the problem of large load of the traditional micro cloud caused by greedy unloading of a mobile node is solved, and meanwhile, the resource utilization rate of the whole micro cloud is improved; compared with the traditional mobile cloud computing method for unloading tasks to a remote cloud data center, the micro cloud computing method has the advantages that a large amount of backbone network bandwidth is occupied, the micro cloud computing method is closer to users, delay is small, and unloading of the tasks and obtaining of computing results are faster.
Specifically, the apparatus further comprises:
a third information receiving module, configured to receive third information sent by the first clout, where the third information includes: capability information of the first cloudlet, current resource state information and component service information which can be provided;
the first computing module is used for computing the total capacity of the first micro cloud according to the third information;
the second judgment module is used for judging whether the total capacity of the current micro-cloud is not less than the total capacity of the first micro-cloud;
the third processing module is used for calculating the average utilization rate of the first resources of the current micro cloud, the average utilization rate of the second resources of the first micro cloud and the average utilization rate of the third resources of the new micro cloud generated after the first micro cloud is added after the micro cloud merging request sent by the first micro cloud is received when the total capacity of the current micro cloud is judged to be not less than the total capacity of the first micro cloud;
a third determining module, configured to determine whether the third average usage rate of the resource is smaller than the first average usage rate of the resource and the second average usage rate of the resource at the same time;
the fourth processing module is configured to determine a micro cloud cluster head node of a current micro cloud as a micro cloud cluster head node of a merged micro cloud when it is determined that the third average utilization rate of the resources is smaller than the first average utilization rate of the resources and the second average utilization rate of the resources at the same time; merging the first cloudlet with the current cloudlet.
Specifically, the total capacity of the cloudiness is calculated according to the following formula:
wherein P is the total capacity of the micro cloud, N is the number of nodes in the micro cloud,is a node viE.g. the total capability of V, V is the union of all nodes in the micro cloud, is a node viThe number of the cores of (a) is,for the computing power of each core, MviIs a node viThe memory of (a) is provided,is a node viα, β and gamma are weighting coefficients, and α + β + gamma is 1;
calculating the average utilization rate of the resources of the micro cloud according to the following formula:
wherein, the usage-A is the average utilization rate of the resources of the micro cloud,is a node viE.g. the utilization rate of V, V is the union of all nodes in the micro cloud, c belongs to C, C is all the components running on the node, including the application components to be run by the node and the application components unloaded by other nodes, freqcFor the frequency called by the component c, cu is the CPU used by the component c, mu is the memory used by the component c, nu is the bandwidth consumption caused by the component c, α ', β', γ 'are weighting coefficients, α' + β '+ γ' ═ 1.
Specifically, the apparatus further comprises:
the second computing module is used for computing the total capability of the current micro cloud and the resource cooperative sharing degree of each common node, wherein the common nodes are other nodes except the micro cloud cluster head node in the current micro cloud;
the fourth judging module is used for judging whether the average resource utilization rate of the current micro cloud is greater than a preset threshold value or not;
and the first removing module is used for removing the common node corresponding to the minimum resource collaborative sharing value obtained by calculation when the average resource utilization rate of the current micro cloud is judged to be greater than a preset threshold value.
Specifically, the apparatus further comprises:
a removal request receiving module, configured to receive a removal request sent by a target general node, where the removal request is sent when an access network signal strength of the target general node is lower than a preset threshold and a broadcast discovery packet of another micro cloud is received, and the general node is another node in the current micro cloud except for the micro cloud cluster head node;
and the second removing module is used for removing the target general node.
Specifically, the first removing module or the second removing module is specifically configured to:
judging whether an application program component is unloaded to the removed general node or not in the current micro cloud;
if not, judging whether a first component exists or not, wherein the first component is an application program component of the removed general node unloaded to other general nodes in the current micro cloud; if yes, judging whether a function on the first component is executing; if a function is executing, judging whether the execution time of the function is not greater than a preset first threshold value; if not, removing the removed general node after receiving a message of completing the execution of the function sent by other general nodes; if so, notifying the removed generic node to cause the removed generic node to re-instantiate the first component and synchronize function execution state; removing the removed general node;
if so, judging whether a function is executed on a second component, wherein the second component is an application program component of other general nodes in the current micro cloud unloaded to the removed general node; if not, removing the removed general node; if so, judging whether the execution time of the function is not greater than a preset second threshold value; if not, removing the removed general node after receiving a message that the function execution sent by the removed general node is completed; if so, notifying other generic nodes on the removed generic node to uninstall the application component to cause the other generic nodes to re-instantiate the second component and synchronize function execution state; removing the removed general node.
Specifically, the apparatus further comprises:
the system comprises a joining request information receiving module, a joining request information receiving module and a joining request information sending module, wherein the joining request information comprises the capability of a general node and a joining reason, and the joining reason is that the general node passively joins in the current micro cloud due to the mobility of the general node;
and the adding module is used for adding the general node into the current micro cloud.
Specifically, the apparatus further comprises:
the component uninstalling request receiving module is used for receiving a component uninstalling request based on an application component, which is sent by a general node in the current micro cloud, wherein the general node is other nodes except the micro cloud cluster head node in the current micro cloud;
the target unloading node determining module is used for determining a target unloading node according to the current resource state information and the component state information of all the general nodes in the current micro cloud;
the identification information sending module is used for sending the identification information of the determined target unloading node to a general node needing to unload the application program component; and sending the identification information of the general node needing to uninstall the application program component to the target uninstalling node, so that the general node needing to uninstall the application program component uninstalls the application program component needing to be uninstalled to the target uninstalling node.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (10)
1. A component-based cloudlet, the cloudlet comprising:
the system comprises a micro cloud cluster head node and a plurality of general nodes, wherein the nodes are communicated with each other, the micro cloud cluster head node and the general nodes comprise two functional modules related to a mobile cloud computing system, the functional modules are respectively a micro cloud cluster head service functional module and a general node service functional module, the general node service functional modules of the micro cloud cluster head node and the general node are in an activated state, the micro cloud cluster head service functional module of the micro cloud cluster head node is in an activated state, and the micro cloud cluster head service functional module of the general node is in an inactivated state;
the general node service function module comprises: a node agent function sub-module, an equipment monitoring function sub-module and an assembly management function sub-module, wherein,
the node agent functional submodule is used for controlling the interaction of information and the interaction of data information;
the device monitoring function sub-module is used for monitoring the current resource state of the node;
the component management function submodule is used for managing all application program components of the node per se and call relations among the application program components and comprises a component registry, wherein the component registry is used for storing call information of the application program components of the node per se, and the call information comprises the call relations, parameters, return values and estimated completion time;
the micro cloud cluster head service function module comprises a node management function sub-module, an assembly registration function sub-module, a decision function sub-module and an allocation function sub-module, wherein,
the node management function sub-module is used for managing addition and removal of common nodes, combination of two micro clouds and storage of equipment information and current resource state information of all the nodes;
the component registration function sub-module is used for storing application program component calling information of all nodes, wherein the calling information comprises calling relations, parameters, return values and estimated completion time;
the decision function submodule is used for determining an optimal component deployment result according to current resource state information stored by the node management function submodule, application program component calling information stored by the component registration function submodule and current application program component deployment state information, and the optimal component deployment result is an application program component deployment configuration result based on global optimization of the micro cloud;
and the distribution function submodule is used for distributing the application program components according to the optimal component deployment result determined by the decision function submodule.
2. A micro cloud networking method is characterized in that the micro cloud networking method is applied to a mobile cloud computing system, the mobile cloud computing system comprises at least two nodes, each node comprises two functional modules related to the mobile cloud computing system, the functional modules are respectively a micro cloud cluster head service functional module and a general node service functional module, and the micro cloud cluster head service functional module and the general node service functional module are both in an activated state;
the method comprises the following steps:
any node in the at least two nodes is determined as a micro cloud cluster head node of the target micro cloud;
the micro cloud cluster head node broadcasts a broadcast discovery packet for discovering other nodes;
receiving a micro cloud capability query request and first information sent by a first node, wherein the first node is a node that receives the broadcast discovery packet, and the first information includes: capability information, current resource state information and available component service information of the first node;
sending second information to the first node, the second information comprising: the capability information of the target micro cloud, the current resource state information and the available component service information;
judging whether the total capacity of the target micro-cloud is not less than the total capacity of the first node;
if yes, under the conditions that a joining request of the first node is received and the first node is allowed to join the target micro cloud, the first node is joined into the target micro cloud, and the operation step of broadcasting a broadcast discovery packet for discovering other nodes is continuously executed; the current micro cloud cluster head service function module of the first node is in an inactivated state;
if not, sending a joining request to the first node; under the condition that the joining permission information sent by the first node is received, deactivating a micro cloud cluster head service function module of a micro cloud cluster head node of the target micro cloud; adding the nodes included by the target micro cloud into the first node to generate a new micro cloud; and the micro cloud cluster head node of the new micro cloud is the first node, and the operation step of broadcasting the broadcast discovery packet for discovering other nodes is continuously executed.
3. The method of claim 2, further comprising:
receiving third information sent by the first micro cloud, wherein the third information comprises: capability information of the first cloudlet, current resource state information and component service information which can be provided;
calculating the total capacity of the first micro cloud according to the third information;
judging whether the total capacity of the current micro-cloud is not less than the total capacity of the first micro-cloud;
if so, after receiving a micro cloud merging request sent by the first micro cloud, calculating a first resource average utilization rate of the current micro cloud, a second resource average utilization rate of the first micro cloud, and a third resource average utilization rate of a new micro cloud generated after the first micro cloud is added;
judging whether the third average utilization rate of the resources is smaller than the first average utilization rate of the resources and the second average utilization rate of the resources at the same time;
if so, determining the micro cloud cluster head node of the current micro cloud as the micro cloud cluster head node of the combined micro cloud; merging the first cloudlet with the current cloudlet.
4. The method of claim 3, wherein the total capacity of the cloudiness is calculated according to the following formula:
i=1,…N,
wherein P is the total capacity of the micro cloud, N is the number of nodes in the micro cloud,is a node viE.g. total of VCapability, V is the union of all nodes in the micro cloud, is a node viThe number of the cores of (a) is,for the computing power of each core, MviIs a node viThe memory of (a) is provided,is a node viα, β and gamma are weighting coefficients, and α + β + gamma is 1;
calculating the average utilization rate of the resources of the micro cloud according to the following formula:
i=1,…N,
wherein, the usage-A is the average utilization rate of the resources of the micro cloud,is a node viE.g. the utilization rate of V, V is the union of all nodes in the micro cloud, c belongs to C, C is all the components running on the node, including the application components to be run by the node and the application components unloaded by other nodes, freqcIs adjusted for component cThe frequency used, cu is the CPU used by the component c, mu is the memory used by the component c, nu is the bandwidth consumption caused by the component c, α ', β', γ 'are weighting coefficients, α' + β '+ γ' ═ 1.
5. The method of claim 2, further comprising:
calculating the resource cooperative sharing degree of each general node of the average resource utilization rate of the current micro cloud, wherein the general nodes are other nodes except the micro cloud cluster head node in the current micro cloud;
judging whether the average resource utilization rate of the current micro cloud is greater than a preset threshold value or not;
if so, removing the common node corresponding to the minimum resource collaborative sharing value obtained by calculation;
determining the resource cooperative sharing degree through the following formula, wherein after the node vj executes the component c unloaded by the node vi, the node viDegree of resource co-sharingComprises the following steps:
node vjDegree of resource co-sharingComprises the following steps:
wherein,andare respectively node vjExecuting node viUnloaded component c front node viAnd post-execution node vjη (m, c, v)i,vj) For the actual occupied resource or actual occupied resource usage of the unloaded component c, when η (m, c, v)i,vj) In the case of the resources that are actually occupied,
η(m,c,vi,vj) The calculation formula of (2) is as follows:
η(m,c,vi,vj)=u·loadm·freqc+t·memm+w·(argm+resm)·freqc
wherein, loadmFreq, the amount of CPU resource usage when running for function mcFrequency, mem, called for component cmThe size of the memory occupied for the operation of the function m, argmFor the size of the parameter arg of function m, resmFor the function m, the size of the return value res is returned, u, t, w are weighting coefficients, u + t + w is 1, and/or,
when η (m, c, v)i,vj) η (m, c, v) for actual occupied resource usagei,vj) The calculation formula of (2) is as follows:
wherein,is a node vjThe number of the cores of (a) is,for the computing power of each core, MvjIs a node vjThe memory of (a) is provided,is a node vjThe bandwidth of (c).
6. The method of claim 2, further comprising:
receiving a removal request sent by a target general node, wherein the removal request is sent when the signal strength of an access network of the target general node is lower than a preset threshold value and broadcast discovery packets of other micro clouds are received, and the general node is other nodes except the micro cloud cluster head node in the current micro cloud;
removing the target generic node.
7. The method of claim 5 or 6, wherein removing a generic node comprises:
judging whether an application program component is unloaded to the removed general node or not in the current micro cloud;
if not, judging whether a first component exists or not, wherein the first component is an application program component of the removed general node unloaded to other general nodes in the current micro cloud; if yes, judging whether a function on the first component is executing; if a function is executing, judging whether the execution time of the function is not greater than a preset first threshold value; if not, removing the removed general node after receiving a message of completing the execution of the function sent by other general nodes; if so, notifying the removed generic node to cause the removed generic node to re-instantiate the first component and synchronize function execution state; removing the removed general node;
if so, judging whether a function is executed on a second component, wherein the second component is an application program component of other general nodes in the current micro cloud unloaded to the removed general node; if not, removing the removed general node; if so, judging whether the execution time of the function is not greater than a preset second threshold value; if not, removing the removed general node after receiving a message that the function execution sent by the removed general node is completed; if so, notifying other generic nodes on the removed generic node to uninstall the application component to cause the other generic nodes to re-instantiate the second component and synchronize function execution state; removing the removed general node.
8. The method of claim 2, further comprising:
receiving join request information sent by general nodes in other micro clouds, wherein the join request information comprises the capability of the general nodes and join reasons, and the join reasons are that the general nodes passively join the current micro cloud due to the mobility of the general nodes;
and adding the general node into the current micro cloud.
9. The method of claim 2, further comprising:
receiving an unloading request based on an application program component sent by a general node in the current micro cloud, wherein the general node is other nodes except the micro cloud cluster head node in the current micro cloud;
determining a target unloading node according to the current resource state information and the component state information of all the general nodes in the current micro cloud;
sending the determined identification information of the target uninstalling node to a general node needing to uninstall the application program component; and sending the identification information of the general node needing to uninstall the application program component to the target uninstalling node, so that the general node needing to uninstall the application program component uninstalls the application program component needing to be uninstalled to the target uninstalling node.
10. The micro-cloud networking device is applied to a mobile cloud computing system, the mobile cloud computing system comprises at least two nodes, the nodes comprise two functional modules related to the mobile cloud computing system, the functional modules are respectively a micro-cloud cluster head service functional module and a general node service functional module, and the micro-cloud cluster head service functional module and the general node service functional module are both in an activated state;
the device comprises:
the determining module is used for determining a self node as a micro cloud cluster head node of a target micro cloud by any node of the at least two nodes;
a broadcasting module, configured to broadcast, by the micro cloud cluster head node, a broadcast discovery packet for discovering other nodes;
a receiving module, configured to receive a micro cloud capability query request and first information sent by a first node, where the first node is a node that receives the broadcast discovery packet, and the first information includes: capability information, current resource state information and available component service information of the first node;
a sending module, configured to send second information to the first node, where the second information includes: the capability information of the target micro cloud, the current resource state information and the available component service information;
the first judgment module is used for judging whether the total capacity of the target micro cloud is not less than the capacity of the first node;
the first processing module is used for adding the first node into the target micro cloud and continuing to execute the broadcasting module under the conditions that a joining request of the first node is received and the first node is allowed to join the target micro cloud when the total capacity of the target micro cloud is judged to be not less than the capacity of the first node; the current micro cloud cluster head service function module of the first node is in an inactivated state;
the second processing module is used for sending a joining request to the first node when the total capacity of the target micro-cloud is judged to be smaller than the capacity of the first node; under the condition that the joining permission information sent by the first node is received, deactivating a micro cloud cluster head service function module of a micro cloud cluster head node of the target micro cloud; adding the nodes included by the target micro cloud into the first node, generating a new micro cloud, and continuously executing the broadcast module; wherein the micro cloud cluster head node of the new micro cloud is the first node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610399012.5A CN106131106B (en) | 2016-06-07 | 2016-06-07 | The network-building method and device of a kind of thin cloud component-based, thin cloud |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610399012.5A CN106131106B (en) | 2016-06-07 | 2016-06-07 | The network-building method and device of a kind of thin cloud component-based, thin cloud |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106131106A CN106131106A (en) | 2016-11-16 |
CN106131106B true CN106131106B (en) | 2019-04-12 |
Family
ID=57270379
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610399012.5A Active CN106131106B (en) | 2016-06-07 | 2016-06-07 | The network-building method and device of a kind of thin cloud component-based, thin cloud |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106131106B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107046567A (en) * | 2017-02-14 | 2017-08-15 | 广州云晫信息科技有限公司 | A kind of distributed cloud computing system for the centralized management being made up of thin cloud system |
CN107105003A (en) * | 2017-02-14 | 2017-08-29 | 广州云晫信息科技有限公司 | Cloud system is melted automatically in the super fusion thin cloud data center of one kind |
CN106900011B (en) * | 2017-02-28 | 2020-04-07 | 重庆邮电大学 | MEC-based task unloading method between cellular base stations |
WO2018205301A1 (en) * | 2017-05-08 | 2018-11-15 | 北京邮电大学 | Mobile computing offload cooperative control system and method |
WO2019061188A1 (en) * | 2017-09-28 | 2019-04-04 | Zte Corporation | Mobile network interaction proxy |
US10749740B2 (en) * | 2017-10-31 | 2020-08-18 | Hewlett Packard Enterprise Development Lp | Deploying network-based cloud platforms on end equipment |
CN109104455B (en) * | 2018-04-16 | 2021-06-22 | 南京邮电大学 | Method for optimizing road edge micro-cloud load balance |
CN108900628A (en) * | 2018-07-20 | 2018-11-27 | 南京工业大学 | Micro cloud computing resource allocation method based on pricing mechanism in edge computing environment |
CN109800027B (en) * | 2018-12-27 | 2022-04-12 | 上海无线通信研究中心 | Method and system for task unloading between network nodes based on autonomous participation of service nodes |
CN112579693B (en) * | 2019-09-29 | 2024-05-24 | 中国石油化工股份有限公司 | Downhole distributed micro cloud computing system while drilling |
CN113300866B (en) * | 2020-06-16 | 2022-05-27 | 阿里巴巴集团控股有限公司 | Node capacity control method, device, system and storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102035862B (en) * | 2009-09-30 | 2013-11-06 | 国际商业机器公司 | Configuration node fault transfer method and system in SVC cluster |
US9282898B2 (en) * | 2012-06-25 | 2016-03-15 | Sprint Communications Company L.P. | End-to-end trusted communications infrastructure |
CN104919839B (en) * | 2013-01-09 | 2019-06-21 | 安华高科技股份有限公司 | System and method for establishing and keeping cell cluster |
CN104284387B (en) * | 2014-09-19 | 2018-04-10 | 南京邮电大学 | A kind of cluster routing method towards mobile sensor network |
CN104661278B (en) * | 2015-02-10 | 2017-10-10 | 湖南大学 | A kind of sub-clustering cooperative routing method based on evolutionary Game |
-
2016
- 2016-06-07 CN CN201610399012.5A patent/CN106131106B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106131106A (en) | 2016-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106131106B (en) | The network-building method and device of a kind of thin cloud component-based, thin cloud | |
CN112136294B (en) | Message and system for influencing service route by application function | |
CN107087019B (en) | Task scheduling method and device based on end cloud cooperative computing architecture | |
US9955290B2 (en) | Opportunistic offloading of tasks between nearby computing devices | |
Aljanabi et al. | Improving IoT services using a hybrid fog-cloud offloading | |
CN109548082A (en) | Business reorientation method and device | |
KR102140636B1 (en) | Building a pool-based M2M service layer through NFV | |
US20220264428A1 (en) | Method for controlling use of network slice, apparatus, and system | |
US8732312B2 (en) | Computing system and computing system management method | |
CN116547958A (en) | Method, system and computer readable medium for ranking process of network function selection | |
US11432137B2 (en) | Service notification method for mobile edge host and apparatus | |
US20100077250A1 (en) | Virtualization based high availability cluster system and method for managing failure in virtualization based high availability cluster system | |
Maiti et al. | An effective approach of latency-aware fog smart gateways deployment for IoT services | |
US20150223252A1 (en) | Resource Allocation Method and Device | |
CN103516744A (en) | A data processing method, an application server and an application server cluster | |
US20240137269A1 (en) | Method for instantiating edge application server and apparatus | |
CN112351083B (en) | Service processing method and network service system | |
Boukerche et al. | Vehicular cloud network: A new challenge for resource management based systems | |
EP3132567B1 (en) | Event processing in a network management system | |
US20170111240A1 (en) | Service Elastic Method and Apparatus in Cloud Computing | |
US20240345874A1 (en) | Computing native network and related devices | |
El-Barbary et al. | A cloudlet architecture using mobile devices | |
CN111835797A (en) | Data processing method, device and equipment | |
WO2015018023A1 (en) | Method, device and system for scheduling resources | |
CN115374949A (en) | Distributed quantum computing system and resource management method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |