CN109771939B - Game server adjusting method and device, storage medium and electronic equipment - Google Patents

Game server adjusting method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN109771939B
CN109771939B CN201910037349.5A CN201910037349A CN109771939B CN 109771939 B CN109771939 B CN 109771939B CN 201910037349 A CN201910037349 A CN 201910037349A CN 109771939 B CN109771939 B CN 109771939B
Authority
CN
China
Prior art keywords
game
servers
server
idle
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910037349.5A
Other languages
Chinese (zh)
Other versions
CN109771939A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910037349.5A priority Critical patent/CN109771939B/en
Publication of CN109771939A publication Critical patent/CN109771939A/en
Application granted granted Critical
Publication of CN109771939B publication Critical patent/CN109771939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure belongs to the technical field of server management, and relates to a game server adjusting method and device, a computer readable storage medium and electronic equipment. The method comprises the following steps: acquiring the total number of game processes on a plurality of game servers at intervals of preset time, wherein the total number of the game processes comprises the number of the game processes in a running state or an idle state; calculating the idle proportion of the number of the game processes in the idle state to the total number of the game processes; if the idle proportion meets a first preset condition, starting a first number of game servers in a closed state; and if the idle proportion meets a second preset condition, closing a second number of game servers in the opening state. The server automatically adjusts the operation, so that the inconvenience of service stopping and maintenance is avoided, and the risk of manual adjustment is reduced; and moreover, the server is dynamically adjusted according to the actual situation, so that the problems of resource waste or insufficient bearing caused by estimation errors are avoided, and the reliability is high.

Description

