CN105812461B - A kind of mobile cloud environment context aware computation migration method - Google Patents

A kind of mobile cloud environment context aware computation migration method Download PDF

Info

Publication number
CN105812461B
CN105812461B CN201610133601.9A CN201610133601A CN105812461B CN 105812461 B CN105812461 B CN 105812461B CN 201610133601 A CN201610133601 A CN 201610133601A CN 105812461 B CN105812461 B CN 105812461B
Authority
CN
China
Prior art keywords
service
resource
task
network
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
Application number
CN201610133601.9A
Other languages
Chinese (zh)
Other versions
CN105812461A (en
Inventor
陈星�
曾雪娥
刘漳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhou University
Original Assignee
Fuzhou University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fuzhou University filed Critical Fuzhou University
Priority to CN201610133601.9A priority Critical patent/CN105812461B/en
Publication of CN105812461A publication Critical patent/CN105812461A/en
Application granted granted Critical
Publication of CN105812461B publication Critical patent/CN105812461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention relates to a kind of mobile cloud environment context aware computation migration methods, firstly, providing a kind of design pattern for supporting to calculate dynamic migration in application;Secondly, proposing an assessment models, mobile device-based context environmental can automatically select optimal cloud resource for computation migration;Finally, realizing a kind of frame to support above-mentioned proposed design pattern and assessment models.The present invention can be flexibly applied to mobile cloud environment complicated and changeable.Compared to traditional moving method, it can significantly improve the performance and user experience of mobile device, and promote its cruising ability.

Description

A kind of mobile cloud environment context aware computation migration method
Technical field
The present invention relates to mobile field of cloud calculation, especially a kind of mobile cloud environment context aware computation migration methods.
Background technique
With popularizing for intelligent mobile handheld device, numerous abundant in content applications are emerged, so that the property of mobile device It can become increasingly conspicuous with energy consumption problem.Computation migration becomes currently a popular solution, it is by by " calculating " of mobile application Task is from terminal transfer to Cloud Server, to mitigate terminal device computation burden, while reducing the electrical source consumption of terminal device And promote its cruising ability.Most of traditional moving method is using the server or cloud specified in advance.However, these are traditional Method cannot be flexibly applied to mobile cloud environment complicated and changeable, and main cause has following two aspect:
On the one hand, with the movement of equipment, its context environmental (such as position, network condition) changes constantly.Example Such as, in some places, mobile device is able to use free WIFI connection;And in other place, it can only be connected using 3G Fetch replacement.For speed and energy consumption, the performance of each connection may be different.
On the other hand, there are many optional cloud resources, such as public cloud meter in increasing with cloud, mist, intelligent terminal etc. Calculate service, neighbouring cloudlet.At different conditions, it needs that different cloud resources is selected to be migrated.For example, working as network When environment is poor, the cloudlet for compute-intensive applications being moved to surrounding is can be considered in we, is postponed by reducing, thus Improve the performance and user experience of mobile device.
Summary of the invention
In view of this, the purpose of the present invention is to propose to a kind of mobile cloud environment context aware computation migration method, based on working as The context environmental of preceding mobile device and available cloud resource can be dynamically selected most preferably in a kind of cost-effective mode Cloud resource for migrating.
Core of the invention thought is that mobile device-based context environmental and available cloud resource are moved at runtime Optimal cloud resource is selected to state, and will need to run on the calculating task code dynamic migration to the resource migrated.This hair It is bright to be made of three parts: a kind of design pattern, an assessment models and a kind of context aware computation migration frame.Firstly, A kind of design pattern for supporting to calculate dynamic migration in application is proposed, so that all parts in can be on demand in local Or long-range interoperability.Wherein, calculating task code dynamically can be migrated and dispose.Secondly, an assessment models are proposed, According to the context environmental of mobile device and available cloud resource, automatically selects optimal resource and migrated.In order to improve The availability of migration service, we have introduced service pool concept, and each service pool has polymerize local service, optimal service and most Frequent available service.In client, it would be desirable to real-time monitoring and collection computation task, mobile device context environmental, And the data such as cloud resource computing capability, and it is modeled respectively.According to model information and runtime data, Wo Mensuo The decision making algorithm of proposition selects optimal service and most frequently available service with regard to dynamic.Finally, realizing a kind of context aware meter It calculates migration frame and is used to support above-mentioned design pattern and assessment models.
The present invention using following scheme realize: a kind of mobile cloud environment context aware computation migration method, specifically include with Lower step;
Step S1: a kind of design pattern for supporting to calculate dynamic migration in application is proposed, so that all parts in It can interoperate on demand in Local or Remote;
Step S2: an assessment models are proposed, according to the context environmental of mobile device and available cloud resource, automatically Optimal resource is selected to be migrated;
Step S3: propose that a kind of context aware computation migration frame is used to support the design pattern of step S1 and step S2 is commented Estimate model.
Further, the design pattern in the step S1 includes programming model, deployment process and servicing operating mode;
As shown in Figure 1, the programming model includes a main module and a service registration library;In the main module The code that cannot be migrated is defined, all services that can be migrated are registered in the service registration library;
The deployment process is the following steps are included: step S11: mobile node finds target cloud resource, and to the target Cloud resource carries out authentication;Step S12: upon successful authentication, mobile node to the target cloud resource send it is all with Current service disposes relevant information;Step S13: the target cloud resource receives request, and starts whether to check current environment Can support the deployment of the service, if it can, and required service be not present, enter step S14, otherwise, enter step S15; Step S14: the target cloud resource obtains corresponding service document from mobile node and is disposed, and service description file is returned Back to mobile node;Step S15: the target cloud resource returns to the letter of " service is existing " or " can not dispose " to mobile node Breath;Fig. 2 describes the entire workflow of mechanism.
As shown in figure 3, the servicing operating mode provides a kind of target knot for supporting that calculating remotely executes on demand in application Structure, allow main module can effectively call other services but regardless of it is current they operate in the same VM or in different money Source node.The structure includes three core elements: local adapter, long-range adapter, service pool;
The service pool is single Virtual Service, and it is identical but be deployed in different cloud resources to have polymerize multiple functions The quality of candidate service, the candidate service is different from;When receiving call request, matter can be preferentially selected from service pool Best service is measured to be called;
The local adapter is mainly responsible for the current position of the called service of identification, and this method is forwarded to call;Work as master When module calls the method for Service1, the corresponding service pool of local adapter first discovery, and obtain in service pool quality most The description file serviced well.From service description file, it can recognize that the current position Service1.If Service1 In local runtime, then local adapter can direct retransmission method call so that main module need not pass through net when calling Service1 Network stack.If Service1 is remotely being executed, local adapter obtains the url of service from service description file, and to long-range Adapter forwards this method to call.
The long-range adapter can parse the HTTP request, be serviced when receiving HTTP request Name, method name and parameter information;And invocation target method;After goal approach has executed, corresponding result can be transmitted Client is returned, is merged with original application.In the whole process, if being called the position change serviced, for example turn from local Remote node has been moved on to, or has been transferred to another node from a certain remote node, caller, i.e. main module are not aware that called The variation of service position.
Further, the code that cannot be migrated includes following three classes: related to application user interface realization;It uses I/O equipment;Arbitrary external module is used.
Specifically, when development and application, programming personnel first must classify to the method in application, be divided into Two class of anchored and movable.The method of Anchored type must stay in main module, can only hold on the mobile apparatus Row;It mainly includes the following categories: 1) related to application user interface realization;2) I/O equipment has been used, for example has been read in equipment Accelerometer, GPS etc.;3) arbitrary external module has been used, for example has executed e-commerce transaction using network connection.These Method has used some resources that could can only be obtained on the mobile apparatus.If these methods are transferred in cloud resource and hold Row, their resources required for it can not find due tos, cause to execute mistake.Other methods except these methods are all returned automatically For the method for movable type, that is, they can both execute on the mobile apparatus or execute in cloud resource. The method of movable type must be developed to service, each service encapsulates independent applied function module;And it Require to register in service registration library.Each service in service registration library has corresponding service pool, in the service pool Dynamic aggregation one group of function identical service.In initial, only one service in service pool, that is, local service.It is answering When with operation, main module can call service by " Service name method name (parameter information) " form.
Further, the step S2 specifically includes the following steps:
Step S21: it respectively corresponds and is carried out with calculating task, mobile device context environmental and cloud resource computing capability Modeling, obtains task-function model, network-resource model, task-resource model;When a task is migrated to long-distance cloud money It is executed on source, total time TtotalMainly consist of two parts: Ttotal=Tserver+Ttransfer, wherein TseverFor server execution Time, TtransferFor network latency;
Step S22: construction service pool: according to device context environment and available cloud resource, decision making algorithm dynamic is proposed Select optimal service and most frequently available service;Then optimal service, most frequently available service and local service are dynamically gathered A service pool is synthesized, when optimal service and when most frequently available service is the same service, only there are two services in service pool; Meanwhile service pool can define calling sequence according to service quality;When service is called, quality in service pool can be preferentially called Best service;The service quality is to execute the time;
Step S23: collecting model information, including data monitoring and information are collected;
The execution and current environment that wherein the data monitoring is applied to real-time monitoring;Monitored data include: The title of current network, under current network available resource information, under current network all available resources transmission rate Total execution time on different resource is moved to round-trip delay, current task information, current task;
It includes practical execution and test execution that the information, which is collected,;The practical execution are as follows: when mobile device enters one When a network, the preferential service selected in service pool really to connect or execute task, and corresponding result deposit model letter In breath;The test execution are as follows: those resources not in service pool are tested.Fast-changing runtime environment is The big characteristic of the one of mobile computing;If being every time the resource selected in service pool, it is more likely that local optimum can be fallen into.For example, Some resource may cause current time performance very poor due to Network Abnormal;But this does not represent the next moment, and it will not improve. It would therefore be desirable to also test those resources not in service pool.We are provided with one for each cloud resource A information timeliness basic time Time;If a certain information overaging time, submitting test assignment: network-resource model It is tested in corresponding network, task-resource model is tested when that can connect the resource.If test is basically unchanged, Then each Time increases, and otherwise reduces;Same search engine.In order to obtain task-function model, network-resource model, task- Information needed for resource model, the result of practical execution or test execution can be all saved in database every time.In addition, working as net When network changes, it would be desirable to record the information of a network and current network, the assessment for most frequently available service mentions For supporting.
Further, task-function model described in step S21 are as follows:
T is enabled to indicate a group task set, for each of T task t, its transmission time is carried out by following formula It calculates:
Wherein, C (t) indicates the volume of transmitted data of task t, it is obtained by training in advance, and v indicates the data in network Transmission rate size, rtt indicate the round-trip delay between equipment and cloud resource;Different mobile applications have different data transmission Amount, input data and received result including transmission.For example, face recognition application needs biggish volume of transmitted data, and Quintet game application only needs relatively small volume of transmitted data.
In the task-function model, all it is independent from each other between all tasks.
Further, network-resource model described in step S21 are as follows:
Enable N={ n1,n2,...,nh, indicate h collection of network, S={ s1,s2,...,smIndicate m cloud resource set, V and RTT is the matrix of two h × m, have recorded respectively in heterogeneous networks the transmission rate of each resource and it is round-trip when The desired value prolonged;V and RTT matrix is defined as follows:
Wherein, vij, rijIt is illustrated respectively in network niUnder, equipment to cloud resource sjTransmission rate and round-trip delay expectation Value;For each element v in V and RTTij, rij, they are calculated by following expectation function:
s.t. w1+w2+…+wp=1;
Vector WTIn one weight factor of each element representation, the ratio that these elements are adjusted according to different scenes is big It is small;VijIt has recorded in network niUnder, cloud resource sjTransmission rate historical series, RTTijIt has recorded in network niUnder, Yun Zi Source sjRound-trip delay historical series;Historical series are obtained by practical execution or test execution.
The Matrix C of a h × h is also defined, for recording the variation tendency of user location, Matrix C is defined as follows:
Wherein, cij(i≠j)Have recorded users from networks niIt is moved to network njNumber.
Further, task-resource model described in step S21 are as follows:
Different cloud resources have different processing capacity.Give one group of independent task T={ t1,t2,...,trAnd one Group cloud resource S={ s1,s2,...,sm, matrix E has recorded the desired value of execution time of the different task in each resource, Then the matrix E of the r × m is defined as follows:
Wherein, ekjExpression task tkIn cloud resource sjOn execution the time desired value, for each element in matrix E ekj, calculated by following expectation function:
s.t. w1+w2+…+wp=1;
Wherein, EkjHave recorded task tkIn cloud resource sjOn execution the time historical series.
Further, optimal service described in the step S22 refers to the highest clothes of actual efficiency under current network Business, for the computation migration of current application, wherein the highest service of actual efficiency, which must satisfy to execute to be less than total time, calls this The time of ground service, specifically includes the following steps:
Step 1: collecting all contextual informations at runtime as input parameter, the contextual information includes current Task tk, essential information model and mobile device current network ni
Step 2: for given task tk, it is assessed in local execution total time, is denoted as local_cost;
Step 3: according to input parameter, getting one group of available cloud resource, indicated with S;Then, to all available clouds Resource is all assessed and selects the smallest cloud resource of assessed value as current network optimal service;Valuation functions are as follows:
Step 4: if the Network Abnormal of selected cloud resource, needing to be selected according to assessed value next and so on;If The network of selected resource is normal, while its assessed value is less than local_cost, then returns to the resource, algorithm terminates;
Most frequently available service is according to essential information model described in the step S22, and that assesses is currently available And most frequently available service, i.e., execution total time be less than call local service time;It changes in network condition When use, for providing seamless migration service.In order to automatically select out most frequently available service, we have proposed algorithms 2. The core of algorithm 2 is a performance evaluation function, which consists of two parts, and a part is for all possible net Network is worth moving to the sum of network weight of this resource, is denoted as Worthy;Another part is the network that must be migrated in all values In, the temporal summation saved in this resource is moved to, Save is denoted as.Therefore, in all possible network, task t is referring to The total benefit for determining to execute in resource is defined as follows:
Benefits (t)=α1*Worthy(t)+α2*Save(t)
Wherein, α1, α2It is weight factor, in our frames, the ratio of these elements can be adjusted according to different scenes Size.As shown in algorithm 2, entire decision process includes following four step:
Step 1: collecting all contextual informations at runtime as input parameter, the contextual information includes current Task tk, essential information model and mobile device current network ni
Step 2: for given task tk, it is assessed in local execution total time, is denoted as local_cost;
Step 3: all available resources in current network are assessed, and select the maximum cloud resource of benefit as Most frequently available service;
Step 4: if the Network Abnormal of selected cloud resource, needing to be selected according to assessed value next and so on;It is no The cloud resource is then returned to, algorithm terminates.
Further, the context aware computation migration frame that the step S3 is proposed uses client-server communication Model;Wherein, cloud resource is server, and mobile device is client, it is able to access that provided service on server, is such as schemed Shown in 4;
Administrative mechanism, computation migration supporting mechanism, services selection supporting mechanism when the client realizes operation;The fortune Administrative mechanism includes data monitoring and module management when row;The computation migration supporting mechanism includes the resource registering mould of client Block, service pool module, the proxy call module of client;The services selection supporting mechanism includes model information module, service Selecting module, service testing module;
1) service call: when carrying out service call, proxy call module (adapter) can be according to corresponding Service name, side Religious name, parameter information call top-quality service from service pool module.
2) service pool configures: administrative mechanism is constantly carrying out data monitoring when operation.If it monitors that network becomes Change or call failure, the currently monitored data arrived of administrative mechanism and model information module when service selecting module will be in conjunction with operation In the information that is collected into re-start services selection.Meanwhile resource registering module and service pool module are updated accordingly.
The server includes the resource registering module of server end, the proxy call of service library module and server end Module;The resource registering module of the server end is responsible for managing and registering all available resource nodes;The service library mould Block service in need being deployed on remote resource to register;The proxy call module of the server end is to handle fortune The dynamic call serviced when row.It is similar with the proxy call module of client, by being parsed to call request, from service library Required service is dynamically called in module.
Compared with prior art, on the one hand, due to the mobility of equipment, its context environmental changes constantly;Separately On the one hand, there are many optional cloud resources in increasing with cloud, mist, intelligent terminal etc., these all bring to computation migration New challenge.Most of traditional moving method is using the server specified in advance, they can not be according to current environment, dynamic Ground selects processing capacity powerful and the preferable cloud resource of network condition.The present invention is based on the context environmentals of current mobile device And available cloud resource, optimal cloud resource can be dynamically selected for migrating in a kind of cost-effective mode: firstly, Provide a kind of design pattern for supporting to calculate dynamic migration in application;Secondly, propose an assessment models, it is mobile device-based Context environmental can automatically select optimal cloud resource for computation migration;Finally, realizing a kind of frame to support above-mentioned institute The design pattern and assessment models mentioned.The present invention can be flexibly applied to mobile cloud environment complicated and changeable.Compared to tradition Moving method, it can significantly improve the performance and user experience of mobile device, and promote its cruising ability.
Detailed description of the invention
Fig. 1 is computation migration programming model schematic diagram of the present invention.
Fig. 2 is service arrangement workflow diagrams of the present invention.
Fig. 3 services on-demand far call pattern diagram when being present invention operation.
Fig. 4 is context aware computation migration block schematic illustration of the present invention.
Specific embodiment
The present invention will be further described with reference to the accompanying drawings and embodiments.
A kind of mobile cloud environment context aware computation migration method is present embodiments provided, following steps are specifically included;
Step S1: a kind of design pattern for supporting to calculate dynamic migration in application is proposed, so that all parts in It can interoperate on demand in Local or Remote;
Step S2: an assessment models are proposed, according to the context environmental of mobile device and available cloud resource, automatically Optimal resource is selected to be migrated;
Step S3: propose that a kind of context aware computation migration frame is used to support the design pattern of step S1 and step S2 is commented Estimate model.
In the present embodiment, the design pattern in the step S1 includes programming model, deployment process and service operation Mode;
As shown in Figure 1, the programming model includes a main module and a service registration library;In the main module The code that cannot be migrated is defined, all services that can be migrated are registered in the service registration library;
The deployment process is the following steps are included: step S11: mobile node finds target cloud resource, and to the target Cloud resource carries out authentication;Step S12: upon successful authentication, mobile node to the target cloud resource send it is all with Current service disposes relevant information;Step S13: the target cloud resource receives request, and starts whether to check current environment Can support the deployment of the service, if it can, and required service be not present, enter step S14, otherwise, enter step S15; Step S14: the target cloud resource obtains corresponding service document from mobile node and is disposed, and service description file is returned Back to mobile node;Step S15: the target cloud resource returns to the letter of " service is existing " or " can not dispose " to mobile node Breath;Fig. 2 describes the entire workflow of mechanism.
As shown in figure 3, the servicing operating mode provides a kind of target knot for supporting that calculating remotely executes on demand in application Structure, allow main module can effectively call other services but regardless of it is current they operate in the same VM or in different money Source node.The structure includes three core elements: local adapter, long-range adapter, service pool;
The service pool is single Virtual Service, and it is identical but be deployed in different cloud resources to have polymerize multiple functions The quality of candidate service, the candidate service is different from;When receiving call request, matter can be preferentially selected from service pool Best service is measured to be called;
The local adapter is mainly responsible for the current position of the called service of identification, and this method is forwarded to call;Work as master When module calls the method for Service1, the corresponding service pool of local adapter first discovery, and obtain in service pool quality most The description file serviced well.From service description file, it can recognize that the current position Service1.If Service1 In local runtime, then local adapter can direct retransmission method call so that main module need not pass through net when calling Service1 Network stack.If Service1 is remotely being executed, local adapter obtains the url of service from service description file, and to long-range Adapter forwards this method to call.
The long-range adapter can parse the HTTP request, be serviced when receiving HTTP request Name, method name and parameter information;And invocation target method;After goal approach has executed, corresponding result can be transmitted Client is returned, is merged with original application.In the whole process, if being called the position change serviced, for example turn from local Remote node has been moved on to, or has been transferred to another node from a certain remote node, caller, i.e. main module are not aware that called The variation of service position.
In the present embodiment, the code that cannot be migrated includes following three classes: related to application user interface realization; I/O equipment is used;Arbitrary external module is used.
Specifically, in the present embodiment, when development and application, programming personnel first must divide the method in application Class is divided into two class of anchored and movable.The method of Anchored type must stay in main module, can only set in movement Standby upper execution;It mainly includes the following categories: 1) related to application user interface realization;2) I/O equipment has been used, for example has read and sets Standby upper accelerometer, GPS etc.;3) arbitrary external module has been used, for example has executed e-commerce using network connection and hands over Easily.These methods have used some resources that could can only be obtained on the mobile apparatus.If these methods are transferred to cloud It is executed in resource, their resources required for it can not find due tos causes to execute mistake.Other methods except these methods are all Automatically the method for being classified as movable type, that is, they can both execute on the mobile apparatus or in cloud resource It executes.The method of movable type must be developed to service, each service encapsulates independent applied function module; And they require to register in service registration library.Each service in service registration library has corresponding service pool, the clothes It is engaged in dynamic aggregation one group of function identical service in pond.In initial, only one service in service pool, that is, local clothes Business.In application operation, main module can call service by " Service name method name (parameter information) " form.
In the present embodiment, the step S2 specifically includes the following steps:
Step S21: it respectively corresponds and is carried out with calculating task, mobile device context environmental and cloud resource computing capability Modeling, obtains task-function model, network-resource model, task-resource model;When a task is migrated to long-distance cloud money It is executed on source, total time TtotalMainly consist of two parts: Ttotal=Tserver+Ttransfer, wherein TseverFor server execution Time, TtransferFor network latency;
Step S22: construction service pool: according to device context environment and available cloud resource, decision making algorithm dynamic is proposed Select optimal service and most frequently available service;Then optimal service, most frequently available service and local service are dynamically gathered A service pool is synthesized, when optimal service and when most frequently available service is the same service, only there are two services in service pool; Meanwhile service pool can define calling sequence according to service quality;When service is called, quality in service pool can be preferentially called Best service;The service quality is to execute the time;
Step S23: collecting model information, including data monitoring and information are collected;
The execution and current environment that wherein the data monitoring is applied to real-time monitoring;Monitored data include: The title of current network, under current network available resource information, under current network all available resources transmission rate Total execution time on different resource is moved to round-trip delay, current task information, current task;
It includes practical execution and test execution that the information, which is collected,;The practical execution are as follows: when mobile device enters one When a network, the preferential service selected in service pool really to connect or execute task, and corresponding result deposit model letter In breath;The test execution are as follows: those resources not in service pool are tested.Fast-changing runtime environment is The big characteristic of the one of mobile computing;If being every time the resource selected in service pool, it is more likely that local optimum can be fallen into.For example, Some resource may cause current time performance very poor due to Network Abnormal;But this does not represent the next moment, and it will not improve. It would therefore be desirable to also test those resources not in service pool.We are provided with one for each cloud resource A information timeliness basic time Time;If a certain information overaging time, submitting test assignment: network-resource model It is tested in corresponding network, task-resource model is tested when that can connect the resource.If test is basically unchanged, Then each Time increases, and otherwise reduces;Same search engine.In order to obtain task-function model, network-resource model, task- Information needed for resource model, the result of practical execution or test execution can be all saved in database every time.In addition, working as net When network changes, it would be desirable to record the information of a network and current network, the assessment for most frequently available service mentions For supporting.
In the present embodiment, task-function model described in step S21 are as follows:
T is enabled to indicate a group task set, for each of T task t, its transmission time is carried out by following formula It calculates:
Wherein, C (t) indicates the volume of transmitted data of task t, it is obtained by training in advance, and v indicates the data in network Transmission rate size, rtt indicate the round-trip delay between equipment and cloud resource;Different mobile applications have different data transmission Amount, input data and received result including transmission.For example, face recognition application needs biggish volume of transmitted data, and Quintet game application only needs relatively small volume of transmitted data.
In the task-function model, all it is independent from each other between all tasks.
In the present embodiment, network-resource model described in step S21 are as follows:
Enable N={ n1,n2,...,nh, indicate h collection of network, S={ s1,s2,...,smIndicate m cloud resource set, V and RTT is the matrix of two h × m, have recorded respectively in heterogeneous networks the transmission rate of each resource and it is round-trip when The desired value prolonged;V and RTT matrix is defined as follows:
Wherein, vij, rijIt is illustrated respectively in network niUnder, equipment to cloud resource sjTransmission rate and round-trip delay expectation Value;For each element v in V and RTTij, rij, they are calculated by following expectation function:
s.t. w1+w2+…+wp=1;
Vector WTIn one weight factor of each element representation, the ratio that these elements are adjusted according to different scenes is big It is small;VijIt has recorded in network niUnder, cloud resource sjTransmission rate historical series, RTTijIt has recorded in network niUnder, Yun Zi Source sjRound-trip delay historical series;Historical series are obtained by practical execution or test execution.
The Matrix C of a h × h is also defined, for recording the variation tendency of user location, Matrix C is defined as follows:
Wherein, cij(i≠j)Have recorded users from networks niIt is moved to network njNumber.
In the present embodiment, task-resource model described in step S21 are as follows:
Different cloud resources have different processing capacity.Give one group of independent task T={ t1,t2,...,trAnd one Group cloud resource S={ s1,s2,...,sm, matrix E has recorded the desired value of execution time of the different task in each resource, Then the matrix E of the r × m is defined as follows:
Wherein, ekjExpression task tkIn cloud resource sjOn execution the time desired value, for each element in matrix E ekj, calculated by following expectation function:
s.t. w1+w2+…+wp=1;
Wherein, EkjHave recorded task tkIn cloud resource sjOn execution the time historical series.
In the present embodiment, optimal service described in the step S22 refers to the actual efficiency highest under current network Service, for the computation migration of current application, wherein the highest service of actual efficiency must satisfy to execute to be less than total time and adjust With the time of local service, specifically includes the following steps:
Step 1: collecting all contextual informations at runtime as input parameter, the contextual information includes current Task tk, essential information model and mobile device current network ni
Step 2: for given task tk, it is assessed in local execution total time, is denoted as local_cost;
Step 3: according to input parameter, getting one group of available cloud resource, indicated with S;Then, to all available clouds Resource is all assessed and selects the smallest cloud resource of assessed value as current network optimal service;Valuation functions are as follows:
Step 4: if the Network Abnormal of selected cloud resource, needing to be selected according to assessed value next and so on;If The network of selected resource is normal, while its assessed value is less than local_cost, then returns to the resource, algorithm terminates;
Specific algorithm is as shown in the table:
Most frequently available service is according to essential information model described in the step S22, and that assesses is currently available And most frequently available service, i.e., execution total time be less than call local service time;It changes in network condition When use, for providing seamless migration service.In order to automatically select out most frequently available service, we have proposed algorithms 2. The core of algorithm 2 is a performance evaluation function, which consists of two parts, and a part is for all possible net Network is worth moving to the sum of network weight of this resource, is denoted as Worthy;Another part is the network that must be migrated in all values In, the temporal summation saved in this resource is moved to, Save is denoted as.Therefore, in all possible network, task t is referring to The total benefit for determining to execute in resource is defined as follows:
Benefits (t)=α1*Worthy(t)+α2*Save(t)
Wherein, α1, α2It is weight factor, in our frames, the ratio of these elements can be adjusted according to different scenes Size.As shown in algorithm 2, entire decision process includes following four step:
Step 1: collecting all contextual informations at runtime as input parameter, the contextual information includes current Task tk, essential information model and mobile device current network ni
Step 2: for given task tk, it is assessed in local execution total time, is denoted as local_cost;
Step 3: all available resources in current network are assessed, and select the maximum cloud resource of benefit as Most frequently available service;
Step 4: if the Network Abnormal of selected cloud resource, needing to be selected according to assessed value next and so on;It is no The cloud resource is then returned to, algorithm terminates.
Shown in the table specific as follows of algorithm 2:
In the present embodiment, the context aware computation migration frame that the step S3 is proposed uses client-server Traffic model;Wherein, cloud resource is server, and mobile device is client, it is able to access that provided service on server, As shown in Figure 4;
Administrative mechanism, computation migration supporting mechanism, services selection supporting mechanism when the client realizes operation;The fortune Administrative mechanism includes data monitoring and module management when row;The computation migration supporting mechanism includes the resource registering mould of client Block, service pool module, the proxy call module of client;The services selection supporting mechanism includes model information module, service Selecting module, service testing module;
1) service call: when carrying out service call, proxy call module (adapter) can be according to corresponding Service name, side Religious name, parameter information call top-quality service from service pool module.
2) service pool configures: administrative mechanism is constantly carrying out data monitoring when operation.If it monitors that network becomes Change or call failure, the currently monitored data arrived of administrative mechanism and model information module when service selecting module will be in conjunction with operation In the information that is collected into re-start services selection.Meanwhile resource registering module and service pool module are updated accordingly.
The server includes the resource registering module of server end, the proxy call of service library module and server end Module;The resource registering module of the server end is responsible for managing and registering all available resource nodes;The service library mould Block service in need being deployed on remote resource to register;The proxy call module of the server end is to handle fortune The dynamic call serviced when row.It is similar with the proxy call module of client, by being parsed to call request, from service library Required service is dynamically called in module.
The foregoing is merely presently preferred embodiments of the present invention, all equivalent changes done according to scope of the present invention patent with Modification, is all covered by the present invention.

Claims (8)

1. a kind of mobile cloud environment context aware computation migration method, it is characterised in that include the following steps;
Step S1: a kind of design pattern for supporting to calculate dynamic migration in application is proposed, so that all parts in can It interoperates on demand in Local or Remote;
Step S2: propose that an assessment models are automatically selected according to the context environmental of mobile device and available cloud resource Optimal resource is migrated;
Step S3: propose that a kind of context aware computation migration frame is used to support the design pattern and step S2 assessment mould of step S1 Type;
Wherein, the design pattern in the step S1 includes programming model, deployment process and servicing operating mode;
The programming model includes a main module and a service registration library;Defining in the main module cannot be migrated Code, registered in the service registration library it is all can migration services;
The deployment process is the following steps are included: step S11: mobile node finds target cloud resource, and provides to the target cloud Source carries out authentication;Step S12: upon successful authentication, mobile node to the target cloud resource send it is all with it is current The relevant information of service arrangement;Step S13: the target cloud resource receives request, and starts to check whether current environment can prop up Hold the deployment of the service, if it can, and required service be not present, enter step S14, otherwise, enter step S15;Step S14: the target cloud resource obtains corresponding service document from mobile node and is disposed, and service description file is returned to Mobile node;Step S15: the target cloud resource returns to the information of " service is existing " or " can not dispose " to mobile node;
The servicing operating mode provides a kind of object construction for supporting that calculating remotely executes on demand in application, the object construction packet Include three core elements: local adapter, long-range adapter, service pool;
The service pool is single Virtual Service, and it is identical but be deployed in the candidate in different cloud resources to have polymerize multiple functions Service, the quality of the candidate service are different from;When receiving call request, quality preferentially can be selected most from service pool Good service is called;
The local adapter is mainly responsible for the current position of the called service of identification, and forwards the service call;
The long-range adapter can parse the HTTP request, obtain Service name, side when receiving HTTP request Religious name and parameter information;And invocation target method;After goal approach has executed, corresponding result can be transferred back to visitor Family end is merged with original application.
2. a kind of mobile cloud environment context aware computation migration method according to claim 1, it is characterised in that: it is described not The code that can be migrated includes following three classes: to using user interface realize relevant code, the code for having used I/O equipment, The code of arbitrary external module is used.
3. a kind of mobile cloud environment context aware computation migration method according to claim 1, it is characterised in that: the step Rapid S2 specifically includes the following steps:
Step S21: respectively corresponding and modeled with calculating task, mobile device context environmental and cloud resource computing capability, Obtain task-function model, network-resource model, task-resource model;When a task is migrated in long-range cloud resource It executes, total time TtotalMainly consist of two parts: Ttotal=Tserver+Ttransfer, wherein TseverWhen being executed for server Between, TtransferFor network latency;
Step S22: construction service pool: according to device context environment and available cloud resource, propose that decision making algorithm dynamic is selected Optimal service and most frequently available service;Then optimal service, most frequently available service and local service are dynamically aggregated into One service pool, when optimal service and when most frequently available service is the same service, only there are two services in service pool;Together When, service pool can define calling sequence according to service quality;When service is called, quality can be preferentially called in service pool most Good service;The service quality is to execute the time;
Step S23: collecting model information, including data monitoring and information are collected;
The execution and current environment that wherein the data monitoring is applied to real-time monitoring;Monitored data include: current The title of network, available resource information, the transmission rate of all available resources and past under current network under current network It returns time delay, current task information, current task and moves to total execution time on different resource;
It includes practical execution and test execution that the information, which is collected,;The practical execution are as follows: when mobile device enters a net When network, the preferential service selected in service pool really to connect or execute task, and in corresponding result deposit model information; The test execution are as follows: those resources not in service pool are tested.
4. a kind of mobile cloud environment context aware computation migration method according to claim 3, it is characterised in that: step Task-function model described in S21 are as follows:
T is enabled to indicate a group task set, for each of T task t, its transmission time is counted by following formula It calculates:
Wherein, C (t) indicates the volume of transmitted data of task t, it is obtained by training in advance, and v indicates the data transmission in network Rate size, rtt indicate the round-trip delay between equipment and cloud resource;
In the task-function model, all it is independent from each other between all tasks.
5. a kind of mobile cloud environment context aware computation migration method according to claim 3, it is characterised in that: step Network-resource model described in S21 are as follows:
Enable N={ n1,n2,...,nh, indicate h collection of network, S={ s1,s2,...,smIndicate m cloud resource set, V with RTT is the matrix of two h × m, has recorded the transmission rate and round-trip delay of each resource in heterogeneous networks respectively Desired value;V and RTT matrix is defined as follows:
Wherein, vij, rijIt is illustrated respectively in network niUnder, equipment to cloud resource sjTransmission rate and round-trip delay desired value; For each element v in V and RTTij, rij, they are calculated by following expectation function:
s.t.w1+w2+…+wp=1;
Vector WTIn one weight factor of each element representation, the scale of these elements is adjusted according to different scenes; VijIt has recorded in network niUnder, cloud resource sjTransmission rate historical series, RTTijIt has recorded in network niUnder, cloud resource sj Round-trip delay historical series;
The Matrix C of a h × h is also defined, for recording the variation tendency of user location, Matrix C is defined as follows:
Wherein, cij(i≠j)Have recorded users from networks niIt is moved to network njNumber.
6. a kind of mobile cloud environment context aware computation migration method according to claim 4, it is characterised in that: step Task-resource model described in S21 are as follows:
Give one group of independent task T={ t1,t2,...,trAnd one group of cloud resource S={ s1,s2,...,sm, matrix E note The desired value of execution time of the different task in each resource is recorded, then the matrix E of the r × m is defined as follows:
Wherein, ekjExpression task tkIn cloud resource sjOn execution the time desired value, for each element e in matrix Ekj, Calculated by following expectation function:
s.t.w1+w2+…+wp=1;
Wherein, EkjHave recorded task tkIn cloud resource sjOn execution the time historical series.
7. a kind of mobile cloud environment context aware computation migration method according to claim 6, it is characterised in that:
Optimal service described in the step S22 refers to the highest service of actual efficiency under current network, for currently answering Computation migration, wherein the highest service of actual efficiency, which must satisfy to execute, total time is less than the time for calling local service, Specifically includes the following steps:
Step 1: collecting all contextual informations at runtime as input parameter, the contextual information includes current task tk, essential information model and mobile device current network ni
Step 2: for given task tk, it is assessed in local execution total time, is denoted as local_cost;
Step 3: according to input parameter, getting one group of available cloud resource, indicated with S;Then, to all available cloud resources It is all assessed and selects the smallest cloud resource of assessed value as current network optimal service;Valuation functions are as follows:
Step 4: if the Network Abnormal of selected cloud resource, needing to be selected according to assessed value next and so on;If selected The network of resource is normal, while its assessed value is less than local_cost, then returns to the resource, algorithm terminates;
Described in the step S22 most frequently available service be according to essential information model, assess currently available and Most frequently available service, i.e. execution total time are less than the time for calling local service;Specifically includes the following steps:
Step 1: collecting all contextual informations at runtime as input parameter, the contextual information includes current task tk, essential information model and mobile device current network ni
Step 2: for given task tk, it is assessed in local execution total time, is denoted as local_cost;
Step 3: all available resources in current network being assessed, and select the maximum cloud resource of benefit as most passing through Normal available service;
Step 4: if the Network Abnormal of selected cloud resource, needing to be selected according to assessed value next and so on;Otherwise it returns The cloud resource is returned, algorithm terminates.
8. a kind of mobile cloud environment context aware computation migration method according to claim 1, it is characterised in that:
The context aware computation migration frame that the step S3 is proposed uses client-server communication model;Wherein, Yun Zi Source is server, and mobile device is client;
Administrative mechanism, computation migration supporting mechanism, services selection supporting mechanism when the client realizes operation;When the operation Administrative mechanism includes data monitoring and module management;The computation migration supporting mechanism include client resource registering module, Service pool module, the proxy call module of client;The services selection supporting mechanism includes model information module, services selection Module, service testing module;
The server includes the resource registering module of server end, the proxy call mould for servicing library module and server end Block;The resource registering module of the server end is responsible for managing and registering all available resource nodes;The service library module The service in need being deployed on remote resource to register;The proxy call module of the server end is to handle operation When the dynamic call that services.
CN201610133601.9A 2016-03-09 2016-03-09 A kind of mobile cloud environment context aware computation migration method Active CN105812461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610133601.9A CN105812461B (en) 2016-03-09 2016-03-09 A kind of mobile cloud environment context aware computation migration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610133601.9A CN105812461B (en) 2016-03-09 2016-03-09 A kind of mobile cloud environment context aware computation migration method

Publications (2)

Publication Number Publication Date
CN105812461A CN105812461A (en) 2016-07-27
CN105812461B true CN105812461B (en) 2019-03-12

Family

ID=56467985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610133601.9A Active CN105812461B (en) 2016-03-09 2016-03-09 A kind of mobile cloud environment context aware computation migration method

Country Status (1)

Country Link
CN (1) CN105812461B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180046940A1 (en) * 2016-08-15 2018-02-15 Google Inc. Optimized machine learning system
CN107133101B (en) * 2017-04-27 2021-01-29 福州大学 Adaptive computing migration middleware in an IoT system
CN107391031B (en) * 2017-06-27 2020-05-08 北京邮电大学 Data migration method and device in computing system based on hybrid storage
CN109218049B (en) 2017-06-30 2021-10-26 华为技术有限公司 Control method, related equipment and system
CN108376099B (en) * 2018-01-16 2020-06-23 西安建筑科技大学 Mobile terminal calculation migration method for optimizing time delay and energy efficiency
CN109062677B (en) * 2018-07-10 2020-07-31 中国人民解放军国防科技大学 Unmanned aerial vehicle system calculation migration method
CN109347926B (en) * 2018-09-21 2021-04-27 西北大学 Method for constructing intelligent edge computing sensing system for historic site protection
CN113015942B (en) * 2018-12-28 2024-07-30 西门子股份公司 Method, device and system for data analysis
CN109756379A (en) * 2019-01-11 2019-05-14 南京航空航天大学 A kind of network performance abnormality detection and localization method based on the decomposition of matrix difference
CN110012021B (en) * 2019-04-12 2021-06-22 福州大学 Self-adaptive computing migration method under mobile edge computing
CN110109702B (en) * 2019-05-16 2021-07-13 福州大学 Android computing migration online decision-making method based on code analysis
CN110809275B (en) * 2019-11-08 2021-09-28 福州大学 Micro cloud node placement method based on wireless metropolitan area network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102857548A (en) * 2012-04-25 2013-01-02 梁宏斌 Mobile cloud computing resource optimal allocation method
CN104869151A (en) * 2015-04-07 2015-08-26 北京邮电大学 Business unloading method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9104507B2 (en) * 2010-06-25 2015-08-11 Daniel Knoodle Developer platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102857548A (en) * 2012-04-25 2013-01-02 梁宏斌 Mobile cloud computing resource optimal allocation method
CN104869151A (en) * 2015-04-07 2015-08-26 北京邮电大学 Business unloading method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
《Jupiter: Transparent Augmentation of Smartphone》;Yao Guo 等;《Proceeding MobiHeld "11 Proceedings of the 3rd ACM SOSP Workshop on Networking, Systems, and Applications on Mobile Handhelds》;20111231;全文 *
《弹性移动云计算的研究进展与安全性分析》;李鹏伟 等;《计算机研究与发展》;20150615;第52卷(第6期);第1362-1377页 *
《面向移动云计算的关键技术研究》;肖雪芳 等;《绵阳师范学院学报》;20121130;第31卷(第11期);第73-76页 *

Also Published As

Publication number Publication date
CN105812461A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
CN105812461B (en) A kind of mobile cloud environment context aware computation migration method
CN112953778B (en) Intention-driven-based service arrangement system and method in intelligent fusion identification network
CN106020715B (en) Storage pool capacity management
CN109756364A (en) A kind of micro services performance optimization system and analysis method based on log analysis
CN100556024C (en) The method and the solenoid field that are used for the solenoid field Control on Communication
US20160381116A1 (en) Method and system to estimate user desired delay for resource allocation for mobile-cloud applications
CN107767080A (en) A kind of bank outlets' Service Source dispatching method and device
CN106027328A (en) Cluster monitoring method and system based on application container deployment
CN109618002A (en) A kind of micro services gateway optimization method, device and storage medium
US7894361B1 (en) System and method for network capacity engineering
CN103473291A (en) Personalized service recommendation system and method based on latent semantic probability models
Ye et al. A framework for QoS and power management in a service cloud environment with mobile devices
CN110463140A (en) The network Service Level Agreement of computer data center
CN108696400A (en) network monitoring method and device
CN109075995A (en) The device that performance measurement data for NFV performance management is subscribed to
CN103220697A (en) Online and distributed optimization framework method and system for wireless analytics
CN103051672A (en) Terminal information obtaining method and device in heterogeneous terminal environment
CN106130756A (en) A kind of method and device predicting access content clicking rate
CN106453143A (en) Bandwidth setting method, device and system
KR20180134553A (en) System and method for providing the degree of congestion
CN110442787A (en) A kind of information consulting service platform based on big data analysis acquisition
CN107889213B (en) Article localization method, device and server
CN110191362B (en) Data transmission method and device, storage medium and electronic equipment
CN105205905B (en) The method, apparatus and system that a kind of business hall is called out the numbers
CN115314500B (en) Dynamic load balancing method based on improved TOPSIS model

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