CN109828826B - Task progress polling method, device and system - Google Patents

Task progress polling method, device and system Download PDF

Info

Publication number
CN109828826B
CN109828826B CN201910024693.0A CN201910024693A CN109828826B CN 109828826 B CN109828826 B CN 109828826B CN 201910024693 A CN201910024693 A CN 201910024693A CN 109828826 B CN109828826 B CN 109828826B
Authority
CN
China
Prior art keywords
polling
task
progress
difference value
duration
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
CN201910024693.0A
Other languages
Chinese (zh)
Other versions
CN109828826A (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.)
New H3C Cloud Technologies Co Ltd
Original Assignee
New H3C Cloud Technologies Co Ltd
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 New H3C Cloud Technologies Co Ltd filed Critical New H3C Cloud Technologies Co Ltd
Priority to CN201910024693.0A priority Critical patent/CN109828826B/en
Publication of CN109828826A publication Critical patent/CN109828826A/en
Application granted granted Critical
Publication of CN109828826B publication Critical patent/CN109828826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

According to the task progress polling method, the device and the system, whether the task progress values respectively obtained by two adjacent polling times are different or not is judged through the management platform node, then the management platform node judges whether the difference meets a period maintaining condition or not, and when the period maintaining condition is met, the duration of a polling period of next polling is kept unchanged; when the period maintaining condition is not met, shortening the polling period duration of the next polling; when there is no difference in the task progress values, the polling cycle duration of the next polling is increased. Obviously, the polling mechanism provided by the embodiment of the invention matches the appropriate polling cycle duration based on the progress of the completion of the current task, thereby providing a more flexible polling mode, improving the polling efficiency of the teaching management system based on cloud computing, and reducing the load pressure of the nodes in the system.

Description