Game server adjusting method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of server management technologies, and in particular, to a game server adjusting method, a game server adjusting apparatus, a computer-readable storage medium, and an electronic device.
Background
For the room-opening game, generally, according to the rules set by the plan, the server in charge of matching performs matching calculation, and after matching is successful, the matched player is put into the corresponding room to play the game. The more people, the more server resources are needed accordingly. Generally, overseas games run on servers provided by cloud vendors, such as AWS (Amazon cloud computing Services). The AWS can provide resources such as a CPU, a memory, a disk and the like, and is applied by a user according to needs. However, according to the online number curve of the players, the number of the players in different time periods is not constant, and the online number curve is a change curve.
In the related art, in order to solve the problems, internal pressure measurement can be performed, the bearing upper limit of each service node is determined, and corresponding server resources are purchased in an AWS according to the estimated number of people. In the operation process, if the number of people is inconsistent with the estimated number of people, the server is generally maintained in a mode of stopping to adjust the size of the server resources. However, due to inaccurate prediction, the number of purchasing servers is possibly low, and the upper limit of the number of people cannot be born; or the purchase of a large number of servers causes resource waste and increases the cost. Moreover, the manual resource adjustment process is complex, has a high risk, and is contrary to the operation goal.
In view of the above, there is a need in the art to develop a new method and apparatus for adjusting a game server.
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 disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a game server adjusting method, a game server adjusting device, a computer-readable storage medium, and an electronic device, so as to overcome, at least to some extent, the problems of high risk and low reliability caused by manually adjusting server resources due to the limitations of the related art.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a game server adjusting method, the method including: acquiring the total number of game processes on a plurality of game servers at intervals of preset time; wherein the total number of game processes comprises the number of game processes in a running state or an idle state; calculating the idle proportion of the number of the game processes in the idle state to the total number of the game processes; if the idle ratio meets a first preset condition, starting a first number of game servers in a closed state; and if the idle ratio meets a second preset condition, closing a second number of game servers in the opening state.
In an exemplary embodiment of the present disclosure, the turning on the first number of game servers in the off state includes: acquiring a game server list used for recording the state information of each game server, and taking the game server in a closed state as a server to be started; and opening a first number of the servers to be opened, and updating the game server list.
In an exemplary embodiment of the present disclosure, the turning off the second number of game servers in the on state includes: acquiring a game server list used for recording the state information of each game server, and taking the game server in an open state as a server to be closed; and closing a second number of the servers to be closed, and updating the game server list.
In an exemplary embodiment of the disclosure, the shutting down the second number of the servers to be shut down includes: obtaining the usage amount of the game process on each server to be closed, and sequencing the servers to be closed according to the usage amount of the game process; and closing the second quantity of the servers to be closed according to the sequencing result.
In an exemplary embodiment of the present disclosure, the closing the second number of servers to be closed according to the sorting result includes: monitoring the running state information of each game process on a second number of servers to be closed according to the sequencing result; and when all game processes on the server to be closed are operated, closing the server to be closed.
In an exemplary embodiment of the present disclosure, the first preset condition includes that the idle ratio is smaller than a first preset ratio; the second preset condition comprises that the idle proportion is larger than a second preset proportion; wherein the first preset proportion is smaller than the second preset proportion.
In an exemplary embodiment of the present disclosure, the turning on of the first number of game servers in the off state includes: calculating to obtain the first quantity according to the idle proportion and the first preset proportion; and starting the first number of game servers in the closed state.
In an exemplary embodiment of the present disclosure, the turning off the second number of game servers in the on state includes: calculating according to the idle proportion and the second preset proportion to obtain the second quantity; and closing the second number of game servers in the opening state.
According to an aspect of the present disclosure, there is provided a game server adjusting apparatus, the apparatus including: the acquisition module is configured to acquire the total number of game processes on a plurality of game servers at intervals of preset time; wherein the total number of game processes comprises the number of game processes in a running state or an idle state; the calculating module is configured to calculate the idle proportion of the number of the game processes in the idle state to the total number of the game processes; the starting module is configured to start a first number of game servers in a closed state if the idle ratio meets a first preset condition; a closing module configured to close a second number of the game servers in the open state if the idle ratio satisfies a second preset condition.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor and a memory; wherein the memory has stored thereon computer readable instructions which, when executed by the processor, implement the game server adaptation method of any of the above exemplary embodiments.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a game server adaptation method in any of the exemplary embodiments described above.
As can be seen from the foregoing technical solutions, the game server adjusting method, the game server adjusting apparatus, the computer storage medium and the electronic device in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:
in the method and the device provided by the exemplary embodiment of the disclosure, based on the obtained idle proportion of the number of the game processes in the idle state in the total number of the game processes, the number of the game server switches or switches can be determined so as to adjust the game server. On one hand, the game server can be automatically adjusted in the running state by the adjusting mode, the telescopic process is simple, inconvenience caused by service stopping and maintenance is reduced, and risks caused by manual adjustment are reduced; on the other hand, the game server is dynamically adjusted according to the actual use condition, so that the problems of resource waste or insufficient bearing and the like caused by inaccurate estimation are avoided, and the reliability is high.
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 disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 schematically illustrates a flow chart of a game server tuning method in an exemplary embodiment of the disclosure;
FIG. 2 is a schematic flow chart illustrating the starting of a game server according to a calculation result in an exemplary embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of turning off a game server according to a calculation result in an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic flow chart illustrating the opening of a first number of game servers to be opened in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow diagram for shutting down a second number of game servers to be shut down in an exemplary embodiment of the disclosure;
fig. 6 schematically illustrates a flow chart of shutting down a server to be shut down in an exemplary embodiment of the present disclosure;
fig. 7 schematically illustrates a flowchart of closing a server to be closed according to a sorting result in an exemplary embodiment of the present disclosure;
FIG. 8 is a schematic diagram illustrating a server architecture for an open room type game in an exemplary embodiment of the present disclosure;
FIG. 9 is a schematic flow chart illustrating opening a server for capacity expansion according to an exemplary embodiment of the disclosure;
FIG. 10 is a schematic flow chart illustrating a method for shutting down a server for capacity reduction in an exemplary embodiment of the present disclosure;
Fig. 11 schematically illustrates an effect diagram of an application scenario of an exemplary embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of a game server adjustment apparatus according to an exemplary embodiment of the present disclosure;
FIG. 13 schematically illustrates an electronic device for implementing a game server adaptation method in an exemplary embodiment of the present disclosure;
fig. 14 schematically illustrates a computer-readable storage medium for implementing a game server adjustment method in an exemplary embodiment of the present disclosure.
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 disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
The terms "a," "an," "the," and "said" are used in this specification to denote the presence of one or more elements/components/parts/etc.; the terms "comprising" and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. other than the listed elements/components/etc.; the terms "first" and "second", etc. are used merely as labels, and are not limiting on the number of their objects.
Furthermore, the drawings are merely schematic illustrations of the present disclosure 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.
In order to solve the problems in the related art, the present disclosure provides a game server adjusting method. Fig. 1 shows a flow chart of a game server tuning method, which, as shown in fig. 1, at least comprises the following steps:
step S101, acquiring the total number of game processes on a plurality of game servers at intervals of preset time; wherein the total number of game processes comprises the number of game processes in a running state or an idle state.
The game server is a game place of the player, loads game contents, and provides services related to game applications, such as management of player characters and collection and analysis of user data. A game operator typically does not deploy only one game server, but builds a set of game servers to provide game services to players. A game server includes a plurality of game processes, each game process having a unique process number (PID). Therefore, the total number of the game progresses at the current moment can be obtained by counting the progress numbers of the game progresses. During the running of the game, the corresponding game processes are from the beginning to the end of the creation, and the number of the game processes in the part is the number of the game processes in the running state; if the game is not started after the game is finished, the number of the corresponding game processes is equal to the number of the game processes in the idle state. Therefore, the total number of game processes may include two parts of the number of game processes in a running state or an idle state. As the game progresses, the total number of the game processes is not constant, a preset time may be set to count the total number of the game processes on the game server, where the preset time may be 1s, 1min, or 1h, and the like.
And step S102, calculating the idle proportion of the number of the game processes in the idle state to the total number of the game processes.
After the total number of game processes and the number of game processes in an idle state are obtained in step S101, the total number of game processes and the number of game processes in an idle state are calculated in this step. For example, in this step, the number of game processes in the idle state and the total number of game processes may be directly divided, and the idle proportion of the number of game processes in the idle state in the total number of game processes is determined; or respectively giving a weight value to the game processes in the idle state and the running state, and determining the idle proportion of the number of the game processes in the idle state in the total number of the game processes according to the number of the game processes in the idle state and the division operation between the corresponding weight value and the total number of the game processes.
And step S103, if the idle ratio meets a first preset condition, starting a first number of game servers in a closed state.
After determining the idle ratio of the number of the game processes in the idle state to the total number of the game processes in step S102, this step may determine the idle ratio. If the idle ratio meets a first preset condition, starting a first number of game servers in a closed state. The first preset condition comprises that the idle ratio is smaller than a first preset ratio. The first preset proportion can be obtained according to historical statistics or determined according to the proportion of the number of players in the corresponding time period to the total number of players. Fig. 2 is a flow chart illustrating the process of turning on the game servers according to the calculation result, and as shown in fig. 2, turning on the first number of game servers in the off state includes the following two steps: in step S201, a first number is calculated according to the idle ratio and a first preset ratio. For example, the difference between the idle ratio and the first preset ratio may be calculated first, and then the total number of game servers may be multiplied by the difference to determine the first number. Of course, in some other exemplary embodiments, any other calculation formula may be used to determine the first number, and the disclosure is not limited thereto. In step S202, a first number of game servers in the OFF state are turned on. For example, if the number of game processes in the idle state accounts for 10% of the total number of game processes, and the first preset ratio is 15%, it means that the number of game processes in the idle state accounts for less than 15% of the total number of game processes, and the number of game servers is 100, and the first number of game servers that are turned on may be determined to be 5 in a manner of 100 × 15% -10%) = 5.
And step S104, if the idle ratio meets a second preset condition, closing a second number of game servers in the opening state.
After determining the idle ratio of the number of the game processes in the idle state to the total number of the game processes in step S102, this step may determine the idle ratio. And if the idle proportion meets a second preset condition, closing a second number of game servers in the opening state. The second preset condition comprises that the idle ratio is larger than the first preset ratio. The second preset proportion can be obtained according to historical statistics or determined according to the proportion of the number of the players in the corresponding time period to the total number of the players. It should be noted that the first preset ratio is smaller than the second preset ratio. Fig. 3 shows a flow chart of turning off the game servers according to the calculation result, and as shown in fig. 3, turning off the second number of game servers in the on state may include the following two steps: in step S301, a second quantity is calculated according to the idle ratio and a second preset ratio. For example, the difference between the idle ratio and the second preset ratio may be calculated first, and then the total number of game servers may be multiplied by the difference to determine the first number. Of course, in some other exemplary embodiments, any other calculation formula may be used to determine the second number, and the disclosure is not limited thereto. In step S302, a second number of game servers in the on state are turned off. For example, if the number of game processes in the idle state accounts for 32% of the total number of game processes in the idle state, and the second preset ratio is 30%, it means that the number of game processes in the idle state accounts for 32% of the total number of game processes in the idle state to be greater than the second preset ratio of 30%, and the number of game servers is 100, and it may be determined that the second number of game servers that are turned off is 2 in a manner of 100 × 32% -30% = 2.
In an exemplary embodiment of the present disclosure, based on an idle proportion of the acquired number of game processes in the idle state in the total number of game processes, the number of game server switches or shutdowns may be determined to adjust the game server. On one hand, the game server can be automatically adjusted in the running state by the adjusting mode, the telescopic process is simple, inconvenience caused by service stopping and maintenance is reduced, and risks caused by manual adjustment are reduced; on the other hand, the game server is dynamically adjusted according to the actual use condition, so that the problems of resource waste or insufficient bearing and the like caused by inaccurate estimation are avoided, and the reliability is high.
Fig. 4 is a schematic flow chart illustrating the process of starting up the first number of game servers to be started, and as shown in fig. 4, the process of starting up the first number of game servers to be started may include the following two steps:
and step S401, obtaining a game server list used for recording the state information of each game server, and taking the game server in the closed state as a server to be opened.
The game server list records information of a plurality of game servers in an on state and a plurality of standby game servers in an off state, which currently provide game services, and may include IP addresses, ports, and on/off state information of the game servers. In this step, a game server list may be obtained, and in order to open the first number of game servers, a game server in a closed state may be determined from the game server list as a server to be opened. The server to be started may be a game server which is completely or partially in a closed state. For example, when the number of game servers is 100, the number of game servers in the on state is 40, and the first number of game servers to be turned on is 5, the remaining 60 game servers in the off state may be used as servers to be turned on, and 5 game servers among the 60 servers to be turned on may be turned on.
Step S402, a first number of servers to be started are started, and a game server list is updated.
In step S401, the servers to be started are determined, and in this step, the servers to be started may be started according to the first number. Because the states of the first number of servers to be started are changed, the state information of the corresponding game server in the game server list can be updated, namely, the closing state is updated to the opening state.
Fig. 5 shows a flow chart of closing the second number of game servers to be closed, and as shown in fig. 5, closing the second number of game servers to be closed may include the following two steps:
and step S501, obtaining a game server list used for recording the state information of each game server, and taking the game server in the opening state as a server to be closed.
The game server list records information of a plurality of game servers in an on state and a plurality of standby game servers in an off state, which currently provide game services, and may include IP addresses, ports, and on/off state information of the game servers. In this step, a game server list may be obtained, and in order to close a second number of game servers, a game server in an open state may be determined from the game server list as a server to be closed. The server to be closed may be a game server which is wholly or partially in an open state. For example, when the number of game servers is 100, the number of game servers in the closed state is 60, and the first number of game servers to be closed is 2, the remaining 40 game servers in the open state may be taken as servers to be closed, and 5 game servers may be closed among the 40 servers to be closed.
And step S502, closing the second number of servers to be closed and updating the game server list.
In step S501, the servers to be closed are determined, and the step may close the servers to be closed according to the second number. Since the states of the second number of servers to be closed change, the state information of the corresponding game server in the game server list can be updated, that is, the open state is updated to the closed state. When the server to be closed is closed, there may be a case where the game progress in the game server is not finished. In order to ensure that the game service of the player is smoothly carried out and the server to be closed cannot be directly closed, the usage amount of the game process of the server to be closed can be acquired and sequenced to determine whether the closing operation can be executed. Fig. 6 shows a flowchart of the process of shutting down the servers to be shut down, and as shown in fig. 6, shutting down the second number of servers to be shut down may include the following steps: in step S601, the usage amount of the game process on each server to be closed is obtained, and the servers to be closed are sorted according to the usage amount of the game process. The usage amount of the game process is used for reflecting the usage condition of the game process, and may be the number of the game processes in the running state of the game server, the proportion of the number of the game processes in the running state to the total number of the game processes of the game server, or other forms of numerical information which can explain the usage amount of the game process of the game server. The servers to be closed can be sorted according to the acquired game process usage, and the sorting sequence can be from small to large or from large to small of the game process usage, and can also be in other forms of sorting modes. In step S602, a second number of servers to be shut down are shut down according to the sorting result. Fig. 7 shows a schematic flowchart of closing the server to be closed according to the sorting result, and as shown in fig. 7, the method may include the following two steps: in step S701, the running state information of each game process on the second number of servers to be closed is monitored according to the sorting result. And aiming at the sequencing result of the usage amount of the game process, the corresponding game servers can be closed from small to large of the usage amount of the game process until the second number of servers to be closed are closed. In the closing process, the server to be closed can be selected, and the running state information of the server can be monitored. If the game server is in the running state, the game service is indicated to be continued, and in order to ensure the game experience of the player, a waiting state can be entered. In step S702, when all game processes running on the server to be closed end, the server to be closed is closed. And monitoring and judging the running state of the server to be closed in real time, and if the server to be closed is in an idle state, namely the game service on the server to be closed is ended, executing closing operation.
In the exemplary embodiment of the present disclosure, based on the obtained game server list, for the operation of opening or closing the game server, the game server to be operated is determined, and the game server list is updated, so that not only the game server can be automatically opened or closed, but also the configuration can be automatically modified, and the expansion and contraction operations can be performed well and orderly; furthermore, the game server to be closed is subjected to state monitoring and game process usage amount sequencing, closing operation execution errors are avoided, the integrity of game experience of the player is guaranteed, and the problems of economic loss, player complaints and the like caused by mistaken closing of the game server are avoided.
The following describes the adjustment method of the game server in the embodiment of the present disclosure in detail with reference to an application scenario.
Fig. 8 is a schematic diagram showing a server architecture of an open-room game, and as shown in fig. 8, a battle management process server 81 manages all battle process servers 82 and manages information of all battle process servers 82. Therefore, the matching server 83 must apply for/release the battle progress server through the battle management progress server 81. The combat progress server 82 is a vast collection of combat progresses distributed over different AWS computing units, registered on the combat management progress server 81, requested by the matching server 83 and put into combat. The start and stop of the game process server 82 is highly relevant to the battle logic, and the cloud manufacturer can not use the self-contained expansion interface to expand and contract violently, otherwise the business is affected.
Fig. 9 is a schematic flowchart illustrating a process of starting a server to achieve capacity expansion, and as shown in fig. 9, when the combat management process server 81 is started, a capacity expansion checker is started to perform a check every 2 seconds to determine whether capacity expansion is needed. The check function may perform a series of basic precondition checks, such as whether the capacity expansion switch is turned on (by configuration setting, default is turned on), whether the capacity expansion switch is in the last capacity expansion period, whether there is a capacity expansion requirement, and the like. If at least one item is not satisfied, returning and waiting for the next time when the preset time is reached for detection; if the number of the combat processes in the idle state is less than 15%, carrying out capacity expansion, calculating the number of servers required for capacity expansion, and informing a capacity expansion interface at the bottom layer. The interface may write the number of servers to be expanded into a log, and when the daemon process deployed on the battle management process server 81 detects that the log is changed, select a standby machine from the standby machine pool of the servers to be started, call the application program interface to start the servers corresponding to the number of servers, modify the game server list, and synchronize the codes to complete expansion.
Fig. 10 is a schematic flow chart showing the server shutdown for the purpose of capacity reduction, and as shown in fig. 10, the battle management process server 81 starts up the capacity reduction checker, and checks every 2 seconds to determine whether capacity reduction is needed. The check function may perform a series of basic precondition checks, such as whether the capacity reduction switch is turned on (by configuration setting, default is turned on), whether it is in the last capacity reduction period, whether there is a capacity reduction requirement, and the like. If at least one is not satisfied, returning and waiting for the next time when the preset time is reached for detection; if the two are met, further judging the capacity reduction condition, wherein the main index is that the proportion of the number of the current fighting processes in the idle state to the total number of the fighting processes is more than 30%, carrying out capacity reduction, calculating the number of servers required by capacity reduction, continuously calculating the fighting process usage amount of the game server, preferentially closing the completely unused game servers according to the sequence of the fighting process usage amounts from large to small, then closing the game servers with the minimum fighting process usage amount in sequence, and informing the game servers needing to be closed that the fighting processes are actively closed after the last fighting is finished. After the calculation is completed, the combat progress server 82 that needs to be closed triggers the capacity reduction file before closing, and when the daemon deployed on the combat management progress server 81 detects that the log is changed, the combat progress server tries to close forcibly. Before closing, checking the closing state of the battle progress and carrying out core dump, modifying and updating a game server list, if the battle progress on the game server is finished, calling an application program interface to close the servers with the corresponding number of servers, synchronizing codes and completing the capacity reduction.
In order to better show the effect of the scalable, the history can be tracked, and fig. 11 shows an effect diagram of the game server adjusting method. As shown in fig. 11, for the game server adjustment method in this application scenario, the relationship between the number of online players and the number of game servers is displayed on the visual interface that tracks for 7 days, where the histogram is the number of servers and the graph is the number of real-time online players, it can be seen that the two are basically attached to each other, which indicates that the scaling strategy is reasonable and the expected effect is achieved. And, the visualization interface shows that the American server saves $ 5614 and the Asian server saves $ 2034 within 7 days, which achieves the effect of saving cost.
Further, in an exemplary embodiment of the present disclosure, a game server adjusting apparatus is also provided. Fig. 12 is a schematic diagram showing a configuration of a game server adjustment device, and as shown in fig. 12, a fashion output processing device 1200 for a game character may include: an obtaining module 1201, a calculating module 1202, an opening module 1203 and a closing module 1204. Wherein:
an obtaining module 1201, configured to obtain the total number of game processes on a plurality of game servers at intervals of a preset time; wherein the total number of game processes comprises the number of game processes in a running state or an idle state; a calculating module 1202, configured to calculate an idle proportion of the number of the game processes in the idle state to the total number of the game processes; an opening module 1203, configured to open a first number of game servers in a closed state if the idle ratio satisfies a first preset condition; a closing module 1204, configured to close a second number of game servers in the open state if the idle ratio satisfies a second preset condition.
The specific details of the game server adjusting device have been described in detail in the corresponding game server adjusting method, and therefore, the details are not described herein again.
It should be noted that although several modules or units of the game server adjustment apparatus 1200 are mentioned in the above detailed description, such 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 present disclosure. 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.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
An electronic device 1300 according to such an embodiment of the invention is described below with reference to fig. 13. The electronic device 1300 shown in fig. 13 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 13, the electronic device 1300 is in the form of a general purpose computing device. The components of the electronic device 1300 may include, but are not limited to: the at least one processing unit 1310, the at least one memory unit 1320, the bus 1330 connecting the various system components (including the memory unit 1320 and the processing unit 1310), the display unit 1340.
Wherein the memory unit stores program code that is executable by the processing unit 1310 to cause the processing unit 1310 to perform steps according to various exemplary embodiments of the present invention as described in the "exemplary methods" section above in this specification.
The storage 1320 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM) 1321 and/or a cache memory unit 1322, and may further include a read only memory unit (ROM) 1323.
Storage 1320 may also include a program/utility 1324 having a set (at least one) of program modules 1325, such program modules 1325 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 1330 may be any bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1300 may also communicate with one or more external devices 1500 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1300 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 1350. Also, the electronic device 1300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) through the network adapter 1360. As shown, the network adapter 1360 communicates with other modules of the electronic device 1300 via the bus 1330. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 1300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the present description, when said program product is run on the terminal device.
Referring to fig. 14, a program product 1400 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
A computer readable signal medium may include a propagated data signal with 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 readable signal medium may also be any readable medium that is not a 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 readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Other embodiments of the disclosure 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 disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (8)

