CN112311599B - Cloud resource allowance alarm method and device and server - Google Patents

Cloud resource allowance alarm method and device and server Download PDF

Info

Publication number
CN112311599B
CN112311599B CN202011184702.1A CN202011184702A CN112311599B CN 112311599 B CN112311599 B CN 112311599B CN 202011184702 A CN202011184702 A CN 202011184702A CN 112311599 B CN112311599 B CN 112311599B
Authority
CN
China
Prior art keywords
consumption
cloud
time period
cloud resource
historical time
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
CN202011184702.1A
Other languages
Chinese (zh)
Other versions
CN112311599A (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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202011184702.1A priority Critical patent/CN112311599B/en
Publication of CN112311599A publication Critical patent/CN112311599A/en
Application granted granted Critical
Publication of CN112311599B publication Critical patent/CN112311599B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • H04L41/064Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis involving time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a cloud resource allowance alarm method, a cloud resource allowance alarm device and a server, and relates to the technical field of cloud computing, wherein the method comprises the following steps: acquiring a cloud resource consumption record of a user in a preset historical time period; determining the consumption trend of the cloud resources in a preset historical time period according to the cloud resource consumption record; calculating the consumption of the cloud resources in a specified period in the future based on the consumption trend; judging whether the consumption of the cloud resources is larger than the current available cloud resource allowance of the user; and if so, sending a cloud resource allowance alarm prompt to the user. According to the cloud resource surplus alarm method, the cloud resource surplus alarm device and the server, the resource threshold value does not need to be set in the cloud platform independently, and the resource surplus alarm prompt can be performed on the user in a targeted manner, so that the purpose of prompting the user can be achieved, the use condition of each user can be taken into consideration effectively, and the use requirements of the user are met.

Description

Cloud resource allowance alarm method and device and server
Technical Field
The invention relates to the technical field of cloud computing, in particular to a cloud resource allowance alarming method, a cloud resource allowance alarming device and a server.
Background
In a cloud computing platform, all storage, networks, memories, computing, I/O, and the like are resources of the cloud computing platform, that is, cloud resources, which can be allocated and used by a user, but are usually limited, so that in order to ensure that the user can normally use the cloud computing platform, usually when the cloud resource surplus is insufficient, a surplus alarm is performed in advance to prompt the user to purchase in time, and the like.
The conventional allowance alarm mode is that a certain alarm threshold value is preset on the cloud platform, and although the purpose of allowance alarm is achieved to a certain extent, because a large number of users are provided on the cloud platform, if all the users are provided with the same allowance alarm logic, the actual use condition of each user is difficult to be considered, so that the alarm mode is difficult to meet the requirements of the users.
Disclosure of Invention
In view of the above, the present invention provides a cloud resource allowance alarming method, a cloud resource allowance alarming device, and a server, which are used to alleviate the technical problem that it is difficult to consider the technical problem of each user in the allowance alarming manner.
In a first aspect, an embodiment of the present invention provides a cloud resource allowance alarm method, including: acquiring a cloud resource consumption record of a user in a preset historical time period; determining the consumption trend of the cloud resources in the preset historical time period according to the cloud resource consumption record; calculating consumption of the cloud resources in a specified period in the future based on the consumption trend; judging whether the consumption of the cloud resources is larger than the cloud resource allowance currently available to the user; and if so, sending a cloud resource allowance alarm prompt to the user.
Preferably, in a preferred embodiment, the step of determining the consumption trend of the cloud resources within the preset historical time period according to the cloud resource consumption record includes: acquiring a change rule of the consumption of the cloud resources in each record period in the cloud resource consumption record in the preset historical time period; and determining the consumption trend of the cloud resources in the preset historical time period based on the change rule.
Preferably, in a preferred embodiment, the step of determining the consumption trend of the cloud resource in the preset historical time period based on the change rule includes: if the average variation of the cloud resource consumption in each recording period is smaller than a preset variation threshold, or within the preset historical time period, the variation of the cloud resource consumption in each recording period is a wave-like variation rule; determining that the consumption trend of the cloud resources in the preset historical time period is a stable consumption trend.
Preferably, in a preferred embodiment, the step of calculating the consumption amount of the cloud resource in a specified period in the future based on the consumption trend includes: calculating the average consumption value of the cloud resources consumed in each recording period in the preset historical time period; and calculating the consumption amount of the cloud resources in the future specified time period according to the consumption average value and the number of the recording periods contained in the future specified time period.
Preferably, in a preferred embodiment, the step of determining the consumption trend of the cloud resource in the preset historical time period based on the change rule includes: if the consumption of the cloud resources in each recording period is in an increasing change rule in the preset historical time period; determining that the consumption trend of the cloud resources is an increasing trend within the preset historical time period, and calculating the increasing speed of the increasing trend.
Preferably, in a preferred embodiment, the step of calculating the consumption amount of the cloud resource in a specified period in the future based on the consumption trend includes: calculating the consumption of the cloud resource in the future specified time period based on the increment speed, the consumption of the cloud resource in the previous recording period, and the number of recording periods included in the future specified time period.
Preferably, in a preferred embodiment, the step of determining the consumption trend of the cloud resource in the preset historical time period based on the change rule further includes: if the consumption of the cloud resources in each recording period is in a decreasing change rule in the preset historical time period; determining that the consumption trend of the cloud resources is a decreasing trend within the preset historical time period, and calculating the decreasing speed of the decreasing trend.
Preferably, in a preferred embodiment, the step of calculating the consumption amount of the cloud resource in a specified period in the future based on the consumption trend includes: calculating the consumption amount of the cloud resource in the future specified time period based on the decrement speed, the consumption amount of the cloud resource in the previous recording period, and the number of the recording periods included in the future specified time period.
Preferably, in a preferred embodiment, the step of obtaining the cloud resource consumption record of the user within the preset historical time period includes: and according to a preset time interval, regularly acquiring a cloud resource consumption record of the user in the preset historical time period.
Preferably, in a preferred embodiment, the step of determining the consumption trend of the cloud resource within the preset historical time period according to the cloud resource consumption record further includes: if the preset historical time period contains the target recording period marked by the user, deleting the consumption of the cloud resources corresponding to the target recording period; and determining the consumption trend of the cloud resources in the preset historical time period according to the residual cloud resource consumption records after the consumption of the cloud resources corresponding to the target record period is deleted.
In a second aspect, an embodiment of the present invention further provides a cloud resource allowance alarm device, including: the acquisition module is used for acquiring a cloud resource consumption record of a user in a preset historical time period; the determining module is used for determining the consumption trend of the cloud resources in the preset historical time period according to the cloud resource consumption record; a calculation module for calculating the consumption of the cloud resources in a specified period in the future based on the consumption trend; the judging module is used for judging whether the consumption of the cloud resources is larger than the cloud resource allowance currently available to the user; and the alarm module is used for sending a cloud resource allowance alarm prompt to the user when the judgment result of the judgment module is yes.
In a third aspect, an embodiment of the present invention further provides a server, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method according to the first aspect when executing the computer program.
In a fourth aspect, the embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the method described in the first aspect.
The embodiment of the invention has the following beneficial effects:
according to the cloud resource allowance alarm method, the cloud resource allowance alarm device and the server, the cloud resource consumption record of the user in the preset historical time period can be obtained, and the consumption trend of the cloud resources in the preset historical time period is determined according to the cloud resource consumption record; then calculating the consumption of the cloud resources in a future specified time period based on the consumption trend; and when the consumption of the cloud resources is judged to be larger than the current available cloud resource allowance of the user, sending a cloud resource allowance alarm prompt to the user, wherein the process of determining the consumption trend of the cloud resources is carried out based on the cloud resource consumption record of the current user in a historical time period, so that the consumption condition of the cloud resources of the current user can be obtained and compared with the cloud resource allowance to determine whether the alarm needs to be sent to the user, a resource threshold value does not need to be set in a cloud platform independently, and the resource allowance alarm prompt can be carried out on the user in a targeted manner, so that the aim of prompting the user can be fulfilled, the use condition of each user can be effectively considered, and the use requirement of the user is met.
Additional features and advantages 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 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.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a cloud resource allowance alarm method according to an embodiment of the present invention;
fig. 2 is a flowchart of another cloud resource margin alarm method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a cloud resource allowance alarm device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
At present, in the existing cloud technology, the following method is generally adopted to set a cloud resource allowance alarm:
(1) Setting a fixed resource threshold value on the cloud platform, and when the available resources are smaller than the resource threshold value, sending an alarm notification to a user by the cloud platform to remind the user to purchase the resources;
(2) And setting different resource thresholds for different users, and when the available cloud resource allowance of the user is smaller than the set resource threshold, sending an alarm notification to the user by the cloud platform.
However, with the first solution, all users generally use the same set of cloud resource allowance alarm logic, which often causes the problem that the alarm notification is not sent in time or is sent in advance.
For example, taking cloud resources as an example of traffic, assuming that daily traffic consumption of most users is 1g, daily traffic consumption of a user is 10G, daily traffic consumption of B user is 100M, and assuming that the cloud platform expects the available cloud resource allowance resources of the user to be only enough for 7 days, an alarm notification is sent to the user, at this time, the consumption of the a user for 7 days is about 70G, and the consumption of the B user for 7 days is about 700M. If the traffic threshold set by the cloud platform is set according to the usage of most users, and is almost 7G, for the user a, the user a will be warned when the margin is less than 7G, but the user a is not used for a day by 7G, so that the user a is not warned in time, and a risk is brought. While for B, 7G can still take 70 days, user B does not want to receive a margin alarm notification at this time, i.e., such an early alarm notification is not meaningful to B user.
Although the second scheme solves the problems caused by the first scheme, in the manner of setting different resource thresholds for different users, the operation and maintenance personnel of the cloud platform mostly need to manually set the surplus alarm threshold in the background, which brings unnecessary labor cost, and when the usage fluctuates, the threshold needs to be updated at any time, which brings great inconvenience to the operation and maintenance.
Based on this, the embodiment of the invention provides a cloud resource allowance alarm method, a cloud resource allowance alarm device and a server, which can dynamically analyze the cloud resource consumption situation of a user for a period of time, and further perform alarm prompt to alleviate the technical problems.
In order to facilitate understanding of the embodiment, a detailed description is first given to a cloud resource margin alarm method disclosed in the embodiment of the present invention.
In a possible implementation manner, an embodiment of the present invention provides a cloud resource surplus alarm method, and specifically, the method may be applied to a server of a cloud platform, as shown in a flowchart of the cloud resource surplus alarm method in fig. 1, where the method includes the following steps:
step S102, acquiring a cloud resource consumption record of a user in a preset historical time period;
generally, the cloud platform records the use condition of the cloud resources of the user, such as the cloud resource consumption condition every minute and the like, and can record the use condition of the cloud resources in the database, and when the cloud platform executes the cloud resource allowance alarm method provided by the embodiment of the invention, the cloud platform can directly acquire the cloud resource consumption record stored in the database within the preset historical time period, so as to acquire the consumption condition of the cloud resources within the historical time period. The preset historical time period refers to a past time period, such as a past time period of 5 days, 7 days, 10 days, and the like, and a specific historical time period may be set according to an actual use situation, which is not limited in this embodiment of the present invention.
Step S104, determining the consumption trend of cloud resources in a preset historical time period according to the cloud resource consumption record;
step S106, calculating the consumption of cloud resources in a future specified time period based on the consumption trend;
specifically, the consumption trend refers to the consumption of the cloud resource by the user in the past period, for example, the consumption of the cloud resource by the user is gradually increased or gradually decreased, or the consumption is kept relatively stable all the time, and based on the consumption trend determined in the step S104, the consumption of the cloud resource in the future designated period can be dynamically calculated, and then the following steps are further performed to further determine whether to give an alarm to the user, and the like.
The future specified time period refers to a future time period, such as 5 days, 7 days, or 10 days, and the like, and may be specifically set according to an actual use situation, which is not limited in this embodiment of the present invention.
Step S108, judging whether the consumption of the cloud resources is larger than the current available cloud resource allowance of the user;
and step S110, if yes, sending a cloud resource allowance alarm prompt to the user.
Specifically, the consumption of the cloud resources refers to a predicted total consumption of the cloud resources in a specified time period in the future, the predicted total consumption of the cloud resources is compared with a currently available cloud resource allowance, whether the cloud resource allowance of a current user meets a use requirement in a time period in the future can be predicted, if the predicted total consumption of the cloud resources is larger than the currently available cloud resource allowance of the user, step S110 needs to be executed to prompt the user, and if the predicted total consumption of the cloud resources is smaller than or equal to the currently available cloud resource allowance of the user, it is indicated that the currently available cloud resource allowance of the user is relatively sufficient, and an alarm prompt is not needed.
Therefore, the cloud resource allowance alarm method provided by the embodiment of the invention can acquire the cloud resource consumption record of the user in the preset historical time period, and determine the consumption trend of the cloud resource in the preset historical time period according to the cloud resource consumption record; then calculating the consumption of the cloud resources in a future specified time period based on the consumption trend; and when the consumption of the cloud resources is judged to be larger than the current available cloud resource allowance of the user, sending a cloud resource allowance alarm prompt to the user, wherein the process of determining the consumption trend of the cloud resources is carried out based on the cloud resource consumption record of the current user in a historical time period, so that the consumption condition of the cloud resources of the current user can be obtained and compared with the cloud resource allowance to determine whether the alarm needs to be sent to the user, a resource threshold value does not need to be set in a cloud platform independently, and the resource allowance alarm prompt can be carried out on the user in a targeted manner, so that the aim of prompting the user can be fulfilled, the use condition of each user can be effectively considered, and the use requirement of the user is met.
In practical use, in order to implement dynamic analysis of cloud resources, in step S102, when the cloud resource consumption record is obtained, the cloud resource consumption record may be obtained dynamically, specifically, the cloud resource consumption record may be obtained according to a preset time interval, so as to dynamically calculate the consumption of cloud resources in a future specified time period, and further determine whether to send a margin alarm prompt to a user.
Therefore, on the basis of fig. 1, fig. 2 further shows a flowchart of another cloud resource margin alarm method, which describes a dynamic analysis process of cloud resource margin, and specifically, as shown in fig. 2, includes the following steps:
step S202, according to a preset time interval, regularly acquiring a cloud resource consumption record of a user in a preset historical time period.
In this step, the process of regularly obtaining according to the preset time interval may be implemented by a timing task, for example, the timing task is set in the cloud platform, and the time interval is further set, that is, the cloud resource consumption record of the user in a past certain historical time period may be regularly obtained from the database.
Specifically, the time interval may be one hour, two hours, or the like, and dynamic calculation is performed, and a case where the cloud resource margin is insufficient is found.
Step S204, acquiring a change rule of the consumption of the cloud resources in each recording period in the cloud resource consumption record in a preset historical time period;
step S206, determining the consumption trend of cloud resources in a preset historical time period based on the change rule;
specifically, for a service with faster cloud resource consumption, the recording period may be every several hours or every day, but for a service with particularly low cloud resource consumption, it may also be every week, and the like, and the setting mode of the specific recording period may be set according to an actual use situation, which is not limited in the embodiment of the present invention.
For example, taking the preset historical time period as the past 10 days and the recording period as one day as an example, in step S204, the consumption amount of the cloud resources per day in the past 10 days is obtained, and based on the consumption amount of the cloud resources per day, the change rule of the consumption amount of the cloud resources in the past 10 days can be known, and then the consumption trend of the cloud resources in the past 10 days is further determined based on the change rule.
Step S208, calculating the consumption of the cloud resources in a specified future time period based on the consumption trend;
specifically, the consumption obtained in this step is an estimated total consumption amount of the cloud resources in a specified period in the future.
Step S210, judging whether the consumption of the cloud resources is larger than the current available cloud resource allowance of the user; if yes, continuing to execute step S212 to send a cloud resource allowance alarm prompt to the user; if not, returning to the step S202, obtaining the cloud resource consumption records again according to the time interval, and performing dynamic monitoring analysis on the consumption condition of the cloud resources.
And step S212, sending a cloud resource allowance alarm prompt to the user.
Specifically, when the cloud resource allowance alarm prompt is sent to the user, multiple contact modes reserved by the user in the cloud platform can be acquired to send the alarm prompt, such as a telephone number, a mailbox, or other instant communication modes, so that the cloud resource allowance alarm prompt can be sent to the user in time.
Further, the cloud platform may continue to monitor a reaction behavior of the user to the cloud resource surplus alarm prompt, such as whether to purchase resources in time, and the like, and if the user does not take a corresponding measure within a period of time, the cloud platform may continue to send the cloud resource surplus alarm prompt to the user, such as a prompt for a short message and a telephone call, and the like.
In actual use, in step S204, the obtained change rule of the consumption amount of the cloud resource in the preset historical time period may be obtained based on the consumption amount of the cloud resource recorded in each recording period, specifically, the consumption amount of the cloud resource recorded in each recording period in the preset historical time period may be analyzed in a big data statistics manner, so as to obtain the change rule in the preset historical time period.
Specifically, if the average variation of the cloud resource consumption in each recording period is smaller than a preset variation threshold, or within a preset historical time period, the variation of the cloud resource consumption in each recording period is a wave-like variation rule; determining the consumption trend of the cloud resources in the preset historical time period as a stable consumption trend.
For convenience of understanding, the preset historical time period is also taken as the last 10 days, and the recording period is taken as one day for example, and if the average variation of the consumption amount of the cloud resources in each recording period is smaller than the preset variation threshold, it indicates that the consumption amount of the cloud resources in each day is basically even in the last 10 days, and has no too large fluctuation, and it indicates that the consumption trend of the cloud resources in the last 10 days is a steady consumption trend.
Further, if the consumption of the cloud resources per day fluctuates in the last 10 days and the fluctuation range regularly changes in a wave manner, the consumption trend can also be considered as a steady consumption trend, and at this time, when the consumption of the cloud resources in a future specified time period is calculated based on the consumption trend, the average consumption value of the cloud resources consumed in each recording period in a preset historical time period can be calculated first; and then calculating the consumption of the cloud resources in the specified time period in the future according to the consumption average value and the number of the recording cycles contained in the specified time period in the future.
For example, taking the future specified time period as 7 days as an example, for the above steady consumption trend, an average value of the consumption amount of the cloud resources in each day in the past 10 days needs to be calculated, then the total consumption amount in the future 7 days is calculated according to the average value, and then the total consumption amount is compared with the available cloud resource allowance actually owned by the user at present to determine whether to send the cloud resource allowance alarm prompt to the user.
Further, if the consumption of the cloud resources per day fluctuates in a wavy manner in the past 10 days, the average value of the consumption of the cloud resources per day in the 10 days can be calculated, and the total consumption in the future 7 days can be calculated according to the average value, so that whether the cloud resource allowance alarm prompt is sent to the user or not can be further determined.
In addition, in addition to the above steady consumption trend, the consumption trend of the cloud resources further includes an increasing trend, or a decreasing trend, and the like, specifically, if the consumption of the cloud resources in each recording period is in an increasing change rule in a preset historical time period; determining that the consumption trend of the cloud resources is an increasing trend within a preset historical time period, and calculating the increasing speed of the increasing trend.
With respect to the above increasing trend, when calculating the consumption amount of the cloud resource in the future specified time period, the consumption amount of the cloud resource in the future specified time period may be calculated based on the increasing speed of the above increasing trend, the consumption amount of the cloud resource in the previous recording cycle, and the number of recording cycles included in the future specified time period.
Further, if the consumption of the cloud resources in each recording period is in a descending change rule in a preset historical time period; determining that the consumption trend of the cloud resources in the preset historical time period is a decreasing trend, calculating a decreasing speed of the decreasing trend, and calculating the consumption of the cloud resources in the future specified time period based on the decreasing speed, the consumption of the cloud resources in the previous recording period and the number of recording periods included in the future specified time period when calculating the consumption of the cloud resources in the future specified time period.
Specifically, for example, if the consumption of cloud resources in the past 10 days is in an increasing trend, the increasing speed of the consumption of cloud resources in the past period, that is, the increasing speed of the consumption of cloud resources per day, needs to be calculated, the total amount of cloud resources to be consumed by the user in the future 7 days is calculated according to the increasing speed and the consumption of cloud resources recorded in the previous day, and then the calculated total amount of cloud resources to be consumed by the user is compared with the available cloud resource allowance actually owned by the user, so as to determine whether to send a cloud resource allowance alarm prompt to the user.
Further, if the consumption of the cloud resources becomes a decreasing trend in the past 10 days, the decreasing speed of the consumption of the cloud resources in the past 10 days needs to be calculated, then the total amount of the cloud resources to be consumed by the user in the future 7 days is calculated according to the consumption of the cloud resources recorded in the previous day, and the same judgment logic is adopted to judge whether to send the cloud resource allowance alarm prompt to the user.
Specifically, the total amount of cloud resources to be consumed by the user in the future 7 days is represented as Q, the available cloud resource surplus actually owned by the user at present is represented as P, and the above-mentioned judgment logic is represented as:
if Q < = P, the cloud resource allowance is sufficient in a future period of time (7 days), and a cloud resource allowance alarm prompt does not need to be sent to a user;
if Q > P, the cloud resource surplus is insufficient in a future period of time (7 days), and a cloud resource surplus alarm prompt needs to be sent to the user.
In addition, during actual use, a situation that cloud resource consumption is increased suddenly often occurs within a preset historical time period, for example, for an e-commerce platform, a promotion activity is released regularly, at this time, in a promotion period, consumed cloud resources greatly exceed consumed cloud resources in a non-promotion period, and for such a situation, when a consumption trend of cloud resources is determined, a cloud resource consumption record in the promotion period is removed, so that the determined consumption trend more conforms to an actual use situation.
Specifically, if a target recording period marked by a user is included in a preset historical time period, deleting the consumption of the cloud resources corresponding to the target recording period; and determining the consumption trend of the cloud resources in the preset historical time period according to the residual cloud resource consumption records after the consumption of the cloud resources corresponding to the target record period is deleted.
Generally, for the situation of the rapid increase of the cloud resource consumption during the promotion period, the user usually reports to the operation and maintenance center of the cloud platform in advance, so that the operation and maintenance personnel can maintain the cloud platform and the cloud resources during the promotion period, and the user can be guaranteed to use the cloud resources stably and smoothly.
Further, for a cloud resource consumption surge situation under a non-reporting condition, the cloud platform may prompt, for example, when the cloud resource consumption surge is monitored, and under a non-reporting condition, prompt information may be sent to the operation and maintenance personnel, at this time, the operation and maintenance personnel may check the current operation condition of the cloud platform to determine whether the current operation condition is caused by normal use of the user, and also whether the current operation condition is caused by attack on the cloud platform.
To sum up, the cloud resource surplus alarm method provided by the embodiment of the invention can dynamically analyze the change of the consumption of the cloud resources of the user every day in the recent period of time, dynamically calculate the total amount of the cloud resources required to be consumed by the user in the future period of time, and determine whether to send the alarm prompt to the user by comparing the calculated total amount of the cloud resources required to be consumed with the cloud resource surplus currently available to the user.
Further, on the basis of the above embodiments, an embodiment of the present invention further provides a cloud resource allowance alarm device, which may be disposed in a server of a cloud platform, and as shown in fig. 3, the cloud resource allowance alarm device has the following structure:
the acquisition module 30 is configured to acquire a cloud resource consumption record of a user within a preset historical time period;
a determining module 32, configured to determine, according to the cloud resource consumption record, a consumption trend of cloud resources within the preset historical time period;
a calculation module 34, configured to calculate, based on the consumption trend, a consumption amount of the cloud resource in a specified period in the future;
a determining module 36, configured to determine whether the consumption of the cloud resource is greater than the cloud resource allowance currently available to the user;
and an alarm module 38, configured to send a cloud resource allowance alarm prompt to the user when the determination result of the determination module is yes.
The cloud resource allowance alarm device provided by the embodiment of the invention has the same technical characteristics as the cloud resource allowance alarm method provided by the embodiment of the invention, so that the same technical problems can be solved, and the same technical effects can be achieved.
Further, an embodiment of the present invention further provides a server, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method shown in fig. 1 or fig. 2.
Further, an embodiment of the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the method shown in fig. 1 or fig. 2.
Further, an embodiment of the present invention further provides a schematic structural diagram of a server, as shown in fig. 4, which is the schematic structural diagram of the server, where the server includes a processor 101 and a memory 100, the memory 100 stores a computer executable instruction that can be executed by the processor 101, and the processor 101 executes the computer executable instruction to implement the cloud resource remaining amount alarm method.
In the embodiment shown in fig. 4, the server further comprises a bus 102 and a communication interface 103, wherein the processor 101, the communication interface 103 and the memory 100 are connected by the bus 102.
The Memory 100 may include a Random Access Memory (RAM) and a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like may be used. The bus 102 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 102 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The processor 101 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 101. The Processor 101 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory, and the processor 101 reads information in the memory and completes the cloud resource margin alarm method of the foregoing embodiment in combination with hardware thereof.
The cloud resource allowance alarm method, the cloud resource allowance alarm device and the computer program product of the server provided by the embodiment of the invention comprise a computer readable storage medium storing program codes, instructions included in the program codes can be used for executing the method described in the previous method embodiment, and specific implementation can refer to the method embodiment and is not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood in specific cases for those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: those skilled in the art can still make modifications or changes to the embodiments described in the foregoing embodiments, or make equivalent substitutions for some features, within the scope of the disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. A cloud resource allowance alarm method is characterized by comprising the following steps:
acquiring a cloud resource consumption record of a user in a preset historical time period;
determining the consumption trend of the cloud resources in the preset historical time period according to the cloud resource consumption record;
calculating consumption of the cloud resources in a specified period in the future based on the consumption trend;
judging whether the consumption of the cloud resources is larger than the current available cloud resource allowance of the user;
if yes, sending a cloud resource allowance alarm prompt to the user;
the step of determining the consumption trend of the cloud resources in the preset historical time period according to the cloud resource consumption record comprises the following steps:
acquiring a change rule of the consumption of the cloud resources in each record period in the cloud resource consumption record in the preset historical time period;
determining the consumption trend of the cloud resources in the preset historical time period based on the change rule;
wherein the step of determining the consumption trend of the cloud resources in the preset historical time period based on the change rule comprises the following steps:
if the average variation of the cloud resource consumption in each recording period is smaller than a preset variation threshold, or within the preset historical time period, the variation of the cloud resource consumption in each recording period is a wave-type variation rule;
determining that the consumption trend of the cloud resources in the preset historical time period is a stable consumption trend.
2. The method of claim 1, wherein calculating the consumption of the cloud resources over a specified period of time in the future based on the consumption trend comprises:
calculating the average consumption value of the cloud resources consumed in each recording period in the preset historical time period;
and calculating the consumption of the cloud resources in the future specified time period according to the consumption average value and the number of the recording cycles contained in the future specified time period.
3. The method according to claim 1, wherein the step of determining the consumption trend of the cloud resources in the preset historical time period based on the change rule comprises:
if the consumption of the cloud resources in each recording period is in an increasing change rule in the preset historical time period;
determining that the consumption trend of the cloud resources is an increasing trend within the preset historical time period, and calculating the increasing speed of the increasing trend.
4. The method of claim 3, wherein calculating the consumption of the cloud resources for a specified period of time in the future based on the consumption trend comprises:
calculating the consumption of the cloud resource in the future specified time period based on the increment speed, the consumption of the cloud resource in the previous recording period, and the number of recording periods included in the future specified time period.
5. The method according to claim 1, wherein the step of determining the consumption trend of the cloud resources in the preset historical time period based on the change rule further comprises:
if the consumption of the cloud resources in each recording period is in a decreasing change rule in the preset historical time period;
determining that the consumption trend of the cloud resources is a decreasing trend within the preset historical time period, and calculating the decreasing speed of the decreasing trend.
6. The method of claim 5, wherein calculating the consumption of the cloud resources over a specified period of time in the future based on the consumption trend comprises:
calculating the consumption amount of the cloud resource in the future specified time period based on the decrement speed, the consumption amount of the cloud resource in the previous recording period, and the number of the recording periods included in the future specified time period.
7. The method according to any one of claims 1 to 6, wherein the step of obtaining the cloud resource consumption record of the user in the preset historical time period comprises:
and according to a preset time interval, regularly acquiring a cloud resource consumption record of the user in the preset historical time period.
8. The method according to claim 1, wherein the step of determining the consumption trend of the cloud resources within the preset historical time period according to the cloud resource consumption record further comprises:
if the preset historical time period contains the target recording period marked by the user, deleting the consumption of the cloud resources corresponding to the target recording period;
and determining the consumption trend of the cloud resources in the preset historical time period according to the residual cloud resource consumption records after the consumption of the cloud resources corresponding to the target record period is deleted.
9. A cloud resource allowance alarm device is characterized by comprising:
the acquisition module is used for acquiring a cloud resource consumption record of a user in a preset historical time period;
the determining module is used for determining the consumption trend of the cloud resources in the preset historical time period according to the cloud resource consumption record;
a calculation module for calculating the consumption amount of the cloud resource in a specified period in the future based on the consumption trend;
the judging module is used for judging whether the consumption of the cloud resources is larger than the current available cloud resource allowance of the user;
the alarm module is used for sending a cloud resource allowance alarm prompt to the user when the judgment result of the judgment module is yes;
wherein the determining module is further configured to:
acquiring a change rule of the consumption of the cloud resources in each record period in the cloud resource consumption record in the preset historical time period;
determining the consumption trend of the cloud resources in the preset historical time period based on the change rule;
wherein the step of determining the consumption trend of the cloud resources within the preset historical time period based on the change rule comprises the steps of:
if the average variation of the cloud resource consumption in each recording period is smaller than a preset variation threshold, or within the preset historical time period, the variation of the cloud resource consumption in each recording period is a wave-like variation rule;
determining that the consumption trend of the cloud resources in the preset historical time period is a stable consumption trend.
10. A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, is adapted to carry out the method of any of the preceding claims 1-8.
CN202011184702.1A 2020-10-29 2020-10-29 Cloud resource allowance alarm method and device and server Active CN112311599B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011184702.1A CN112311599B (en) 2020-10-29 2020-10-29 Cloud resource allowance alarm method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011184702.1A CN112311599B (en) 2020-10-29 2020-10-29 Cloud resource allowance alarm method and device and server

Publications (2)

Publication Number Publication Date
CN112311599A CN112311599A (en) 2021-02-02
CN112311599B true CN112311599B (en) 2023-04-07

Family

ID=74331854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011184702.1A Active CN112311599B (en) 2020-10-29 2020-10-29 Cloud resource allowance alarm method and device and server

Country Status (1)

Country Link
CN (1) CN112311599B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117687767A (en) * 2022-09-02 2024-03-12 华为云计算技术有限公司 Resource planning method, device and related equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110198244A (en) * 2019-06-19 2019-09-03 北京百度网讯科技有限公司 Resource allocation method and device towards isomery cloud service
CN111756589A (en) * 2019-03-26 2020-10-09 杭州海康威视系统技术有限公司 Cloud resource management method and device, cloud server and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375115B (en) * 2016-08-30 2019-12-03 东软集团股份有限公司 Resource allocation methods and device
CN107368372B (en) * 2017-07-25 2021-02-23 苏州浪潮智能科技有限公司 Resource display method and device based on cloud sea OS platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756589A (en) * 2019-03-26 2020-10-09 杭州海康威视系统技术有限公司 Cloud resource management method and device, cloud server and storage medium
CN110198244A (en) * 2019-06-19 2019-09-03 北京百度网讯科技有限公司 Resource allocation method and device towards isomery cloud service

Also Published As

Publication number Publication date
CN112311599A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN109597685B (en) Task allocation method, device and server
CN109889999B (en) Flow pool management method, system and terminal of Internet of things card
CN111010292A (en) Offline task delay warning system and method and computer system
CN108572905B (en) Monitoring method and system based on distributed computation
CN111985726B (en) Resource quantity prediction method and device, electronic equipment and storage medium
US20110054846A1 (en) Monitoring the Performance of a Computer
CN110609780B (en) Data monitoring method and device, electronic equipment and storage medium
WO2005017736A1 (en) System and program for detecting bottle neck in disc array device
CN112153216A (en) Electric quantity early warning method and device, terminal equipment and storage medium
CN112311599B (en) Cloud resource allowance alarm method and device and server
CN106464733A (en) Method and device for adjusting virtual resources in cloud computing
CN108809720A (en) The management method and device of alarming assignment in cloud data system
CN111585824A (en) Resource distribution method, device and system and electronic equipment
CN110674149B (en) Service data processing method and device, computer equipment and storage medium
CN111141971A (en) Charging alarm system and method
CN105471938B (en) Server load management method and device
CN112367384B (en) Kafka cluster-based dynamic speed limiting method and device and computer equipment
CN113159463A (en) Traffic monitoring method and device
CN111782488B (en) Message queue monitoring method, device, electronic equipment and medium
CN109002381B (en) Process communication monitoring method, electronic device and computer readable storage medium
CN109284275B (en) Cloud platform virtual machine file system monitoring method and device
CN114173006A (en) Communication user off-network early warning method and server
JPH08316958A (en) Method and device for network management
CN108023741B (en) Monitoring resource use method and server
CN105279432B (en) Software monitoring processing method and device

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