Task progress polling method, device and system
Technical Field
The invention relates to a cloud computing technology, in particular to a task progress polling method, a task progress polling device and a task progress polling system.
Background
With the development of cloud computing technology, the IT requirements of the education industry become more diversified, and the traditional physical PC can not meet diversified teaching scenes of colleges and universities. In order to meet the requirements of the education industry on practical scenes such as teaching, educational administration, examination and the like, the industry has provided a teaching management system based on cloud computing.
The existing teaching management system based on cloud computing issues task configuration to subordinate nodes through cloud computing management nodes, and then the subordinate nodes execute each task function based on the task configuration. For example, a lower node in a classroom is configured to create a course template, and the lower node creates a course template and a corresponding virtual machine.
However, after the cloud computing management node configures a task to a subordinate node in the prior art, the cloud computing management node needs to acquire the execution condition of the current task of the subordinate node in a polling manner, so as to configure a subsequent task after the current task is completed. However, in the prior art, the polling mechanism of the cloud computing management node cannot be reasonably adapted to different differentiated tasks, so that the operation efficiency of the whole system is reduced.
Disclosure of Invention
The invention aims to provide a task progress polling method, a task progress polling device and a task progress polling system, which are used for improving the operation efficiency of a teaching management system based on cloud computing.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a task progress polling method, including:
judging whether the task progress values respectively obtained by two adjacent polling are different or not;
if so, judging whether the difference meets a period maintenance condition; if not, increasing the polling cycle duration of the next polling;
if the period maintaining condition is met, maintaining the duration of the polling period of the next polling unchanged; and if the period maintaining condition is not met, shortening the polling period duration of the next polling.
With reference to the first aspect, in a first possible implementation manner, the determining whether there is a difference between task progress values obtained by two adjacent polls includes:
acquiring a progress difference value, wherein the progress difference value is the difference between the task progress value obtained by the nth polling and the task progress value obtained by the (n-1) th polling;
the determining whether the difference satisfies a period maintaining condition includes:
if the progress difference value is larger than zero, determining whether the progress difference value is equal to a minimum variation difference value; the minimum change difference value represents a minimum change amount of the task progress value;
if the progress difference value is equal to the minimum change difference value, maintaining the duration of the polling cycle of the (n + 1) th polling unchanged; if the progress difference value is larger than the minimum change difference value, shortening the polling cycle duration of the (n + 1) th polling;
if the difference does not exist, increasing the polling cycle duration of the next polling, including:
and if the progress difference value is zero, increasing the polling cycle duration of the (n + 1) th polling.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the polling cycle duration expression of the (n + 1) th polling is as follows:
Figure BDA0001942046990000021
wherein, T isn+1A polling period duration for the n +1 th poll, TnThe polling cycle duration of the nth polling, k is a constant, DnThe difference between the task progress value obtained for the nth polling and the task progress value obtained for the (n-1) th polling.
With reference to the first aspect, in a third possible implementation manner, before the determining whether there is a difference between task progress values obtained by two adjacent polls, the method further includes:
and configuring the polling cycle duration of the 1 st polling according to the task type of the task and the performance state of a management secondary node executing the task.
In a second aspect, an embodiment of the present invention provides a task progress polling device, including: the device comprises a judging module and a processing module; the judgment module is connected with the processing module;
the judging module is used for judging whether the task progress values respectively obtained by two adjacent polling are different or not; if so, judging whether the difference meets a period maintenance condition;
the processing module is used for increasing the polling cycle duration of the next polling if the polling cycle duration does not exist; if the period maintaining condition is met, maintaining the duration of the polling period of the next polling unchanged; and if the period maintaining condition is not met, shortening the polling period duration of the next polling.
With reference to the second aspect, in a first possible implementation manner, the determining module is specifically configured to obtain a progress difference value, where the progress difference value is a difference between a task progress value obtained by the nth polling and a task progress value obtained by the n-1 th polling; if the progress difference value is larger than zero, determining whether the progress difference value is equal to a minimum variation difference value; the minimum change difference value represents a minimum change amount of the task progress value;
the processing module is specifically configured to maintain the duration of the polling cycle of the (n + 1) th polling unchanged if the progress difference value is equal to the minimum change difference value; if the progress difference value is larger than the minimum change difference value, shortening the polling cycle duration of the (n + 1) th polling; and if the progress difference value is zero, increasing the polling cycle duration of the (n + 1) th polling.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the polling cycle duration expression of the (n + 1) th polling is as follows:
Figure BDA0001942046990000031
wherein, T isn+1A polling period duration for the n +1 th poll, TnThe polling cycle duration of the nth polling, k is a constant, DnThe difference between the task progress value obtained for the nth polling and the task progress value obtained for the (n-1) th polling.
With reference to the second aspect, in a third possible implementation manner, the processing module is further configured to configure a polling cycle duration of the 1 st polling according to a task type of a task and a performance state of a management secondary node that executes the task.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method as described in the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a task progress polling system, including: a management platform node and a management secondary node, the management platform node comprising the apparatus as described in the second aspect or any one of the possible implementations of the second aspect;
the management secondary node is used for executing tasks;
and the management platform node is used for determining the execution progress of the task according to the task progress value of the task.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
according to the task progress polling method, the device and the system provided by the embodiment of the invention, whether the task progress values respectively obtained by two adjacent polling are different or not is judged through the management platform node, and then the management platform node judges whether the difference meets the period maintenance condition or not, and when the period maintenance condition is met, the duration of the polling period of the next polling is kept unchanged; when the period maintaining condition is not met, shortening the polling period duration of the next polling; when there is no difference in the task progress values, the polling cycle duration of the next polling is increased. Obviously, the polling mechanism provided by the embodiment of the invention matches the appropriate polling cycle duration based on the progress of the completion of the current task, thereby providing a more flexible polling mode, improving the polling efficiency of the teaching management system based on cloud computing, and reducing the load pressure of the nodes in the system.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1A is a schematic signaling interaction diagram of a teaching management system based on cloud computing according to an embodiment of the present invention;
FIG. 1B is a schematic signaling interaction diagram of a conventional task polling mechanism;
fig. 2 is a flowchart illustrating a task progress polling method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating another task progress polling method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating another task progress polling method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a task progress polling device according to an embodiment of the present invention;
fig. 6 is a schematic deployment diagram of a task progress polling system according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a node device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Fig. 1A is a schematic signaling interaction diagram of a teaching management system based on cloud computing according to an embodiment of the present invention, and referring to fig. 1A, the system includes: management platform nodes, management secondary nodes and clients.
The management platform node, the management secondary node and the client are connected through a network, and specifically, the network may be a cloud network formed by a physical server, a network adapter, a switch, a storage device and the like. The physical server may carry a plurality of Virtual Machines (VMs). Moreover, the cloud network can be a heterogeneous network and supports various wireless access and wired access modes.
With continued reference to fig. 1A, the management platform node is responsible for completing the business functions in the teaching scenario for use by the teacher. The management secondary node can be a virtualization management platform, can provide a VM for a user, and a user side can be connected with the VM through a Remote Desktop Protocol (RDP) for students to use. The RDP supports a variety of different operating systems, such as Linux, FreeBSD, Mac OS.
Further, taking a "teaching" scenario as an example, the scenario has a function of going to and going to lessons, and one possible implementation manner is as follows: the teacher sends a lesson instruction through a one-key lesson taking function of the management platform node, and then the management platform node informs the management secondary node to execute tasks: and (4) creating the VM, and redistributing the client to log in after the VM is successfully created, so that students can directly use the client to connect with the VM to start class taking.
Specifically, in the course of executing the in-class and out-of-class functions, all instructions issued by the management platform node to the management secondary node must be synchronous and ordered. Referring to fig. 1A, a possible implementation of signaling interaction is shown:
step 1, the management platform node triggers the lesson taking function.
And 2, the management platform node issues an instruction for creating the course template to the management secondary node.
Step 3, managing a secondary node to create a template VM;
step 4, the management secondary node feeds back a command of successful creation to the management platform node;
step 5, the management platform node issues a VM establishing instruction to the management secondary node;
step 6, managing the secondary node to create a VM;
step 7, the management secondary node feeds back a command of successful creation to the management platform node;
and 8, the management platform node allocates the VM to the client.
Referring to the above flow of fig. 1A, the management platform node notifies the management secondary node to create the VM, and the management platform node can perform the next action of allocating the VM only after all processes of creating the template VM by the management secondary node are completed. Wherein the task time required for creating the template VM is Tm1The task time required to create a VM is Tm2
Then at Tm1In the process, the management platform node needs to synchronously wait for the management secondary node to finish the step 3, and then can continue the subsequent steps. Referring to fig. 1A, fig. 1B is a schematic diagram of signaling interaction of a conventional task polling mechanism, referring to fig. 1B, with Tm1For example, the signaling interaction includes:
step 2, the management platform node issues an instruction for creating the course template to the management secondary node
And 3-1, managing the task ID reported by the secondary node.
And 3-2, initiating the 1 st polling by the management platform node.
And 3-3, the management secondary node reports the task progress value of the 1 st polling.
And 3-4, initiating the 2 nd polling by the management platform node.
……
And 3-m, initiating the nth polling by the management platform node.
And 3-m +1, reporting the task progress value of the nth polling by the management secondary node.
And 3-m +2, the management platform node initiates the (n + 1) th polling.
And 3-m +3, reporting the task progress value of the (n + 1) th polling by the management secondary node.
In the polling mechanism of FIG. 1B, for T1Waiting for 1 st polling cycle duration at management platform node for T1Thereafter, a 2 nd poll is initiated. And each time of polling, the management platform node obtains the current task progress value, so that the progress of the management secondary node executing the creation of the template VM at present is obtained. Until the n +1 th poll, which is 100%, step 5 of fig. 1A may be performed.
However, the polling mechanism of the above-mentioned process is: at fixed intervals within the cycle (e.g. T)1To TnThe duration of the n polling periods is 1s), the management platform node inquires the progress of the current task to the management secondary node, if the progress is 100%, the current polling process is skipped if the task is completed, otherwise, the polling is performed all the time if the task is not completed.
However, if the task execution time for managing the secondary node is long, for example, the task progress increases by 1% in 1 minute, the above-mentioned polling mechanism will poll 60 times in the 1 minute, and if the progress results of the 60 polls are not changed, the 60 polls are invalid polls, causing the CPU to idle, and wasting the CPU resources.
However, if the polling interval is set to 1 minute, such invalid polling may be resolved, but for example, the task execution time of the management secondary node is short, for example, the current task is executed for 3s, but the polling interval is 1 minute, the management platform node cannot sense whether the task is completed for the first time, which results in a delay of 57 s.
Therefore, in summary, if the above polling mechanism is adopted, that is, the latency of the management platform node polling the CAS is a fixed value, it will result in: 1. and (2) managing invalid polling of platform nodes, wherein the management platform nodes cannot timely sense tasks. I.e., a fixed polling period duration, makes the polling mechanism less flexible.
In order to solve the above technical problem, a possible implementation manner of the task progress polling method is provided below, in which the polling cycle duration is matched with the completion progress of the current task, so as to provide a flexible polling mechanism. Specifically, fig. 2 is a schematic flowchart of a task progress polling method according to an embodiment of the present invention, where an execution subject of the method may be a management platform node shown in fig. 1A or fig. 1B, and referring to fig. 2, the process includes the following steps:
and step 100, judging whether the task progress values respectively obtained by two adjacent polling are different.
Specifically, each time polling is performed, the management platform node may issue polling to the management secondary node, so that the management secondary node reports a task progress value of the polling. If there is a difference, go to step 101; if not, it indicates that the current polling period is too short, then step 104 is executed.
And step 101, judging whether the difference meets a period maintaining condition.
Specifically, the period maintaining condition is a condition for determining whether the polling period duration of the current polling is appropriate. Further, if the period maintaining condition is satisfied, which indicates that the current polling period duration is appropriate, step 102 is executed; if the period maintaining condition is not satisfied, which means that the current polling period is too long, step 103 is executed.
Alternatively, the period maintaining condition may be implemented by detecting whether the change of the task progress of the management secondary node meets the minimum change of the task progress value, that is, when the difference in step 100 is equal to the minimum change of the task progress value, the situation that the management secondary node currently completes the task meets the basic requirement of task execution. And, the current polling cycle duration is also matched, so that the polling cycle duration of the next polling can be kept unchanged. In addition, the period maintaining condition may be a preset fixed threshold or a threshold range, or may be dynamically adjusted based on different task types or current performance states of the management secondary node. Whatever the way it is obtained, it should eventually satisfy: the period maintenance condition represents that the duration of the polling period of the current polling is matched with the change of the task progress of the management secondary node.
And 102, maintaining the duration of the polling period of the next polling unchanged.
And 103, shortening the polling cycle duration of the next polling.
And step 104, increasing the polling cycle duration of the next polling.
According to the task progress polling method provided by the embodiment of the invention, whether the task progress values respectively obtained by two adjacent polling are different or not is judged through the management platform node, and then the management platform node judges whether the difference meets the period maintenance condition or not, when the period maintenance condition is met, the current polling period duration is appropriate, and the management platform node maintains the polling period duration of the next polling unchanged; when the period maintaining condition is not met, the current polling period is too long, and in order to avoid polling delay, the management platform node shortens the polling period of the next polling; when the difference does not exist, the current polling cycle duration is too short, so that invalid polling is caused, and the polling cycle duration of next polling is increased by the management platform node. Obviously, the polling mechanism provided by the embodiment of the invention matches the appropriate polling cycle duration based on the progress of the completion of the current task, thereby providing a more flexible polling mode, improving the polling efficiency of the teaching management system based on cloud computing, and reducing the load pressure of the nodes in the system.
Optionally, one possible implementation manner of the difference in step 100 is as follows: managing the difference between the task progress value obtained from the nth polling and the task progress value obtained from the (n-1) th polling of the secondary node. Therefore, a possible implementation manner of the difference between the task progress values based on two polling is given below, specifically, on the basis of fig. 2, fig. 3 is a schematic flow chart of another task progress polling method provided by the embodiment of the present invention, and referring to fig. 3, step 100 specifically includes:
and step 100-1, acquiring a progress difference value.
Specifically, when the progress difference value is greater than zero, step 101-1 is executed. If the progress difference value is equal to zero, go to step 104-1.
With continued reference to fig. 3, one possible implementation of step 101 is:
step 101-1, if the progress difference value is greater than zero, determining whether the progress difference value is equal to the minimum variation difference value.
Specifically, the minimum variation difference value represents the minimum variation of the task progress value.
Accordingly, one possible implementation of step 102 is:
and 102-1, if the progress difference value is equal to the minimum change difference value, keeping the duration of the polling cycle of the (n + 1) th polling unchanged.
Accordingly, one possible implementation of step 103 is:
and 103-1, if the progress difference value is larger than the minimum change difference value, shortening the polling cycle duration of the (n + 1) th polling.
Accordingly, one possible implementation of step 104 is:
and step 104-1, if the progress difference value is zero, increasing the polling cycle duration of the (n + 1) th polling.
Specifically, in an implementation manner of steps 100-1 to 104-1, a polling cycle duration expression (1) of the (n + 1) th polling is:
Figure BDA0001942046990000111
wherein, Tn+1Polling cycle duration, T, for the n +1 th pollnThe polling period duration for the nth poll, k is a constant, DnThe difference between the task progress value obtained for the nth polling and the task progress value obtained for the n-1 th polling.
Alternatively, the polling cycle duration for each poll should satisfy engineering constraints. Taking the polling cycle of the (n + 1) th polling as an example, the duration of the polling cycle of the (n + 1) th polling belongs to the engineering constraint duration range, and the minimum value of the engineering constraint duration range isThe minimum polling cycle duration, the maximum value of the engineering constraint duration range is matched with the duration required by the management secondary node to execute the task. For example, 1s ≦ Tn+1Less than or equal to 60s, i.e. the Tn+1The minimum is 1s, i.e. the minimum polling period duration is 1 second and the maximum polling period duration is 60 s. Because of Tn+1Too small, for example, 1ms, results in massive polling of the management platform node to the management secondary node, resulting in an overload and failure of the management secondary node. In addition, if the maximum polling period is too long, the management platform node queries the management secondary node too slowly, resulting in a task loss. Since the task ID will only remain on the managing secondary node for a period of time, if Tn+1Too large, e.g., 10 minutes, then the task ID may have been cleared, causing an error in the (n + 1) th poll. Therefore, an engineering constraint duration range is defined to limit the polling period of each polling, and the management platform node is guaranteed to reasonably poll and manage the secondary node.
Alternatively, due to different task requirements, the execution time of the first task may be varied while the managing secondary node executes the task, e.g., T in FIG. 1Am1When its corresponding task is "create template VM", Tm1And may be 10 s. And when the corresponding task is 'create test VM', Tm1And may be 15 s. Therefore, in order to flexibly match the polling cycle duration of the 1 st polling with the execution time of the first task, so as to further optimize the polling mechanism and reduce the number of invalid polling times, a possible implementation manner is given below, specifically, on the basis of fig. 2, fig. 4 is a flowchart of another polling method for task progress provided by the embodiment of the present invention, referring to fig. 4, before step 100, further including:
and 105, configuring the polling cycle duration of the 1 st polling according to the task type of the task and the performance state of the management secondary node executing the task.
Specifically, the duration of the corresponding polling period may be different based on different task types, so that, by acquiring the task type of the task currently prepared to be executed by the management secondary node,to match the polling cycle duration of the corresponding 1 st poll. Proceed with T in FIG. 1Am1For example, when its corresponding task is "create template VM", Tm1The polling period duration of the 1 st polling may be in the range of 5s to 10s at this time, which is 10 s. And when the corresponding task is 'create test VM', Tm1At 15s, the polling period duration of the 1 st polling may be in the range of 10s to 15 s.
Alternatively, the current management secondary node may process different tasks of multiple different scenarios in parallel. Since the resources of its CPU are limited, the polling cycle duration of the 1 st poll may be configured appropriately based on the CPU usage efficiency, i.e., performance status, of the currently managed secondary node.
The following compares, by way of an example, the polling method for task progress provided by the embodiment of the present invention with the conventional scheme of the polling mechanism corresponding to fig. 1B. Specifically, for the class attendance scenario, i.e. the flow shown in fig. 1B, three class attendance scenarios are shown here: 1. there are 1 session, 2, 5 sessions, 3, 10 sessions, each session creating 1 session template VM and 50 VMs for students. Each scene was tested 5 times and then the observation indices were averaged to obtain the following results:
TABLE 1
Figure BDA0001942046990000131
Referring to table 1, it can be seen that, in the embodiment of the present invention, by reducing invalid polling in the process of executing a long task by the management platform node and the management secondary node, the respective CPU utilization rates of the management platform node and the management secondary node are reduced. For a class flow, there are both tasks that take a long time (e.g., creating a template VM) and tasks that take a short time (creating a VM), so the polling times are not linearly decreased, and the task progress is not queried during the class task and occupies the CPU, so the optimization result of the polling method for the task progress provided by the embodiment of the present invention can be roughly measured by comparing in the same scene, and the above example can reduce the usage rate by about 15% when the CPU occupies a high amount (more than 50%).
The following provides a possible implementation manner of a task progress polling device, which is used for executing each execution step and corresponding technical effect of the task progress polling method shown in the foregoing embodiments and possible implementation manners. Specifically, fig. 5 is a schematic structural diagram of a task progress polling device according to an embodiment of the present invention, where the device may be used to implement a function of a management platform node, and referring to fig. 5, the device 20 includes: a judging module 200 and a processing module 201; the judgment module 200 is connected with the processing module 201;
the judging module 200 is configured to judge whether there is a difference between task progress values respectively obtained by two adjacent polling; if so, judging whether the difference meets a period maintenance condition;
a processing module 201, configured to increase a polling cycle duration of next polling if the polling cycle duration does not exist; if the period maintaining condition is met, maintaining the duration of the polling period of the next polling unchanged; if the period maintaining condition is not met, the polling period duration of the next polling is shortened.
According to the task progress polling device provided by the embodiment of the invention, whether the difference of the task progress values respectively obtained by two adjacent polling is different or not is judged by the judgment module, whether the difference meets the period maintenance condition or not is judged by the judgment module, when the period maintenance condition is met, the current polling period duration is appropriate, and the processing module maintains the polling period duration of the next polling unchanged; when the period maintaining condition is not met, the current polling period is too long, and in order to avoid polling delay, the processing module shortens the polling period of next polling; when the difference of the task progress values does not exist, the fact that the current polling cycle time is too short causes invalid polling is shown, and the processing module increases the polling cycle time of next polling. Obviously, the task progress polling device provided by the embodiment of the invention matches the appropriate polling cycle duration based on the progress of the current task completion, thereby providing a more flexible polling mechanism, improving the polling efficiency of the teaching management system based on cloud computing, and reducing the load pressure of nodes in the system.
Optionally, the determining module 200 is specifically configured to obtain a progress difference value; and if the progress difference value is larger than zero, determining whether the progress difference value is equal to the minimum variation difference value.
The processing module 201 is specifically configured to maintain the duration of the polling cycle of the (n + 1) th polling unchanged if the value is equal to the minimum variation difference value; if the change difference value is larger than the minimum change difference value, shortening the polling cycle duration of the (n + 1) th polling; and if the progress difference value is zero, increasing the polling cycle duration of the (n + 1) th polling.
Alternatively, the polling cycle duration of the (n + 1) th poll satisfies the above expression (1).
Optionally, the processing module 201 is further configured to configure a polling cycle duration of the 1 st polling according to the task type of the task and the performance state of the management secondary node executing the task.
Referring to fig. 1A and fig. 1B, an embodiment of the present invention further provides an implementation manner of a task progress polling system, and specifically, fig. 6 is a schematic deployment diagram of the task progress polling system provided in the embodiment of the present invention, and referring to fig. 6, the task progress polling system includes a management secondary node 30 and a management platform node 31.
The management platform node includes a task progress polling device shown in fig. 5, which can implement the function of the device to achieve the corresponding technical effect.
The management secondary node 30 for performing tasks;
in particular, the management secondary node 30 may begin executing the corresponding task based on the instructions to create the particular task. For example, referring to fig. 1A and 1B, "an instruction to create a course template", "an instruction to create a VM".
The management platform node 31 is configured to determine an execution progress of the task according to the task progress value of the task.
Specifically, since the management platform node 31 includes the polling device of the task progress shown in fig. 5, it may obtain the task progress value of the task executed by the management secondary node 30 through polling each time of polling, and further, based on any one of the method flows in fig. 2 to fig. 4, based on the task progress value, dynamically adjust the polling cycle duration, thereby providing a more flexible polling mechanism, improving the polling efficiency of the teaching management system based on cloud computing, and reducing the load pressure of the nodes in the system.
It should be noted that, the system is described by taking a management platform node and a management secondary node as an example, and the number of the management platform node and the management secondary node may be set according to a scene requirement. Each management platform node or management secondary node may correspond to an independent node device, or a plurality of management platform nodes or management secondary nodes may be integrated on one node device, which may further include a client shown in fig. 1A, where the client, the management platform nodes, and the management secondary nodes may perform data transmission through a wired network or a wireless network, and accordingly, in order to construct a wired network system, a wireless network system, or a heterogeneous network system that can provide cloud computing, storage, and other related services, the system may also include other necessary network devices, such as a router, a LAN switch, an access device, and the like, which is not limited herein.
A general implementation manner of a node device is given below, which may be used to implement a function of managing devices such as a secondary node or a management platform node, specifically, fig. 7 is a schematic structural diagram of a node device provided in an embodiment of the present invention, and referring to fig. 7, the node device 40 includes: an interface 400, a processor 401, a memory 402;
the number of the processors 401 may be one or more, and the interface 400 and the memory 402 may be connected by a bus. If multiple buses are used, each bus may be coupled to multiple interfaces 402, multiple memories 402. While memory 402 may be an integration of multiple memory cells or contain only one memory cell. To meet the communication requirements of different communication protocols, the interface 400 may include one or more interfaces and may correspond to different communication protocols.
The processor 401 may implement the functions of the determining module 200 and the processing module 201 in the above embodiments.
The memory 402 is used to store data related to the present solution, such as the polling cycle duration, the task type of the task, the performance status of the management secondary node, and the task progress value in the above embodiments. So that the processor 401 can call, read and write the relevant information when executing the steps of the above embodiments.
The interface 400 is used for interacting with the management secondary node to obtain data or signaling related to the above embodiments, such as task ID, task progress value of multiple polling, task type of the management secondary node, and performance status of the management secondary node.
Optionally, the general node device may have an I/O device, such as a display screen, a mouse, a keyboard, and the like, and the memory 402 further has an operating system capable of performing user interaction, so as to implement a corresponding human-computer interaction function, so as to implement the function of the teaching scene.
It should be noted that the general node device may be a server of an entity, and the general node device may also construct multiple VMs at the same time. And is not limited herein.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor (for example, the processor 401 shown in fig. 7), implements the flow of the method in any one of fig. 2 to fig. 4 to achieve the corresponding technical effect.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

