CN112156453A - Example adaptive adjustment method, apparatus, computer readable storage medium and device - Google Patents

Example adaptive adjustment method, apparatus, computer readable storage medium and device Download PDF

Info

Publication number
CN112156453A
CN112156453A CN202011134138.2A CN202011134138A CN112156453A CN 112156453 A CN112156453 A CN 112156453A CN 202011134138 A CN202011134138 A CN 202011134138A CN 112156453 A CN112156453 A CN 112156453A
Authority
CN
China
Prior art keywords
instance
class
instances
occupation information
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011134138.2A
Other languages
Chinese (zh)
Other versions
CN112156453B (en
Inventor
许敏华
邵梦超
杨锦隆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011134138.2A priority Critical patent/CN112156453B/en
Publication of CN112156453A publication Critical patent/CN112156453A/en
Application granted granted Critical
Publication of CN112156453B publication Critical patent/CN112156453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides an example self-adaptive adjusting method, an example self-adaptive adjusting device, a computer readable storage medium and an electronic device; relates to the technical field of computers; the method comprises the following steps: after a specific object running on an instance is released, determining first class instance occupation information corresponding to a current time window and second class instance occupation information corresponding to a historical time window; the first-class instance occupation information and the second-class instance occupation information comprise instance idle quantity and instance starting quantity; determining an instance adjustment scheme meeting the future time window according to the first class instance occupation information and the second class instance occupation information; wherein the instance adjustment scheme comprises a supplemental number of instances or a reduced number of instances; and adjusting the starting number of the instances in the instance occupation information according to the instance adjusting scheme. Therefore, by implementing the technical scheme of the application, the utilization rate of the instance can be improved through reasonable resource scheduling.

Description

Example adaptive adjustment method, apparatus, computer readable storage medium and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an instance adaptive adjustment method, an instance adaptive adjustment device, a computer-readable storage medium, and an electronic device.
Background
When a user plays an online game, the user usually needs to click to enter first to trigger the platform to assign a corresponding instance to the user. However, the predetermined number of instances are generally pre-opened, and when the number of users who click in is large and the number of instances is insufficient, a queuing situation occurs, and the users need to wait for a long time to wait for the idle allocable instances; when the number of users who click in is small and the number of instances is large, more instances are in an idle state. This easily causes a problem of low utilization of the instances.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The application aims to provide an instance adaptive adjusting method, an instance adaptive adjusting device, a computer readable storage medium and an electronic device, which can solve the problem of low instance utilization rate and improve the instance utilization rate.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of the present application, there is provided an example adaptive adjustment method, including:
after a specific object running on an instance is released, determining first class instance occupation information corresponding to a current time window and second class instance occupation information corresponding to a historical time window; the first-class instance occupation information and the second-class instance occupation information comprise instance idle quantity and instance starting quantity;
determining an instance adjustment scheme meeting the future time window according to the first class instance occupation information and the second class instance occupation information; wherein the instance adjustment scheme comprises a supplemental number of instances or a reduced number of instances;
and adjusting the starting number of the instances in the instance occupation information according to the instance adjusting scheme.
According to an aspect of the present application, there is provided an example adaptive adjustment apparatus, including an occupancy information determination unit, an adjustment scheme determination unit, and an example number adjustment unit, wherein:
the occupation information determining unit is used for determining the occupation information of the first class of examples corresponding to the current time window and the occupation information of the second class of examples corresponding to the historical time window after the specific object running on the examples is released; the first-class instance occupation information and the second-class instance occupation information comprise instance idle quantity and instance starting quantity;
the adjustment scheme determining unit is used for determining an example adjustment scheme meeting the future time window according to the first class of example occupation information and the second class of example occupation information; wherein the instance adjustment scheme comprises a supplemental number of instances or a reduced number of instances;
and the example quantity adjusting unit is used for adjusting the example starting quantity in the example occupation information of one type according to the example adjusting scheme.
In an exemplary embodiment of the present application, the example adjustment scheme includes a reduced number of examples, and the adjustment scheme determination unit determines the example adjustment scheme that satisfies the future time window according to the first class of example occupancy information and the second class of example occupancy information, including:
calculating the occupancy rate of the first class of examples according to the occupancy information of the first class of examples;
and if the occupancy rate of the first class of examples is smaller than the preset occupancy rate, calculating the reduction number of the examples according to the occupancy information of the first class of examples and the occupancy information of the second class of examples.
In an exemplary embodiment of the application, the instance adjustment scheme comprises an instance augmentation number, and the adjustment scheme determination unit determines the instance adjustment scheme that satisfies the future time window based on the class one instance occupancy information and the class two instance occupancy information, comprising:
calculating a first reference augmentation quantity according to the second type of instance occupation information and the first type of instance occupation information;
predicting the number of newly added users corresponding to a future time window according to the number distribution of the users corresponding to the historical time window;
calculating a second reference supplement quantity according to the number of the newly added users, the first reference supplement quantity, the idle quantity of the instances in the first class of instance occupation information and the number of queuing people corresponding to the specific object;
the number of instance augmentations is determined from the second number of reference augmentations, the number of instance usages in the class of instance occupancy information, and the number of instance idleness in the class of instance occupancy information.
In an exemplary embodiment of the present application, the adjustment scheme determining unit determines the number of instance augmentations from the second reference augmentations number, the number of instance usages in the instance occupancy information of the class, and the number of instance idles in the instance occupancy information of the class, including:
calculating the sum of the second reference supplement number, the use number of the examples in the first class of example occupation information and the idle number of the examples in the first class of example occupation information to obtain a first reference value;
determining a second reference augmentation quantity as an instance augmentation quantity if the first reference value is less than or equal to the quantity threshold value;
if the first reference value is larger than the quantity threshold value, calculating the sum of the example using quantity in the first class of example occupation information and the example idle quantity in the first class of example occupation information to obtain a second reference value;
calculating a quantity threshold value minus a second reference value to obtain a third reference value;
the third reference value is determined as the example augmentation number.
In an exemplary embodiment of the present application, after the specific object is released, the apparatus further includes a node testing unit, a node selecting unit, and an instance selecting unit, wherein:
the node testing unit is used for executing a testing task when receiving a user request so as to obtain a testing result corresponding to each node; any node in each node corresponds to a plurality of servers, any server in the plurality of servers corresponds to a plurality of instances, and the test result at least comprises network delay, network bandwidth and network packet loss rate;
the node selection unit is used for selecting a target node meeting preset conditions from all nodes according to a test result;
and the example selecting unit is used for selecting a target example for running the specific object from the target node so that the target example responds to the user request.
In an exemplary embodiment of the present application, the instance selecting unit selects a target instance for running a specific object from the target node, including:
selecting a target server from a plurality of servers corresponding to the target node according to the duty cycle;
and selecting a target instance for running the specific object from a plurality of instances corresponding to the target server.
In an exemplary embodiment of the present application, the adjusting unit of the number of instances adjusts the number of instances started in the class of instance occupancy information according to an instance adjustment scheme, including:
if the example adjusting scheme comprises the reduced number of the examples, closing the examples corresponding to the reduced number of the examples in the starting number of the examples corresponding to the occupation information of the class of the examples;
if the instance adjustment scheme comprises the instance supplement quantity, the instance corresponding to the instance supplement quantity is started on the basis of the instance starting quantity corresponding to the class of instance occupation information.
According to an aspect of the present application, there is provided an electronic device including: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to perform the method of any of the above via execution of the executable instructions.
According to an aspect of the application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the above.
According to an aspect of the application, a computer program product or computer program is provided, 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 described above.
The exemplary embodiments of the present application may have some or all of the following advantages:
in the example adaptive adjustment method provided by an example embodiment of the present application, after a specific object running on an example is published, first-class example occupation information corresponding to a current time window and second-class example occupation information corresponding to a historical time window may be determined; the first-class instance occupation information and the second-class instance occupation information comprise instance idle quantity and instance starting quantity; determining an instance adjustment scheme meeting the future time window according to the first class instance occupation information and the second class instance occupation information; wherein the instance adjustment scheme comprises a supplemental number of instances or a reduced number of instances; and adjusting the starting number of the instances in the instance occupation information according to the instance adjusting scheme. According to the above scheme description, on one hand, the instance adjustment scheme can be determined according to the instance occupation conditions of the historical time window and the current time window, so that the instance starting number is adjusted in time before the future time window comes to correspond to the instance use condition of the future time window, and compared with the prior art in which a fixed number of instances are started for a specific object, the utilization rate of the instances can be improved. On the other hand, the method and the device can avoid the queuing situation to a certain extent, and when the specific object is the cloud game, the user can quickly enter the cloud game without waiting based on the preset adjusted number of instances, so that the influence of the queuing situation on the issuing effect of the specific object can be avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic diagram illustrating an exemplary system architecture to which an example adaptive adjustment method and an example adaptive adjustment apparatus according to an embodiment of the present application may be applied;
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing an electronic device of an embodiment of the present application;
FIG. 3 is a diagram schematically illustrating the functional architecture of a cloud game launch scenario of the prior art;
FIG. 4 is a functional architecture diagram schematically illustrating another prior art cloud game launch scheme;
FIG. 5 schematically illustrates a flow diagram of an example adaptive adjustment method according to one embodiment of the present application;
FIG. 6 schematically illustrates a graph of historical user online profiles, according to one embodiment of the present application;
FIG. 7 schematically illustrates a graph of historical user online profiles, according to one embodiment of the present application;
FIG. 8 schematically illustrates a structural schematic of an example distribution in accordance with an embodiment of the present application;
FIG. 9 schematically illustrates a flow diagram of an example adaptive adjustment method according to an embodiment of the present application;
fig. 10 schematically shows a block diagram of an example adaptive adjustment apparatus in an embodiment according to the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present application.
Furthermore, the drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating a system architecture of an exemplary application environment to which an example adaptive adjustment method and an example adaptive adjustment apparatus according to an embodiment of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. In addition, the server cluster 105 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 a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, and the like. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
It should be noted that the cloud server described above may provide basic cloud computing services by using cloud technology. Cloud technology refers to a hosting technology for unifying serial resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
The example adaptive adjustment method provided by the embodiment of the present application is generally executed by the server 105, and accordingly, the example adaptive adjustment apparatus is generally disposed in the server 105. For example, in an exemplary embodiment, the server 105 may determine, after a specific object running on an instance is published, one type of instance occupancy information corresponding to a current time window and two types of instance occupancy information corresponding to a historical time window; the first-class instance occupation information and the second-class instance occupation information comprise instance idle quantity and instance starting quantity; determining an instance adjustment scheme meeting the future time window according to the first class instance occupation information and the second class instance occupation information; wherein the instance adjustment scheme comprises a supplemental number of instances or a reduced number of instances; and adjusting the starting number of the instances in the instance occupation information according to the instance adjusting scheme. In addition, the terminal device 101, 102, or 103 is configured to send a user request to the server 105, and when the server 105 receives the user request, the server 105 may execute a test task to obtain a test result corresponding to each node; any node in each node corresponds to a plurality of servers, any server in the plurality of servers corresponds to a plurality of instances, and the test result at least comprises network delay, network bandwidth and network packet loss rate; selecting a target node meeting preset conditions from all nodes according to the test result; and selecting a target instance for running the specific object from the target node so that the target instance responds to the user request.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data necessary for system operation are also stored. The CPU 201, ROM 202, and RAM 203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 210 as necessary, so that a computer program read out therefrom is installed into the storage section 208 as necessary.
In particular, according to embodiments of the present application, the processes described below with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU)201, performs various functions defined in the methods and apparatus of the present application.
Firstly, a cloud game operation scheme in the prior art is shown by fig. 3 and 4, specifically:
referring to fig. 3, fig. 3 schematically illustrates a functional architecture diagram of a cloud game booting scheme in the prior art. As shown in fig. 3, the functional structure diagram includes: a virtual machine scheme and an ARM array server scheme; the virtual machine scheme comprises a step S310 and a step S330, and the ARM array server scheme comprises a step S320 and a step S330. Step S310: an instance is created. Step S320: a specific object is installed. Step S330: the game is started.
In the virtual machine scheme, when a user request for starting a specific object is received, an instance (e.g., a virtual machine) may be created first and then the specific object is started, but creating the instance usually has a problem of long time consumption, and further, a problem of delaying the user from entering the specific object may be caused, which affects the user experience. In particular, if the virtual machine image is not stored before the instance is created, the image also needs to be downloaded from the image server first, which easily causes a problem of consuming longer time. The mirror image is a special file system, and includes system program related data and specific object related data.
In the ARM array server scheme, when a user request for starting a specific object is received, the specific object may be installed into a development board, thereby starting a game. However, the step of installing a specific object usually has a long time-consuming problem, and also easily affects the user experience.
It should be noted that the ARM array server is used for integrating android development boards into one server, where one development board includes one android system, and one development board includes a complete GPU, a memory, a CPU, and a storage system. The virtual machine is used for running a virtual system, the virtual system is a complete computer system which has complete hardware system functions and runs in a completely isolated environment through software simulation, and optionally, the virtual system can also comprise a system running in a container.
In order to solve the problems of the virtual machine scheme and the ARM array server scheme, the following improvement schemes exist:
referring to fig. 4, fig. 4 schematically shows a functional architecture diagram of another cloud game launching scheme in the prior art. As shown in fig. 4, a plurality of instances (e.g., virtual machines/android development boards) may be launched in advance before receiving a user request, and a pre-launch object 1 (e.g., cloud game 1), a pre-launch object 2 (e.g., cloud game 2), or a pre-launch object 3 (e.g., cloud game 3) may be installed in each instance. When a user request is detected, step S400 of allocating instances may be performed, that is, allocating free instances for which specific objects are installed according to the specific objects in the user request; the specific object may be a pre-boot object 1, a pre-boot object 2, or a pre-boot object 3, which is not limited in the embodiment of the present application. However, such a problem is likely to occur that the utilization rate of the device is low, and if the number of users requesting entry into the pre-boot object 1 is large and the number of users requesting entry into the pre-boot object 2 is small, the number of queued users corresponding to the pre-boot object 1 is large and the number of idle instances corresponding to the pre-boot object 2 is large.
For example, if the example is an android development board, and there are currently 10 android development boards, 5 cloud games 1, 3 cloud games 2, and 2 cloud games 3 are installed, respectively. When a user request is used for starting the cloud game 2, 1 idle android development board is detected to exist in 3 android development boards provided with the cloud game 2, and the 1 idle android development board can be directly distributed to the user. However, if it is detected that there is no free android development board in the 3 android development boards with the cloud game 2 installed, the user request needs to be added into the waiting queue, and the user cannot enter the cloud game 2 (i.e., when the free android development board appears) until other users exit the cloud game 2. Therefore, the problem of long waiting time is easy to exist, and the use experience of the user is easy to influence.
Based on the above problem, the present exemplary embodiment provides an example adaptive adjustment method. This example adaptive adjustment method may be applied to the server 105 described above. Referring to fig. 5, the example adaptive adjustment method may include the following steps S510 to S530:
step S510: after a specific object running on an instance is released, determining first class instance occupation information corresponding to a current time window and second class instance occupation information corresponding to a historical time window; the first-class instance occupation information and the second-class instance occupation information both comprise instance idle number and instance starting number.
Step S520: determining an instance adjustment scheme meeting the future time window according to the first class instance occupation information and the second class instance occupation information; wherein the instance adjustment scheme includes a supplemental number of instances or a reduced number of instances.
Step S530: and adjusting the starting number of the instances in the instance occupation information according to the instance adjusting scheme.
By implementing the method shown in fig. 5, an instance adjustment scheme can be determined according to instance occupation conditions of the historical time window and the current time window, so that the number of instances started can be adjusted in time before the future time window comes to cope with the use condition of the instances of the future time window, and compared with the prior art in which a fixed number of instances are started for a specific object, the utilization rate of the instances can be improved. In addition, the occurrence of a queuing condition can be avoided to a certain extent, and when the specific object is the cloud game, the user can quickly enter the cloud game without waiting based on the number of the pre-adjusted instances, so that the influence of the queuing condition on the publishing effect of the specific object can be avoided.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S510, after the specific object running on the instance is published, determining first class instance occupation information corresponding to the current time window and second class instance occupation information corresponding to the historical time window; the first-class instance occupation information and the second-class instance occupation information both comprise instance idle number and instance starting number.
It should be noted that the specific object may be any type of application, such as a game application, a music application, or a shopping application. Examples are virtual machines or android development boards in ARM array servers. One type of instance occupancy information is used to characterize the instance usage of the current time window, and the second type of instance occupancy information is used to characterize the instance usage in the historical time window, which may be a time point or a time period (e.g., within a week). The first class of instance occupancy information and the second class of instance occupancy information may also include a number of instances used. The instance idle number is used to characterize the number of unused instances contained in the instance start number, which is the instance idle number + the instance occupied number.
As an alternative embodiment, the instance adjustment scheme includes a reduced number of instances, and the determining of the instance adjustment scheme that satisfies the future time window based on the first type of instance occupancy information and the second type of instance occupancy information includes: calculating the occupancy rate of the first class of examples according to the occupancy information of the first class of examples; if the occupancy rate of the first type of instance is less than the preset occupancy rate (for example, 30%), the reduced number of instances is calculated according to the occupancy information of the first type of instance and the occupancy information of the second type of instance.
Specifically, calculating the occupancy rate of the first class of instances according to the occupancy information of the first class of instances comprises: substituting the instance idle number and the instance starting number included in the instance occupation information of one type into an expression: and one-class instance occupancy rate is (number of instances started-number of instances idle)/number of instances started, so as to obtain one-class instance occupancy rate. Similarly, the class ii instance occupancy is (number of instances started-number of instances idle)/number of instances started.
Further, specifically, calculating the reduced number of instances according to the first class of instance occupancy information and the second class of instance occupancy information includes: determining first class instance occupancy rates corresponding to the first class instance occupancy information and second class instance occupancy rates corresponding to the second class instance occupancy information; if the occupancy of one type of instance (e.g., 20%) is less than the occupancy of the second type of instance (e.g., 30%), then a reference reduction amount (e.g., 50) is calculated based on the occupancy reduction ratio (e.g., 10%); further, calculating the instance starting number minus the reference reduction number in the class of instance occupation information to obtain a target value, if the target value is smaller than a minimum threshold (e.g., 20), adjusting the reference reduction number according to the minimum threshold until the value is not smaller than the minimum threshold, and determining the adjusted reference reduction number as the instance reduction number; if the target value is greater than or equal to the minimum threshold value, the reference reduction amount is determined as the instance reduction amount.
Therefore, by implementing the optional embodiment, part of the instances can be closed under the condition that the occupancy rate of the current time window instance is not high, and resource waste is avoided.
As an alternative embodiment, the instance adjustment scheme includes an instance augmentation number, and the determining of the instance adjustment scheme to satisfy the future time window based on the one type of instance occupancy information and the two type of instance occupancy information includes: calculating a first reference augmentation quantity according to the second type of instance occupation information and the first type of instance occupation information; predicting the number of newly added users corresponding to a future time window according to the number distribution of the users corresponding to the historical time window; calculating a second reference supplement quantity according to the number of the newly added users, the first reference supplement quantity, the idle quantity of the instances in the first class of instance occupation information and the number of queuing people corresponding to the specific object; the number of instance augmentations is determined from the second number of reference augmentations, the number of instance usages in the class of instance occupancy information, and the number of instance idleness in the class of instance occupancy information.
The number of the queuing people corresponding to the specific object is used for indicating the number of the missing examples, and the number of the supplemented examples is more than or equal to the number of the queuing people corresponding to the specific object. The instance idle number is used for representing the number of instances which are idle and not allocated in the instance opening number, and the instance use number is used for representing the number of instances which are allocated to be in a used state in the instance opening number.
Specifically, calculating a first reference augmentation number from the class two instance occupancy information and the class one instance occupancy information includes: calculating a historical object occupation ratio according to the two types of instance occupation information corresponding to the historical time window, wherein the historical object occupation ratio is in a preset time period (such as a week) [ the total number of triggering access times of a specific object/the total number of triggering access times of all objects ]; further, a first reference supplement number is calculated according to the used number of the instances in the instance occupation information of the class and the determined number of all the instances, the first reference supplement number is calculated according to the used number of the instances, the historical object occupation ratio and the used number of the instances, and the first reference supplement number is (the used number of the instances-the used number of the instances) the supplement coefficient is the historical object occupation ratio; the augmentation factor may be a constant (e.g., 0.5), the number of all instances is the number of instances that can be started according to the number of servers (CPU, memory, and GPU resources), and the number of instances that have been used is the number of instances that are being used by all objects.
Further, specifically, predicting the number of newly added users corresponding to the future time window according to the number distribution of users corresponding to the historical time window includes: acquiring a historical user online distribution curve chart to determine user number distribution corresponding to a historical time window; the user number distribution is input into the prediction model so that the prediction model predicts the number of newly added users corresponding to a future time window, wherein the future time window is at the same time (for example, 1 month, 1 day 00:00 and 1 month, 2 days 00:00) in different periods with the historical time window. The prediction Model may be a Long Short-Term Memory network (LSTM), a Moving Average (MA) Model, or an Autoregressive Moving Average (ARIMA) Model.
Referring to fig. 6, fig. 6 schematically shows a graph of historical user online profiles according to an embodiment of the present application. As shown in fig. 6, the vertical axis of the historical user online profile graph is used to represent the number of users online, the horizontal axis is used to represent the time to date, and the historical user online profile graph may be used to represent the relationship between time and the number of users online.
Referring to fig. 7 on the basis of fig. 6, fig. 7 schematically shows a graph of historical user online distribution according to an embodiment of the present application. Compared with fig. 6, fig. 7 has higher precision, the horizontal axis in fig. 7 is used for representing the time accurate to the moment, the vertical axis in fig. 7 is used for representing the online number of users, and the distribution of the number of users possibly reached by the current time window can be predicted through the distribution of the number of users in the historical time window, so that the number of newly added users can be determined according to the distribution of the number of users.
Further, specifically, calculating a second reference supplement number according to the number of the newly added users, the first reference supplement number, the number of instances in the class of instance occupancy information, and the number of queued users corresponding to the specific object, includes: according to the expression: the second reference supplement number, namely a1 new user number + a2 first reference supplement number + a3 example idle number in example occupation information + a4 queuing number corresponding to the specific object, and the second reference supplement number is calculated; wherein a1, a2, a3 and a4 are weight coefficients.
It can be seen that, by implementing this alternative embodiment, the number of instances that need to be newly opened can be predicted according to the historical data and the current data to meet the user requirement of the future time window, that is, by opening the supplementary instances in advance, the situation that the future time window is queued can be avoided, so that the newly joined user can quickly enter a specific object (e.g., a cloud game).
Further, determining the number of instance augmentations from the second number of reference augmentations, the number of instance usages in the instance occupancy information of the class and the number of instance idleness in the instance occupancy information of the class includes: calculating the sum of the second reference supplement number, the use number of the examples in the first class of example occupation information and the idle number of the examples in the first class of example occupation information to obtain a first reference value;
determining a second reference number of augmentations as the number of instance augmentations if the first reference number is less than or equal to a number threshold (e.g., 1000);
if the first reference value is larger than the quantity threshold value, calculating the sum of the example using quantity in the first class of example occupation information and the example idle quantity in the first class of example occupation information to obtain a second reference value;
calculating a quantity threshold value minus a second reference value to obtain a third reference value;
the third reference value is determined as the example augmentation number.
Specifically, the number threshold may be a maximum threshold, i.e., a maximum number of instance openings. Wherein the number of instances augmentations may be related to, in addition to the second reference augmentations, the number of instances used in the instance occupancy information of the class, and the number of instances free in the instance occupancy information of the class, an instance utilization rate, a queue average duration, a queue rate, a pre-pull efficiency ratio, a pre-pull correction efficiency ratio. Specifically, the instance utilization rate is the instance usage number/the instance total number, the average queuing time is the queuing time/the total number of queuing people, the queuing rate is the queuing number/the total number of user requests, the pre-pull efficiency ratio is (the total server occupancy time + the queuing time)/the total usage time, and the pre-pull correction efficiency ratio is (the total server occupancy time + the queuing time + the total time corresponding to the historical time window instance supplement number)/the total usage time. Wherein, the ideal value corresponding to the pre-pull-up correction efficiency ratio is 1, and the pre-pull-up efficiency ratio is the same.
Specifically, the sum of the second reference supplement number, the number of instances used in the first class of instance occupancy information, and the number of instances free in the first class of instance occupancy information is calculated to obtain the first reference value, which can be expressed by the following expression: the second reference supplementary number t' + the number of used instances p2 in the instance occupancy information of the type and the number of free instances e2 in the instance occupancy information of the type are the first reference value.
Further, the first reference value may be applied to the following expression:
Figure BDA0002736111350000141
the number t of the instance augmentations can be determined through the expression; wherein m ismaxFor the quantity threshold, the second reference value is p2+ e2, and the third reference value is mmax-(p2+e2)。
Therefore, by implementing the alternative embodiment, the number of the instances needed in the future time window can be determined through the calculation of the number of the instances, so that the corresponding number of the instances can be increased before the future time window arrives, the queuing condition of the future time window is avoided, and the use experience of the user is improved.
As an alternative embodiment, after the specific object is published, the method further comprises: when a user request is received, executing a test task to obtain a test result corresponding to each node; any node in each node corresponds to a plurality of servers, any server in the plurality of servers corresponds to a plurality of instances, and the test result at least comprises network delay, network bandwidth and network packet loss rate; selecting a target node meeting preset conditions from all nodes according to the test result; and selecting a target instance for running the specific object from the target node so that the target instance responds to the user request.
Specifically, the test task is used to obtain network delay, network bandwidth, and network packet loss rate corresponding to each node. The preset condition may be used to define the selection condition of the target node, for example, the preset condition may include: network delay is lowest, network bandwidth is lowest, and/or network packet loss rate is lowest. One or more target nodes meeting the preset condition may be provided, and the embodiment of the present application is not limited.
Referring to fig. 8, fig. 8 schematically illustrates an example distribution architecture in accordance with an embodiment of the present application. As shown in fig. 8, the present application may be applied to the field of cloud games, and the specific object may be a cloud game, where the structural diagram includes: a client 810, a cloud game management platform 820, a node a830 and a node B840; the node a830 includes a server a 1831, a server a 2832 and a server a 3833, the node B840 includes a server B1841, a server B2842 and a server B3843, each of which may include n instances, that is, instance 1, instance 2, … … and instance n, where n is a positive integer greater than or equal to 3. The cloud game management platform 820 may be configured to generate a game image according to a game package and accept a user operation for configuring a game pre-pull, where the user operation is used to configure an instance opening number and a length of a time window. Node a830 and node B840 may be nodes in different regions.
Specifically, the client 810 may send a user request for requesting to allocate an instance to enter a specific object to the cloud game management platform 820, and then the cloud game management platform 820 may execute a test task to obtain test results corresponding to the node a830 and the node B840; furthermore, the test result may be sent to the background, so that the background selects a target node satisfying a preset condition from the node a830 and the node B840 according to the test result; further, the target server may be selected from server a 1831, server a 2832, and server a 3833, and the target instance in the idle state may be selected from the target server in response to the user request. It should be noted that, if there is no target instance in the idle state in server a 1831, server a 2832, and server a 3833, the user request is added to the waiting queue until there is a target instance in the idle state.
Therefore, by implementing the optional embodiment, the idle instances can be timely allocated to the users according to the user requests, so that the users can timely enter the cloud game, the queuing condition is avoided, and the use experience of the users is improved.
As an alternative embodiment, the selecting a target instance for running a specific object from the target node includes: selecting a target server from a plurality of servers corresponding to the target node according to the duty cycle; and selecting a target instance for running the specific object from a plurality of instances corresponding to the target server.
Specifically, a higher duty cycle indicates that the server is busy, and a lower duty cycle indicates that the server is idle, and the target server may be the server with the lowest duty cycle, which is an instance in an idle state in the target server.
Therefore, the implementation of the alternative embodiment can improve the utilization rate of the equipment through reasonable distribution of the examples.
In step S520, determining an instance adjustment scheme meeting a future time window according to the first class instance occupancy information and the second class instance occupancy information; wherein the instance adjustment scheme includes a supplemental number of instances or a reduced number of instances.
Specifically, the future time window may be a time point (e.g., 1 month 1 day 00:00 in 2020) or a time period (e.g., within one week), the time period being composed of a plurality of time points. The lengths (e.g., 10s) of the future time window, the current time window, and the historical time window may be the same or different.
For example, the type of instance occupancy information corresponding to all objects in the current time window may be as follows, wherein the type of instance occupancy information corresponding to a specific object in the current time window is included in the table.
Object Instance occupancy Number of instances opened
1 10% 10
2 20% 20
3 20% 20
4 30% 30
5 15% 15
6 (specific object) 5% 5
And determining an instance adjustment scheme which is satisfied with the specific object in the future time window according to the first class instance occupation information and the second class instance occupation information corresponding to the specific object, namely, increasing the number of instance openings from 5 to 10. According to the example adjusting scheme, the number of the opened examples of the specific object corresponding to the current time window is adjusted, queuing in the future time window can be avoided, and a user can directly enter the specific object without waiting (such as a cloud game). As shown in the following table, the example adjustment schemes for object 5 and object 6 in all objects are shown, including the example adjustment scheme for object 6 (i.e., a particular object).
Object Instance occupancy Number of instances opened
1 10% 10
2 20% 20
3 20% 20
4 30% 30
5 10% 10 (decrease)
6 (specific object) 10% 10 (lifting)
In step S530, the starting number of instances in the instance occupancy information of one type is adjusted according to the instance adjustment scheme.
As an optional embodiment, adjusting the number of instances started in the class of instance occupancy information according to the instance adjustment scheme includes: if the example adjusting scheme comprises the reduced number of the examples, closing the examples corresponding to the reduced number of the examples in the starting number of the examples corresponding to the occupation information of the class of the examples; if the instance adjustment scheme comprises the instance supplement quantity, the instance corresponding to the instance supplement quantity is started on the basis of the instance starting quantity corresponding to the class of instance occupation information.
Specifically, the number of instances to be reduced and the number of instances to be supplemented may be within a predetermined range, e.g., 20 to 50.
Therefore, the implementation of the optional embodiment can adjust the number of the instances in time according to the prediction of the future situation, thereby improving the utilization rate of the instances.
Referring to fig. 9, fig. 9 schematically illustrates a flow chart of an example adaptive adjustment method according to an embodiment of the present application. As shown in fig. 9, an example adaptive adjustment method may include: step S910 to step S950, wherein:
step S910: determining first-class instance occupation information corresponding to a current time window and second-class instance occupation information corresponding to a historical time window; the first-class instance occupation information and the second-class instance occupation information both comprise instance idle number and instance starting number. If the instance adjustment scheme includes a reduced number of instances, go to step S920; if the instance adjustment scheme includes the instance augmentation number, step S930 is performed.
Step S920: calculating the occupancy rate of the first class of examples according to the occupancy information of the first class of examples; and if the occupancy rate of the first class of examples is smaller than the preset occupancy rate, calculating the reduction number of the examples according to the occupancy information of the first class of examples and the occupancy information of the second class of examples.
Step S930: calculating a first reference augmentation quantity according to the second type of instance occupation information and the first type of instance occupation information; predicting the number of newly added users corresponding to a future time window according to the number distribution of the users corresponding to the historical time window; calculating a second reference supplement quantity according to the number of the newly added users, the first reference supplement quantity, the idle quantity of the instances in the first class of instance occupation information and the number of queuing people corresponding to the specific object; the number of instance augmentations is determined from the second number of reference augmentations, the number of instance usages in the class of instance occupancy information, and the number of instance idleness in the class of instance occupancy information.
Step S940: if the example adjusting scheme comprises the reduced number of the examples, closing the examples corresponding to the reduced number of the examples in the starting number of the examples corresponding to the occupation information of the class of the examples; if the instance adjustment scheme comprises the instance supplement quantity, the instance corresponding to the instance supplement quantity is started on the basis of the instance starting quantity corresponding to the class of instance occupation information. Then, the process loops to step S910.
Step S950: when a user request is received, executing a test task to obtain a test result corresponding to each node; any node in each node corresponds to a plurality of servers, any server in the plurality of servers corresponds to a plurality of instances, and the test result at least comprises network delay, network bandwidth and network packet loss rate; selecting a target node meeting preset conditions from all nodes according to the test result; and selecting a target instance for running the specific object from the target node so that the target instance responds to the user request.
It should be noted that steps S910 to S950 correspond to the steps and embodiments shown in fig. 5, and for the specific implementation of steps S910 to S950, please refer to the steps and embodiments shown in fig. 5, which are not described herein again.
It can be seen that, by implementing the method shown in fig. 9, an instance adjustment scheme can be determined according to instance occupancy of the historical time window and the current time window, so that the number of instances started can be adjusted in time before the future time window arrives to cope with the use condition of the instances of the future time window, and compared with the prior art in which a fixed number of instances are started for a specific object, the utilization rate of the instances can be improved. In addition, the occurrence of a queuing condition can be avoided to a certain extent, and when the specific object is the cloud game, the user can quickly enter the cloud game without waiting based on the number of the pre-adjusted instances, so that the influence of the queuing condition on the publishing effect of the specific object can be avoided.
Further, in the present exemplary embodiment, an example adaptive adjustment apparatus is also provided. Referring to fig. 10, the example adaptive adjusting apparatus 1000 may include an occupancy information determining unit 1001, an adjustment scheme determining unit 1002, and an example number adjusting unit 1003, wherein:
an occupation information determining unit 1001, configured to determine, after a specific object running on an instance is published, first-class instance occupation information corresponding to a current time window and second-class instance occupation information corresponding to a historical time window; the first-class instance occupation information and the second-class instance occupation information comprise instance idle quantity and instance starting quantity;
an adjustment scheme determining unit 1002, configured to determine, according to the first-class instance occupancy information and the second-class instance occupancy information, an instance adjustment scheme that satisfies a future time window; wherein the instance adjustment scheme comprises a supplemental number of instances or a reduced number of instances;
an example number adjusting unit 1003, configured to adjust the start-up number of the examples in the class of example occupation information according to the example adjusting scheme.
It can be seen that, with the implementation of the apparatus shown in fig. 10, an instance adjustment scheme may be determined according to instance occupancy of the historical time window and the current time window, so as to adjust the number of instances started in time before the future time window arrives, so as to cope with the use status of the instances of the future time window. In addition, the occurrence of a queuing condition can be avoided to a certain extent, and when the specific object is the cloud game, the user can quickly enter the cloud game without waiting based on the number of the pre-adjusted instances, so that the influence of the queuing condition on the publishing effect of the specific object can be avoided.
In an exemplary embodiment of the present application, the example adjustment scheme includes a reduced number of examples, and the adjustment scheme determining unit 1002 determines the example adjustment scheme that satisfies the future time window according to the first class of example occupancy information and the second class of example occupancy information, including:
calculating the occupancy rate of the first class of examples according to the occupancy information of the first class of examples;
and if the occupancy rate of the first class of examples is smaller than the preset occupancy rate, calculating the reduction number of the examples according to the occupancy information of the first class of examples and the occupancy information of the second class of examples.
Therefore, by implementing the optional embodiment, part of the instances can be closed under the condition that the occupancy rate of the current time window instance is not high, and resource waste is avoided.
In an exemplary embodiment of the present application, the example adjustment scheme includes an example augmentation number, and the adjustment scheme determining unit 1002 determines the example adjustment scheme satisfying the future time window according to the one type of example occupancy information and the two type of example occupancy information, including:
calculating a first reference augmentation quantity according to the second type of instance occupation information and the first type of instance occupation information;
predicting the number of newly added users corresponding to a future time window according to the number distribution of the users corresponding to the historical time window;
calculating a second reference supplement quantity according to the number of the newly added users, the first reference supplement quantity, the idle quantity of the instances in the first class of instance occupation information and the number of queuing people corresponding to the specific object;
the number of instance augmentations is determined from the second number of reference augmentations, the number of instance usages in the class of instance occupancy information, and the number of instance idleness in the class of instance occupancy information.
It can be seen that, by implementing this alternative embodiment, the number of instances that need to be newly opened can be predicted according to the historical data and the current data to meet the user requirement of the future time window, that is, by opening the supplementary instances in advance, the situation that the future time window is queued can be avoided, so that the newly joined user can quickly enter a specific object (e.g., a cloud game).
In an exemplary embodiment of the present application, the adjusting scheme determining unit 1002 determines the instance supplementation number according to the second reference supplementation number, the instance usage number in the instance occupancy information of the class and the instance idle number in the instance occupancy information of the class, including:
calculating the sum of the second reference supplement number, the use number of the examples in the first class of example occupation information and the idle number of the examples in the first class of example occupation information to obtain a first reference value;
determining a second reference augmentation quantity as an instance augmentation quantity if the first reference value is less than or equal to the quantity threshold value;
if the first reference value is larger than the quantity threshold value, calculating the sum of the example using quantity in the first class of example occupation information and the example idle quantity in the first class of example occupation information to obtain a second reference value;
calculating a quantity threshold value minus a second reference value to obtain a third reference value;
the third reference value is determined as the example augmentation number.
Therefore, by implementing the alternative embodiment, the number of the instances needed in the future time window can be determined through the calculation of the number of the instances, so that the corresponding number of the instances can be increased before the future time window arrives, the queuing condition of the future time window is avoided, and the use experience of the user is improved.
In an exemplary embodiment of the present application, after the specific object is released, the apparatus further includes a node testing unit (not shown), a node selecting unit (not shown), and an instance selecting unit (not shown), wherein:
the node testing unit is used for executing a testing task when receiving a user request so as to obtain a testing result corresponding to each node; any node in each node corresponds to a plurality of servers, any server in the plurality of servers corresponds to a plurality of instances, and the test result at least comprises network delay, network bandwidth and network packet loss rate;
the node selection unit is used for selecting a target node meeting preset conditions from all nodes according to a test result;
and the example selecting unit is used for selecting a target example for running the specific object from the target node so that the target example responds to the user request.
Therefore, by implementing the optional embodiment, the idle instances can be timely allocated to the users according to the user requests, so that the users can timely enter the cloud game, the queuing condition is avoided, and the use experience of the users is improved.
In an exemplary embodiment of the present application, the instance selecting unit selects a target instance for running a specific object from the target node, including:
selecting a target server from a plurality of servers corresponding to the target node according to the duty cycle;
and selecting a target instance for running the specific object from a plurality of instances corresponding to the target server.
Therefore, the implementation of the alternative embodiment can improve the utilization rate of the equipment through reasonable distribution of the examples.
In an exemplary embodiment of the present application, the adjusting unit 1003 adjusts the starting number of instances in the class of instance occupancy information according to an instance adjustment scheme, including:
if the example adjusting scheme comprises the reduced number of the examples, closing the examples corresponding to the reduced number of the examples in the starting number of the examples corresponding to the occupation information of the class of the examples;
if the instance adjustment scheme comprises the instance supplement quantity, the instance corresponding to the instance supplement quantity is started on the basis of the instance starting quantity corresponding to the class of instance occupation information.
Therefore, the implementation of the optional embodiment can adjust the number of the instances in time according to the prediction of the future situation, thereby improving the utilization rate of the instances.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
For details which are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the above-mentioned example adaptive adjustment method of the present application for the details which are not disclosed in the embodiments of the apparatus of the present application.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method in the above embodiments.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. An example adaptive adjustment method, comprising:
after a specific object running on an instance is released, determining first class instance occupation information corresponding to a current time window and second class instance occupation information corresponding to a historical time window; the first class of instance occupation information and the second class of instance occupation information both comprise instance idle quantity and instance starting quantity;
determining an instance adjustment scheme meeting a future time window according to the first class of instance occupation information and the second class of instance occupation information; wherein the instance adjustment scheme comprises a supplemental number of instances or a reduced number of instances;
and adjusting the starting number of the instances in the class of instance occupation information according to the instance adjustment scheme.
2. The method of claim 1, wherein the instance adjustment scheme comprises the reduced number of instances, and wherein determining the instance adjustment scheme that satisfies the future time window based on the class one instance occupancy information and the class two instance occupancy information comprises:
calculating the occupancy rate of the first class of examples according to the occupancy information of the first class of examples;
and if the occupancy rate of the first class of examples is smaller than the preset occupancy rate, calculating the reduction number of the examples according to the occupancy information of the first class of examples and the occupancy information of the second class of examples.
3. The method of claim 1, wherein the instance adjustment scheme comprises the instance augmentation quantity, and wherein determining the instance adjustment scheme to satisfy the future time window based on the class one instance occupancy information and the class two instance occupancy information comprises:
calculating a first reference supplement quantity according to the second type of instance occupation information and the first type of instance occupation information;
predicting the number of newly added users corresponding to the future time window according to the number distribution of the users corresponding to the historical time window;
calculating a second reference supplement number according to the number of the newly added users, the first reference supplement number, the idle number of the instances in the class of instance occupation information and the number of queuing people corresponding to the specific object;
determining the instance augmentation number according to the second reference augmentation number, the instance usage number in the instance occupancy information of the class and the instance idle number in the instance occupancy information of the class.
4. The method according to claim 3, wherein determining the instance supplementation number according to the second reference supplementation number, the instance usage number in the instance occupancy information of the type and the instance idle number in the instance occupancy information of the type comprises:
calculating the sum of the second reference supplement number, the use number of the examples in the class of example occupation information and the idle number of the examples in the class of example occupation information to obtain a first reference value;
determining the second reference augmentation quantity as the instance augmentation quantity if the first reference value is less than or equal to a quantity threshold value;
if the first reference value is larger than the quantity threshold value, calculating the sum of the example using quantity in the class of example occupation information and the example idle quantity in the class of example occupation information to obtain a second reference value;
calculating the number threshold value minus the second reference value to obtain a third reference value;
determining the third reference value as the instance supplement number.
5. The method of claim 1, wherein after the particular object is published, the method further comprises:
when a user request is received, executing a test task to obtain a test result corresponding to each node; any one of the nodes corresponds to a plurality of servers, any one of the servers corresponds to a plurality of instances, and the test result at least comprises network delay, network bandwidth and network packet loss rate;
selecting target nodes meeting preset conditions from all the nodes according to the test results;
selecting a target instance from the target node for running the particular object such that the target instance responds to the user request.
6. The method of claim 5, wherein selecting the target instance from the target nodes for running the particular object comprises:
selecting a target server from a plurality of servers corresponding to the target node according to the duty cycle;
and selecting a target instance for running the specific object from a plurality of instances corresponding to the target server.
7. The method according to claim 1, wherein adjusting the number of instances started in the class of instance occupancy information according to the instance adjustment scheme comprises:
if the instance adjustment scheme comprises the reduced number of the instances, closing the instances corresponding to the reduced number of the instances in the instance starting number corresponding to the class of instance occupation information;
if the example adjustment scheme comprises the example supplement quantity, starting the example corresponding to the example supplement quantity on the basis of the example starting quantity corresponding to the class of example occupation information.
8. An example adaptive adjustment apparatus, comprising:
the occupation information determining unit is used for determining the occupation information of the first class of examples corresponding to the current time window and the occupation information of the second class of examples corresponding to the historical time window after the specific object running on the examples is released; the first class of instance occupation information and the second class of instance occupation information both comprise instance idle quantity and instance starting quantity;
an adjustment scheme determining unit, configured to determine, according to the first class of instance occupancy information and the second class of instance occupancy information, an instance adjustment scheme that satisfies a future time window; wherein the instance adjustment scheme comprises a supplemental number of instances or a reduced number of instances;
and the example quantity adjusting unit is used for adjusting the example starting quantity in the class of example occupation information according to the example adjusting scheme.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-7 via execution of the executable instructions.
CN202011134138.2A 2020-10-21 2020-10-21 Example adaptive adjustment method, apparatus, computer readable storage medium and device Active CN112156453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011134138.2A CN112156453B (en) 2020-10-21 2020-10-21 Example adaptive adjustment method, apparatus, computer readable storage medium and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011134138.2A CN112156453B (en) 2020-10-21 2020-10-21 Example adaptive adjustment method, apparatus, computer readable storage medium and device

