User interface method for refreshing based on message subscribing under a kind of cloud platform
Technical field
The invention belongs to interface refresh technique fields, specifically, being related to the use based on message subscribing under a kind of cloud platform
Family interface refreshing method.
Background technology
Cloud platform be unable to do without interface and is interacted with user, and the friendliness and fast reaction degree direct influence at interface are used
Experience of the family to system.Cloud platform is big and complicated, and component is more and cumbersome.Often interface needs to obtain an information, needs tediously long
Operational chain and prolonged wait for.Processing time of the request to acquisition of information often over minute rank is initiated at interface,
And the state change of bottom be reacted to interface be presented to the user be also minute rank gap.
In general, a request is initiated at existing cloud platform interface, is needed by api interface, cloud platform controller, cloud
Dispatching platforms device is sent to each cloud platform assembly controller of bottom using message queue, then the controller of bottom according to
Its logic interacts with specific hardware, database or memory, then feeds back to interface.Similarly, when one cloud platform of bottom
When resource changes, also needs same path to feed back to interface, feed back to user.
But existing cloud platform interface mostly uses greatly B/S frameworks, this framework is not easy real-time reception and comes from bottom number
According to change so that web interface is difficult that real-time interface is kept to refresh (real-time update for including backstage link), can only be taken week
The mode of phase property inquiry goes tracking data variation.Obvious data variation is that whenever and wherever possible, there are a large amount of uncertainties.If inquiry
Period is excessive, and cloud platform interface cannot reflect bottom data variation in time., whereas if polling cycle is too small, it is just inevitable
It can lead to the serious query load of cloud platform physical layer interface, the server where cloud platform interface can also can't bear the heavy load.Therefore, have
Necessity considers more intelligent, efficient cloud platform interface refreshing method, to the greatest extent may be used under the premise of meeting user's quick obtaining information
The query load of cloud platform can be reduced.
Chinese invention patent " a kind of the mode adaptation method and mode adaptation system of user interface " (application number
CN201210101654.4), the invention provides a kind of mode adaptation method of user interface and mode adaptation systems, wherein institute
Stating mode adaptation method includes:To several operating modes of the UI Preferences of terminal, each operating mode corresponds to audient group
Body;Resource is divided according to different audiences, the resource for belonging to same audience is divided into one kind, and with it is described
The corresponding operating mode of audience corresponds to;Corresponding operating mode, the user interface is selected to provide and selected work
The corresponding resource of pattern.Although the invention so that the user for belonging to any audience can be according to the use demand of oneself
Free switching enjoys the resource for being suitble to the user provided under the operating mode, but the invention to the operating mode met
It is not related in patent of the present invention the real-time refreshing problem of user interface in cloud computing.
Chinese invention patent " a kind of method, Cloud Server and the thin client of the triggering of cloud business " (application number
CN201210433373.9), the invention provides method, Cloud Server and the thin-clients of a kind of triggering of cloud business.The side
Method includes:Trigger action of the user to button is received, the particular cloud business presence of the button and the Cloud Server is set in advance
The binding relationship set;Triggering message is generated according to the trigger action to button, the triggering message is sent to the cloud
Server is so that the Cloud Server calls the particular cloud business according to the pre-set binding relationship.Although the invention
A kind of quick method calling cloud service business by thin client is provided the user with, the working efficiency of user is improved, but simultaneously
The real-time refreshing problem of user interface in cloud computing is not involved in patent of the present invention.
Chinese invention patent " a kind of interface presentation, system and terminal " (application number CN201210214287.9), should
Invention provides a kind of interface presentation, system and terminal, the method includes:First terminal, which receives, preserves active user circle
The request message in face is captured current interface information based on the request message, and the interface information is uploaded to network storage
Server;Second terminal receives triggering command, and the call request to the interface information is initiated to the network storage server,
And with the interface information of calling, structuring user's can perform interface, and the interface of the construction is presented.The invention
Originating end is presented by interface, interface information is uploaded to network storage server, then receiving terminal is presented by interface and calls network
Storage server is realized is presented the long-range asynchronous shared of originating end interface information to interface, and the sharing mode is independent of boundary
The operating status of originating end is presented in face and the current interface display situation of originating end is presented in interface, realizes more flexible.But
There is no the real-time refreshing problems that interface presentation is changed in view of patent midsole layer state of the present invention for the invention.
Chinese invention patent " a kind of the form information method of calibration and system at cloud platform interface " (application number
CN201610619009.X), the disclosure of the invention form information method of calibration and system at a kind of cloud platform interface so that right
When form information is verified, only corresponding regular expression need to be transferred to be verified from preset configuration file, and
Without obtaining regular expression by way of inputting regular expression, to accelerate the verification speed of form information and carry
Verification accuracy rate is risen.But the invention does not account for the non-form information of other in cloud platform interface, is just not involved with this yet
The real-time refreshing problem of user interface in patent of invention.
Chinese invention patent " operating method and device at a kind of cloud Host Administration interface " (application number
CN201610633358.7), the disclosure of the invention operating method and device at a kind of cloud Host Administration interface, including cloud host,
Cloud host is equipped with human-computer interaction interface, and human-computer interaction interface is made of three parts, is respectively:Order line importation, order
Control section, order backstage response section.Although the invention can be the operation maintenance personnel using cloud computing management system backstage, carry
For a kind of mode of the operation cloud host of homoatomic chain disk, operating efficiency is improved, but is not related to patent medium cloud meter of the present invention
The real-time refreshing problem of user interface in calculation.
Invention content
In view of this, the present invention in order to solve defect and deficiency of the existing technology, provides base under a kind of cloud platform
In the user interface method for refreshing of message subscribing, disappeared by way of actively subscribing to the message queue in cloud platform scheduler
Ceasing information, polarity information interacts again, can realize efficient, low-cost the real-time refresh operation of user interface.
In order to solve the above-mentioned technical problem, the invention discloses the user interface brushes based on message subscribing under a kind of cloud platform
New method, and realized using following technical scheme.
User interface method for refreshing based on message subscribing under a kind of cloud platform, step include:
S1, bottom component triggering backstage hang up the request of virtual machine;
S2, the bottom component execute the processing of state change, and processing information and result are fed back to corresponding component
Controller;
S3, the assembly controller will handle the message queue that the bottom component is corresponded in message feedback to scheduler;
The processing message is actively sent to monitor by S4, the message queue;
S5, the monitor by the processing message feedback to user interface under the cloud platform, and the monitor and
Independent communication between the user interface;
The last state data of virtual machine described in S6, the user interface query and corresponding component;
S7, the user interface render interface, are shown to user again according to the last state data.
Further, the user interface inquires the last state data by api interface and cloud controller.
A kind of cloud platform system being suitable for the user interface method for refreshing based on message subscribing under cloud platform described above,
Including cloud platform architecture, function module and user interface;The cloud platform architecture includes and is not limited to calculate node
Controller, network node controller, volume Node Controller, cloud controller, scheduler and/or monitor;The Functional Module
Include and be not limited to authentication service module, storage services module and/or api interface module;The user interface includes and is not limited to
Website, webpage and/or backstage link;Independent communication between the user interface and the monitor, the monitor actively will
The message of bottom component states variation is pushed to the user interface;The monitor is believed in real time with the user interface
Breath interaction.
Further, the monitor actively subscribes to the message queue in the scheduler of the cloud platform, and described
Message queue feeds back the operation of all bottom components and Status Change information in the cloud platform.
Further, the different bottom components realize mutual interaction and task team by subscribing to different channel
The information such as column processing, Status Change that the message queues of the different bottom components can be respective bottom component and operational circumstances
Active feedback is to monitor.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter
Calculation machine program realizes the step of the user interface method for refreshing based on message subscribing under cloud platform as described above when being executed by processor
Suddenly.
User interface refreshing apparatus based on message subscribing under a kind of cloud platform, including memory, processor and storage
In the memory and the computer program that can run on the processor, it is characterised in that:The processor executes institute
The step of user interface method for refreshing based on message subscribing is realized under cloud platform as described above when stating computer program.
Compared with prior art, the present invention can be obtained including following technique effect:Pass through across component monitoring technique so that
Message can be fed back to bottom change on interface with second step velocity, to realize quick response;It needs compared with the existing technology
Repeated multiple times various components are wanted to carry out the inquiry of consumption performance, the present invention is not necessarily to poll inquiry, targetedly inquires very much
The component changed, it is very low on cloud platform influence, to performance of deducting a percentage.
Certainly, implementing any of the products of the present invention must be not necessarily required to reach all the above technique effect simultaneously.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and constitutes the part of the present invention, this hair
Bright illustrative embodiments and their description are not constituted improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 be one embodiment of the invention active sniffing pattern under cloud platform structural schematic diagram.
Fig. 2 is that the slave bottom component states of one embodiment of the invention change to the flow signal that process is presented in interface information
Figure.
Specific implementation mode
Carry out the embodiment that the present invention will be described in detail below in conjunction with accompanying drawings and embodiments, thereby how the present invention is applied
Technological means solves technical problem and reaches the realization process of technical effect to fully understand and implement.
Fig. 1 is cloud platform structure chart under active sniffing pattern according to the ... of the embodiment of the present invention, it is for realizing based on message
The user interface method for refreshing of subscription.Entire cloud platform system includes three big component parts under active sniffing pattern, is respectively:Cloud
Three big component part of platform base framework, function module and user interface.
Cloud platform architecture include and be not limited to calculate node controller, network node controller, volume Node Controller,
Cloud controller, scheduler and monitor etc.;Function module includes and is not limited to authentication service module, storage services module, API and connects
Mouth mold block etc.;User interface includes and is not limited to website, webpage, from the background link etc..
Monitor can actively subscribe to the message queue in the scheduler of cloud platform, and message queue can be fed back in cloud platform
The operation and Status Change of all bottom components.Since different bottom components are by subscribing to different channel, realize mutual
Interaction and task queue processing, this enable different bottom components message queue the Status Change of respective bottom component and
The information active feedback such as operational circumstances is to monitor.In this way, monitor can be accomplished to find that bottom component states change in real time
With task operating situation, without user interface, frequently, inefficiently the api interface of periodic queries each bottom components obtains bottom
The various information of layer assembly.Monitor carries out information exchange using with user interface, to realize the real-time brush of user interface
Newly.
Due to that can be independent communication between user interface and monitor, monitor again can be actively by bottom component states
The notice of variation is pushed to user interface, so the number of communications between user interface and monitor is frequent again, it generally will not shadow
Ring the calculated performance to cloud platform.In addition, although monitor is to carry out active subscription formula to message queue to monitor, it is also possible to have
There is message screening function, ignores certain form of message by condition setting, reduce communication overhead, reduce to being calculated in cloud platform
The influence of performance.
The user interface of present patent application described above refreshes cloud platform and the user interface refreshing side based on the cloud platform
Real-time acquisition of information not only may be implemented in method, and synchronizes and be presented in user interface, and also possessing smaller calculated performance influences
Cost.
The producing cause of cloud platform midsole layer assembly state change may be there are two aspect:
It is " request that user interface is actively initiated " on one side, for example creates virtual machine request, bottom can be caused to store
Component creates cloud hard disk, will also create the network port, and bottom computation module can create virtual machine image.For user interface
Speech, know above-mentioned a series of Status Change naturally in logic, also can duration processing subsequently change interface presentation.Therefore
In this case, no matter whether monitor is arranged informing function, all will not have any influence to user interface.Certainly, be into
One step reduces communication overhead, and the filtering function of monitor can also be arranged so that the situation that only interface in need changes,
The notice operation of monitor can be triggered;
On the other hand it is the case where " user interface non-active initiation ".When bottom component because the reasons such as hardware or software occur
When state change, user interface needs real-time perception to this variation, otherwise actively initiates cloud platform user interface next time to ask
It asks, it is more likely that operation is caused to conflict or fail.User interface brush based on message subscribing under cloud platform of the present invention
New method can very well solve the problems, such as in this case.
The flow of one embodiment that interface information is presented in real time is changed to as shown in Fig. 2, specific from bottom component states
Embodiment step is as follows:
S201:Bottom component (such as calculating, storage and networking component) triggers backstage hang-up void because various conditions limit
The request of quasi- machine (vm1);
S202:When virtual machine is hung up from the background, bottom component generating state variation, component internal executes at correlation
Reason, and processing information and result are fed back into corresponding assembly controller;
S203:Assembly controller corresponds to the message queue of component by handling in message feedback to scheduler;
S204:Because monitor actively subscribes to the message queue of each bottom component in scheduler, when some component message team
When generating the message with handling result in row, which actively transmits the message to monitor;
S205:After monitor receives the message in some component message queue, its process content and logic are first determined whether, then
According to certain rule and requirement, component states change information is fed back into user interface under cloud platform;
S206:After user interface receives the information of monitor, which component states hair during virtual machine vm1 is suspended learnt
Changing, then virtual machine (vm1) is inquired by api interface and cloud controller and corresponds to the last state data of component;
S207:After user interface receives the last state data of virtual machine (vm1) and corresponding component, boundary is rendered again
Face is shown to user.
The beneficial effects of the invention are as follows:Pass through across component monitoring technique so that message can becoming bottom with second step velocity
It more feeds back on interface, to realize quick response;Repeated multiple times various components are needed to disappear compared with the existing technology
The inquiry of consumption energy, the present invention are not necessarily to poll inquiry, targetedly inquire very much the component changed, influenced on cloud platform
It is very low, to performance of deducting a percentage.
It is provided for the embodiments of the invention the user interface method for refreshing based on message subscribing under a kind of cloud platform above,
It is described in detail.The explanation of above example is only intended to facilitate the understanding of the method and its core concept of the invention;Meanwhile
For those of ordinary skill in the art, according to the thought of the present invention, has change in specific embodiments and applications
Become place, in conclusion the content of the present specification should not be construed as limiting the invention.
Some vocabulary has such as been used to censure specific components or module in specification and claim.Art technology
Personnel are, it is to be appreciated that different institutions may call the same component or module with different nouns.This specification and right are wanted
In a manner of asking the difference not by title to be used as differentiation component, but area is used as with the difference of component or module functionally
The criterion divided.As being open language, therefore should solve in specification in the whole text and claim "comprising", " comprising " mentioned in
It is interpreted into " including but not limited to "." substantially " refer in receivable error range, those skilled in the art can be certain
The technical problem is solved in error range, basically reaches the technique effect.Specification subsequent descriptions are to implement the present invention's
Better embodiment, so description is being not limited to the model of the present invention for the purpose of the rule for illustrating the present invention
It encloses.Protection scope of the present invention is when subject to appended claims institute defender.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Including so that commodity or system including a series of elements include not only those elements, but also include not clear
The other element listed, or further include for this commodity or the intrinsic element of system.In the feelings not limited more
Under condition, the element that is limited by sentence "including a ...", it is not excluded that including the element commodity or system in also
There are other identical elements.
Several preferred embodiments of the present invention have shown and described in above description, but as previously described, it should be understood that the present invention
Be not limited to form disclosed herein, be not to be taken as excluding other embodiments, and can be used for various other combinations,
Modification and environment, and can in innovation and creation contemplated scope described herein, by the technology of above-mentioned introduction or related field or
Knowledge is modified.And changes and modifications made by those skilled in the art do not depart from the spirit and scope of the present invention, then it all should be
In the protection domain of appended claims of the present invention.