CN113904940A - Resource adjusting method and device, electronic equipment and computer readable storage medium - Google Patents

Resource adjusting method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113904940A
CN113904940A CN202111031832.6A CN202111031832A CN113904940A CN 113904940 A CN113904940 A CN 113904940A CN 202111031832 A CN202111031832 A CN 202111031832A CN 113904940 A CN113904940 A CN 113904940A
Authority
CN
China
Prior art keywords
server
amount
future
total amount
current
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.)
Pending
Application number
CN202111031832.6A
Other languages
Chinese (zh)
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.)
Shenzhen Leiniao Network Media Co ltd
Original Assignee
Shenzhen Leiniao Network Media 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 Shenzhen Leiniao Network Media Co ltd filed Critical Shenzhen Leiniao Network Media Co ltd
Priority to CN202111031832.6A priority Critical patent/CN113904940A/en
Publication of CN113904940A publication Critical patent/CN113904940A/en
Pending legal-status Critical Current

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/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • 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

Abstract

The embodiment of the invention discloses a resource adjusting method, a resource adjusting device, electronic equipment and a computer readable storage medium; in the embodiment of the application, the user data of the terminal device and the current total amount of the server resources are obtained first. And then determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the user data. And finally, adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount. Because the final total amount of the server resources is matched with the future request amount, the condition that the server resources are idle does not occur, the utilization rate of the server resources is improved, and the cost of the operation and maintenance server of a service provider can be reduced.

Description

