CN111224806A - Resource allocation method and server - Google Patents

Resource allocation method and server Download PDF

Info

Publication number
CN111224806A
CN111224806A CN201811422859.6A CN201811422859A CN111224806A CN 111224806 A CN111224806 A CN 111224806A CN 201811422859 A CN201811422859 A CN 201811422859A CN 111224806 A CN111224806 A CN 111224806A
Authority
CN
China
Prior art keywords
terminal
server
time period
resource
value
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
CN201811422859.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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201811422859.6A priority Critical patent/CN111224806A/en
Publication of CN111224806A publication Critical patent/CN111224806A/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/0893Assignment of logical groups to network elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • 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
    • 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
    • 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/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • 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/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • H04L41/5051Service on demand, e.g. definition and deployment of services in real time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user data
    • H04N21/25891Management of end-user data being end-user preferences

Abstract

The application discloses a resource allocation method and a server, wherein the method comprises the following steps: the server predicts a resource demand value of the terminal within a future period of time according to historical information of the terminal, wherein the historical information comprises one or more of the resource demand value predicted by the server for the terminal within the historical period of time, a resource allocation value allocated by the server for the terminal within the historical period of time, information of a request sent by the terminal to the server within the historical period of time and an actual resource occupation value of the terminal within the historical period of time; the server determines the resource allocation value of the terminal in a future period according to the resource demand value predicted for the terminal in the future period and the current residual total resources of the server, wherein the resource allocated for the terminal in the future period is used for the server to process the request from the terminal in the future period. By implementing the method and the system, resources can be reasonably distributed, the concurrency capability of the server is improved, and interruption of media focuses is avoided.

Description

