CN113676347A - Server load prediction method and device, storage medium and electronic device - Google Patents

Server load prediction method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113676347A
CN113676347A CN202110839797.4A CN202110839797A CN113676347A CN 113676347 A CN113676347 A CN 113676347A CN 202110839797 A CN202110839797 A CN 202110839797A CN 113676347 A CN113676347 A CN 113676347A
Authority
CN
China
Prior art keywords
load
target
server
increase
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110839797.4A
Other languages
Chinese (zh)
Other versions
CN113676347B (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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110839797.4A priority Critical patent/CN113676347B/en
Publication of CN113676347A publication Critical patent/CN113676347A/en
Application granted granted Critical
Publication of CN113676347B publication Critical patent/CN113676347B/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/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a load prediction method and a load prediction device of a server, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring load data of a server to be monitored in a target time period; predicting a target load increase function of the server according to the load data, wherein the target load increase function is used for representing a load increase curve of the server; and predicting the increase time of the load of the server to a target threshold value according to the target load increase function, the load data and the target time period, wherein the target threshold value is the load reached when the server triggers the load early warning. By adopting the technical scheme, the problems of poor timeliness of predicting the load of the server and the like in the related technology are solved.

Description

Server load prediction method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for load prediction of a server, a storage medium, and an electronic apparatus.
Background
With the continuous growth of network users, the performance and reliability of a server as an infrastructure determine the stability of a service system, and system operation and maintenance personnel cannot accurately estimate how much load is brought to the server by the growth of user access flow. In order to strive for time to receive alarm information in advance, a manager can only reduce the threshold value setting to achieve the purpose of early warning, but the timeliness of prediction is poor, future growth of the server cannot be predicted, operation and maintenance personnel can only respond passively according to the alarm, and instability of the server or waste of resources are caused.
Aiming at the problems of poor timeliness of predicting the load of the server and the like in the related art, an effective solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a load prediction method and device of a server, a storage medium and an electronic device, and at least solves the problems that in the related art, the timeliness of prediction of the load of the server is poor and the like.
According to an embodiment of the present invention, there is provided a load prediction method for a server, including: acquiring load data of a server to be monitored in a target time period; predicting a target load increase function of the server according to the load data, wherein the target load increase function is used for representing a load increase curve of the server; and predicting the increase time of the load of the server to a target threshold value according to the target load increase function, the load data and the target time period, wherein the target threshold value is the load reached when the server triggers load early warning.
In an exemplary embodiment, obtaining load data of a server to be monitored in a target time period includes:
determining a plurality of unit times included in the target time period;
and acquiring target flow data and target memory consumption data corresponding to each unit time of the plurality of unit times of the server as the load data.
In one exemplary embodiment, predicting the target load growth function for the server based on the load data comprises:
acquiring an initial load increasing function, wherein the initial load increasing function is a function which takes flow data as an independent variable and memory consumption data as a dependent variable, and the initial load increasing function comprises one or more initial parameters;
acquiring a functional relation between each initial parameter in the one or more initial parameters and the flow data and the memory consumption data to obtain one or more functional relations;
calculating a target parameter corresponding to each initial parameter in the one or more initial parameters according to the target flow data and the target memory consumption data corresponding to each unit time in the plurality of unit times and the one or more functional relations to obtain one or more target parameters;
and inputting the one or more target parameters into the initial load increasing function to obtain the target load increasing function.
In an exemplary embodiment, predicting an increase time for the load of the server to increase to a target threshold based on the target load increase function, the load data, and the target time period comprises:
inputting a target memory consumption threshold into the target load increasing function to obtain a target flow threshold, wherein the target load increasing function is a function which takes flow data as an independent variable and memory consumption data as a dependent variable, and the target load increasing function comprises one or more target parameters;
predicting the flow rate increase of the flow rate of the server in unit time according to the load data and the target time period;
and determining the time of the flow data of the server reaching the target flow threshold value according to the flow acceleration rate as the increase time.
In one exemplary embodiment, predicting a traffic increase rate of the traffic of the server per unit time according to the load data and the target time period includes:
calculating a first difference value between the flow data corresponding to the last unit time and the flow data corresponding to the earliest unit time in the target time period;
determining a target number per unit time included in the target time period;
determining a ratio between the first difference and the target amount as the flow rate increase rate.
In an exemplary embodiment, determining the time when the traffic data of the server reaches the target traffic threshold according to the traffic acceleration as the increase time includes:
calculating a second difference between the target flow threshold and the flow data corresponding to the last unit time;
and carrying out upward rounding operation on the ratio of the second difference value to the flow rate increase to obtain the increase time.
In an exemplary embodiment, after predicting an increase time for the load of the server to increase to a target threshold according to the target load increase function, the load data, and the target time period, the method further comprises:
and sending alarm information to a monitoring client corresponding to the server, wherein the alarm information carries the increase time, and the alarm information is used for indicating that the server triggers load early warning after the increase time.
According to another embodiment of the present invention, there is also provided a load prediction apparatus for a server, including: the acquisition module is used for acquiring load data of the server to be monitored in a target time period; a first prediction module, configured to predict a target load increase function of the server according to the load data, where the target load increase function is used to represent a load increase curve of the server; and the second prediction module is used for predicting the increase time of the load of the server to a target threshold according to the target load increase function, the load data and the target time period, wherein the target threshold is the load reached when the server triggers load early warning.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above-mentioned method for predicting the load of the server in a less timely manner when the computer program is executed.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for predicting the load of the server with poor timeliness through the computer program.
In the embodiment of the invention, load data of a server to be monitored in a target time period is obtained; predicting a target load increase function of the server according to the load data, wherein the target load increase function is used for representing a load increase curve of the server; predicting the increase time of the load of the server to increase to a target threshold value according to a target load increase function, load data and a target time period, wherein the target threshold value is the load reached when the server triggers load early warning, firstly, obtaining the load data of the server to be monitored in a target time period, then predicting the functional relationship between the server load and the time according to the obtained load data so as to obtain a target load increasing function for expressing the load increasing curve of the server, predicting the growth time according to the target load growth function, the load data and the target time period so as to determine the time left for the load of the server to grow to the target threshold value, the load of the server can be estimated to increase to a target threshold for a future time, so that the load of the server can be early warned by using the obtained increase time. By adopting the technical scheme, the problems that the timeliness for predicting the load of the server is poor and the like in the related technology are solved, and the technical effect of improving the timeliness for predicting the load of the server is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a load prediction method of a server according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of load prediction for a server according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a load prediction method of a server according to an embodiment of the invention;
fig. 4 is a block diagram of a load prediction apparatus of a server according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method provided by the embodiment of the invention can be executed in a computer terminal, a computer terminal or a similar arithmetic device. Taking the example of the present invention running on a computer terminal, fig. 1 is a block diagram of a hardware structure of a computer terminal of a server load prediction method according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the load prediction method of the server in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a load prediction method for a server is provided, and is applied to the computer terminal, and fig. 2 is a flowchart of the load prediction method for a server according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, acquiring load data of a server to be monitored in a target time period;
step S204, predicting a target load increase function of the server according to the load data, wherein the target load increase function is used for expressing a load increase curve of the server;
step S206, predicting the increasing time of the load of the server to increase to a target threshold value according to the target load increasing function, the load data and the target time period, wherein the target threshold value is the load reached when the server triggers load early warning.
Through the steps, the load data of the server to be monitored in the target time period is obtained, then the functional relation between the server load and the time is predicted according to the obtained load data, so that a target load increasing function for expressing a load increasing curve of the server is obtained, the increasing time is predicted according to the target load increasing function, the load data and the target time period, the time left by the increase of the server load to the target threshold value is determined, the time by which the load of the server increases to the target threshold value in the future can be estimated, and therefore the load of the server can be early warned in advance by means of the obtained increasing time. By adopting the technical scheme, the problems that the timeliness for predicting the load of the server is poor and the like in the related technology are solved, and the technical effect of improving the timeliness for predicting the load of the server is achieved.
In the technical solution provided in step S202, the target time period may be, but is not limited to, determined according to a preset prediction cycle, for example: the prediction may be set to be performed every day or every few days, or every week or every few weeks, or every month or every few months, or may be performed every year, etc., and if the prediction is performed every day, the target time period may be the day before the current time, if the prediction is performed every week, the target time period may be the week before the current time, and so on.
Optionally, in this embodiment, the load data is data generated by the server to be monitored, or may also be data calculated according to the data generated by the server to be monitored, and the load data may be used to measure a load condition of the server to be monitored.
Optionally, in this embodiment, the load data may include, but is not limited to: traffic data of the server, memory consumption data, CPU usage data, IO (input output interface) consumption, and the like.
In an exemplary embodiment, the load data of the server to be monitored in the target time period may be obtained by, but is not limited to: determining a plurality of unit times included in the target time period; and acquiring target flow data and target memory consumption data corresponding to each unit time of the plurality of unit times of the server as the load data.
Alternatively, in the present embodiment, the accuracy of load prediction of the server may be controlled by controlling the size of the unit time. The unit time may be determined according to, but not limited to, a range of target time periods, such as: if the target time period is one day, the unit time may be one hour or several hours, one minute or several minutes, or the like. If the target time period is one week, the unit time may be one day or several days, or one hour or several hours, or one minute or several minutes, etc.
Alternatively, in the present embodiment, the load data may be, but is not limited to, acquired from each unit time in units of time. The load data may include, but is not limited to, target traffic data and target memory consumption data generated by the server per unit time.
In the technical solution provided in step S204 above, the load increase curve of the server may be, but is not limited to, used for representing a load increase trend of the server, so as to predict an increase that the load of the server may reach in the future.
Optionally, in this embodiment, the target load increasing function may be, but is not limited to, a linear function, and may also be, but is not limited to, a nonlinear function.
In an exemplary embodiment, the target load growth function of a server may be predicted from load data by, but is not limited to: acquiring an initial load increasing function, wherein the initial load increasing function is a function which takes flow data as an independent variable and memory consumption data as a dependent variable, and the initial load increasing function comprises one or more initial parameters; acquiring a functional relation between each initial parameter in the one or more initial parameters and the flow data and the memory consumption data to obtain one or more functional relations; calculating a target parameter corresponding to each initial parameter in the one or more initial parameters according to the target flow data and the target memory consumption data corresponding to each unit time in the plurality of unit times and the one or more functional relations to obtain one or more target parameters; and inputting the one or more target parameters into the initial load increasing function to obtain the target load increasing function.
Optionally, in this embodiment, generally, the larger the traffic is, the more the memory consumed, and the obtained load data of the server may be used to represent a certain functional relationship between the memory consumption of the server and the traffic, for example: and calculating a scatter diagram according to the memory consumption data and the flow data in the unit time, and performing curve fitting on the scatter diagram to analyze the functional relationship between the memory consumed by the server and the flow so as to finally obtain the target load increase function.
Optionally, in this embodiment, the initial load increasing function may be, but is not limited to, preset, the initial load increasing function takes the traffic data as an independent variable and takes the memory consumption data as a dependent variable, and the initial load increasing function includes one or more initial parameters, and each of the one or more initial parameters has a certain functional relationship with the traffic data and the memory consumption data. The obtained target flow data and the obtained target memory consumption data which have the corresponding relation are used for calculating one or more parameter values of the initial parameters included in the initial load increasing function as target parameters, and the obtained target parameters are substituted into the initial load increasing function to obtain the target load increasing function.
Optionally, in this embodiment, the initial load increase function may be, but is not limited to, a function with flow data as an independent variable and memory consumption data as a dependent variable, and includes a unary linear function of two initial parameters, such as: constructing an initial load growth function as Yt=axt+ b, where xt is the flow rate per unit time t, Yt is the memory consumption per unit time t, and a and b are two initial parameters.
In the technical solution provided in step S206, the target threshold may be, but is not limited to, represented by a percentage of a memory capacity of the server, for example: the target threshold may be that the memory reaches 80% of the capacity, or the hard disk reaches 85% of the total capacity, etc.
Optionally, in this embodiment, when the load of the server reaches the target threshold, the server may trigger a load warning. The increase time of the load to the target threshold may be, but is not limited to, the time when the server reaches the time triggering the load warning from the last time of the target time period.
In one exemplary embodiment, the increase time for the load of the server to increase to the target threshold may be predicted, but is not limited to, by: inputting a target memory consumption threshold into the target load increasing function to obtain a target flow threshold, wherein the target load increasing function is a function which takes flow data as an independent variable and memory consumption data as a dependent variable, and the target load increasing function comprises one or more target parameters; predicting the flow rate increase of the flow rate of the server in unit time according to the load data and the target time period; and determining the time of the flow data of the server reaching the target flow threshold value according to the flow acceleration rate as the increase time.
Optionally, in this embodiment, but not limited to, calculating, according to the obtained target load increase function, how much the flow rate is, when the memory consumption value reaches a memory consumption threshold set by an operation and maintenance worker, a flow rate threshold for triggering server early warning may be obtained, obtaining a flow rate increase rate according to the flow rate data of a plurality of unit times, and calculating a time required for the increase of the flow rate according to the flow rate increase rate to reach the flow rate threshold, that is, a time for triggering server early warning.
In an exemplary embodiment, the traffic acceleration of the server traffic per unit time may be predicted, but is not limited to, by: calculating a first difference value between the flow data corresponding to the last unit time and the flow data corresponding to the earliest unit time in the target time period; determining a target number per unit time included in the target time period; determining a ratio between the first difference and the target amount as the flow rate increase rate.
Alternatively, in this embodiment, the ratio between the difference between the traffic data corresponding to the last unit time in the target time period and the earliest and the target number of unit times included in the target time period may be, but is not limited to, used as the traffic speed increase of the server.
Optionally, in this embodiment, the time for the traffic data of the server to reach the target traffic threshold according to the traffic acceleration may be determined, but is not limited to, by the following manner, so as to obtain the increase time: calculating a second difference between the target flow threshold and the flow data corresponding to the last unit time; and carrying out upward rounding operation on the ratio of the second difference value to the flow rate increase to obtain the increase time.
In an exemplary embodiment, after the step S206, the load of the server may be, but is not limited to, alerted by: and sending alarm information to a monitoring client corresponding to the server, wherein the alarm information carries the increase time, and the alarm information is used for indicating that the server triggers load early warning after the increase time.
Optionally, in this embodiment, but not limited to, when it is predicted that the increase time of the load of the server to the target threshold is less than or equal to the early warning time set by the operation and maintenance staff, sending an alarm message to the monitoring client of the operation and maintenance staff, and informing the operation and maintenance staff in advance how long to trigger the server load early warning.
In order to better understand the process of the load prediction method of the server, the following describes an implementation method flow of the load prediction process of the server with reference to an optional embodiment, but the implementation method flow is not limited to the technical solution of the embodiment of the present invention.
In this embodiment, a load prediction method of a server is provided, and fig. 3 is a schematic diagram of the load prediction method of the server according to the embodiment of the present invention, as shown in fig. 3, a load prediction process of the server includes an operation and maintenance person, a detection server (i.e., the above-mentioned server to be monitored), and a prediction service (for performing a load prediction operation of the server). The operation and maintenance personnel firstly configure various parameters of the prediction service, such as the threshold value of each index of the detection server (for example: the memory reaches 80% of the capacity and the hard disk reaches 85% of the total capacity), information such as how many days ahead of time for early warning, and the like. The detection server can regularly send load data (flow data, memory consumption data (memory data, hard disk capacity data) and the like) to an interface of the prediction service through the script uploaded by the configuration data of the operation and maintenance personnel. The prediction service calculates a scatter plot from the received load data of the detection servers. Typically, the greater the traffic, the more memory consumed, and then a functional relationship between memory consumption and traffic may be determined.
TABLE 1
Figure BDA0003178440430000111
Figure BDA0003178440430000121
The load data shown in table 1 can be obtained from the data reports of a plurality of unit times. Prediction model Y from unary linear regression equationt=axtIn the expression + b, xt represents the value of independent variable flow in the t period, and Yt represents the value of dependent variable memory consumption in the t period. a and b represent parameters of a unary linear regression equation. a. The b parameter can be, but is not limited to, the following formula:
Figure BDA0003178440430000122
Figure BDA0003178440430000123
it can be calculated from the load data in table 1 that Yt is 0.531x +189.75 as the target load increase function. The target load increase function may predict that when the flow x is 1000MB/s, the memory consumption is Y0.531 × 1000+189.75 720.75 MB. The flow rate increase rate is (950- & ltSUB & gt 300)/8 & ltSUB & gt 81.25 can be obtained according to the relationship between the flow rate and the unit time (day). The memory threshold value set by the operation and maintenance personnel is 720MB, and then early warning can be triggered when the flow reaches 1000MB/s according to the deduction and calculation of the content. The early warning can be triggered when the flow rate is increased. I.e. after 1 day an early warning is triggered.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Fig. 4 is a block diagram of a load prediction apparatus of a server according to an embodiment of the present invention; as shown in fig. 4, includes:
an obtaining module 42, configured to obtain load data of a server to be monitored in a target time period;
a first prediction module 44, configured to predict a target load increase function of the server according to the load data, where the target load increase function is used to represent a load increase curve of the server;
a second prediction module 46, configured to predict, according to the target load increase function, the load data, and the target time period, an increase time for a load of the server to increase to a target threshold, where the target threshold is a load reached when the server triggers a load warning.
According to the device, the load data of the server to be monitored in the target time period is firstly acquired, then the functional relation between the server load and the time is predicted according to the acquired load data, so that a target load increasing function for expressing a load increasing curve of the server is obtained, the increasing time is predicted according to the target load increasing function, the load data and the target time period, the time left by the load of the server increasing to the target threshold value is determined, the time that the load of the server will increase to the target threshold value in the future can be estimated, and therefore the load of the server can be early warned in advance by means of the obtained increasing time. By adopting the technical scheme, the problems that the timeliness for predicting the load of the server is poor and the like in the related technology are solved, and the technical effect of improving the timeliness for predicting the load of the server is achieved.
In one exemplary embodiment, the obtaining module includes:
a first determination unit configured to determine a plurality of unit times included in the target time period;
a first obtaining unit, configured to obtain, as the load data, target traffic data and target memory consumption data corresponding to each unit time of the plurality of unit times of the server.
In one exemplary embodiment, the first prediction module comprises:
a second obtaining unit, configured to obtain an initial load increasing function, where the initial load increasing function is a function that takes flow data as an independent variable and memory consumption data as a dependent variable, and the initial load increasing function includes one or more initial parameters;
a third obtaining unit, configured to obtain a functional relationship between each of the one or more initial parameters and the flow data and the memory consumption data, so as to obtain one or more functional relationships;
a calculating unit, configured to calculate, according to the target traffic data and the target memory consumption data corresponding to each unit time in the multiple unit times and the one or more functional relationships, a target parameter corresponding to each initial parameter in the one or more initial parameters, so as to obtain one or more target parameters;
a first input unit, configured to input the one or more target parameters into the initial load increasing function to obtain the target load increasing function.
In one exemplary embodiment, the second prediction module comprises:
a second input unit, configured to input a target memory consumption threshold into the target load growth function to obtain a target traffic threshold, where the target load growth function is a function that uses traffic data as an independent variable and memory consumption data as a dependent variable, and the target load growth function includes one or more target parameters;
the prediction unit is used for predicting the flow rate increase of the flow rate of the server in unit time according to the load data and the target time period;
and a second determining unit, configured to determine, as the increase time, a time when the traffic data of the server reaches the target traffic threshold according to the traffic acceleration.
In an exemplary embodiment, the prediction unit is configured to:
calculating a first difference value between the flow data corresponding to the last unit time and the flow data corresponding to the earliest unit time in the target time period;
determining a target number per unit time included in the target time period;
determining a ratio between the first difference and the target amount as the flow rate increase rate.
In an exemplary embodiment, the second determination unit is configured to:
calculating a second difference between the target flow threshold and the flow data corresponding to the last unit time;
and carrying out upward rounding operation on the ratio of the second difference value to the flow rate increase to obtain the increase time.
In one exemplary embodiment, the apparatus further comprises:
and the sending module is used for sending alarm information to a monitoring client corresponding to the server after predicting the increase time of the load of the server to a target threshold value according to the target load increase function, the load data and the target time period, wherein the alarm information carries the increase time, and the alarm information is used for indicating that the server triggers load early warning after the increase time.
An embodiment of the present invention further provides a storage medium including a stored program, wherein the program executes any one of the methods described above.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, acquiring load data of the server to be monitored in a target time period;
s2, predicting a target load increase function of the server according to the load data, wherein the target load increase function is used for representing a load increase curve of the server;
and S3, predicting the increase time of the load of the server to increase to a target threshold value according to the target load increase function, the load data and the target time period, wherein the target threshold value is the load reached when the server triggers load early warning.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring load data of the server to be monitored in a target time period;
s2, predicting a target load increase function of the server according to the load data, wherein the target load increase function is used for representing a load increase curve of the server;
and S3, predicting the increase time of the load of the server to increase to a target threshold value according to the target load increase function, the load data and the target time period, wherein the target threshold value is the load reached when the server triggers load early warning.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A load prediction method for a server, comprising:
acquiring load data of a server to be monitored in a target time period;
predicting a target load increase function of the server according to the load data, wherein the target load increase function is used for representing a load increase curve of the server;
and predicting the increase time of the load of the server to a target threshold value according to the target load increase function, the load data and the target time period, wherein the target threshold value is the load reached when the server triggers load early warning.
2. The method for load prediction of a server according to claim 1, wherein obtaining load data of the server to be monitored in the target time period comprises:
determining a plurality of unit times included in the target time period;
and acquiring target flow data and target memory consumption data corresponding to each unit time of the plurality of unit times of the server as the load data.
3. The method of load forecasting of a server according to claim 2, wherein forecasting the target load growth function of the server based on the load data comprises:
acquiring an initial load increasing function, wherein the initial load increasing function is a function which takes flow data as an independent variable and memory consumption data as a dependent variable, and the initial load increasing function comprises one or more initial parameters;
acquiring a functional relation between each initial parameter in the one or more initial parameters and the flow data and the memory consumption data to obtain one or more functional relations;
calculating a target parameter corresponding to each initial parameter in the one or more initial parameters according to the target flow data and the target memory consumption data corresponding to each unit time in the plurality of unit times and the one or more functional relations to obtain one or more target parameters;
and inputting the one or more target parameters into the initial load increasing function to obtain the target load increasing function.
4. The method for load prediction of a server according to claim 1, wherein predicting an increase time for the load of the server to increase to a target threshold according to the target load increase function, the load data and the target time period comprises:
inputting a target memory consumption threshold into the target load increasing function to obtain a target flow threshold, wherein the target load increasing function is a function which takes flow data as an independent variable and memory consumption data as a dependent variable, and the target load increasing function comprises one or more target parameters;
predicting the flow rate increase of the flow rate of the server in unit time according to the load data and the target time period;
and determining the time of the flow data of the server reaching the target flow threshold value according to the flow acceleration rate as the increase time.
5. The method for load prediction of a server according to claim 4, wherein predicting a traffic increase rate per unit time of the traffic of the server based on the load data and the target time zone comprises:
calculating a first difference value between the flow data corresponding to the last unit time and the flow data corresponding to the earliest unit time in the target time period;
determining a target number per unit time included in the target time period;
determining a ratio between the first difference and the target amount as the flow rate increase rate.
6. The method for load prediction of a server according to claim 5, wherein determining the time at which the traffic data of the server reaches the target traffic threshold in accordance with the traffic acceleration as the increase time comprises:
calculating a second difference between the target flow threshold and the flow data corresponding to the last unit time;
and carrying out upward rounding operation on the ratio of the second difference value to the flow rate increase to obtain the increase time.
7. The method for load prediction of a server according to any one of claims 1 to 6, wherein after predicting an increase time for the load of the server to increase to a target threshold according to the target load increase function, the load data and the target time period, the method further comprises:
and sending alarm information to a monitoring client corresponding to the server, wherein the alarm information carries the increase time, and the alarm information is used for indicating that the server triggers load early warning after the increase time.
8. A load prediction apparatus for a server, comprising:
the acquisition module is used for acquiring load data of the server to be monitored in a target time period;
a first prediction module, configured to predict a target load increase function of the server according to the load data, where the target load increase function is used to represent a load increase curve of the server;
and the second prediction module is used for predicting the increase time of the load of the server to a target threshold according to the target load increase function, the load data and the target time period, wherein the target threshold is the load reached when the server triggers load early warning.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202110839797.4A 2021-07-23 2021-07-23 Load prediction method and device of server, storage medium and electronic device Active CN113676347B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110839797.4A CN113676347B (en) 2021-07-23 2021-07-23 Load prediction method and device of server, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110839797.4A CN113676347B (en) 2021-07-23 2021-07-23 Load prediction method and device of server, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN113676347A true CN113676347A (en) 2021-11-19
CN113676347B CN113676347B (en) 2024-03-26

Family

ID=78540052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110839797.4A Active CN113676347B (en) 2021-07-23 2021-07-23 Load prediction method and device of server, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113676347B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594371A (en) * 2008-05-28 2009-12-02 山东省标准化研究院 The load balance optimization method of food safety trace back database
CN108845881A (en) * 2018-05-30 2018-11-20 有米科技股份有限公司 The method and device of server capacity dynamic adjustment
KR20190012928A (en) * 2017-07-31 2019-02-11 한국전자통신연구원 Load balancing apparatus and method
CN110474795A (en) * 2019-07-11 2019-11-19 中国平安财产保险股份有限公司 Processing method and processing device, storage medium and the electronic equipment of server capacity
CN111930526A (en) * 2020-10-19 2020-11-13 腾讯科技(深圳)有限公司 Load prediction method, load prediction device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594371A (en) * 2008-05-28 2009-12-02 山东省标准化研究院 The load balance optimization method of food safety trace back database
KR20190012928A (en) * 2017-07-31 2019-02-11 한국전자통신연구원 Load balancing apparatus and method
CN108845881A (en) * 2018-05-30 2018-11-20 有米科技股份有限公司 The method and device of server capacity dynamic adjustment
CN110474795A (en) * 2019-07-11 2019-11-19 中国平安财产保险股份有限公司 Processing method and processing device, storage medium and the electronic equipment of server capacity
CN111930526A (en) * 2020-10-19 2020-11-13 腾讯科技(深圳)有限公司 Load prediction method, load prediction device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨伟;朱巧明;李培峰;钱培德;: "基于时间序列的服务器负载预测", 计算机工程, no. 19, pages 143 - 148 *
申泽星;彭云建;岳喜顺;: "集群服务器在混合请求下的负载均衡优化算法", 计算机工程与应用, no. 18, pages 99 - 104 *

Also Published As

Publication number Publication date
CN113676347B (en) 2024-03-26

Similar Documents

Publication Publication Date Title
CN109446041B (en) Server pressure early warning method and system and terminal equipment
CN109962856B (en) Resource allocation method, device and computer readable storage medium
CN107040608A (en) A kind of data processing method and system
CN109005528A (en) A kind of bluetooth mesh gateway data polymerization report method
CN111882395A (en) Monitoring method and system for rental equipment, computer equipment and storage medium
CN110933698A (en) Monitoring management method, device and equipment for Internet of things card
CN106464733A (en) Method and device for adjusting virtual resources in cloud computing
CN116756522B (en) Probability forecasting method and device, storage medium and electronic equipment
CN106970696B (en) Electronic equipment management method and electronic equipment
US20150120940A1 (en) Apparatus and method for changing resource using pattern information, and recording medium using the same
CN113676347B (en) Load prediction method and device of server, storage medium and electronic device
CN114338778B (en) Gateway equipment control method and device, storage medium and electronic device
CN115827232A (en) Method, device, system and equipment for determining configuration for service model
CN116016150A (en) Early warning method and device for physical network, electronic equipment and storage medium
CN114330914A (en) Building carbon emission management method, system and device
CN114675551A (en) Method and device for determining operation behavior, storage medium and electronic device
CN114896296A (en) Cloud service resource configuration method and device, electronic equipment and computer readable medium
CN114867050A (en) Vehicle flow detection method, device, system, equipment and storage medium
CN112418509A (en) Task data prediction method and device, storage medium and electronic device
CN113112158A (en) Method and device for processing equipment use data, storage medium and electronic device
CN114281250A (en) Method and device for cleaning storage file, storage medium and electronic device
CN110955728A (en) Power consumption data transmission method, server and storage medium
CN113271351A (en) Cloud computing resource scheduling method, device, equipment and readable storage medium
CN111949246A (en) Method and device for creating new energy power industry application
CN113722088A (en) Recommendation method and device for cloud host specification, storage medium and electronic 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