Claims (9)

1. A task progress polling method is characterized by comprising the following steps:
judging whether the task progress values respectively obtained by two adjacent polling are different or not;
if so, judging whether the difference meets a period maintenance condition; if not, increasing the polling cycle duration of the next polling; the period maintaining condition is to detect whether the difference meets a minimum variation difference value of the task progress values, wherein the minimum variation difference value is a basic demand meeting task execution;
if the period maintaining condition is met, maintaining the duration of the polling period of the next polling unchanged; and if the period maintaining condition is not met, shortening the polling period duration of the next polling.
2. The task progress polling method of claim 1, wherein the determining whether the task progress values respectively obtained by two adjacent polling have a difference comprises:
acquiring a progress difference value, wherein the progress difference value is the difference between the task progress value obtained by the nth polling and the task progress value obtained by the (n-1) th polling;
the determining whether the difference satisfies a period maintaining condition includes:
if the progress difference value is larger than zero, determining whether the progress difference value is equal to the minimum variation difference value; the minimum change difference value represents a minimum change amount of the task progress value;
if the progress difference value is equal to the minimum change difference value, maintaining the duration of the polling cycle of the (n + 1) th polling unchanged; if the progress difference value is larger than the minimum change difference value, shortening the polling cycle duration of the (n + 1) th polling;
if the difference does not exist, increasing the polling cycle duration of the next polling, including:
and if the progress difference value is zero, increasing the polling cycle duration of the (n + 1) th polling.
3. The task progress polling method of claim 2, wherein the polling period duration expression of the (n + 1) th polling is as follows:
Figure FDA0002944391830000021
wherein, T isn+1A polling period duration for the n +1 th poll, TnThe polling cycle duration of the nth polling, k is a constant, DnThe difference between the task progress value obtained for the nth polling and the task progress value obtained for the (n-1) th polling.
4. The method according to claim 1, before said determining whether there is a difference between task progress values obtained by two adjacent polling, further comprising:
and configuring the polling cycle duration of the 1 st polling according to the task type of the task and the performance state of a management secondary node executing the task.
5. A task progress polling device, comprising: the device comprises a judging module and a processing module; the judgment module is connected with the processing module;
the judging module is used for judging whether the task progress values respectively obtained by two adjacent polling are different or not; if so, judging whether the difference meets a period maintenance condition; the period maintaining condition is to detect whether the difference meets a minimum variation difference value of the task progress values, wherein the minimum variation difference value is a basic demand meeting task execution;
the processing module is used for increasing the polling cycle duration of the next polling if the polling cycle duration does not exist; if the period maintaining condition is met, maintaining the duration of the polling period of the next polling unchanged; and if the period maintaining condition is not met, shortening the polling period duration of the next polling.
6. The task progress polling device according to claim 5, wherein the determining module is specifically configured to obtain a progress difference value, where the progress difference value is a difference between a task progress value obtained by the nth polling and a task progress value obtained by the n-1 st polling; if the progress difference value is larger than zero, determining whether the progress difference value is equal to a minimum variation difference value; the minimum change difference value represents a minimum change amount of the task progress value;
the processing module is specifically configured to maintain the duration of the polling cycle of the (n + 1) th polling unchanged if the progress difference value is equal to the minimum change difference value; if the progress difference value is larger than the minimum change difference value, shortening the polling cycle duration of the (n + 1) th polling; and if the progress difference value is zero, increasing the polling cycle duration of the (n + 1) th polling.
7. The task progress polling device of claim 6, wherein the polling period duration expression of the (n + 1) th polling is as follows:
Figure FDA0002944391830000031
wherein, T isn+1A polling period duration for the n +1 th poll, TnThe polling cycle duration of the nth polling, k is a constant, DnTask progress values obtained for the nth pollAnd the difference between the task progress values obtained from the (n-1) th polling.
8. The task progress polling device of claim 5, wherein the processing module is further configured to configure a polling cycle duration of the 1 st polling according to a task type of the task and a performance status of a management secondary node executing the task.
9. A task progress polling system, comprising: a management platform node and a management secondary node, the management platform node comprising the apparatus of any of claims 5-8;
the management secondary node is used for executing tasks;
and the management platform node is used for determining the execution progress of the task according to the task progress value of the task.
CN201910024693.0A 2019-01-10 2019-01-10 Task progress polling method, device and system Active CN109828826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910024693.0A CN109828826B (en) 2019-01-10 2019-01-10 Task progress polling method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910024693.0A CN109828826B (en) 2019-01-10 2019-01-10 Task progress polling method, device and system