Publications (2)

Publication Number Publication Date
CN112156453A true CN112156453A (en) 2021-01-01
CN112156453B CN112156453B (en) 2022-06-03

Family

ID=73867792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011134138.2A Active CN112156453B (en) 2020-10-21 2020-10-21 Example adaptive adjustment method, apparatus, computer readable storage medium and device

Country Status (1)

Country Link
CN (1) CN112156453B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685187A (en) * 2021-03-17 2021-04-20 北京海誉动想科技股份有限公司 Cloud game resource scheduling method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1751294A (en) * 2003-03-10 2006-03-22 国际商业机器公司 Methods and apparatus for managing computing deployment in presence of variable workload
US20120259982A1 (en) * 2011-04-11 2012-10-11 International Business Machines Corporation Dynamic resource allocation method, system, and program
CN103098027A (en) * 2010-09-21 2013-05-08 亚马逊技术有限公司 Methods and systems for dynamically managing requests for computing capacity
CN104657411A (en) * 2013-11-22 2015-05-27 国际商业机器公司 Method and system for information technology resource management
CN106528266A (en) * 2016-10-28 2017-03-22 柏域信息科技(上海)有限公司 Resource dynamic adjustment method and device in cloud computing system
CN107567696A (en) * 2015-05-01 2018-01-09 亚马逊科技公司 The automatic extension of resource instances group in computing cluster
CN109740870A (en) * 2018-12-17 2019-05-10 南京理工大学 The resource dynamic dispatching method that Web is applied under cloud computing environment
CN109771939A (en) * 2019-01-15 2019-05-21 网易(杭州)网络有限公司 Game server method of adjustment and device, storage medium, electronic equipment
CN110990138A (en) * 2019-12-04 2020-04-10 北京三快在线科技有限公司 Resource scheduling method, device, server and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1751294A (en) * 2003-03-10 2006-03-22 国际商业机器公司 Methods and apparatus for managing computing deployment in presence of variable workload
CN103098027A (en) * 2010-09-21 2013-05-08 亚马逊技术有限公司 Methods and systems for dynamically managing requests for computing capacity
US20120259982A1 (en) * 2011-04-11 2012-10-11 International Business Machines Corporation Dynamic resource allocation method, system, and program
CN104657411A (en) * 2013-11-22 2015-05-27 国际商业机器公司 Method and system for information technology resource management
CN107567696A (en) * 2015-05-01 2018-01-09 亚马逊科技公司 The automatic extension of resource instances group in computing cluster
CN106528266A (en) * 2016-10-28 2017-03-22 柏域信息科技(上海)有限公司 Resource dynamic adjustment method and device in cloud computing system
CN109740870A (en) * 2018-12-17 2019-05-10 南京理工大学 The resource dynamic dispatching method that Web is applied under cloud computing environment
CN109771939A (en) * 2019-01-15 2019-05-21 网易(杭州)网络有限公司 Game server method of adjustment and device, storage medium, electronic equipment
CN110990138A (en) * 2019-12-04 2020-04-10 北京三快在线科技有限公司 Resource scheduling method, device, server and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685187A (en) * 2021-03-17 2021-04-20 北京海誉动想科技股份有限公司 Cloud game resource scheduling method and device