Resource allocation method and server
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a resource allocation method and a server.
Background
In a virtual set-top box and similar scenes providing remote dynamic media services (e.g., electronic menu (EPG) browsing of a smart television), a user sends an operation instruction to a remote service end, and the remote service end responds to the operation of the user to complete media content processing and then pushes the media content to a user end to present media information.
The capability of processing massive user media requests (high concurrency) is the core competitiveness of a remote server, the concurrency capability is improved, the user experience is guaranteed, and the core appeal of the remote dynamic media service is achieved.
The concurrence of limited resources and massive users is one-to-one trade off, the problem of concurrence optimization is really the problem of reasonable distribution of the limited resources, and the server does not have a pre-estimation mechanism for the resource demand of each user, so that the resource occupation for processing the user request cannot be effectively managed, the surge phenomenon is easy to occur under the high concurrence condition, the total resources of the system are possibly limited, the resource demands of all users cannot be met, and the distribution of the unmanaged resources easily causes interruption of media focuses. Therefore, how to reasonably allocate content resources to improve the concurrency capability of the server and avoid interruption of media focus on the premise of ensuring user experience is a technical problem which needs to be solved urgently at present.
Disclosure of Invention
The embodiment of the invention provides a resource allocation method and a server, which can reasonably allocate resources of the server, improve the concurrency capability of the server and avoid interruption of a media focus on the premise of ensuring user experience.
In a first aspect, an embodiment of the present invention provides a resource allocation method, including: the server predicts a resource demand value of the terminal in a first time period according to history information of the terminal, wherein the history information comprises one or more of the resource demand value predicted by the server for the terminal in a second time period, a resource allocation value allocated by the server for the terminal in the second time period, information of a request sent by the terminal to the server in the second time period and an actual resource occupation value of the terminal in the second time period, the second time period is before the first time period, and the second time period comprises one or more than one; the server determines the resource allocation value of the terminal in the first time period according to the resource demand value predicted for the terminal in the first time period and the current remaining total resources of the server, wherein the resources allocated for the terminal in the first time period are used for the server to process the request from the terminal in the first time period.
By implementing the embodiment of the invention, the server can predict the resource requirements of each terminal in advance, can effectively manage the resources for processing the terminal requests, and can still reasonably distribute the resources according to the resource requirements of each terminal under the condition of high concurrency so as to improve the concurrency capability of the server and avoid interruption of media focuses on the premise of ensuring user experience.
In one possible design, the server predicts the resource requirement value of the terminal in the first time period according to the history information of the terminal, and the method includes: the server constructs a time sequence model according to the historical information of the terminal; and the server predicts the resource requirement value of the terminal in the first time period according to the time series model.
By implementing the embodiment of the invention, the time series model is constructed through the historical information of the terminal, and the required value of each terminal to the resource in the future time period can be predicted in real time.
In one possible design, the time series model includes a long short term memory network LSTM model or an RRN model.
In one possible design, after the server determines the resource allocation value of the terminal in the first time period according to the predicted resource demand value in the first time period for the terminal and the current remaining total resources of the server, the method further includes: if the terminal is configured with the sandbox, the server reconfigures the sandbox matched with the resource allocation value of the terminal in the first time period for the terminal; if the terminal is not configured with the sandbox before, the server configures the sandbox matched with the resource allocation value of the terminal in the first time period for the terminal; the sandbox is used for representing resource values allocated to the terminal by the server.
By implementing the embodiment of the invention, the light-weight unified management of resource allocation can be realized by relying on a sandbox-like mechanism.
In one possible design, the server determines the resource allocation value of the terminal in the first time period according to the predicted resource demand value of the terminal in the first time period and the current remaining total resources of the server, and includes: and the server determines the resource allocation value of the terminal in the first time period according to the resource demand value predicted for the terminal in the first time period, the current residual total resources of the server and the resource allocation algorithm.
In one possible design, the resource allocation algorithm includes an ACO algorithm, a Min-Min algorithm, or a Max-Min algorithm.
In a second aspect, an embodiment of the present invention provides a server, which may include a plurality of functional modules or units, and is configured to correspondingly perform the resource allocation method provided in the first aspect.
In a third aspect, an embodiment of the present invention provides a server, configured to execute the resource allocation method provided in the first aspect. The server may include: memory, processor, communication interface, wherein: the communication interface is used for communicating with other communication devices (such as terminals and the like). The memory is used for storing implementation codes of the resource allocation method provided by the first aspect, and the processor is used for executing the program codes stored in the memory, namely executing the resource allocation method provided by the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores instructions that, when executed on a processor, cause the processor to execute the resource allocation method described in the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program product containing instructions, which when run on a processor, causes the processor to perform the resource allocation method described in the first aspect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
Fig. 1 is a schematic structural diagram of a resource allocation system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a logical structure of a server according to an embodiment of the present invention;
FIG. 3 is a logic diagram of lifecycle management based on a resource allocation table according to an embodiment of the present invention;
fig. 4 is a logic diagram for performing time-series modeling on resource requirements of a terminal based on historical information of the terminal according to an embodiment of the present invention;
FIG. 5 is a flowchart of a resource allocation method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a logical structure of a server according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a hardware structure of a server according to an embodiment of the present invention.
Detailed Description
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
First, an application scenario related to the present application will be described. Referring to fig. 1, a schematic structural diagram of a resource allocation system according to an embodiment of the present invention is provided. The resource allocation system 100 includes: server 101, terminal 102, and network 103. The terminal 102 communicates with the server 101 through the network 103.
The terminal 102 may be, for example, a mobile phone, a tablet computer, a cable television, etc., but is not limited thereto. In the resource allocation system 100, the terminal 102 may obtain media content, which may be pictures, video, audio, etc., through the server 101. Specifically, the terminal 102 may send a media request to the server 101, and the server 101 pushes corresponding media content to the terminal 102 according to the media request. The format of the media request may be a hypertext transfer protocol (HTTP) format, a File Transfer Protocol (FTP) format, and the like.
Only one server and one terminal are shown in the resource allocation system 100 shown in fig. 1, but those skilled in the art should appreciate that a plurality of servers may be configured in the resource allocation system 100 to ensure the response speed and the operational stability of the servers, and of course, a plurality of terminals may also be configured in the resource allocation system 100, and the present invention has no limitation on the number of servers and terminals in the resource allocation system 100. Through the resource allocation system 100, the server can predict (or periodically predict) the resource demand of each terminal in a future period of time in real time according to the historical information of the terminals, and then reasonably allocate resources for each terminal respectively based on the predicted resource demand and the current residual total resources of the server. Here, the history information of the terminal includes one or more of a resource demand value predicted by the server for the terminal at the history time (or time period), a resource value allocated by the server for the terminal at the history time (or time period), information of a request transmitted by the terminal to the server at the history time (or time period) (for example, a frequency of transmitting the request, which may be, for example, 15 requests/s, etc.), and a resource value actually occupied by the terminal at the history time (or time period). The server can predict the resource demand of the terminal in the next stage in real time and reasonably allocate resources to the terminal, so as to prepare for a high concurrency scene which may occur in advance and avoid the condition that the media focus is interrupted due to the resource allocation without management and control. The resources referred to in this application may include a Central Processing Unit (CPU), a Random Access Memory (RAM), a disk, and the like. The number of resources or resource values may be characterized as a number of CPUs, a number of memories, a number of disks, and so on.
The user can use the terminal to send a request to the server through the wired network or the wireless network, the server responds to the request to feed back corresponding media content to the terminal after receiving the request, and finally, the terminal analyzes the fed back media content and presents media effects for the user.
The network architecture in the embodiment of the present invention includes, but is not limited to, the above network architectures, as long as the network architecture capable of implementing the resource allocation method in the present invention is within the scope protected and covered by the present invention.
The inventive concept of the present application is described below in connection with the logical structure of a server. Referring to fig. 2, the server 200 includes five modules, including a resource monitoring module 201, a resource demand forecasting module 202, a resource adaptive allocation module 203, a resource lifecycle management module 204, and a user management module 205.
The resource monitoring module 201 is responsible for monitoring and outputting the total resource utilization of the server 200 and the resource utilization of each terminal.
The resource demand prediction module 202 is configured to store historical information of the terminal, learn resource usage of the terminal, construct a time series model, and predict a demand of the terminal for resources in a next time period according to the time series model. The resource demand prediction module 202 may also be disposed on the terminal side. The history information of the terminal includes, among others, a resource demand value predicted by the server history for the terminal, a resource value allocated to the terminal at a history time (or a time period), information of a request sent by the terminal history to the server (e.g., a frequency of the sent request, etc.), an actual resource occupation value of the terminal history, and so on. The time series model may be, for example, a long-short-term memory network (LSTM), a recurrent neural network (RRN), or the like.
The resource adaptive allocation module 203 is responsible for adaptively allocating resources for the terminal according to the total resource condition of the server 200 and the resource demand of the terminal predicted by the resource demand prediction module 202 in the next time period, and has limited balanced allocation capability to avoid the interruption of the terminal focus in high concurrency. For example, resources may be adaptively allocated for the terminal based on an Ant Colony Optimization (ACO), a Min-Min algorithm, or a Max-Min algorithm. These algorithms may calculate resource allocation values for each terminal based on the total resources remaining at the server and the predicted resource demand values for the next time period for each terminal. The purpose of resource allocation is to allocate sufficient resources for each terminal while satisfying the constraint that the consumed resources are less than the remaining total resources. When the total system resources are in short supply, the resources can be allocated to the terminals according to the priority order. For example, a resource is preferentially allocated to a terminal with a high priority, and a slightly smaller resource is allocated to a terminal with a low priority.
The resource lifecycle management module 204 is responsible for maintaining lifecycle management of the user resource, which can be specifically referred to fig. 3. Specifically, the resource lifecycle management module 204 may maintain a resource allocation table, and add, change, and remove user resources based on the resource allocation table, thereby implementing lightweight user resource lifecycle management. The resource allocation list is used for recording the history information of each terminal and the current resource use condition of each terminal. For example, the format of the resource allocation table can be seen in table 1 below.
TABLE 1
Figure BDA0001880899780000041
The resources allocated to the terminal 0 in the time period t0-t1 are: the number of CPUs: 2, number of Memory: the upper limit of the number of requests of the terminal 0 that can be handled by these resources is 20/s, and the lower limit of the number of requests of the terminal 0 that can be handled is 10/s. The number of requests actually transmitted by terminal 0 during the time period t0-t1 is 15/s.
The user management module 205 acquires terminal access/disconnection information in real time. If a new terminal is accessed, the resource lifecycle management module 204 is notified to add the information related to the terminal to the resource allocation list. If any terminal disconnects from the server, the resource lifecycle management module 204 is notified to remove the information of the terminal from the resource allocation list.
Specifically, the resource demand prediction module 202 performs time sequence modeling according to history information of a single terminal (or called a single user, each terminal, etc.), and predicts the resource demand of the single terminal in a future period of time based on the history information. In which the resource demand of a single terminal can be periodically predicted. Fig. 4 is a logic diagram for performing time-series modeling on resource requirements of a terminal based on history information of the terminal according to an embodiment of the present invention. Wherein t0-tp refers to each predicted time point. The resource demand prediction module 202 periodically predicts the resource demand of the terminal. For example, the prediction period is 1 second. The input of the time sequence model comprises a request sent by a terminal history, a resource demand value predicted by a server history for the terminal, a resource value actually occupied by the terminal history and the like. As shown in fig. 4, X0, X1, … Xp respectively refer to information of requests sent by a certain terminal (assumed to be terminal 1) to a server at a certain time (or time period), which may include specific content of the requests or the total number of requests. For example, X1 refers to a request sent by the terminal 1 to the server during the period t0-t 1. X2 refers to a request sent by the terminal 1 to the server during the period t1-t 2. A0, a1, and … Ap refer to processing units of the recurrent neural network, respectively, and the processing units are used for storing a resource predicted value, an actual resource occupation value, and the like of a history time period of the terminal before the current time. For example, the history information stored by a2 includes request information of the terminal in the time period of t0-t1, the resource demand value h0 of the server in the time period of t0-t1 predicted by the server for the terminal 1 at the time t0, the actual resource occupancy value of the terminal 1 in the time period of t0-t1, the resource demand value h1 of the server in the time period of t1-t2 predicted by the server for the terminal 1 at the time t1, and the actual resource occupancy value of the terminal 1 in the time period of t1-t 2. The processing unit a2 needs to predict the resource demand value h2 of the terminal 1 in the next time period, i.e., the time period of t2-t3, from the history information stored by itself and X2.
After the resource demand prediction module 202 predicts the resource demand value of the next stage for the terminal, the resource adaptive allocation module 203 calculates the resource allocation value for the terminal according to the current remaining total resources of the server and the resource demand value predicted by the resource demand prediction module 202 for the terminal. For example, the resource value allocated to the terminal may be decided according to the ACO algorithm.
After the resource adaptive allocation module 203 determines the value of the resource allocated to the terminal, the resource lifecycle management module 204 may employ a sandbox-like mechanism to visually represent the value of the resource allocated to the terminal by the resource adaptive allocation module 203. The sandbox can be a sandbox predefined by the system or a sandbox defined by a user. Each sandbox corresponds to a configuration of resource values. The configuration of the resource value may be, for example, the number of CPUs, the number of memories, the number of disks, and the like. For example, the server configures 3 sandboxes, where the resource corresponding to sandbox 1 is configured to: the number of the CPUs is 2, the number of the memories is 20, 20 user requests are processed in each second, and 10 user requests are processed in each second at least. The resource configuration corresponding to sandbox 2 is: the number of the CPUs is 2, the number of the memories is 10, 15 user requests are processed in each second, and the minimum number of the user requests is 5. The resources corresponding to sandbox 3 are configured as follows: the number of the CPUs is 3, the number of the memories is 20, 20 user requests are processed in each second, and 15 user requests are processed at least in each second. Assume that the resource values of the time period t0-t1 allocated by the server for the terminal 1 are: if the number of the CPUs is 2 and the number of the memories is 20, it can be characterized that the sandbox allocated by the server to the terminal 1 is the sandbox 1. If the server allocates the resource value of the time period t1-t2 to the terminal 1: if the number of the CPUs is 2 and the number of the memories is 10, it can be characterized that the sandbox allocated by the server to the terminal 1 is adjusted from the sandbox 1 to the sandbox 2. If a new user joins (i.e. a new client accesses to the server, for example, the set-top box is connected to the server after being powered on), the resource lifecycle management module 204 adds information such as the terminal ID corresponding to the user to the resource allocation table, and allocates a corresponding sandbox to the user. If there is a user removed, the resource lifecycle management module 204 needs to delete the information of the user from the resource allocation table, cancel the sandbox allocation for the user, and release the corresponding resource.
The resource allocation information of all users can be represented by utilizing the adjacent order matrix. The expression form of the adjacent order matrix can be:
Figure BDA0001880899780000051
the matrix is described by taking the number of users as m and the number of sandboxes as n as an example.
If the sandbox allocated by the resource adaptive allocation module 203 for the terminal 0 is sandbox 0, the matrix is
Figure BDA0001880899780000052
Figure BDA0001880899780000053
If the sandbox allocated by the resource adaptive allocation module 203 for terminal 0 is adjusted from sandbox 0 to sandbox 1, the matrix is adjusted to
Figure BDA0001880899780000061
If a new user joins, the sandbox information corresponding to the user needs to be added to the matrix. If a user removes the sandbox, the sandbox information corresponding to the user needs to be deleted from the matrix.
As mentioned in the present application, the resource of the user is equal to the resource of the terminal, and the request of the user is equal to the request of the terminal, unless otherwise specified.
The following describes the resource allocation method provided by the embodiment of the present invention in detail.
Referring to fig. 5, a flowchart of a resource allocation method according to an embodiment of the present invention is shown, which includes the following steps.
S501: the server predicts the resource demand value of the terminal in the first time period according to the history information of the terminal, wherein the history information comprises one or more of the resource demand value predicted by the server for the terminal in the second time period, the resource allocation value allocated by the server for the terminal in the second time period, the information of the request sent by the terminal to the server in the second time period and the actual resource occupation value of the terminal in the second time period, the second time period is before the first time period, and the second time period comprises one or more than one.
S502: the server determines the resource allocation value of the terminal in the first time period according to the resource demand value predicted for the terminal in the first time period and the current remaining total resources of the server, wherein the resources allocated for the terminal in the first time period are used for the server to process the request from the terminal in the first time period.
The server can construct a time series model according to the historical information of the terminal, and predict the resource demand value of the terminal in the first time period in the future according to the time series model. The time series model may be, for example, a long-term memory network (LSTM), an RRN, or the like.
The server can adaptively allocate resources for the terminal based on an ACO algorithm, a Min-Min algorithm or a Max-Min algorithm. These algorithms may calculate resource allocation values for each terminal based on the total resources remaining at the server and the predicted resource demand values for the next time period for each terminal. The purpose of resource allocation is to allocate sufficient resources for each terminal while satisfying the constraint that the consumed resources are less than the remaining total resources. When the total system resources are in short supply, the resources can be allocated to the terminals according to the priority order. For example, a resource is preferentially allocated to a terminal with a high priority, and a slightly smaller resource is allocated to a terminal with a low priority.
The server may employ a sandbox-like representation to visually characterize the value of the resource allocated for the terminal. For the introduction of the sandbox, reference may be made to the foregoing description and further description may not be provided herein. If the terminal is configured with the class sandbox before, the server reconfigures the class sandbox which is matched with the resource allocation value of the terminal in the first time period for the terminal; and if the terminal is not configured with the class sandbox before, the server configures the class sandbox which is matched with the resource allocation value of the terminal in the first time period for the terminal.
In the embodiment of the invention, the server constructs the time series model based on the historical information of the terminal and acquires the request sent by the terminal so as to learn the model. The resource requirement value of the terminal in a future period of time can be predicted through the constructed time series model, and the resource value is reasonably distributed to the terminal according to the resource requirement value and the current remaining total resources of the server. By implementing the embodiment of the invention, the concurrency capability and the resource utilization rate of the server can be improved. Based on the class sandbox and the resource allocation table, efficient management and maintenance of resource allocation can be achieved.
In the embodiment of the present application, the server may be divided into the functional modules according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
In the case of dividing each functional module by corresponding functions, fig. 6 shows a schematic diagram of a possible logical structure of the server according to the above embodiment, where the server 600 includes: a prediction unit 601 and an allocation unit 602. The prediction unit 601 is configured to predict a resource demand value of a terminal in a first time period according to history information of the terminal, where the history information includes one or more of a resource demand value in a second time period predicted by the server for the terminal, a resource allocation value in the second time period allocated by the server for the terminal, information of a request sent by the terminal to the server in the second time period, and an actual resource occupancy value of the terminal in the second time period, where the second time period is before the first time period, and the second time period includes one or more resource occupancy values. The allocating unit 602 is configured to determine a resource allocation value of the terminal in the first time period according to the predicted resource requirement value of the terminal in the first time period and the current remaining total resources of the server, where the resource in the first time period allocated to the terminal is used for the server to process the request from the terminal in the first time period.
In a hardware implementation, the prediction unit 601 and the allocation unit 602 may be processors or the like.
Fig. 7 is a schematic diagram of a possible hardware structure of the server according to the foregoing embodiments, provided for an embodiment of the present application. The server 700 includes: a processor 701, a memory 702, and a communications interface 703. In the embodiment of the present application, the processor 701 is configured to control and manage the actions of the server, for example, the processor 701 is configured to support, in the embodiment, the steps of predicting the resource requirement value of the terminal in the first time period according to the history information of the terminal, and determining the resource allocation value of the terminal in the first time period according to the resource requirement value of the terminal in the first time period predicted for the terminal and the current remaining total resources of the server, and the like. The processor 701, the communication interface 703 and the memory 702 may be connected to each other or to each other through a bus 704. The memory 702 is used for storing codes and data of the server, among other things. The communication interface 703 is used to support the server for communication. The bus 704 may be a peripheral component interconnect standard PCI bus or an extended industry standard architecture EISA bus or the like.
The processor 701 may be, among other things, a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, transistor logic, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a digital signal processor and a microprocessor, or the like.
In another embodiment of the present application, a computer storage medium is further provided, where the computer storage medium stores computer-executable instructions, and when a device (which may be a single chip, a chip, or the like) or a processor may call the readable storage medium to store the computer-executable instructions to perform the steps of the server in the resource allocation method provided in fig. 5. The aforementioned computer storage media may comprise: u disk, removable hard disk, read only memory, random access memory, magnetic or optical disk, etc. for storing program codes.
In another embodiment of the present application, there is also provided a computer program product comprising computer executable instructions stored in a computer readable storage medium; the computer executable instructions may be read by at least one processor of the device from a computer readable storage medium, and execution of the computer executable instructions by the at least one processor causes the device to perform the steps of the server in the resource allocation method provided in fig. 5.
In another embodiment of the present application, there is also provided a resource allocation system including a plurality of devices including a server and a terminal. The server may be the server provided in fig. 6 or fig. 7, and is configured to execute the steps of the server in the resource allocation method provided in fig. 5.
Finally, it should be noted that: the above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Yet another aspect of the application provides an apparatus comprising the processor executing code in memory to cause the apparatus to perform the various methods described previously. The memory stores code and data therein. The memory is located in the device, the memory coupled to the processor. The memory may also be located outside the device.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method for resource allocation, comprising:
the method comprises the steps that a server predicts a resource demand value of a terminal in a first time period according to history information of the terminal, wherein the history information comprises one or more of a resource demand value predicted by the server for the terminal in a second time period, a resource allocation value allocated by the server for the terminal in the second time period, information of a request sent by the terminal to the server in the second time period and an actual resource occupation value of the terminal in the second time period, the second time period is before the first time period, and the second time period comprises one or more than one;
and the server determines the resource allocation value of the terminal in the first time period according to the predicted resource demand value of the terminal in the first time period and the current residual total resources of the server, wherein the resources allocated to the terminal in the first time period are used for the server to process the request from the terminal in the first time period.
2. The method of claim 1, wherein the server predicts the resource demand value of the terminal in the first time period according to the history information of the terminal, and comprises:
the server constructs a time sequence model according to the historical information of the terminal;
and the server predicts the resource demand value of the terminal in the first time period according to the time series model.
3. The method of claim 2, wherein the time series model comprises a long short term memory network (LSTM) model or a recurrent neural network (RRN) model.
4. The method according to any one of claims 1 to 3, wherein the server determines the resource allocation value of the terminal in the first time period according to the predicted resource demand value of the terminal in the first time period and the current remaining total resources of the server, and further comprises:
if the terminal is configured with the sandbox, the server configures the sandbox matched with the resource allocation value of the terminal in the first time period for the terminal again;
if the terminal is not configured with the sandbox before, the server configures the sandbox matched with the resource allocation value of the terminal in the first time period for the terminal;
the sandbox is used for representing resource values distributed to the terminal by the server.
5. The method according to any one of claims 1 to 4, wherein the server determines the resource allocation value of the terminal in the first time period according to the predicted resource demand value for the terminal in the first time period and the current remaining total resources of the server, and comprises:
and the server determines the resource allocation value of the terminal in the first time period according to the resource demand value predicted for the terminal in the first time period, the current residual total resources of the server and a resource allocation algorithm.
6. The method of claim 5, wherein the resource allocation algorithm comprises an ACO algorithm, a Min-Min algorithm, or a Max-Min algorithm.
7. A server, comprising:
the system comprises a prediction unit, a resource requirement value prediction unit and a resource requirement value prediction unit, wherein the resource requirement value prediction unit is used for predicting a resource requirement value of a terminal in a first time period according to history information of the terminal, the history information comprises one or more of a resource requirement value in a second time period predicted by a server for the terminal, a resource allocation value in the second time period allocated by the server for the terminal, information of a request sent by the terminal to the server in the second time period and an actual resource occupation value of the terminal in the second time period, and the second time period is before the first time period and comprises one or more of the second time period;
and the allocation unit is used for determining the resource allocation value of the terminal in the first time period according to the predicted resource demand value of the terminal in the first time period and the current residual total resources of the server, wherein the resources allocated to the terminal in the first time period are used for the server to process the request from the terminal in the first time period.
8. The server according to claim 7, wherein the prediction unit comprises:
the modeling unit is used for constructing a time series model according to the historical information of the terminal;
and the determining unit is used for predicting the resource demand value of the terminal in the first time period according to the time series model.
9. The server of claim 8, wherein the time series model comprises a long short term memory network (LSTM) model or a recurrent neural network (RRN) model.
10. A server according to any of claims 7 to 9, characterized in that the server further comprises:
a configuration unit, configured to, after the allocation unit determines the resource allocation value of the terminal in the first time period according to the resource requirement value predicted for the terminal in the first time period and the current remaining total resources of the server, if the terminal has been configured with a sandbox before, re-configure the sandbox for the terminal, where the sandbox matches the resource allocation value of the terminal in the first time period; if the terminal is not configured with the sandbox, configuring the sandbox matched with the resource allocation value of the terminal in the first time period for the terminal; the sandbox is used for representing resource values distributed to the terminal by the server.
11. The server according to any one of claims 7 to 10, wherein the allocation unit is specifically configured to:
and determining the resource allocation value of the terminal in the first time period according to the resource demand value predicted for the terminal in the first time period, the current residual total resources of the server and a resource allocation algorithm.
12. The server of claim 11, wherein the resource allocation algorithm comprises an ACO algorithm, a Min-Min algorithm, or a Max-Min algorithm.
CN201811422859.6A 2018-11-27 2018-11-27 Resource allocation method and server Pending CN111224806A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811422859.6A CN111224806A (en) 2018-11-27 2018-11-27 Resource allocation method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811422859.6A CN111224806A (en) 2018-11-27 2018-11-27 Resource allocation method and server