Resource adjusting method and device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a resource adjustment method, an apparatus, and a computer-readable storage medium.
Background
In recent years, with the rapid development of internet technology, services of the internet are increasing. The services of the internet are generally implemented by clients and servers.
When the service request of the client is more, the resource of the service request exceeds the resource which can be provided by the server, so that the service request cannot be responded or is slowly responded. Therefore, server resources are generally configured according to the maximum service request amount of the client at present. However, if the number of subsequent service requests is reduced, a portion of the server resources may be left unused, thereby reducing the utilization of the server resources.
Disclosure of Invention
Embodiments of the present invention provide a resource adjustment method, an apparatus, and a computer-readable storage medium, which can improve the utilization rate of server resources.
A method of resource adjustment, comprising:
acquiring user data of terminal equipment and the current total amount of server resources;
determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the user data;
and adjusting the current total amount according to the future request amount to obtain the final total amount of the server resource so as to enable the final total amount to be matched with the future request amount.
Optionally, after the adjusting the current total amount according to the future request amount to obtain a final total amount of the server resource, so that the final total amount matches the future request amount, the method further includes:
and determining the target quantity of the server resources allocated to the terminal equipment in the future preset time according to the future request quantity and the final total quantity.
Optionally, the user data is historical user data;
correspondingly, the determining the future request amount of the terminal device for the server resource at the future preset time according to the user data includes:
analyzing the historical user data to obtain a request rule of the terminal equipment for the server resource;
and determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the request rule.
Optionally, the user data is current user data;
correspondingly, the determining the future request amount of the terminal device for the server resource at the future preset time according to the user data includes:
and inputting the current user data into a trained neural network model for prediction to obtain the future request quantity of the terminal equipment to the server resource at the future preset time, wherein the trained neural network model is obtained by training according to historical user data.
Optionally, the adjusting the current total amount according to the future request amount to obtain a final total amount of the server resource, so that the final total amount matches the future request amount, includes:
acquiring the initial quantity of the server resources occupied by the terminal equipment;
determining a target difference value according to the future request quantity and the initial quantity;
determining the remaining amount of the server resources according to the current total amount and the initial amount;
and adjusting the current residual quantity according to the target difference value to obtain the final residual quantity of the server resource so as to enable the final residual quantity to be matched with the target difference value.
Optionally, the adjusting the current remaining amount according to the target difference to obtain a final remaining amount of the server resource includes:
comparing the target difference value with the current residual amount;
and if the target difference is smaller than the current surplus, reducing the current surplus of the server resource, and if the target difference is larger than the current surplus, increasing the current surplus of the server resource to obtain the final surplus.
Optionally, the reducing the current remaining amount of the server resource includes:
reducing the current residual amount of the server resources by reducing the number of the servers;
accordingly, increasing the current remaining amount of the server resource includes:
and increasing the current remaining amount of the server resources by increasing the number of the servers.
Accordingly, an embodiment of the present invention provides a resource adjusting apparatus, including:
the acquisition module is used for acquiring the user data of the terminal equipment and the current total amount of the server resources;
the determining module is used for determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the user data;
and the adjusting module is used for adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount.
In addition, an embodiment of the present invention further provides an electronic device, which includes a processor and a memory, where the memory stores a computer program, and the processor is configured to run the computer program in the memory to implement the resource adjustment method provided in the embodiment of the present invention.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is suitable for being loaded by a processor to perform any one of the resource adjustment methods provided in the embodiment of the present invention.
In the embodiment of the application, the user data of the terminal device and the current total amount of the server resources are obtained first. And then determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the user data. And finally, adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount. Because the final total amount of the server resources is matched with the future request amount, the situation that the server resources are idle does not occur, and the utilization rate of the server resources is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a system for implementing services provided by an embodiment of the present invention;
fig. 2 is a schematic flow chart of an information adjusting method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a trained neural network model provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a resource adjustment apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
The embodiment of the invention provides a resource adjusting method, a resource adjusting device and a computer readable storage medium. The resource adjusting apparatus may be integrated in an electronic device, and the electronic device may be a server.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Network acceleration service (CDN), big data and an artificial intelligence platform.
The terminal device in the embodiment of the present application may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like, but is not limited thereto.
For the specific type of the server and the specific type of the terminal device, the user may select the server and the terminal device according to actual situations, which is not specifically limited herein. In addition, the terminal device and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
Referring to fig. 1, services of the internet are generally implemented by clients, networks, and servers. When the service request of the client is more, the resource of the service request exceeds the resource which can be provided by the server, so that the service request cannot be responded or is slowly responded. Therefore, in order to improve the user experience, server resources are generally configured according to the maximum service request amount of the client at present. For example, the number of servers is set according to the maximum service request amount, so that the number of server resources matches the maximum service request amount. However, if the number of subsequent service requests is reduced, a portion of the server resources may be left unused, thereby reducing the utilization of the server resources.
In order to solve the technical problem of low utilization rate of server resources, the application provides a resource adjustment method. And then determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the user data. And finally, adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount. Because the final total amount of the server resources is matched with the future request amount, the condition that the server resources are idle does not occur, the utilization rate of the server resources is improved, and the cost of the operation and maintenance server of a service provider can be reduced.
The resource adjustment method provided in the embodiment of the present application is described in detail below.
As shown in fig. 2, the specific process of the resource adjustment method is as follows:
s201, acquiring user data of the terminal equipment and the current total amount of server resources.
The user data of the terminal device refers to data generated by a user requesting a service from the server through the terminal device, and includes, but is not limited to, the number of times, the time, the requested service, the number of users accessing the server, and the like that the user requests the service. Server resources include, but are not limited to, a Central Processing Unit (CPU) of the server, a memory, a disk, operating environment parameters of the server (e.g., temperature and humidity of an environment where the server is located, etc.), a network bandwidth, and the like.
The terminal equipment can acquire user data in real time through the preset first acquisition device, and then transmit the user data to the server in real time, so that the server acquires the user data of the terminal equipment. Alternatively, the terminal device may periodically transmit the user data to the server. Alternatively, the terminal device may send the user data to the server when receiving the data acquisition request sent by the server.
The user is sent to the server in real time relative to the terminal equipment, the user data is periodically sent to the server, or the user is sent to the server when a data acquisition request sent by the server is received, so that the interaction times of the terminal equipment and the server can be reduced, and the server resources occupied by the terminal equipment are reduced.
Or, the server may acquire the user data of the terminal device in real time by presetting the second acquisition device, so as to acquire the user data of the terminal device. It should be understood that the server may also collect the current total amount of the resources of the terminal server in real time by presetting the second collecting device.
The current total amount of server resources includes an initial amount of server resources that have been occupied by the terminal device and a remaining amount of server resources.
S202, determining future request quantity of the terminal equipment to the server resource at future preset time according to the user data.
After the server acquires the user data, the server can determine the request quantity of the terminal equipment to the server resource at the future preset time according to the user data. For example, when the user data is user data of an application program, after analyzing the user data, a change trend of the number of users using the application program may be predicted, and then a request amount of the application program (or a terminal device where the application program is located) for a server resource at a future preset time may be calculated according to the change trend.
Or after analyzing the user data, the request rule of the user may be obtained, for example, after analyzing the user data, it may be determined that the number of requests initiated by the terminal device by the user is large on weekends, and then the future request amount of the terminal device for the server resource on the next weekend may be determined according to the user data.
The specific method for determining the future request amount of the terminal device for the server resource at the future preset time according to the user data may be set by the user according to the situation, and the application is not limited herein.
For the future preset time, the user may set the time according to actual conditions, and the application is not specifically limited herein.
S203, adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources, so that the final total amount is matched with the future request amount.
After obtaining the future request amount, the server may adjust the current total amount according to the future request amount to obtain a final total amount of the server resource, so that the final total amount matches the future request amount.
For example, when the future request amount is larger than the current total amount of the server resources, the server resources may be increased so that the request of the terminal device at the future preset time may be realized. When the future amount of requests is less than the current total amount of server resources, then the current total amount of server resources may be reduced so that the reduced server resources may be used to fulfill other service requests. When the future request amount is equal to the current total amount, then the current total amount may not be modified, at which point the final total amount of server resources is the same as the current total amount.
Matching the final total amount to the future requested amount means that the final total amount is equal to the future requested amount or that the difference between the final total amount and the future requested amount is within a preset threshold. The preset threshold may be set according to actual conditions, and the application is not specifically limited herein.
When the difference value between the final request quantity and the future request quantity is within the preset threshold value, although the final total quantity and the future request quantity are not equal, the preset threshold value is smaller, namely the difference between the final total quantity and the future request quantity is smaller, so that the idle server resources are less.
As can be seen from the above, in the embodiment of the present application, the user data of the terminal device and the current total amount of the server resources are obtained first. And then determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the user data. And finally, adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount. Because the final total amount of the server resources is matched with the future request amount, the condition that the server resources are idle does not occur, the utilization rate of the server resources is improved, and the cost of the operation and maintenance server of a service provider can be reduced.
The resource adjustment method described above will be described in further detail below.
In some embodiments, the user data may be historical user data, and determining a future request amount of the terminal device for the server resource at a future preset time according to the user data includes:
and analyzing the historical user data to obtain the request rule of the terminal equipment for the server resource. And then determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the request rule.
For example, the historical user data is analyzed, and it is obtained that the terminal device generally needs to occupy resources of 7 servers on weekends, and generally only needs to occupy resources of 5 servers on workdays. The server may determine that the future request for server resources by the terminal device is 7 servers 'resources on a future weekend and 5 servers' resources on a future weekday.
If the user data does not have a rule, the future request amount can be predicted according to the current user data, so in other embodiments, the user data is the current user data; correspondingly, determining the future request amount of the terminal equipment to the server resource at the future preset time according to the user data comprises the following steps:
and inputting the current user data into the trained neural network model for prediction to obtain the future request quantity of the terminal equipment to the server resource at the future preset time, and training the trained neural network model according to the historical user data to obtain the future request quantity.
In the present embodiment, the trained neural network model is trained according to historical user data. Therefore, after the server inputs the current user data into the trained neural network model for prediction, the future request quantity of the terminal equipment for the server resources at the future preset time can be obtained.
For example, the user data at time a is input into the trained neural network model to predict the requested amount at time a and time B.
It should be noted that, for the specific type of the trained Neural Network model, the user may select according to the actual situation, for example, select a Recurrent Neural Network (RNN) or a Long Short-Term Memory Network (LSTM) as the specific type of the Neural Network in the embodiment of the present application, and the present application is not limited specifically herein.
The training process of the trained neural network model may be: and inputting the historical user data into the neural network model to be trained to obtain a loss value, and stopping training if the loss value is less than or equal to a preset value to obtain the trained neural network model. And if the loss value is larger than the preset value, updating the network parameters of the neural network model to be trained according to the preset value, and returning to execute the step of inputting the historical user data into the neural network model to be trained.
It should be understood that, in the process of training the neural network model to be trained, the neural network model to be trained may also be trained to recognize the identifier of the terminal device, so that when the current user data is input to the neural network model of the trained model, the trained neural network model may recognize the terminal device while analyzing the current user data, thereby enabling the server to obtain the future request amount through the trained neural network model without associating the terminal device with the future request amount.
For example, referring to fig. 3, the trained neural network model includes a first sub-network, a second sub-network and a full connectivity layer, the first sub-network is a neural network model for identifying the terminal device, and the second sub-network is a neural network model for analyzing the current user data. After the current user data is input into the first sub-network, the identification of the terminal device is obtained, after the current user data is input into the second sub-network, the future request quantity of the server resource at the future preset time is obtained, then the identification of the terminal device and the future request quantity are input into the full connection for splicing, and the future request quantity of the server resource at the future preset time of the terminal device is obtained.
In other embodiments, the process of adjusting the current total amount according to the future request amount to obtain the final total amount of the server resource so that the final total amount matches the future request amount may be:
the initial number of server resources occupied by the terminal device is obtained first. A target difference is then determined based on the future request amount and the initial amount. And then determining the remaining amount of the server resources according to the current total amount and the initial amount. And finally, adjusting the current surplus according to the target difference value to obtain the final surplus of the server resource so as to enable the final surplus to be matched with the target difference value.
The process of obtaining the final surplus of the server resource by adjusting the current surplus according to the target difference value may be as follows:
and comparing the target difference with the current residual amount. And if the target difference value is smaller than the current surplus, reducing the current surplus of the server resources, and if the target difference value is larger than the current surplus, increasing the current surplus of the server resources to obtain the final surplus. If the target difference value is equal to the current remaining amount, the current remaining amount of the server resources does not need to be increased or decreased.
The current remaining amount of the server resources can be increased by increasing the number of the servers, and the current remaining amount of the server resources can be decreased by decreasing the number of the servers. Or, when the current performance parameter of the server meets the preset condition, the resource use upper limit of the server can be modified, so as to increase the current remaining amount of the server resource.
For example, if the resource usage upper limit of the server is 75% of the total amount of the server resources, the speed of the server for realizing the service will be slow or the service cannot be realized when the occupied server resources exceed 75%. Then the current performance parameter of the server can be judged, and if the performance parameter meets the preset condition, the resource use upper limit of the server can be modified to 85%.
Or, the current remaining amount of the server resource can be increased by recovering the server resource occupied by the terminal device. For example, after analyzing the user data, it is found that the first terminal device occupies the server resource 1 in the time interval a, and it is found that the second terminal device occupies the server resource 1 in the time interval B, and the time interval a and the time interval B are different time intervals, so that the server can recover the server resource 1 occupied by the first terminal device after the time interval a, thereby increasing the current remaining amount of the server resource. Finally, the server resource 1 is allocated to the second terminal.
In other embodiments, after obtaining the final total amount of the server resources, the target amount of the server resources allocated to the terminal device at the preset time in the future may be determined according to the future request amount and the final total amount.
For example, if the future request amount of the terminal device is 3 CPUs and the final total amount is 4 CPUs, the terminal device may be allocated with 3 CPUs.
It should be noted that, since a general terminal device currently occupies some server resources, when determining the target number for the terminal device, the initial number of the server resources currently occupied by the terminal device may be obtained. And then subtracting the initial quantity from the future request quantity to obtain a target difference value, and subtracting the initial quantity from the current total quantity to obtain the remaining quantity of the server resources. And finally, determining the target quantity of the server resources distributed to the terminal equipment in the future preset time according to the target difference and the surplus.
For example, the future request amount of the terminal device is 3 CPUs, the final total amount is 4 CPUs, the terminal device currently occupies 2 CPUs, the remaining amount is 2 CPUs, the target difference value is 1 CPU, and the terminal device needs to occupy 1 CPU at the future preset time. Since there are 2 CPUs remaining, 1 CPU can be allocated to the terminal device at a preset time in the future.
In order to better implement the above method, an embodiment of the present invention further provides a resource adjusting apparatus, which may be integrated in an electronic device.
For example, as shown in fig. 4, the resource adjusting apparatus may include:
an obtaining module 401, configured to obtain user data of the terminal device and a current total amount of server resources.
A determining module 402, configured to determine, according to the user data, a future request amount of the terminal device for the server resource at a future preset time.
An adjusting module 403, configured to adjust the current total amount according to the future request amount to obtain a final total amount of the server resource, so that the final total amount matches the future request amount.
Optionally, the resource adjusting apparatus further includes:
and the allocation module is used for determining the target quantity of the server resources allocated to the terminal equipment in the future preset time according to the future request quantity and the final total quantity.
Optionally, the user data is historical user data.
Accordingly, the determining module 402 is specifically configured to perform:
analyzing historical user data to obtain a request rule of the terminal equipment for server resources;
and determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the request rule.
Optionally, the user data is current user data.
Accordingly, the determining module 402 is specifically configured to perform:
and inputting the current user data into the trained neural network model for prediction to obtain the future request quantity of the terminal equipment to the server resource at the future preset time, and training the trained neural network model according to the historical user data to obtain the future request quantity.
Optionally, the adjusting module 403 is specifically configured to perform:
acquiring the initial quantity of server resources occupied by the terminal equipment;
determining a target difference value according to the future request quantity and the initial quantity;
determining the residual amount of server resources according to the current total amount and the initial amount;
and adjusting the current surplus according to the target difference value to obtain the final surplus of the server resource so as to enable the final surplus to be matched with the target difference value.
Optionally, the adjusting module 403 is specifically configured to perform:
comparing the target difference with the current residual amount;
and if the target difference is smaller than the current surplus, reducing the current surplus of the server resources, and if the target difference is larger than the current surplus, increasing the current surplus of the server resources to obtain the final surplus.
Optionally, the adjusting module 403 is specifically configured to perform:
by reducing the number of servers, the current remaining amount of server resources is reduced.
The current remaining amount of server resources is increased by increasing the number of servers.
In a specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily, and implemented as the same or a plurality of entities, and the specific implementation manner and the corresponding beneficial effects of the above modules may refer to the above embodiment of the resource adjustment method, and are not described herein again.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which shows a schematic structural diagram of the electronic device according to the embodiment of the present invention, specifically:
the electronic device may include components such as a processor 501 of one or more processing cores, memory 502 of one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 501 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing computer programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the electronic device. Optionally, processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 501.
The memory 502 may be used to store computer programs and modules, and the processor 501 executes various functional applications and data processing by operating the computer programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
The electronic device further comprises a power supply 503 for supplying power to each component, and preferably, the power supply 503 may be logically connected to the processor 501 through a power management system, so that functions of managing charging, discharging, power consumption, and the like are realized through the power management system. The power supply 503 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may also include an input unit 504, where the input unit 504 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 501 in the electronic device loads the executable file corresponding to the process of one or more computer programs into the memory 502 according to the following instructions, and the processor 501 runs the computer program stored in the memory 502, so as to implement various functions, such as:
acquiring user data of terminal equipment and the current total amount of server resources;
determining future request quantity of the terminal equipment to server resources at a future preset time according to user data;
and adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, in the embodiment of the present application, the user data of the terminal device and the current total amount of the server resources are obtained first. And then determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the user data. And finally, adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount. Because the final total amount of the server resources is matched with the future request amount, the condition that the server resources are idle does not occur, the utilization rate of the server resources is improved, and the cost of the operation and maintenance server of a service provider can be reduced.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the computer program.
To this end, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute any one of the resource adjustment methods provided by the embodiment of the present invention. For example, the computer program may perform the steps of:
acquiring user data of terminal equipment and the current total amount of server resources;
determining future request quantity of the terminal equipment to server resources at a future preset time according to user data;
and adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the computer-readable storage medium can execute the steps in any resource adjustment method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any resource adjustment method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
According to an aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations of the resource adjustment aspect described above.
The resource adjustment method, device and computer-readable storage medium provided by the embodiments of the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for resource adjustment, comprising:
acquiring user data of terminal equipment and the current total amount of server resources;
determining future request quantity of the terminal equipment to the server resource at a future preset time according to the user data;
and adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount.
2. The resource adjustment method according to claim 1, wherein after the adjusting the current total amount according to the future request amount to obtain a final total amount of the server resource, so that the final total amount matches the future request amount, the method further comprises:
and determining the target quantity of the server resources distributed to the terminal equipment in the future preset time according to the future request quantity and the final total quantity.
3. The resource adjustment method according to claim 1, wherein the user data is historical user data;
correspondingly, the determining the future request amount of the terminal device for the server resource at the future preset time according to the user data includes:
analyzing the historical user data to obtain a request rule of the terminal equipment for the server resource;
and determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the request rule.
4. The resource adjustment method according to claim 1, wherein the user data is current user data;
correspondingly, the determining the future request amount of the terminal device for the server resource at the future preset time according to the user data includes:
inputting the current user data into a trained neural network model for prediction to obtain the future request quantity of the terminal equipment to the server resource at the future preset time, wherein the trained neural network model is obtained by training according to historical user data.
5. The resource adjustment method according to any one of claims 1 to 4, wherein the adjusting the current total amount according to the future request amount to obtain a final total amount of the server resource so that the final total amount matches the future request amount comprises:
acquiring the initial quantity of server resources occupied by the terminal equipment;
determining a target difference value according to the future request quantity and the initial quantity;
determining the residual amount of the server resources according to the current total amount and the initial amount;
and adjusting the current surplus according to the target difference value to obtain the final surplus of the server resource so as to enable the final surplus to be matched with the target difference value.
6. The resource adjustment method according to claim 5, wherein the adjusting the current remaining amount according to the target difference value to obtain a final remaining amount of the server resource includes:
comparing the target difference value with the current residual amount;
and if the target difference value is smaller than the current surplus, reducing the current surplus of the server resources, and if the target difference value is larger than the current surplus, increasing the current surplus of the server resources to obtain the final surplus.
7. The resource adjustment method of claim 6, wherein said reducing the current remaining amount of the server resource comprises:
reducing the current remaining amount of the server resources by reducing the number of servers;
accordingly, increasing the current remaining amount of the server resource includes:
increasing the current remaining amount of the server resource by increasing the number of the servers.
8. A resource adjustment apparatus, comprising:
the acquisition module is used for acquiring the user data of the terminal equipment and the current total amount of the server resources;
the determining module is used for determining the future request quantity of the terminal equipment to the server resource at the future preset time according to the user data;
and the adjusting module is used for adjusting the current total amount according to the future request amount to obtain the final total amount of the server resources so as to enable the final total amount to be matched with the future request amount.
9. An electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program in the memory to perform the resource adjustment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored, the computer program being adapted to be loaded by a processor to perform the resource adjustment method of any one of claims 1 to 7.
CN202111031832.6A 2021-09-03 2021-09-03 Resource adjusting method and device, electronic equipment and computer readable storage medium Pending CN113904940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111031832.6A CN113904940A (en) 2021-09-03 2021-09-03 Resource adjusting method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111031832.6A CN113904940A (en) 2021-09-03 2021-09-03 Resource adjusting method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113904940A true CN113904940A (en) 2022-01-07