1. A method for adjusting a game server, the method comprising:
acquiring the total number of game processes on a plurality of game servers at intervals of preset time; wherein the total number of game processes comprises the number of game processes in a running state or in an idle state;
calculating the idle proportion of the number of the game processes in the idle state to the total number of the game processes;
if the idle proportion meets a first preset condition, calculating to obtain a first quantity according to the idle proportion and the first preset proportion;
starting the first number of game servers in the closed state; the first preset condition comprises that the idle proportion is smaller than a first preset proportion;
If the idle proportion meets a second preset condition, calculating according to the idle proportion and a second preset proportion to obtain a second quantity;
closing the second number of game servers in the opening state, wherein the second preset condition comprises that the idle ratio is greater than a second preset ratio; wherein the first preset proportion is smaller than the second preset proportion.
2. The method of claim 1, wherein turning on a first number of game servers in an off state comprises:
acquiring a game server list used for recording the state information of each game server, and taking the game server in a closed state as a server to be started;
and opening a first number of the servers to be opened, and updating the game server list.
3. The game server adjustment method of claim 1, wherein the turning off a second number of game servers in an on state comprises:
acquiring a game server list used for recording the state information of each game server, and taking the game server in an open state as a server to be closed;
And closing a second number of the servers to be closed, and updating the game server list.
4. The game server adjustment method according to claim 3, wherein the turning off the second number of the servers to be turned off includes:
obtaining the usage amount of the game process on each server to be closed, and sequencing the servers to be closed according to the usage amount of the game process;
and closing the second quantity of the servers to be closed according to the sequencing result.
5. The method for adjusting game servers according to claim 4, wherein the step of closing the second number of servers to be closed according to the sorting result comprises:
monitoring the running state information of each game process on a second number of servers to be closed according to the sequencing result;
and when all game processes on the server to be closed are operated, closing the server to be closed.
6. A game server adjusting apparatus, comprising:
the acquisition module is configured to acquire the total number of game processes on a plurality of game servers at intervals of preset time; wherein the total number of game processes comprises the number of game processes in a running state or an idle state;
The calculating module is configured to calculate the idle proportion of the number of the game processes in the idle state to the total number of the game processes;
the starting module is configured to calculate to obtain a first quantity according to the idle ratio and a first preset ratio if the idle ratio meets a first preset condition;
starting the first number of game servers in the closed state; the first preset condition comprises that the idle proportion is smaller than a first preset proportion;
the closing module is configured to calculate to obtain a second quantity according to the idle ratio and a second preset ratio if the idle ratio meets a second preset condition;
closing the second number of game servers in the opening state, wherein the second preset condition comprises that the idle ratio is greater than a second preset ratio; wherein the first preset proportion is smaller than the second preset proportion.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a game server adaptation method according to any one of claims 1 to 5.
8. An electronic device, comprising:
A processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the game server adjustment method of any one of claims 1-5 via execution of the executable instructions.
CN201910037349.5A 2019-01-15 2019-01-15 Game server adjusting method and device, storage medium and electronic equipment Active CN109771939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910037349.5A CN109771939B (en) 2019-01-15 2019-01-15 Game server adjusting method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910037349.5A CN109771939B (en) 2019-01-15 2019-01-15 Game server adjusting method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109771939A CN109771939A (en) 2019-05-21
CN109771939B true CN109771939B (en) 2022-07-12