Publications (1)

Publication Number Publication Date
CN111224806A true CN111224806A (en) 2020-06-02

Family

ID=70828922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811422859.6A Pending CN111224806A (en) 2018-11-27 2018-11-27 Resource allocation method and server

Country Status (1)

Country Link
CN (1) CN111224806A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111724067A (en) * 2020-06-22 2020-09-29 中国银行股份有限公司 Resource scheduling method and device
CN111866111A (en) * 2020-07-13 2020-10-30 郑州轻工业大学 Edge deployment method for sensing user demand growth trend
CN111985726A (en) * 2020-08-31 2020-11-24 重庆紫光华山智安科技有限公司 Resource quantity prediction method and device, electronic equipment and storage medium
CN112130989A (en) * 2020-08-18 2020-12-25 贝壳技术有限公司 Two-dimensional code application method and device
CN113220452A (en) * 2021-05-10 2021-08-06 北京百度网讯科技有限公司 Resource allocation method, model training method, device and electronic equipment
CN113315945A (en) * 2021-07-29 2021-08-27 江苏怀业信息技术股份有限公司 Terminal access method of distributed video conference system
CN113378498A (en) * 2021-08-12 2021-09-10 新华三半导体技术有限公司 Task allocation method and device
CN114327915A (en) * 2022-03-08 2022-04-12 北京蚂蚁云金融信息服务有限公司 Method and device for online resource allocation
CN114884900A (en) * 2022-06-09 2022-08-09 中国联合网络通信集团有限公司 Resource allocation method, device, equipment and storage medium
CN115086331A (en) * 2022-07-20 2022-09-20 阿里巴巴(中国)有限公司 Cloud equipment scheduling method, device and system, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075944A (en) * 2010-12-07 2011-05-25 南京邮电大学 Multi-Agent cooperation-based available resource management system and method in cognitive network
CN102724231A (en) * 2011-03-31 2012-10-10 腾讯科技(深圳)有限公司 Resource downloading method, server and user terminals
CN103595756A (en) * 2012-08-17 2014-02-19 三星电子株式会社 Method and apparatus for generating and utilizing a cloud service-based content shortcut object
US20160224554A1 (en) * 2013-09-12 2016-08-04 Beijing Zhigu Rui Tuo Tech Co., Ltd Search methods, servers, and systems
CN105897616A (en) * 2016-05-17 2016-08-24 腾讯科技(深圳)有限公司 Resource allocation method and server
CN106097044A (en) * 2016-06-01 2016-11-09 腾讯科技(深圳)有限公司 A kind of data recommendation processing method and device
CN108170529A (en) * 2017-12-26 2018-06-15 北京工业大学 A kind of cloud data center load predicting method based on shot and long term memory network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075944A (en) * 2010-12-07 2011-05-25 南京邮电大学 Multi-Agent cooperation-based available resource management system and method in cognitive network
CN102724231A (en) * 2011-03-31 2012-10-10 腾讯科技(深圳)有限公司 Resource downloading method, server and user terminals
CN103595756A (en) * 2012-08-17 2014-02-19 三星电子株式会社 Method and apparatus for generating and utilizing a cloud service-based content shortcut object
US20160224554A1 (en) * 2013-09-12 2016-08-04 Beijing Zhigu Rui Tuo Tech Co., Ltd Search methods, servers, and systems
CN105897616A (en) * 2016-05-17 2016-08-24 腾讯科技(深圳)有限公司 Resource allocation method and server
CN106097044A (en) * 2016-06-01 2016-11-09 腾讯科技(深圳)有限公司 A kind of data recommendation processing method and device
CN108170529A (en) * 2017-12-26 2018-06-15 北京工业大学 A kind of cloud data center load predicting method based on shot and long term memory network

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111724067A (en) * 2020-06-22 2020-09-29 中国银行股份有限公司 Resource scheduling method and device
CN111866111A (en) * 2020-07-13 2020-10-30 郑州轻工业大学 Edge deployment method for sensing user demand growth trend
CN111866111B (en) * 2020-07-13 2021-03-30 郑州轻工业大学 Edge deployment method for sensing user demand growth trend
CN112130989A (en) * 2020-08-18 2020-12-25 贝壳技术有限公司 Two-dimensional code application method and device
CN111985726B (en) * 2020-08-31 2023-04-18 重庆紫光华山智安科技有限公司 Resource quantity prediction method and device, electronic equipment and storage medium
CN111985726A (en) * 2020-08-31 2020-11-24 重庆紫光华山智安科技有限公司 Resource quantity prediction method and device, electronic equipment and storage medium
CN113220452A (en) * 2021-05-10 2021-08-06 北京百度网讯科技有限公司 Resource allocation method, model training method, device and electronic equipment
CN113315945A (en) * 2021-07-29 2021-08-27 江苏怀业信息技术股份有限公司 Terminal access method of distributed video conference system
CN113315945B (en) * 2021-07-29 2021-11-09 江苏怀业信息技术股份有限公司 Terminal access method of distributed video conference system
CN113378498A (en) * 2021-08-12 2021-09-10 新华三半导体技术有限公司 Task allocation method and device
CN114327915A (en) * 2022-03-08 2022-04-12 北京蚂蚁云金融信息服务有限公司 Method and device for online resource allocation
CN114884900A (en) * 2022-06-09 2022-08-09 中国联合网络通信集团有限公司 Resource allocation method, device, equipment and storage medium
CN114884900B (en) * 2022-06-09 2023-10-31 中国联合网络通信集团有限公司 Resource allocation method, device, equipment and storage medium
CN115086331A (en) * 2022-07-20 2022-09-20 阿里巴巴(中国)有限公司 Cloud equipment scheduling method, device and system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111224806A (en) Resource allocation method and server
CN109684358B (en) Data query method and device
US11146502B2 (en) Method and apparatus for allocating resource
CN112445857A (en) Resource quota management method and device based on database
CN104102693A (en) Object processing method and device
CN110008050B (en) Method and device for processing information
CN108924203B (en) Data copy self-adaptive distribution method, distributed computing system and related equipment
CN109428926B (en) Method and device for scheduling task nodes
CN107659509B (en) Application flow use control method and device, readable storage medium and terminal equipment
CN104202305A (en) Transcoding processing method and device, server
CN112600761A (en) Resource allocation method, device and storage medium
CN111371848A (en) Request processing method, device, equipment and storage medium
CN116069493A (en) Data processing method, device, equipment and readable storage medium
CN111190719A (en) Method, device, medium and electronic equipment for optimizing cluster resource allocation
CN114253698A (en) Resource scheduling method, system, electronic device and storage medium
CN113779412B (en) Message touch method, node and system based on blockchain network
CN113268329B (en) Request scheduling method, device and storage medium
CN115426361A (en) Distributed client packaging method and device, main server and storage medium
CN114374657A (en) Data processing method and device
CN114422565A (en) Network connection management method based on connection pool and related device
CN111694670A (en) Resource allocation method, device, equipment and computer readable medium
CN111092817A (en) Data transmission method and device
CN112422613B (en) Data processing method, data processing platform and computer readable storage medium
US20220164317A1 (en) Remote file access apparatus and method thereof
WO2024082770A1 (en) Video transcoding method and apparatus, and device, storage medium and video on-demand 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200602

RJ01 Rejection of invention patent application after publication