Publications (2)

Publication Number Publication Date
CN109828826A CN109828826A (en) 2019-05-31
CN109828826B true CN109828826B (en) 2021-11-09

Family

ID=66860204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910024693.0A Active CN109828826B (en) 2019-01-10 2019-01-10 Task progress polling method, device and system

Country Status (1)

Country Link
CN (1) CN109828826B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813719B (en) * 2020-06-15 2023-01-10 厦门科灿信息技术有限公司 Data polling method and device and terminal equipment
CN112162820A (en) * 2020-09-23 2021-01-01 广州六环信息科技有限公司 Timing method and device of timer
CN117272407A (en) * 2023-11-08 2023-12-22 飞腾信息技术有限公司 Polling method, polling device, computing device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104423790A (en) * 2013-09-10 2015-03-18 联想(北京)有限公司 Information processing method and electronic device
US9396088B2 (en) * 2013-03-08 2016-07-19 Sap Se Computer execution progress indicator
CN107239386A (en) * 2017-06-06 2017-10-10 网易(杭州)网络有限公司 A kind of progress display methods and device
CN108199912A (en) * 2017-12-15 2018-06-22 北京奇艺世纪科技有限公司 Management, consuming method and the device of a kind of strange land distributed message mostly living
CN108733467A (en) * 2017-04-20 2018-11-02 海马云(天津)信息技术有限公司 The method and device of electronic equipment operation application, electronic equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100434054B1 (en) * 2002-04-26 2004-06-04 엘지전자 주식회사 Polling method of radio link control
US7567974B2 (en) * 2004-09-09 2009-07-28 Microsoft Corporation Method, system, and apparatus for configuring a data protection system
CN105988913B (en) * 2015-02-27 2019-06-28 阿里巴巴集团控股有限公司 A kind of tempo instructions method and process indicating device
CN106888135B (en) * 2015-12-15 2020-03-24 阿里巴巴集团控股有限公司 Task state query method and device
CN107193541A (en) * 2016-03-15 2017-09-22 广州市动景计算机科技有限公司 The display methods and device of tasks carrying progress
CN108170500A (en) * 2017-11-28 2018-06-15 深圳市金立通信设备有限公司 Download progress method for refreshing, terminal device and computer readable storage medium
CN108037968B (en) * 2017-12-01 2021-11-05 东软集团股份有限公司 Execution progress display method and device, storage medium and electronic equipment
CN108564424B (en) * 2018-01-04 2021-11-30 上海瀚之友信息技术服务有限公司 Method for reducing errors in transaction information query and payment transaction system
CN108509264B (en) * 2018-03-30 2021-04-20 浙江口碑网络技术有限公司 Overtime task scheduling system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9396088B2 (en) * 2013-03-08 2016-07-19 Sap Se Computer execution progress indicator
CN104423790A (en) * 2013-09-10 2015-03-18 联想(北京)有限公司 Information processing method and electronic device
CN108733467A (en) * 2017-04-20 2018-11-02 海马云(天津)信息技术有限公司 The method and device of electronic equipment operation application, electronic equipment
CN107239386A (en) * 2017-06-06 2017-10-10 网易(杭州)网络有限公司 A kind of progress display methods and device
CN108199912A (en) * 2017-12-15 2018-06-22 北京奇艺世纪科技有限公司 Management, consuming method and the device of a kind of strange land distributed message mostly living

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Progress Bar for all your excel Applications";Ejaz;《https://strugglingtoexcel.com/2014/03/27/progress-bar-excel-vba/》;20140327;第1-40页 *
"基于YARN框架下并行化计算的研究";朱敏明;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160715(第07期);第I137-73页 *