Family

ID=66499377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910037349.5A Active CN109771939B (en) 2019-01-15 2019-01-15 Game server adjusting method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109771939B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457138A (en) * 2019-08-20 2019-11-15 网易(杭州)网络有限公司 Management method, device and the electronic equipment of game server cluster
CN110879730B (en) * 2019-11-14 2023-10-24 腾讯科技(深圳)有限公司 Method and device for automatically adjusting game configuration, electronic equipment and storage medium
CN112156453B (en) * 2020-10-21 2022-06-03 腾讯科技(深圳)有限公司 Example adaptive adjustment method, apparatus, computer readable storage medium and device
CN113082723A (en) * 2021-03-24 2021-07-09 杭州电魂网络科技股份有限公司 Game server rolling updating method, device, electronic equipment and medium
CN113521753B (en) * 2021-07-21 2023-08-15 咪咕互动娱乐有限公司 System resource adjusting method, device, server and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002140534A (en) * 2000-11-01 2002-05-17 Sony Corp System and method for contents distribution with log management constitution
JP3954631B1 (en) * 2006-03-30 2007-08-08 株式会社バンダイナムコゲームス Server system, game terminal, program, and information storage medium
CN103023872A (en) * 2012-11-16 2013-04-03 杭州顺网科技股份有限公司 Cloud game service platform
CN103729254A (en) * 2013-12-31 2014-04-16 国网山东省电力公司 Virtual server Virtual CPU resource monitoring and dynamic allocation method
CN105833522A (en) * 2015-01-28 2016-08-10 法国游戏公司 Computer game system
CN106470219A (en) * 2015-08-17 2017-03-01 阿里巴巴集团控股有限公司 The dilatation of computer cluster and capacity reduction method and equipment
CN107070716A (en) * 2017-04-14 2017-08-18 腾讯科技(深圳)有限公司 Game server state acquiring method, device, electronic equipment and storage medium
CN107638695A (en) * 2017-10-24 2018-01-30 博雅网络游戏开发(深圳)有限公司 Game control method and games system
CN109091861A (en) * 2018-06-22 2018-12-28 网易(杭州)网络有限公司 Interaction control method, electronic equipment and storage medium in game

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778085B (en) * 2015-03-25 2018-07-06 广州多益网络股份有限公司 A kind of game fighting processing method and processing device of hand trip
JP5833789B1 (en) * 2015-06-30 2015-12-16 グリー株式会社 Program, control method, and information processing apparatus
CN105897744B (en) * 2016-05-26 2018-08-21 广州多益网络股份有限公司 A kind of game server update method and its system
CN107526632B (en) * 2016-06-20 2021-06-29 咪咕互动娱乐有限公司 Process pool expansion method and device
CN106201717A (en) * 2016-07-01 2016-12-07 珠海市魅族科技有限公司 A kind of method managing Installed System Memory and terminal
CN106899772B (en) * 2017-02-21 2020-09-08 深圳市彬讯科技有限公司 Distributed balanced load control method for call service and call system
CN107341048B (en) * 2017-06-23 2021-03-23 苏州浪潮智能科技有限公司 Method and device for inquiring client occupying specific resources of server
CN107670275B (en) * 2017-10-26 2020-10-13 广州市雷军游乐设备有限公司 Method and system for disconnection and reconnection of game process
CN108479061B (en) * 2018-03-29 2021-06-01 腾讯科技(深圳)有限公司 Application running data verification method and device, storage medium and server

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002140534A (en) * 2000-11-01 2002-05-17 Sony Corp System and method for contents distribution with log management constitution
JP3954631B1 (en) * 2006-03-30 2007-08-08 株式会社バンダイナムコゲームス Server system, game terminal, program, and information storage medium
CN103023872A (en) * 2012-11-16 2013-04-03 杭州顺网科技股份有限公司 Cloud game service platform
CN103729254A (en) * 2013-12-31 2014-04-16 国网山东省电力公司 Virtual server Virtual CPU resource monitoring and dynamic allocation method
CN105833522A (en) * 2015-01-28 2016-08-10 法国游戏公司 Computer game system
CN106470219A (en) * 2015-08-17 2017-03-01 阿里巴巴集团控股有限公司 The dilatation of computer cluster and capacity reduction method and equipment
CN107070716A (en) * 2017-04-14 2017-08-18 腾讯科技(深圳)有限公司 Game server state acquiring method, device, electronic equipment and storage medium
CN107638695A (en) * 2017-10-24 2018-01-30 博雅网络游戏开发(深圳)有限公司 Game control method and games system
CN109091861A (en) * 2018-06-22 2018-12-28 网易(杭州)网络有限公司 Interaction control method, electronic equipment and storage medium in game