Family

ID=79188589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111031832.6A Pending CN113904940A (en) 2021-09-03 2021-09-03 Resource adjusting method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113904940A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117170821A (en) * 2023-11-01 2023-12-05 建信金融科技有限责任公司 Service processing method, device, electronic equipment and computer readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318091A (en) * 2014-10-13 2015-01-28 航天东方红卫星有限公司 Moonlet ground testing method based on virtualization computer system
CN108243222A (en) * 2016-12-26 2018-07-03 航天信息股份有限公司 Server network architecture method and device
CN111625344A (en) * 2019-02-27 2020-09-04 阿里巴巴集团控股有限公司 Resource scheduling system, method and device in application system
WO2021004324A1 (en) * 2019-07-09 2021-01-14 平安科技(深圳)有限公司 Resource data processing method and apparatus, and computer device and storage medium
CN112860403A (en) * 2021-02-22 2021-05-28 中国联合网络通信集团有限公司 Cluster load resource scheduling method, device, equipment, medium and product
US20210218690A1 (en) * 2020-07-20 2021-07-15 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for allocating server resource, electronic device and storage medium
CN113230658A (en) * 2021-05-31 2021-08-10 腾讯科技(深圳)有限公司 Resource allocation method and device, computer readable medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318091A (en) * 2014-10-13 2015-01-28 航天东方红卫星有限公司 Moonlet ground testing method based on virtualization computer system
CN108243222A (en) * 2016-12-26 2018-07-03 航天信息股份有限公司 Server network architecture method and device
CN111625344A (en) * 2019-02-27 2020-09-04 阿里巴巴集团控股有限公司 Resource scheduling system, method and device in application system
WO2021004324A1 (en) * 2019-07-09 2021-01-14 平安科技(深圳)有限公司 Resource data processing method and apparatus, and computer device and storage medium
US20210218690A1 (en) * 2020-07-20 2021-07-15 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for allocating server resource, electronic device and storage medium
CN112860403A (en) * 2021-02-22 2021-05-28 中国联合网络通信集团有限公司 Cluster load resource scheduling method, device, equipment, medium and product
CN113230658A (en) * 2021-05-31 2021-08-10 腾讯科技(深圳)有限公司 Resource allocation method and device, computer readable medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117170821A (en) * 2023-11-01 2023-12-05 建信金融科技有限责任公司 Service processing method, device, electronic equipment and computer readable medium
CN117170821B (en) * 2023-11-01 2024-02-09 建信金融科技有限责任公司 Service processing method, device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
US11146502B2 (en) Method and apparatus for allocating resource
CN110990138B (en) Resource scheduling method, device, server and storage medium
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
CN112272239B (en) Edge calculation method and device, intelligent terminal and computer readable storage medium
WO2017016113A1 (en) Method and device for monitoring network traffic
CN112165691A (en) Content delivery network scheduling method, device, server and medium
CN104243405A (en) Request processing method, device and system
CN109558248B (en) Method and system for determining resource allocation parameters for ocean mode calculation
CN115033340A (en) Host selection method and related device
CN109428926B (en) Method and device for scheduling task nodes
CN112559125A (en) Container application migration method and device, electronic equipment and computer readable medium
CN111324460B (en) Power monitoring control system and method based on cloud computing platform
KR101630125B1 (en) Method for resource provisioning in cloud computing resource management system
CN113885794B (en) Data access method and device based on multi-cloud storage, computer equipment and medium
CN113904940A (en) Resource adjusting method and device, electronic equipment and computer readable storage medium
CN114564313A (en) Load adjustment method and device, electronic equipment and storage medium
CN108770014B (en) Calculation evaluation method, system and device of network server and readable storage medium
CN108540546B (en) Network node access control method, electronic device, network system, and storage medium
CN115913967A (en) Micro-service elastic scaling method based on resource demand prediction in cloud environment
CN114880079A (en) Kubernetes cluster scale adjustment method, system and equipment based on reinforcement learning
US20220191273A1 (en) Liaison System and Method for Cloud Computing Environment
CN114466365A (en) Spectrum resource acquisition method, spectrum resource acquisition device and computer readable storage medium
CN114490432A (en) Memory processing method and device, electronic equipment and computer readable storage medium
CN109951316B (en) Application program management method and device, computer readable medium and electronic equipment
Hanczewski et al. A Multiparameter Analytical Model of the Physical Infrastructure of a Cloud-Based System

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