CN105897869A - APP sleep management method and apparatus - Google Patents
APP sleep management method and apparatus Download PDFInfo
- Publication number
- CN105897869A CN105897869A CN201610190741.XA CN201610190741A CN105897869A CN 105897869 A CN105897869 A CN 105897869A CN 201610190741 A CN201610190741 A CN 201610190741A CN 105897869 A CN105897869 A CN 105897869A
- Authority
- CN
- China
- Prior art keywords
- app
- module
- sleep management
- message
- management module
- 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.)
- Granted
Links
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/50—Network services
- H04L67/54—Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides an APP sleep management method and apparatus. The apparatus comprises a sleep management module which obtains APP resource utilization rate during the operation of an APP, conducts sleep processing for the APP when the APP needing sleep is determined according to the resource utilization rate, and sends the forwarding information of the sleep management module to a router module when the APP sleeps successfully, the APP which notifies the router module to delete the forwarding information of the APP and release the resources occupied by the APP when the sleep management module conducts sleep processing for the APP, and the router module which sends an accessing request message to the APP by using the forwarding information of the APP during operation of the APP, and sends the request message to the sleep management module by the forwarding information of the sleep management module when the APP sleeps successfully. According to the technical scheme disclosed in the invention, calculating, memory, network and storage resources occupied by the APP can be released, thereby preventing resource waste and improving resource utilization rate.
Description
Technical field
The present invention relates to communication technical field, particularly relate to management method and the device of a kind of APP dormancy.
Background technology
Cloud computing refers to, based on networks such as internets, be shared the novel calculating of IT resource by virtualization mode
Pattern.Wherein, the core concept of cloud computing is: be managed collectively by network and dispatch calculating, storage,
The resource such as network, software, it is achieved resource consolidation and configuration optimization, meets different user in the way of service
Obtain at any time and extend, on-demand use pay, reduce all kinds of demands such as cost to greatest extent.
At present, cloud computing provide service mode specifically include that IaaS (Infrastructure as a Service,
Infrastructure i.e. services), PaaS (Platform as a Service, platform i.e. services), SaaS (Software
As a Service, software i.e. services).PaaS provides application service engine, using research and development of software platform as
Service provides, as API (Application Programming Interface, application programming interfaces) services
Or application operation services etc., user is based on these service construction service application.APP (application) is fortune
Row, in the network application of PaaS platform, includes the WEB application of the page and does not has the API service of the page.
Along with the fast development of Internet technology, increasing APP is developed.APP quantity
Increase, need to use the more resource that calculates to dispose APP.And, substantial amounts of APP, can use big
The resources such as the calculating of amount, internal memory, network, storage, cause waste greatly to resource.
Summary of the invention
The present invention provides the managing device of a kind of APP dormancy, and described device specifically includes:
Sleep management module, for the run duration at APP, obtains the resource utilization of described APP;
When utilizing described resource utilization to determine to need APP described in dormancy, described APP is carried out at dormancy
Reason;When described APP dormancy success, the forwarding information of this sleep management module is sent to routing module;
APP, for when described sleep management module carries out dormancy process to described APP, notice is described
Routing module deletes the forwarding information of described APP, and discharges the resource that described APP takies;
Routing module, for the run duration at APP, utilizes the forwarding information of described APP to access
Request message is sent to described APP;When described APP dormancy success, utilize described sleep management module
Forwarding information access request message is sent to described sleep management module.
Described device also includes:
Monitoring module, for the run duration at APP, obtains the resource utilization of described APP;
Application controls module, for receiving carrying out described APP from described sleep management module
During the notice that dormancy processes, then described APP is carried out dormancy process;In described APP dormancy success
After, then the described successful information of APP dormancy is notified to described sleep management module;
Described sleep management module, specifically for obtain described APP resource utilization during,
The resource utilization of described APP is obtained from described monitoring module;Described APP is being carried out dormancy process
During, notify that described application controls module carries out dormancy process to described APP;Receive from
During the described successful information of APP dormancy of described application controls module, determine described APP dormancy success.
Described sleep management module, specifically for obtaining the resource profit of described APP from described monitoring module
During rate, send the first message for asking resource utilization to described monitoring module, described
First message carries acquisition time information, the identification information of described APP, and receives described monitoring module and return
The second message returned, and from described second message, obtain the resource utilization of described APP;
Described monitoring module, specifically for after receiving described first message, when obtaining described collection
Between the resource utilization of described APP corresponding to information, and to the resource utilization currently obtained is added
In two messages, and described second message is sent to described sleep management module.
Described sleep management module, specifically for notifying that described APP is carried out by described application controls module
During dormancy processes, send for described APP is carried out dormancy process to described application controls module
The 3rd message, and described 3rd message carries the identification information of described APP;
Described application controls module, specifically for notifying the described successful information of APP dormancy to described
During sleep management module, send to described sleep management module and be used for representing that described APP dormancy becomes
4th message of merit, and described 4th message carry the identification information of described APP.
Described APP, specifically for notifying that described routing module deletes the mistake of the forwarding information of described APP
Cheng Zhong, sends the 5th message being used for deleting the forwarding information of described APP to described routing module, described
5th message carries the identification information of described APP, the forwarding information of described APP;
Described sleep management module, specifically for being sent to route by the forwarding information of sleep management module
During module, send the 6th message for registering described sleep management module to described routing module,
Described 6th message carries the identification information of described APP, the forwarding information of described sleep management module;
Described routing module, specifically for after receiving described 5th message, from local routing table
The forwarding information of described APP is deleted in Xiang;After receiving described 6th message, in local route
List item records the forwarding information of described sleep management module, with when described APP dormancy success, utilizes
Access request message is sent to described sleep management module by the forwarding information of described sleep management module.
Described sleep management module, is additionally operable to after receiving access request message, and preserving described access please
Seek message, described APP is waken up up process;When described APP wakes up up successfully, by described access
Request message is sent to described APP, and notifies that routing module deletes the forwarding information of this sleep management module;
Described APP, is additionally operable to when described sleep management module wakes up process up to described APP, weight
Newly start working, and the forwarding information of described APP is sent to described routing module;
Described routing module, is additionally operable to, when described APP wakes up up successfully, receiving access request message
Afterwards, access request message is sent to described APP by the forwarding information utilizing described APP.
Also include: application controls module;Described sleep management module, specifically for entering described APP
During row wakes up process up, send for described APP is waken up up place to described application controls module
7th message of reason, and described 7th message carries the identification information of described APP;
Described application controls module, for after receiving described 7th message, is carried out described APP
Wake up process up, and after described APP wakes up up successfully, send to described sleep management module and be used for representing institute
State APP and wake up the identification information carrying described APP in successful 8th message, and described 8th message up.
Described sleep management module, specifically for deleting the forwarding of sleep management module at notice routing module
During information, send the 9th report being used for deleting the forwarding information of sleep management module to routing module
Literary composition, described 9th message carries the identification information of described APP, the forwarding information of described sleep management module;
Described APP, specifically in the mistake that the forwarding information of described APP is sent to described routing module
Cheng Zhong, sends the tenth message being used for registering the forwarding information of described APP to described routing module, described
Tenth message carries the identification information of described APP, the forwarding information of described APP;
Described routing module, specifically for after receiving described 9th message, from local routing table
The forwarding information of described sleep management module is deleted in Xiang;After receiving described tenth message, at this
The route table items on ground records the forwarding information of described APP, with when described APP wakes up up successfully, sharp
With the forwarding information of described APP, access request message is sent to described APP.
Described resource utilization includes one below or any combination: CPU usage, memory usage,
Disk utilization rate, request process number;The forwarding information of described sleep management module includes: described APP pair
Uniform resource position mark URL information, the IP address of described sleep management module and the serve port answered;
The forwarding information of described APP includes: URL information, IP address and serve port corresponding for described APP.
The present invention provides the management method of a kind of APP dormancy, the management method application of described APP dormancy
On sleep management equipment, and said method comprising the steps of:
At the run duration of APP, obtain the resource utilization of described APP;
Described resource utilization is utilized to judge whether to need APP described in dormancy;
If it is, described APP is carried out dormancy process;So that described APP notice routing module is deleted
Except the forwarding information of described APP, and discharge the resource that described APP takies;
When described APP dormancy success, the forwarding information of described sleep management equipment is sent to described road
By module;So that described routing module is when described APP dormancy success, utilize described sleep management equipment
Forwarding information access request message is sent to described sleep management equipment.
Based on technique scheme, in the embodiment of the present invention, need when the resource utilization utilizing APP determines
When wanting dormancy APP, APP can be carried out dormancy process, thus discharge calculating that APP takies, interior
Deposit, network, the resource such as storage, it is to avoid the waste of resource, improve resource utilization.And, work as existence
During the access request message of APP, access request message can be processed in time, and business will not be interrupted.
Accompanying drawing explanation
In order to the embodiment of the present invention or technical scheme of the prior art are clearly described, below will
The accompanying drawing used required in the embodiment of the present invention or description of the prior art is briefly described, aobvious and
Easily insight, the accompanying drawing in describing below is only some embodiments described in the present invention, for this area
From the point of view of those of ordinary skill, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the structure chart of the managing device of the APP dormancy in one embodiment of the present invention;
Fig. 2 is the structure chart of the managing device of the APP dormancy in another embodiment of the present invention;
Fig. 3 is the flow chart of the management method of the APP dormancy in one embodiment of the present invention;
Fig. 4 is the flow chart of the management method of the APP dormancy in another embodiment of the present invention;
Fig. 5 is the flow chart of the management method of the APP dormancy in another embodiment of the present invention.
Detailed description of the invention
In terminology used in the present invention merely for the sake of describing the purpose of specific embodiment, and the unrestricted present invention.
" a kind of ", " described " and " being somebody's turn to do " also purport of singulative used in the present invention and claims
Including most form, unless context clearly shows that other implication.It is also understood that used herein
Term "and/or" refer to comprise any or all of one or more project of listing being associated may combination.
Although should be appreciated that may use term first, second, third, etc. to describe various letter in the present invention
Breath, but these information should not necessarily be limited by these terms.These terms are only used for same type of information district each other
Separately.Such as, without departing from the present invention, the first information can also be referred to as the second information,
Similarly, the second information can also be referred to as the first information.Depend on linguistic context, additionally, the word used
" if " can be construed to " ... time " or " when ... time " or " in response to determining ".
For problems of the prior art, the embodiment of the present invention proposes the pipe of a kind of APP dormancy
Reason device, as it is shown in figure 1, the managing device of this APP dormancy specifically can include but not limited to dormancy pipe
Reason module (SleepManager), routing module (Router) and multiple APP.Wherein, dormancy pipe
Reason module, the deployment architecture of routing module and multiple APP are distributed frames, i.e. sleep management module,
Routing module and multiple APP can dispose on the same equipment, it is also possible to be deployed in different equipment
On, these multiple APP can dispose on the same equipment, it is also possible to disposes on different devices.And
And, the processing procedure of each APP is identical, follow-up illustrates as a example by the process of an APP.
In the embodiment of the present invention, sleep management module, for the run duration at APP, obtain APP
Resource utilization;When utilizing this resource utilization to determine to need dormancy APP, APP is carried out not
Dormancy processes;When APP dormancy success, the forwarding information of this sleep management module is sent to routing module.
APP, for when sleep management module carries out dormancy process to this APP, notice routing module deletes this
The forwarding information of APP, and discharge the resource that this APP takies.Routing module, for the fortune at APP
Between the departure date, utilize the forwarding information of APP that access request message is sent to APP;Become in APP dormancy
During merit, utilize the forwarding information of sleep management module that access request message is sent to sleep management module.
As in figure 2 it is shown, the managing device of this APP dormancy can also include monitoring module (Monitor)
With application controls module (AppController), wherein, sleep management module, monitoring module and application
The deployment architecture of control module can also be distributed frame, i.e. sleep management module, monitoring module and should
Can dispose on the same equipment by control module, it is also possible to dispose on different devices.
In the embodiment of the present invention, monitoring module, for the run duration at APP, obtain the money of APP
Source utilization rate.Application controls module, for receiving carrying out APP not from sleep management module
During the notice that dormancy processes, then APP is carried out dormancy process;After APP dormancy success, then by APP
The successful information of dormancy notifies to sleep management module.On this basis, sleep management module, specifically use
During the resource utilization obtaining APP, obtain the resource utilization of APP from monitoring module.
During APP is carried out dormancy process, notice application controls module carries out dormancy process to APP;
When receiving the successful information of APP dormancy from application controls module, determine APP dormancy success.
Wherein, the process of the resource utilization of APP is obtained for monitoring module, in the runtime of APP
Between, monitoring module periodically can send the request of query resource utilization rate to APP.On APP permissible
Configuration APP agency, this APP agency can periodically obtain the resource utilization of this APP, and receive
To after the request of monitoring module, the resource utilization of APP is sent to monitoring module.
Wherein, utilizing this resource utilization to determine for sleep management module needs the process of dormancy APP,
When sleep management module utilize this resource utilization determine APP in Preset Time inactive time, as 1
In minute inactive time, it is determined that need dormancy APP.Further, when this resource utilization is less than pre-
If during threshold value, then it is believed that APP is inactive.Based on this, it is assumed that sleep management module obtained in the time 1
The resource utilization got is less than predetermined threshold value, and the resource utilization got in the time 2 is less than and presets
Time interval between threshold value, and time 1 and time 2 is more than Preset Time, it is determined that need dormancy APP.
Wherein, the resource utilization of APP specifically can include but not limited to one below or any combination:
CPU (Central Processing Unit, the central processing unit) utilization rate of APP, memory usage,
Disk utilization rate, request process number etc..Assume resource utilization include CPU usage, memory usage,
Disk utilization rate, request process number, then can be that these resource utilizations configure identical predetermined threshold value,
Can also be the differently configured predetermined threshold value of these resource utilizations.In one example, use as CPU
Rate is less than predetermined threshold value 1, and memory usage is less than predetermined threshold value 2, and disk utilization rate is less than presetting threshold
Value 3, and when request processes number less than predetermined threshold value 4, then it is assumed that resource utilization is less than predetermined threshold value.
Wherein, discharging the process of the resource that this APP takies for APP, APP can discharge this APP
The resources such as the calculating that takies, internal memory, network, storage, so that these resources can be used by other APP.
Wherein, in the run duration of APP, the service provided for this APP, routing module have recorded
The forwarding information of this APP, therefore, when receiving the access request message accessing this APP, permissible
Access request message is sent to this APP by the forwarding information utilizing this APP.When APP dormancy success,
The service provided for this APP, routing module can be deleted the forwarding information of this APP, and record not
The forwarding information of management module of sleeping, therefore, when receiving the access request message accessing this APP, can
To utilize the forwarding information of this sleep management module that access request message is sent to sleep management module.
In the embodiment of the present invention, sleep management module, specifically in the money obtaining APP from monitoring module
During the utilization rate of source, sending for asking the first message of resource utilization to monitoring module, this is the years old
One message carries the identification information of acquisition time information, APP, and receives the Secondary Report that monitoring module returns
Literary composition, and from the second message, obtain the resource utilization of APP.Monitoring module, specifically for receiving
After first message, obtain the resource utilization of APP corresponding to this acquisition time information, and will currently obtain
The resource utilization taken is added in the second message, and the second message is sent to sleep management module.
In the embodiment of the present invention, sleep management module, specifically for notifying that application controls module is to APP
During carrying out dormancy process, to application controls module send for APP carried out dormancy process the
Three messages, and the 3rd message carry the identification information of APP.Application controls module, specifically for inciting somebody to action
During the successful information of APP dormancy notifies to sleep management module, send to sleep management module and use
In representing successful 4th message of APP dormancy, and the 4th message carries the identification information of APP.
In the embodiment of the present invention, APP, specifically for deleting the forwarding letter of this APP at notice routing module
During breath, sending the 5th message of forwarding information for deleting this APP to routing module, this is the years old
Five messages carry the forwarding information of the identification information of APP, APP.Sleep management module, specifically for
During the forwarding information of this sleep management module is sent to routing module, send to routing module
For registering the 6th message of this sleep management module, the 6th message carries the identification information of APP, basis
The forwarding information of sleep management module.Routing module, specifically for after receiving the 5th message, from
Local route table items is deleted the forwarding information of APP;After receiving the 6th message, in this locality
Route table items records the forwarding information of sleep management module, based on this, when APP dormancy success, can
To utilize the forwarding information of sleep management module that access request message is sent to sleep management module.
Said process is the sleep procedure of APP, after APP dormancy success, and waking up up for APP
Process, then sleep management module, be additionally operable to after receiving access request message, preserves this access request
Message, and APP is waken up up process;When APP wakes up up successfully, this access request message is sent out
Give APP, and notify that routing module deletes the forwarding information of this sleep management module.APP, is additionally operable to
When sleep management module wakes up process up to this APP, restart work, and by this APP's
Forwarding information is sent to routing module.Routing module, is additionally operable to, when APP wakes up up successfully, receiving
After access request message, utilize the forwarding information of APP that access request message is sent to APP.
Wherein, restart the process of work for APP, APP can resume calculating, internal memory,
The resource such as network, storage, and use these resources to start working, access request message is processed.
Wherein, during APP dormancy, the service provided for this APP, routing module have recorded not
The forwarding information of management module of sleeping, therefore, when receiving the access request message accessing this APP, can
To utilize the forwarding information of sleep management module that access request message is sent to sleep management module.?
When APP wakes up up successfully, the service provided for this APP, routing module can be deleted sleep management module
Forwarding information, and record the forwarding information of this APP, therefore, receiving the visit accessing this APP
When asking request message, it is possible to use access request message is sent to this APP by the forwarding information of this APP.
In the embodiment of the present invention, sleep management module, specifically in the mistake that APP wakes up up process
Cheng Zhong, sends the 7th message for APP wakes up up process, and the 7th to application controls module
Message carries the identification information of APP.Application controls module, is used for after receiving the 7th message,
APP is waken up up process, and after APP wakes up up successfully, sends for table to sleep management module
Show that APP wakes up successful 8th message up, and the 8th message carries the identification information of APP.
In the embodiment of the present invention, sleep management module, specifically for deleting dormancy pipe at notice routing module
During the forwarding information of reason module, send the forwarding for deleting sleep management module to routing module
9th message of information, and the 9th message carries the identification information of APP, the forwarding of sleep management module
Information.APP, specifically for during the forwarding information of APP is sent to routing module, Xiang Lu
Sent the tenth message being used for registering the forwarding information of APP by module, and the tenth message carries APP
Identification information, the forwarding information of APP.Routing module, specifically for after receiving the 9th message,
The forwarding information of sleep management module is deleted from local route table items;After receiving the tenth message,
The forwarding information of APP is recorded in local route table items;Based on this, when APP wakes up up successfully,
Routing module can utilize the forwarding information of APP that access request message is sent to APP.
In the embodiment of the present invention, the forwarding information of sleep management module specifically can include but not limited to: APP
URL (Uniform Resource Locator, the URL) information of correspondence, sleep management
The IP address of module and serve port.The forwarding information of APP specifically can include but not limited to: APP
Corresponding URL information, IP address and serve port.Wherein, corresponding for APP URL information refers to this
The domain name that APP is corresponding, is that APP is supplied to external user, and external user can use this URL to believe
Breath accesses APP.Such as, when have recorded on routing module corresponding for APP URL information, IP address and
During serve port, routing module is receiving access request message (carrying URL information corresponding to APP)
Time, from this access request message, parse URL information corresponding to APP, and find this URL information
Corresponding IP address and serve port, thus utilize this IP address and serve port by access request message
It is sent to APP.When have recorded corresponding for APP URL information, sleep management module on routing module
When IP address and serve port, routing module, when receiving access request message, disappears from this access request
Breath parses URL information corresponding to APP, finds IP address corresponding to this URL information and service
Port, thus utilize this IP address and serve port that access request message is sent to sleep management module.
Based on technique scheme, in the embodiment of the present invention, need when the resource utilization utilizing APP determines
When wanting dormancy APP, APP can be carried out dormancy process, thus discharge calculating that APP takies, interior
Deposit, network, the resource such as storage, it is to avoid the waste of resource, improve resource utilization.And, work as existence
During the access request message of APP, access request message can be processed in time, and business will not be interrupted.
Below in conjunction with the structure shown in Fig. 2, the technique scheme of the embodiment of the present invention is carried out specifically
Bright.Routing module is external unified interface, and all of access request message is distributed by routing module.Stop
Sleep management module be responsible for APP dormancy strategy control and APP dormancy during flow adapter.Monitoring mould
Block is responsible for monitoring the resource utilization of APP.Application controls module is responsible for the dormancy of APP and wakes up up.?
On the basis of this, as it is shown on figure 3, be the management method of a kind of APP dormancy proposed in the embodiment of the present invention
Flow chart, the method may comprise steps of mainly for the sleep procedure of APP, the method:
Step 301, at the run duration of APP, monitoring module obtains the resource utilization of APP.
Wherein, monitoring module periodically can send the request of query resource utilization rate to APP.At APP
On can configure APP agency, this APP agency can periodically obtain the resource utilization of this APP, and
Receiving after the request of monitoring module, the resource utilization of APP is being sent to monitoring module.
Wherein, the resource utilization of APP specifically can include but not limited to one below or any combination:
The CPU usage of APP, memory usage, disk utilization rate, request process number etc..
Step 302, sleep management module sends the first message to monitoring module, and this first message carries to be adopted
Collection temporal information, the identification information of APP, operational order information.Wherein, this acquisition time information includes
Gathering the time started and gather the end time, this operational order information represents for asking resource utilization.
Wherein, at the run duration of APP, sleep management module can periodically send the first message.
Step 303, monitoring module, after receiving the first message, obtains the APP that acquisition time information is corresponding
Resource utilization, add this resource utilization to second message, the second message be sent to dormancy pipe
Reason module.Sleep management module receives the second message, obtains the resource utilization of APP from the second message.
Wherein, monitoring module, after receiving the first message, parses acquisition time letter from the first message
Breath and the identification information of APP, and the APP that the identification information that obtains this APP is corresponding, when this collection
Between resource utilization corresponding to information (gathering time started and the time period gathered between the end time).
Wherein, the second message carries the resource utilization of APP, operational order information, APP current
State.This resource utilization can be at CPU usage, memory usage, disk utilization rate, request
Reason number etc..This operational order information represents for responding resource utilization.The current state of APP can be
Running status, halted state etc., the current state carried in the second message can be running status, represents
APP is currently run duration, and occupies the resources such as calculating, internal memory, network, storage.
Step 304, sleep management module utilizes the resource utilization of this APP to determine needs this APP of dormancy.
Wherein, when sleep management module utilizes the resource utilization of this APP to determine, this APP is when default
In inactive time, as in 1 minute inactive time, then sleep management module determines needs dormancy APP.
Such as, when this resource utilization is less than predetermined threshold value, then sleep management module determines needs dormancy to be somebody's turn to do
APP, and stop sending the first message to monitoring module.When this resource utilization is not less than predetermined threshold value,
Then sleep management module determines and need not this APP of dormancy, continues periodically to send the first message to monitoring module.
Step 305, sleep management module sends the 3rd message to application controls module, in the 3rd message
Carry the identification information of APP, represent for the operational order information that APP is carried out dormancy process.
Step 306, application controls module is after receiving the 3rd message, corresponding to the identification information of APP
APP carry out dormancy process.After APP dormancy success, send the 4th message to sleep management module,
4th message carries the identification information of APP, for representing APP dormancy successful operational order information.
Additionally, can also carry the current state of APP in the 4th message, this current state can be fortune
Row state, halted state etc., the current state carried in the 4th message can be halted state, represents APP
During being currently dormancy, and release the resources such as calculating, internal memory, network, storage.
Wherein, APP carrying out for application controls module the process of dormancy process, application controls module can
Dormancy process is carried out, so that APP discharges the resource that this APP takies with notice APP.
Step 307, APP is when application controls module carries out dormancy process to this APP, to routing module
Sending the 5th message, the 5th message carries the identification information of APP, the forwarding information of APP and for leading to
Know that routing module deletes the operational order information of the forwarding information of APP, discharge the resource that this APP takies.
Additionally, successful for this APP dormancy information can also be notified to application controls module by APP.
Wherein, discharging the process of the resource that this APP takies for APP, APP can discharge this APP
The resources such as the calculating that takies, internal memory, network, storage, so that these resources can be used by other APP.
Step 308, sleep management module, after receiving the 4th message, determines APP dormancy success, and
Sending the 6th message to routing module, the 6th message carries the identification information of APP, this sleep management mould
The forwarding information of block and for registering the operational order information of the forwarding information of this sleep management module.
Step 309, routing module, after receiving the 5th message, is deleted from local route table items
The forwarding information of APP;After receiving the 6th message, local route table items records dormancy pipe
The forwarding information of reason module.Based on this, at the run duration of APP, routing module can utilize APP
Forwarding information access request message is sent to APP;When APP dormancy success, routing module is permissible
Access request message is sent to sleep management module by the forwarding information utilizing sleep management module.
Wherein, in the run duration of APP, the service provided for this APP, routing module have recorded
The forwarding information of this APP, therefore, when receiving the access request message accessing this APP, permissible
Access request message is sent to this APP by the forwarding information utilizing this APP.When APP dormancy success,
The service provided for this APP, routing module can be deleted the forwarding information of this APP, and record not
The forwarding information of management module of sleeping, therefore, when receiving the access request message accessing this APP, can
To utilize the forwarding information of this sleep management module that access request message is sent to sleep management module.
Said process is the sleep procedure of APP, after APP dormancy success, routing module can be remembered
Forwarding information (URL information corresponding for APP of dormancy and the sleep management module of record sleep management module
IP address and serve port), when there being the access request message of APP accessing this dormancy again, road
Access request message can be sent to sleep management module by module, sleep management module receive access
After request message, wake up the APP of dormancy up, for the wakeup process of APP, as shown in Figure 4, this
The management method of a kind of APP dormancy proposed in inventive embodiments, may comprise steps of:
Step 401, sleep management module is receiving after the access request message of routing module, protects
Deposit this access request message, and carry in application controls module transmission the 7th message, and the 7th message
The identification information of APP, for APP being waken up up the operational order information of process.
Step 402, application controls module, after receiving the 7th message, wakes up process up to APP,
And after APP wakes up up successfully, send in the 8th message, and the 8th message to sleep management module and take
Identification information with APP, for representing that APP wakes up successful operational order information up.
Additionally, can also carry the current state of APP in the 8th message, this current state can be fortune
Row state, halted state etc., the current state carried in the 8th message can be running status, represents APP
It is currently run duration, and occupies the resources such as calculating, internal memory, network, storage.
Wherein, APP waking up for application controls module the process of process up, application controls module can
Carry out waking up process up with notice APP, so that APP resumes related resource, and again start working.
Step 403, APP, when application controls module wakes up process up to this APP, restarts work
Make, and send in the tenth message, and the tenth message to routing module carry this APP identification information,
The forwarding information of this APP, for registering the operational order information of the forwarding information of this APP.
Notify to application controls module additionally, this APP can also be waken up up successful information by APP.
Wherein, restart the process of work for APP, APP can resume calculating, internal memory,
The resource such as network, storage, and use these resources to start working, access request message is processed.
Step 404, sleep management module, after receiving the 8th message, determines that APP wakes up up successfully, and
Send the 9th message to routing module, and the 9th message carries the identification information of APP, this sleep management
The forwarding information of module, for deleting the operational order information of the forwarding information of this sleep management module.
Additionally, sleep management module is after determining that APP wakes up up successfully, it is also possible to the visit that this locality is preserved
Ask that request message is sent to APP, APP and processes this access request message, and result is returned
Back to sleep management module.Result is returned to routing module by sleep management module, and routing module will
Result returns to user.So far, the access request message needing sleep management resume module is processed
Completing, the access request message of this APP of subsequent access can be sent to APP and directly process.
Step 405, routing module, after receiving the 9th message, is deleted from local route table items
The forwarding information of sleep management module;After receiving the tenth message, remember in local route table items
The forwarding information of record APP.Based on this, when APP wakes up up successfully, receiving access request message
Afterwards, routing module can utilize the forwarding information of APP that access request message is sent to APP.
Wherein, during APP dormancy, the service provided for this APP, routing module have recorded not
The forwarding information of management module of sleeping, therefore, when receiving the access request message accessing this APP, can
To utilize the forwarding information of sleep management module that access request message is sent to sleep management module.?
When APP wakes up up successfully, the service provided for this APP, routing module can be deleted sleep management module
Forwarding information, and record the forwarding information of this APP, therefore, receiving the visit accessing this APP
When asking request message, it is possible to use access request message is sent to this APP by the forwarding information of this APP.
For the flow process shown in Fig. 3 and Fig. 4, the identification information of APP can be application identities and/or application
Title, application identities is a unique mark of APP, and such as 123456 etc., Apply Names is APP
One unique name, such as Alipay application etc..Additionally, above-mentioned each message can be based on HTTP (Hyper
Text Transfer Protocol, HTTP) message of agreement, such as the first message to the tenth report
Literary composition, is all based on the message of http protocol.Additionally, the forwarding information of sleep management module can include
But it is not limited to: URL information, the IP address of sleep management module and serve port corresponding for APP.APP
Forwarding information can include but not limited to: URL information, IP address and serve port corresponding for APP.
Wherein, URL information corresponding for APP refers to the domain name that this APP is corresponding, is outside APP is supplied to
Portion user's, external user can use this URL information to access APP.Such as, when on routing module
When recording URL information, IP address and serve port corresponding for APP, routing module is receiving access
During request message, from access request message, parse URL information corresponding to APP, and find this URL
IP address that information is corresponding and serve port, thus utilize this IP address and serve port by access request
Message is sent to APP.When URL information corresponding for record APP on routing module, sleep management module
IP address and during serve port, routing module, when receiving access request message, disappears from access request
Breath parses URL information corresponding to APP, finds IP address corresponding to this URL information and service
Port, thus utilize this IP address and serve port that access request message is sent to sleep management module.
Based on the inventive concept as said method and device, the embodiment of the present invention also proposes one
The management method of APP dormancy, the management method of described APP dormancy can be applied at sleep management equipment
On.Wherein it is possible to mark off sleep management module, monitoring module and application control on sleep management equipment
Molding block, as such, it is possible to use sleep management module, monitoring module and application controls module to realize APP
The management method of dormancy, this handling process sees the handling process of above-mentioned Fig. 3 and Fig. 4, at this no longer
Repeat.It is of course also possible to use sleep management equipment to realize above-mentioned sleep management module, monitoring module
With the function of application controls module, the embodiment of the present invention illustrates as a example by this scene.
The deployment architecture of sleep management equipment, routing module and APP is distributed frame, routing module and
APP can be deployed in sleep management equipment, it is also possible to is deployed in the miscellaneous equipment outside sleep management equipment.
As it is shown in figure 5, the management method of APP dormancy proposed in the present embodiment specifically includes following steps:
Step 501, at the run duration of APP, sleep management equipment obtains the resource utilization of APP.
Step 502, this resource utilization of sleep management equipment utilization judges whether to need this APP of dormancy.
If it is, perform step 503;If it does not, continue to obtain the resource utilization of APP in next cycle.
Step 503, sleep management equipment carries out dormancy process to this APP;So that this APP notice route
Module deletes the forwarding information of this APP, and discharges the resource that this APP takies.
Step 504, when APP dormancy success, sleep management equipment is by the forwarding of this sleep management equipment
Information is sent to routing module;So that routing module is when APP dormancy success, this sleep management is utilized to set
Access request message is sent to sleep management equipment by standby forwarding information.Additionally, in the runtime of APP
Between, routing module can utilize the forwarding information of APP that access request message is sent to this APP.
In the embodiment of the present invention, sleep management equipment is after receiving access request message, at sleep management
Equipment this locality preserves this access request message, and APP is waken up up process;So that APP opens again
Beginning work, and the forwarding information of this APP is sent to routing module.When APP wakes up up successfully, stop
This access request message that this locality is preserved by dormancy management equipment is sent to APP, and notifies that routing module is deleted
The forwarding information of this sleep management equipment;So that routing module is when APP wakes up up successfully, receiving visiting
After asking request message, utilize the forwarding information of APP that access request message is sent to this APP.
In the embodiment of the present invention, in the run duration of APP, the service provided for this APP, route
Module have recorded the forwarding information of this APP, is therefore receiving the access request message accessing this APP
Time, it is possible to use access request message is sent to this APP by the forwarding information of this APP.Stop at APP
When sleeping successfully, the service provided for this APP, routing module can be deleted the forwarding information of this APP,
And record the forwarding information of sleep management equipment, therefore receiving the access request message accessing this APP
Time, it is possible to use access request message is sent to sleep management equipment by the forwarding information of sleep management equipment.
When APP wakes up up successfully, the service provided for this APP, routing module can be deleted sleep management
The forwarding information of equipment, and record the forwarding information of APP, therefore receiving the visit accessing this APP
When asking request message, it is possible to use access request message is sent to this APP by the forwarding information of this APP.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive this
Bright can add the mode of required general hardware platform by software and realize, naturally it is also possible to by hardware,
But the former is more preferably embodiment in the case of a lot.Based on such understanding, technical scheme
The part contributed prior art the most in other words can embody with the form of software product,
This computer software product is stored in a storage medium, including some instructions with so that a calculating
Machine equipment (can be personal computer, server, or the network equipment etc.) performs the present invention, and each is real
Execute the method described in example.It will be appreciated by those skilled in the art that accompanying drawing is the signal of a preferred embodiment
Figure, module or flow process in accompanying drawing are not necessarily implemented necessary to the present invention.
It will be appreciated by those skilled in the art that the module in the device in embodiment can describe according to embodiment
Carry out being distributed in the device of embodiment, it is also possible to carry out respective change and be disposed other than the one of the present embodiment
In individual or multiple device.The module of above-described embodiment can merge into a module, it is possible to splits further
Become multiple submodule.The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
The several specific embodiments being only the present invention disclosed above, but, the present invention is not limited to this,
The changes that any person skilled in the art can think of all should fall into protection scope of the present invention.
Claims (10)
1. the managing device of an APP dormancy, it is characterised in that described device specifically includes:
Sleep management module, for the run duration at APP, obtains the resource utilization of described APP;
When utilizing described resource utilization to determine to need APP described in dormancy, described APP is carried out at dormancy
Reason;When described APP dormancy success, the forwarding information of this sleep management module is sent to routing module;
APP, for when described sleep management module carries out dormancy process to described APP, notice is described
Routing module deletes the forwarding information of described APP, and discharges the resource that described APP takies;
Routing module, for the run duration at APP, utilizes the forwarding information of described APP to access
Request message is sent to described APP;When described APP dormancy success, utilize described sleep management module
Forwarding information access request message is sent to described sleep management module.
Device the most according to claim 1, it is characterised in that described device also includes:
Monitoring module, for the run duration at APP, obtains the resource utilization of described APP;
Application controls module, for receiving carrying out described APP from described sleep management module
During the notice that dormancy processes, then described APP is carried out dormancy process;In described APP dormancy success
After, then the described successful information of APP dormancy is notified to described sleep management module;
Described sleep management module, specifically for obtain described APP resource utilization during,
The resource utilization of described APP is obtained from described monitoring module;Described APP is being carried out dormancy process
During, notify that described application controls module carries out dormancy process to described APP;Receive from
During the described successful information of APP dormancy of described application controls module, determine described APP dormancy success.
Device the most according to claim 2, it is characterised in that
Described sleep management module, specifically for obtaining the resource profit of described APP from described monitoring module
During rate, send the first message for asking resource utilization to described monitoring module, described
First message carries acquisition time information, the identification information of described APP, and receives described monitoring module and return
The second message returned, and from described second message, obtain the resource utilization of described APP;
Described monitoring module, specifically for after receiving described first message, when obtaining described collection
Between the resource utilization of described APP corresponding to information, and to the resource utilization currently obtained is added
In two messages, and described second message is sent to described sleep management module.
Device the most according to claim 2, it is characterised in that
Described sleep management module, specifically for notifying that described APP is carried out by described application controls module
During dormancy processes, send for described APP is carried out dormancy process to described application controls module
The 3rd message, and described 3rd message carries the identification information of described APP;
Described application controls module, specifically for notifying the described successful information of APP dormancy to described
During sleep management module, send to described sleep management module and be used for representing that described APP dormancy becomes
4th message of merit, and described 4th message carry the identification information of described APP.
Device the most according to claim 1, it is characterised in that
Described APP, specifically for notifying that described routing module deletes the mistake of the forwarding information of described APP
Cheng Zhong, sends the 5th message being used for deleting the forwarding information of described APP to described routing module, described
5th message carries the identification information of described APP, the forwarding information of described APP;
Described sleep management module, specifically for being sent to route by the forwarding information of sleep management module
During module, send the 6th message for registering described sleep management module to described routing module,
Described 6th message carries the identification information of described APP, the forwarding information of described sleep management module;
Described routing module, specifically for after receiving described 5th message, from local routing table
The forwarding information of described APP is deleted in Xiang;After receiving described 6th message, in local route
List item records the forwarding information of described sleep management module, with when described APP dormancy success, utilizes
Access request message is sent to described sleep management module by the forwarding information of described sleep management module.
Device the most according to claim 1, it is characterised in that
Described sleep management module, is additionally operable to after receiving access request message, and preserving described access please
Seek message, described APP is waken up up process;When described APP wakes up up successfully, by described access
Request message is sent to described APP, and notifies that routing module deletes the forwarding information of this sleep management module;
Described APP, is additionally operable to when described sleep management module wakes up process up to described APP, weight
Newly start working, and the forwarding information of described APP is sent to described routing module;
Described routing module, is additionally operable to, when described APP wakes up up successfully, receiving access request message
Afterwards, access request message is sent to described APP by the forwarding information utilizing described APP.
Device the most according to claim 6, it is characterised in that
Also include: application controls module;Described sleep management module, specifically for entering described APP
During row wakes up process up, send for described APP is waken up up place to described application controls module
7th message of reason, and described 7th message carries the identification information of described APP;
Described application controls module, for after receiving described 7th message, is carried out described APP
Wake up process up, and after described APP wakes up up successfully, send to described sleep management module and be used for representing institute
State APP and wake up the identification information carrying described APP in successful 8th message, and described 8th message up.
Device the most according to claim 6, it is characterised in that
Described sleep management module, specifically for deleting the forwarding of sleep management module at notice routing module
During information, send the 9th report being used for deleting the forwarding information of sleep management module to routing module
Literary composition, described 9th message carries the identification information of described APP, the forwarding information of described sleep management module;
Described APP, specifically in the mistake that the forwarding information of described APP is sent to described routing module
Cheng Zhong, sends the tenth message being used for registering the forwarding information of described APP to described routing module, described
Tenth message carries the identification information of described APP, the forwarding information of described APP;
Described routing module, specifically for after receiving described 9th message, from local routing table
The forwarding information of described sleep management module is deleted in Xiang;After receiving described tenth message, at this
The route table items on ground records the forwarding information of described APP, with when described APP wakes up up successfully, sharp
With the forwarding information of described APP, access request message is sent to described APP.
9. according to the device described in any one of claim 1-8, it is characterised in that described resource utilization
Including one below or any combination: central processor CPU utilization rate, memory usage, disk make
Number is processed with rate, request;The forwarding information of described sleep management module includes: the system that described APP is corresponding
One URLs URL information, the IP address of described sleep management module and serve port;Described APP
Forwarding information include: URL information, IP address and serve port corresponding for described APP.
10. the management method of an APP dormancy, it is characterised in that the management method of described APP dormancy
Apply on sleep management equipment, and said method comprising the steps of:
At the run duration of APP, obtain the resource utilization of described APP;
Described resource utilization is utilized to judge whether to need APP described in dormancy;
If it is, described APP is carried out dormancy process;So that described APP notice routing module is deleted
Except the forwarding information of described APP, and discharge the resource that described APP takies;
When described APP dormancy success, the forwarding information of described sleep management equipment is sent to described road
By module;So that described routing module is when described APP dormancy success, utilize described sleep management equipment
Forwarding information access request message is sent to described sleep management equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610190741.XA CN105897869B (en) | 2016-03-29 | 2016-03-29 | A kind of management method and device of APP suspend mode |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610190741.XA CN105897869B (en) | 2016-03-29 | 2016-03-29 | A kind of management method and device of APP suspend mode |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105897869A true CN105897869A (en) | 2016-08-24 |
CN105897869B CN105897869B (en) | 2019-09-06 |
Family
ID=57014057
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610190741.XA Active CN105897869B (en) | 2016-03-29 | 2016-03-29 | A kind of management method and device of APP suspend mode |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105897869B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107864042A (en) * | 2017-10-31 | 2018-03-30 | 青岛海信电器股份有限公司 | Application program awakening method and device |
CN109445925A (en) * | 2018-11-09 | 2019-03-08 | 郑州云海信息技术有限公司 | A kind of application program adapting method, apparatus and system |
CN111786904A (en) * | 2020-07-07 | 2020-10-16 | 上海道客网络科技有限公司 | System and method for realizing container dormancy and awakening |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102158341A (en) * | 2010-12-30 | 2011-08-17 | 友达光电股份有限公司 | Method for waking up electronic device and network server capable of waking up electronic device |
CN102571507A (en) * | 2010-12-10 | 2012-07-11 | 华为终端有限公司 | Equipment wake-up method, dormant agent equipment and equipment wake-up system |
CN103259817A (en) * | 2012-02-17 | 2013-08-21 | 华为技术有限公司 | Resource release method and device |
CN103279353A (en) * | 2013-05-31 | 2013-09-04 | 新浪网技术(中国)有限公司 | Method, device and system for determining application optimization strategies |
CN104410712A (en) * | 2014-12-16 | 2015-03-11 | 国家电网公司 | Application example management method, as well as user access request processing method and system |
CN104468160A (en) * | 2013-09-17 | 2015-03-25 | 苏州精易会信息技术有限公司 | A method and device for managing start and stop of Web server |
CN105094979A (en) * | 2014-05-21 | 2015-11-25 | 北京大学 | PaaS flexible resource management mechanism based on application features |
-
2016
- 2016-03-29 CN CN201610190741.XA patent/CN105897869B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571507A (en) * | 2010-12-10 | 2012-07-11 | 华为终端有限公司 | Equipment wake-up method, dormant agent equipment and equipment wake-up system |
CN102158341A (en) * | 2010-12-30 | 2011-08-17 | 友达光电股份有限公司 | Method for waking up electronic device and network server capable of waking up electronic device |
CN103259817A (en) * | 2012-02-17 | 2013-08-21 | 华为技术有限公司 | Resource release method and device |
CN103279353A (en) * | 2013-05-31 | 2013-09-04 | 新浪网技术(中国)有限公司 | Method, device and system for determining application optimization strategies |
CN104468160A (en) * | 2013-09-17 | 2015-03-25 | 苏州精易会信息技术有限公司 | A method and device for managing start and stop of Web server |
CN105094979A (en) * | 2014-05-21 | 2015-11-25 | 北京大学 | PaaS flexible resource management mechanism based on application features |
CN104410712A (en) * | 2014-12-16 | 2015-03-11 | 国家电网公司 | Application example management method, as well as user access request processing method and system |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107864042A (en) * | 2017-10-31 | 2018-03-30 | 青岛海信电器股份有限公司 | Application program awakening method and device |
CN107864042B (en) * | 2017-10-31 | 2021-02-09 | 海信视像科技股份有限公司 | Application program awakening method and device |
CN109445925A (en) * | 2018-11-09 | 2019-03-08 | 郑州云海信息技术有限公司 | A kind of application program adapting method, apparatus and system |
CN109445925B (en) * | 2018-11-09 | 2022-02-18 | 郑州云海信息技术有限公司 | Application program takeover method, device and system |
CN111786904A (en) * | 2020-07-07 | 2020-10-16 | 上海道客网络科技有限公司 | System and method for realizing container dormancy and awakening |
CN111786904B (en) * | 2020-07-07 | 2021-07-06 | 上海道客网络科技有限公司 | System and method for realizing container dormancy and awakening |
Also Published As
Publication number | Publication date |
---|---|
CN105897869B (en) | 2019-09-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2563062B1 (en) | Long connection management apparatus and link resource management method for long connection communication | |
CN102915374B (en) | A kind of method, Apparatus and system of resource access of controlling database | |
CN111064634B (en) | Method and device for monitoring mass Internet of things terminal online state | |
CN104219327B (en) | Distributed cache system | |
CN106357811B (en) | A kind of delet method of Backup Data, apparatus and system | |
CN105357296A (en) | Elastic caching system based on Docker cloud platform | |
CN103001809B (en) | Service node method for monitoring state for cloud storage system | |
CN107005597A (en) | The wireless flow management system cached based on user characteristics in mobile device | |
WO2012146026A1 (en) | Method and system for monitoring internet of things | |
KR20120065072A (en) | Cloud storage and management method thereof | |
CN112016030B (en) | Message pushing method, device, server and computer storage medium | |
CN103338243A (en) | Method and system for updating cache data of Web node | |
CN105760240A (en) | Distributed task processing method and device | |
CN104699529B (en) | A kind of information acquisition method and device | |
CN105897869A (en) | APP sleep management method and apparatus | |
CN110740155B (en) | Request processing method and device in distributed system | |
CN103595566A (en) | Method and device for detecting idle IP addresses | |
CN110474963A (en) | A kind of resource access method based on zookeeper, system, medium and electronic equipment | |
CN112148508B (en) | Information processing method and related device | |
CN104518913B (en) | A kind of cloud service method for detecting abnormality based on artificial immunity | |
CN103475546A (en) | Method and system for detecting repeated login of salesmen | |
CN107526690B (en) | Method and device for clearing cache | |
CN102170476B (en) | Cloud computing method and device based on cloud node autonomic learning | |
CN100413248C (en) | Improved method and system for carrying out charging based on flow | |
CN106550002A (en) | A kind of paas clouds mandatory system and 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 |