Also Published As

Publication number Publication date
CN109771939A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN109771939B (en) Game server adjusting method and device, storage medium and electronic equipment
US10452983B2 (en) Determining an anomalous state of a system at a future point in time
US20160378894A1 (en) Method and apparatus for analyzing economics of power demand management business project using smart power demand resources modeling data simulation module
CN109726076B (en) Applet life cycle management method and system
CN112162891B (en) Performance test method in server cluster and related equipment
CN111950600B (en) Method and device for predicting overdue user resource return performance and electronic equipment
CN110727473B (en) Resource control method, device, system, storage medium and electronic equipment
CN109656781A (en) A kind of blog management method, system, medium and electronic equipment
CN115658301A (en) Storage resource scheduling method, device, storage medium and electronic equipment
CN114911492A (en) Inference service deployment method, device, equipment and storage medium
CN114036501A (en) APP detection method, system, device, equipment and storage medium
CN109039714A (en) The management method and device of resource in cloud computing system
CN111459542A (en) Method, device and system for determining recommended configuration index, storage medium and equipment
WO2023284877A1 (en) Detection method and apparatus, and electronic device
CN110502345A (en) A kind of overload protection method, device, computer equipment and storage medium
Tu et al. Unveiling Energy Efficiency in Deep Learning: Measurement, Prediction, and Scoring across Edge Devices
US8090997B2 (en) Run-time fault resolution from development-time fault and fault resolution path identification
CN101446919B (en) Anti-jamming method for computer central processing unit
CN113127284A (en) Server pressure testing method and system, electronic equipment and storage medium
CN110968519A (en) Game testing method, device, server and storage medium
CN109960767A (en) Page display method, device, computer installation and computer readable storage medium
CN107886180A (en) Boat department creates single interface monitoring method, apparatus, electronic equipment, storage medium
CN116737554B (en) Intelligent analysis processing system and method based on big data
CN113961405B (en) State switching instruction verification method and device, electronic equipment and storage medium
US20230342661A1 (en) Machine learning based monitoring focus engine

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