Also Published As

Publication number Publication date
CN112156453B (en) 2022-06-03

Similar Documents

Publication Publication Date Title
CN110198244B (en) Heterogeneous cloud service-oriented resource configuration method and device
US7870256B2 (en) Remote desktop performance model for assigning resources
CN112165691B (en) Content delivery network scheduling method, device, server and medium
CN111400022A (en) Resource scheduling method and device and electronic equipment
CN107832143B (en) Method and device for processing physical machine resources
CN112363813A (en) Resource scheduling method and device, electronic equipment and computer readable medium
WO2017166643A1 (en) Method and device for quantifying task resources
US20170126583A1 (en) Method and electronic device for bandwidth allocation based on online media services
CN112380020A (en) Computing power resource allocation method, device, equipment and storage medium
CN113196238B (en) Service-aware server-less cloud computing system
CN108415772B (en) Container-based resource adjustment method, device and medium
CN109189563A (en) Resource regulating method, calculates equipment and storage medium at device
CN112749002A (en) Method and device for dynamically managing cluster resources
CN104994149B (en) A kind of resource provider method of facing cloud Video service
CN112156453B (en) Example adaptive adjustment method, apparatus, computer readable storage medium and device
CN109783236B (en) Method and apparatus for outputting information
CN111858040A (en) Resource scheduling method and device
CN107872405A (en) Distributed bandwidth allocation and regulation
CN110113176B (en) Information synchronization method and device for configuration server
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
US11513856B2 (en) Method, devices and computer program products for resource usage
CN114020469A (en) Edge node-based multi-task learning method, device, medium and equipment
CN110716809B (en) Method and device for scheduling cloud resources
CN116610422A (en) Task scheduling method, device and system
CN115344359A (en) Computing power resource allocation method, device, computer readable storage medium and equipment

Legal Events

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