Also Published As

Publication number Publication date
CN109828826A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
US11372688B2 (en) Resource scheduling method, scheduling server, cloud computing system, and storage medium
CN109951545B (en) Self-adaptive container and cloud desktop fusion system and method for acquiring cloud resources by using same
Liu et al. FogWorkflowSim: An automated simulation toolkit for workflow performance evaluation in fog computing
US9851996B2 (en) Applying firmware updates in a system with zero downtime by selectively offlining and onlining hardware using a scale-up hypervisor layer
CN109828826B (en) Task progress polling method, device and system
US20180300116A1 (en) Method for Automatic Application Deployment and Cloud Management Node
CN103414761B (en) Mobile terminal cloud resource scheduling method based on Hadoop framework
Sotiriadis et al. SimIC: Designing a new inter-cloud simulation platform for integrating large-scale resource management
CN108737168B (en) Container-based micro-service architecture application automatic construction method
US7895596B2 (en) Processor assignment in multi-processor systems
CN111045786B (en) Container creation system and method based on mirror image layering technology in cloud environment
CN107666493B (en) Database configuration method and equipment thereof
JP2022017588A (en) Training method of deep-running framework, device, and storage medium
CN110162481A (en) A kind of method for testing software, device, equipment and storage medium
CN112363913B (en) Parallel test task scheduling optimizing method, device and computing equipment
CN112395736B (en) Parallel simulation job scheduling method of distributed interactive simulation system
TWI707561B (en) Management system and management method of vnf
CN113301590B (en) Virtual resource management and control system facing 5G access network
CN111078516A (en) Distributed performance test method and device and electronic equipment
CN113377493A (en) Container cloud simulation system and design method thereof
CN106230623B (en) A kind of VIM site selection method and device
CN110868330B (en) Evaluation method, device and evaluation system for CPU resources which can be divided by cloud platform
US11681353B1 (en) Power capping in a composable computing system
CN112448833A (en) Multi-management-domain communication method and device
Liu et al. Network optimisation solutions of university computer laboratory based on virtualisation technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant