Load equipment determination method and device, storage medium and electronic equipment
By determining the target load cluster in the load cluster whose network parameters meet the conditions, and selecting equipment with superior load capacity based on the load information of the load device to create games, the problem of low resource utilization in the load cluster is solved, and the stability of load balancing and game creation is achieved.
Patent Information
- Application Number
- CN202311097365.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, the resource utilization rate of some load devices in the load cluster is low, making it difficult to achieve load balancing, and random routing strategies may cause some load devices to create less game games or overload.
By acquiring the data request sent by the access device, the target load cluster is determined based on the network parameters between the access device and multiple load clusters, and then the load device group with load capacity is better than other equipment based on the load information reported by the load device, and finally selecting a suitable load device from the group to create a game.
It realizes efficient utilization of load device resources, reduces the possibility of load device overload, improves load balancing, and ensures the stability and success rate of game creation.
Smart Images

Figure CN119544719A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular, to a method and device for determining a load device, a storage medium, and an electronic device. Background Art
[0002] At present, the determination of load devices in related technologies is mainly achieved through random routing strategies, that is, by evenly distributing game matches on each load device in terms of quantity. After a game request is sent to the matching server, the number of game rounds created by each load device is made as close as possible by randomly selecting a load device. However, it is difficult for the above random algorithm to achieve complete balance. Some load devices may create fewer game rounds and have low resource utilization. It is also possible that too many games are randomly assigned to the same load device at a certain point in time, resulting in creation failure. Therefore, in related technologies, some load devices in the load cluster have low resource utilization, making it difficult to truly achieve load balancing for load devices within the cluster.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method and apparatus for determining a load device, a storage medium, and an electronic device, so as to at least solve the technical problem of low resource utilization of some load devices in a load cluster.
[0005] According to one aspect of an embodiment of the present application, a method for determining a load device is provided, comprising: obtaining a first data request sent by a first access device, wherein the first data request is used to request to start a game in a target application; in response to the first data request, determining a target load cluster according to network parameters between the first access device and multiple load clusters, wherein the target load cluster is a load cluster whose network parameters meet preset network parameter conditions among the multiple load clusters; determining a second group of load devices according to a first group of device load information reported by a first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacity of any two load devices in the second group of load devices is not better than each other; determining a first load device from the second group of load devices, and creating the game on the first load device.
[0006] According to another aspect of an embodiment of the present application, a load device determination device is also provided, including:
[0007] An acquisition module, configured to acquire a first data request sent by a first access device, wherein the first data request is used to request to start a game in a target application;
[0008] a determination module, configured to determine, in response to the first data request, a target load cluster according to network parameters between the first access device and a plurality of load clusters, wherein the target load cluster is a load cluster whose network parameters satisfy a preset network parameter condition among the plurality of load clusters;
[0009] A processing module, configured to determine a second group of load devices according to first group of device load information reported by a first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacity of any two load devices in the second group of load devices is not better than each other;
[0010] A creation module is used to determine a first load device from the second group of load devices and create the game on the first load device.
[0011] In an exemplary embodiment, the device is used to determine the second group of load devices based on the first group of device load information reported by the first group of load devices in the following manner: obtain the first device load parameter and the second device load parameter corresponding to each load device in the first group of device load information; determine the load capacity of each load device in the first group of load devices by enumeration method based on the first device load parameter and the second device load parameter; determine the second group of load devices based on the load capacity of each load device.
[0012] In an exemplary embodiment, the device is used to determine the load capacity of each load device in the first group of load devices by using an enumeration method based on the first device load parameter and the second device load parameter in the following manner, including: enumerating each load device in the first group of load devices in a first coordinate system, wherein the first coordinate axis of the first coordinate system is associated with the first device load parameter, and the second coordinate axis of the first coordinate system is associated with the second device load parameter; determining the load capacity of each load device based on the coordinate position of each load device in the first coordinate system, wherein the load capacity is related to the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system.
[0013] In an exemplary embodiment, the device is used to enumerate each load device in the first group of load devices in the first coordinate system in the following manner, including: when the values of the first device load parameter and the second device load parameter are both positively correlated with the load capacity, determining the coordinate position of each load device on the first coordinate system according to the negative number of the first device load parameter value corresponding to each load device and the negative number of the second device load parameter value, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system; when the first device load parameter is positively correlated with the load capacity, and the value of the second device load parameter is negatively correlated with the load capacity In the case where the values of the first device load parameter and the second device load parameter are both negatively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the negative of the first device load parameter value corresponding to each load device and the second device load parameter value, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system; in the case where the values of the first device load parameter and the second device load parameter are both negatively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the values of the first device load parameter and the second device load parameter value, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system.
[0014] In an exemplary embodiment, the apparatus is also used for: when each device load information also includes a third device load parameter for indicating the load capacity of the corresponding load device, and the third device load parameter, the first device load parameter and the second device load parameter all belong to different dimensions, enumerating each load device in the first group of load devices in a second coordinate system, wherein the third coordinate axis of the second coordinate system is associated with the first device load parameter, the fourth coordinate axis of the second coordinate system is associated with the second device load parameter, and the fifth coordinate axis of the second coordinate system is associated with the third device load parameter; determining the load capacity of each load device according to the coordinate position of each load device in the second coordinate system, wherein the load capacity is related to the straight-line distance between the coordinate position and the coordinate origin of the second coordinate system.
[0015] In an exemplary embodiment, the device is used to determine the first load device from the second group of load devices and create the game on the first load device in the following manner: determine the load device with a median load capacity in the second group of load devices as the first load device; create the game on the first load device, and send the network address and port identifier corresponding to the first load device to the first access device.
[0016] In an exemplary embodiment, the device is used to determine the load capacity of each load device in the first group of load devices by enumeration based on the first device load parameter and the second device load parameter in the following manner: determine the first device load parameter corresponding to each load device according to the first weight parameter and the first current device load parameter corresponding to each load device, wherein the first current device load parameter represents the device load parameter of the first dimension reported in the most recent round corresponding to each load device, the first weight parameter represents the ratio of the device load parameter of each load device in the first dimension reported in the target round to the sum of the device load parameters of each load device in the first dimension reported in the target round, the target round represents the round before the most recent round, the first weight parameter is set to 0 in the first round, and the first device load parameter represents the first weight parameter. The second device load parameter corresponding to each load device is determined according to the second weight parameter and the second current device load parameter corresponding to each load device, wherein the second current device load parameter represents the device load parameter of the second dimension reported in the most recent round corresponding to each load device, the second weight parameter represents the ratio of the device load parameter of each load device in the second dimension reported in the target round to the sum of the device load parameters of each load device in the second dimension reported in the target round, the second weight parameter is set to 0 in the first round, and the second device load parameter represents the sum of the second weight parameter and the second current device load parameter; the load capacity of each load device in the first group of load devices is determined by enumeration method according to the first device load parameter and the second device load parameter.
[0017] In an exemplary embodiment, the apparatus is used to determine the first load device from the second group of load devices and create the game on the first load device in the following manner: obtaining the load information of the first group of devices through a first device allocation process every first time period, wherein each device load information is reported by the corresponding load device to the first group of device allocation process through a corresponding device agent process every second time period, the first device allocation process is a device allocation process predetermined in the first group of device allocation processes, and the second time period is less than the first time period; in response to the first data request, determining the first load device from the second group of load devices through the second device allocation process, and creating the game on the first load device.
[0018] In an exemplary embodiment, the device is used to respond to the first data request in the following manner, determine the first load device from the second group of load devices through the second device allocation process, and create the game on the first load device: in response to the first data request, send a game creation instruction to the first load device through the second device allocation process, wherein the game creation instruction is used to instruct the target device agent process corresponding to the first load device to create the game on the first load device; in response to the game creation instruction, perform a self-check on the load capacity of the first load device through the target device agent process; if the load capacity of the first load device meets a preset condition, create the game on the first load device, and send a creation success instruction to the second device allocation process, wherein the creation success instruction is used to inform the second device allocation process that the first load device has completed the creation of the game, and the device load information includes the creation success instruction; if the load capacity of the first load device does not meet the preset condition, send a creation failure instruction to the second device allocation process, wherein the creation failure instruction is used to inform the second device allocation process that the first load device has not completed the creation of the game, and the device load information includes the creation failure instruction.
[0019] In an exemplary embodiment, the apparatus is further used to: obtain a load consumption parameter pre-set for the game, wherein the load consumption parameter is used to indicate the load overhead caused by the first load device creating the game; in response to a second data request sent by a second access device, update the target load device information corresponding to the first load device according to the load consumption parameter when the game creation instruction has been sent to the first load device through the second device allocation process and the second device allocation process has not received the creation success instruction or the creation failure instruction; in response to a second data request sent by a second access device, when the updated target load device information indicates that the first load device cannot create the game again in response to the second data request, determine a third group of load devices that does not include the first load device according to the first group of device load information, determine a second load device from the third group of load devices, and create a load device corresponding to the first load device on the second load device. A game corresponding to two data requests, wherein the load capacity of any load device in the third group of load devices is better than the other load devices in the first group of load devices except the third group of load devices, and the load capacities of any two load devices in the third group of load devices are not better than each other; when the updated target load device information indicates that the first load device allows the creation of the game again in response to the second data request, a fourth group of load devices is determined according to the first group of device load information and the load consumption parameters, and the second load device is determined from the fourth group of load devices, and a game corresponding to the second data request is created on the second load device, wherein the load capacity of any load device in the fourth group of load devices is better than the other load devices in the first group of load devices except the fourth group of load devices, and the load capacities of any two load devices in the fourth group of load devices are not better than each other.
[0020] In an exemplary embodiment, the device is also used to: obtain the total number of device allocation processes of the first group of device allocation processes; determine a first load threshold and a second load threshold based on the first device load parameter, the second device load parameter and the total number of device allocation processes, wherein the first load threshold represents the ratio of the first device load parameter to the total number of device allocation processes, and the second load threshold represents the ratio of the second device load parameter to the total number of device allocation processes; in response to the first data request, determine the second group of load devices allowed to be allocated in the current round of the second device allocation process based on the first load threshold and the second load threshold, wherein the first device load parameter corresponding to each load device in the second group of load devices is less than or equal to the first load threshold, and the second device load parameter is less than or equal to the second load threshold.
[0021] In an exemplary embodiment, the device is used to respond to the first data request in the following manner to determine a target load cluster based on network parameters between the first access device and multiple load clusters: arranging the multiple load clusters according to response speed based on the network parameters between the first access device and the multiple load clusters to obtain a target load cluster set; selecting the load cluster with the fastest response speed from the target load cluster set each time, and determining the cluster load capacity of the selected load cluster; if the cluster load capacity does not meet a preset load condition, deleting the selected load cluster from the target load cluster set; if the cluster load capacity meets the preset load condition, determining the selected load cluster as the target load cluster.
[0022] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for determining a load device when running.
[0023] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above load device determination method.
[0024] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the load device determination method through the computer program.
[0025] In an embodiment of the present application, a first data request sent by a first access device is obtained, wherein the first data request is used to request to start a game in a target application, and in response to the first data request, a target load cluster is determined according to network parameters between the first access device and multiple load clusters, wherein the target load cluster is a load cluster whose network parameters meet preset network parameter conditions among the multiple load clusters, and a second group of load devices is determined according to first group of device load information reported by a first group of load devices, wherein the target load cluster includes a first group of load devices, the first group of load devices includes a second group of load devices, and each device load information in the first group of device load information includes a first device load parameter and a load capacity of a corresponding load device in different dimensions. The second device load parameter, the load capacity of any load device in the second group of load devices is better than the other load devices in the first group of load devices except the second group of load devices, and the load capacities of any two load devices in the second group of load devices are not better than each other, the first load device is determined from the second group of load devices, and a game is created on the first load device. By finding the Pareto optimal solution of the load devices in the load cluster, a game is created on the load device corresponding to the Pareto optimal solution, thereby achieving the purpose of efficient load balancing, thereby achieving the technical effect of improving the resource utilization of the load device and reducing the possibility of overload of the load device, and further solving the technical problem of low resource utilization of some load devices in the load cluster.
[0026] In addition, the entire process of allocating load devices mentioned above does not require querying the database, and the allocation can be completed quickly in a short time, ensuring that the load of each load device is accurately and reliably updated, avoiding problems such as unreliable load device status updates due to reporting timing problems, and memory overflows caused by overload of load device allocation, which may cause major online accidents.
[0027] On the other hand, through the multi-level withholding mechanism and load balancing strategy, we can prevent a large number of loads from rushing into a load device in a short period of time, which will cause a sharp change in device parameters, ensuring that each game can be distributed smoothly, reducing the failure rate of game creation. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0029] Figure 1 is a schematic diagram of an application environment of an optional method for determining a load device according to an embodiment of the present application;
[0030] Figure 2 is a flow chart of an optional method for determining a load device according to an embodiment of the present application;
[0031] Figure 3 is a schematic diagram of an optional method for determining a load device according to an embodiment of the present application;
[0032] Figure 4 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application;
[0033] Figure 5 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application;
[0034] Figure 6 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application;
[0035] Figure 7 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application;
[0036] Figure 8 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application;
[0037] Fig. 9 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application;
[0038] Fig.10 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application;
[0039] Fig.11 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application;
[0040] Fig.12 is a schematic structural diagram of an optional load device determination device according to an embodiment of the present application;
[0041] Fig.13 is a structural schematic diagram of a determined product of an optional load device according to an embodiment of the present application;
[0042] Fig.14 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0045] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:
[0046] PCU (Peak Concurrent Users): The maximum number of people online at the same time.
[0047] FPS: First-person shooter.
[0048] Load cluster: Load cluster is the service cluster for the actual start of the game. After successful matching, players play games on the load cluster, such as entering the map to fight and search for supplies in shooting games, and entering the game to line up in role-playing games. Since global players are distributed in different regions, dozens of load clusters are deployed around the world to improve the combat experience of players with different network delays. After players are successfully matched in the matching service in the same lobby cluster, they enter the load cluster in a certain region to play the game.
[0049] dscenter (corresponding to the following device allocation process): referred to as dsc, each load cluster has multiple parallel dscenters that simultaneously manage the load device allocation of the entire cluster.
[0050] dsagent (corresponding to the following device agent process): referred to as dsa, each load device has a dsagent that manages the initialization, data synchronization and recovery of the actual game ds process on the load device.
[0051] OOM: out of memory, memory overflow will cause the process to fail and stop.
[0052] Pareto optimality: When multiple multi-dimensional data are compared, if each dimension of a current data is better than another data, then the current data is better than the other data. If several data are better than other data, but these data are not better than each other, then the above data are Pareto optimal data.
[0053] The present application is described below in conjunction with embodiments:
[0054] According to one aspect of an embodiment of the present application, a method for determining a load device is provided. Optionally, in this embodiment, the method for determining a load device can be applied to: Figure 1 In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1 As shown, the server 101 is connected to the terminal 103 via a network, and can be used to provide services for the terminal device or an application installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include, but is not limited to, a wired network and a wireless network, wherein the wired network includes, a local area network, a metropolitan area network and a wide area network; the wireless network includes, Bluetooth, WIFI and other networks that implement wireless communication; the terminal device 103 may be a terminal configured with an application, and may include, but is not limited to, at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a mixed reality (MR) terminal and other computer devices; the above-mentioned server may be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0055] Combination Figure 1 As shown, the above load device determination method can be implemented on the terminal device 103 through the following steps:
[0056] S1, obtaining, on the terminal device 103, a first data request sent by a first access device, wherein the first data request is used to request to start a game in a target application;
[0057] S2, in response to the first data request, on the terminal device 103, determining a target load cluster according to network parameters between the first access device and the multiple load clusters, wherein the target load cluster is a load cluster whose network parameters meet preset network parameter conditions among the multiple load clusters;
[0058] S3, determining a second group of load devices on the terminal device 103 according to the first group of device load information reported by the first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacities of any two load devices in the second group of load devices are not better than each other;
[0059] S4, determining a first load device from the second group of load devices on the terminal device 103, and creating a game on the first load device.
[0060] Optionally, in this embodiment, the load device determination method may also be implemented by a server, for example, Figure 1 It is implemented in the server 101 shown; or it is implemented by the terminal device and the server together.
[0061] The above is only an example and is not specifically limited in this embodiment.
[0062] Optionally, as an optional implementation, as Figure 2 As shown, the above method for determining the load device includes:
[0063] S202, obtaining a first data request sent by a first access device, wherein the first data request is used to request to start a game in a target application;
[0064] Optionally, in this embodiment, the first access device may include but is not limited to a device that a user logs in using a target account, and the target application may include but is not limited to a target game application, a target social application, a target shopping application, etc. Taking the target game application as an example, the target game application may include but is not limited to shooting game applications, chess and card game applications, role-playing game applications, strategy game applications, etc., and may also be a combination of the above-mentioned multiple types of game applications. The target account may include but is not limited to an account that has been pre-registered on a relevant server of the game application, and may also include but is not limited to an account that has been registered on a relevant server of the game application while sending a data request. The above is only an example, and this embodiment does not make any specific limitations on this.
[0065] Optionally, in this embodiment, the first data request may include but is not limited to a request to start a game, or a request to form a group of accounts with other accounts for requesting to start the game, and the other accounts may be in the same geographical area or a different geographical area as the target account.
[0066] It should be noted that the execution subject of the above load device determination method may include but is not limited to a matching server for creating a game, for example, may include but is not limited to a regional server or a pre-configured server for matching game accounts.
[0067] Figure 3 is a schematic diagram of an optional method for determining a load device according to an embodiment of the present application, such as Figure 3 As shown, two players in area 302 and area 304 play games through game interface 306 and game interface 308 respectively. After obtaining the interactive operation corresponding to "start matching" in the game interface, the two players can jointly participate in a game created by the game matching server. At this time, the interactive operation of clicking "start matching" is the operation of sending the first data request through the first access device.
[0068] In this step, it is necessary to obtain a first data request sent by the first access device, which is used to start a game in the target application. For example, when a user clicks a "start match" button in a game application on a mobile device, a request is sent to the server.
[0069] S204, in response to the first data request, determining a target load cluster according to network parameters between the first access device and the multiple load clusters, wherein the target load cluster is a load cluster whose network parameters meet preset network parameter conditions among the multiple load clusters;
[0070] Optionally, in this embodiment, the above network parameters may include but are not limited to network delay, cluster load, etc. By acquiring the network parameters between the first access device and multiple load clusters, a target load cluster whose network parameters meet preset network parameter conditions among the multiple load clusters is determined.
[0071] For example, when a game is about to start, the network delay ranges of 10 players for 5 load clusters A, B, C, D, and E are [110-120], [30-40], [60-80], [140-160], and [210-220] (in milliseconds). When the matching server successfully matches players to enter a game, it will request the corresponding load balancing to allocate a single game. If the B load cluster is not fully loaded at this time, it will request the B load cluster to allocate the corresponding load device to create the game. When the B load cluster is fully loaded, it will try to allocate the corresponding load device from the load clusters that are not fully loaded among C, A, D, and E to create the game.
[0072] It should be noted that the above-mentioned target load clusters can be determined in order from low to high according to the network delay, or a load cluster set consisting of some load clusters with delays below a preset threshold can be first screened out according to the network delay, and then the corresponding load cluster can be randomly selected from the load cluster set. The specific selection method is not specifically limited in this application.
[0073] Optionally, in this embodiment, the above-mentioned preset network parameter condition can be understood as a network delay threshold or a network delay sorting position preset by the system.
[0074] Exemplarily, the target load cluster can be determined by analyzing the network parameters between the first access device and the multiple load clusters. The target load cluster is a load cluster that meets the preset network parameter conditions. If the delay and bandwidth of a load cluster are found to be very stable and efficient in the network parameter analysis, it can be determined as the target load cluster.
[0075] S206, determining a second group of load devices according to the first group of device load information reported by the first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacities of any two load devices in the second group of load devices are not better than each other;
[0076] Optionally, in this embodiment, the first group of load devices can be understood as load devices that are managed by the target load cluster and are in operation, and the first group of device load information can be understood as device load information that corresponds one-to-one to the first group of load devices, that is, one device load information corresponds to one load device.
[0077] It should be noted that the above-mentioned equipment load information includes at least two equipment load parameters in different dimensions for indicating the load capacity of the load equipment, for example, a first equipment load parameter and a second equipment load parameter, that is, the above-mentioned first equipment load parameter may include but is not limited to being composed of multiple equipment load parameters of the same dimension, and the above-mentioned second equipment load parameter may include but is not limited to being composed of multiple equipment load parameters of the same dimension, but the above-mentioned first equipment load parameter and the above-mentioned second equipment load parameter are equipment load parameters of different dimensions. Therefore, it is difficult to directly determine the load capacity of the corresponding load equipment by simply merging the values of the above-mentioned first equipment load parameter and the above-mentioned second equipment load parameter.
[0078] Exemplarily, the first device load parameter may include but is not limited to the CPU idle rate, and the second device load parameter may include but is not limited to the remaining memory capacity. Since the CPU idle rate and the remaining memory capacity are device load parameters used to describe the load capacity of the load device in different dimensions, if the CPU idle rate and the remaining memory capacity of one load device are better than those of another load device, then the current load device is better than the other load device. However, when the CPU idle rate of one load device is higher than that of another load device, and the remaining content capacity is lower than that of the other load device, it is difficult to judge the pros and cons of the load capacity of the two load devices. That is, if several load devices are better than other load devices, and these load devices are not better than each other, then they are the second group of load devices, that is, the second group of load devices are the load devices corresponding to the Pareto optimal solution of the load information of the first group of devices.
[0079] In an exemplary embodiment, it is assumed that the first group of load devices is load cluster A, which includes several load devices. The device load information reported by these load devices includes a first device load parameter and a second device load parameter, which are used to indicate the load capacity of the corresponding load devices in different dimensions. According to the requirements of the second group of load devices, other load devices are selected from the first group of load devices, named load devices C, D, etc., as part of the second group of load devices. The load capacity of these load devices must be better than other load devices in the first group of load devices except the second group of load devices. In addition, the load capacity between any two load devices in the second group of load devices cannot be better than each other. In other words, the load capacity of load C cannot be better than the load capacity of load D, and vice versa.
[0080] Through the above examples, we can better understand the process of determining the second group of load devices based on the device load information reported by the first group of load devices. Such a design can ensure that the load capacity of the second group of load devices is higher and they are balanced with each other, thereby improving the performance and reliability of the entire load device system.
[0081] S208, determining a first load device from the second group of load devices, and creating a game on the first load device.
[0082] Optionally, in this embodiment, the first load device may be understood as a load device with the most average load capacity in the second group of load devices, or may be understood as any load device in the second group of load devices.
[0083] In an exemplary embodiment, after determining the second group of load devices, a device with a relatively balanced load capacity can be selected as the first load device, and a game can be created on the device. For example, based on the processing power, memory capacity, and other indicators of the load device, one of the devices can be selected as the first load device, and the game service can be started on it.
[0084] Through this embodiment, a first data request sent by a first access device is obtained, wherein the first data request is used to request to start a game in a target application, in response to the first data request, a target load cluster is determined according to network parameters between the first access device and multiple load clusters, wherein the target load cluster is a load cluster whose network parameters meet preset network parameter conditions among the multiple load clusters, and a second group of load devices is determined according to first group of device load information reported by the first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacities of any two load devices in the second group of load devices are not better than each other, the first load device is determined from the second group of load devices, and a game is created on the first load device. According to the request of the first access device, a suitable load device can be selected from multiple load clusters to create a game. This load cluster-based game request processing embodiment can improve the performance of the game and user experience, and ensure that the game can run in a stable network and load-balanced environment, thereby achieving the technical effect of improving the resource utilization of the load device and reducing the possibility of overload of the load device, thereby solving the technical problem of low resource utilization of some load devices in the load cluster.
[0085] In addition, the entire process of allocating load devices mentioned above does not require querying the database, and the allocation can be completed quickly in a short time, ensuring that the load of each load device is accurately and reliably updated, avoiding problems such as unreliable load device status updates due to reporting timing problems, and memory overflows caused by overload of load device allocation, which may cause major online accidents.
[0086] On the other hand, through the multi-level withholding mechanism and load balancing strategy, we can prevent a large number of loads from rushing into a load device in a short period of time, which will cause a sharp change in device parameters, ensuring that each game can be distributed smoothly, reducing the failure rate of game creation.
[0087] As an optional solution, determining the second group of load devices according to the first group of device load information reported by the first group of load devices includes:
[0088] Obtaining a first device load parameter and a second device load parameter corresponding to each load device in the first group of device load information;
[0089] Determine the load capacity of each load device in the first group of load devices by using an enumeration method according to the first device load parameter and the second device load parameter;
[0090] A second group of load devices is determined according to the load capacity of each load device.
[0091] Optionally, in this embodiment, the load capacity refers to the load amount and load pressure capacity of the load device. Before performing the load capacity analysis, it is necessary to accurately obtain the load information of the first group of devices. The load device usually has multiple related parameters, including the first device load parameter and the second device load parameter. These parameters can be CPU usage, memory occupancy, etc.
[0092] For example, assuming that we are studying a computer server, the first device load parameter may include CPU usage, etc.; and the second device load parameter may include memory occupancy, etc.
[0093] Optionally, in this embodiment, the above-mentioned use of enumeration method to determine the load capacity of each load device in the first group of load devices can be understood as the need to use enumeration method to determine the load capacity of each load device after obtaining the load information of the first group of devices. The enumeration method is a method of listing all possible situations one by one, and by exhaustively enumerating all possible load parameter combinations, a load device that can meet the requirements of the second group of load devices is found.
[0094] Exemplarily, for a load device, its load capacity can be determined by trying different combinations of CPU usage and memory occupancy one by one. For example, when the CPU usage is 80% and the memory usage is 70%, the server works normally, which means the load capacity under this combination. After determining the load capacity of the first group of load devices, a suitable second group of load devices can be selected based on these capabilities. According to the load capacity requirements, select devices that can meet or exceed the load capacity of the first group of load devices. If the load capacity of the first group of load devices is 90% CPU usage and 80% memory usage, the second group of load devices can be selected according to the above requirements for the second group of load devices. For example, 5 load devices with higher performance can be selected, whose CPU usage is 70%, 71%, 71%, 73%, and 67%, and whose memory usage is 32%, 30%, 30%, 29%, and 33%, respectively. The load capacity between any two of the above 5 load devices is not better than each other.
[0095] In an exemplary embodiment, Figure 4 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application, such as Figure 4 As shown, after receiving the above-mentioned first data request, the matching service determines the target load cluster by obtaining the network parameters of each load cluster. After determining the target load cluster, the second group of load devices is determined from the first group of load devices corresponding to the target load cluster according to the load capacity, wherein any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacity between any two load devices in the second group of load devices is not better than each other.
[0096] As an optional solution, the load capacity of each load device in the first group of load devices is determined by enumeration method according to the load parameter of the first device and the load parameter of the second device, including:
[0097] Enumerating each load device in the first group of load devices in a first coordinate system, wherein a first coordinate axis of the first coordinate system is associated with a first device load parameter, and a second coordinate axis of the first coordinate system is associated with a second device load parameter;
[0098] The load capacity of each load device is determined according to the coordinate position of each load device in the first coordinate system, wherein the load capacity is related to the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system.
[0099] Optionally, in this embodiment, the above-mentioned first coordinate system can be understood as a coordinate system pre-set according to the first device load parameter and the second device load parameter, wherein the coordinate axes of the first coordinate system are related to the above-mentioned first device load parameter and the above-mentioned second device load parameter, that is, if the above-mentioned first coordinate system is a rectangular coordinate system, the horizontal axis can correspond to the first device load parameter, and the vertical axis can correspond to the second device load parameter.
[0100] It should be noted that enumerating each load device in the first group of load devices in the first coordinate system means considering each device in the first group of load devices one by one. The first coordinate axis of the first coordinate system is related to the first device load parameter, that is, the first device load parameter will correspond to a certain value on the first coordinate axis. Similarly, the second coordinate axis of the first coordinate system is related to the second device load parameter, and the second device load parameter will correspond to a certain value on the second coordinate axis.
[0101] Next, the load capacity of each load device needs to be determined based on its coordinate position in the first coordinate system. The load capacity is related to the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system. In other words, the load capacity of the load device will be determined by its position in the first coordinate system. The closer it is to the coordinate origin, the greater or smaller the load capacity may be; the farther it is from the coordinate origin, the smaller or greater the load capacity may be.
[0102] In an exemplary embodiment, Figure 5 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application, such as Figure 5 As shown, it is assumed that the first coordinate axis of the first coordinate system represents the CPU weight parameter of the load device, and the second coordinate axis represents the memory weight parameter of the load device. If there are three load devices, they are load device A, load device B, and load device C. The CPU weight parameter of device A corresponds to a value of 2 on the first coordinate axis, and the memory weight parameter corresponds to a value of 3 on the second coordinate axis. The CPU weight parameter of device B corresponds to a value of 5 on the first coordinate axis, and the memory weight parameter corresponds to a value of 1 on the second coordinate axis. The CPU weight parameter of device C corresponds to a value of 3 on the first coordinate axis, and the memory weight parameter corresponds to a value of 4 on the second coordinate axis. According to the coordinate positions of these devices in the first coordinate system, their load capacities can be determined. Assume that the coordinate origin of the first coordinate system is (0,0). The coordinate position of device A in the first coordinate system is (2,3). According to the straight-line distance from the coordinate origin, the load capacity of device A can be determined. Similarly, the coordinate position of device B in the first coordinate system is (5,1), and the coordinate position of device C in the first coordinate system is (3,4). The load capacities of devices B and C can be determined according to these coordinate positions.
[0103] In summary, determining the load capacity according to the coordinate position of each load device in the first coordinate system is a process determined by the relationship between the coordinate position and the straight-line distance between the coordinate origin, which can intuitively display the load capacity corresponding to different load devices under device load parameters in different dimensions.
[0104] As an optional solution, each load device in the first group of load devices is enumerated in the first coordinate system, including:
[0105] In the case where the values of the first device load parameter and the second device load parameter are both positively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the negative number of the first device load parameter value corresponding to each load device and the negative number of the second device load parameter value, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system; in the case where the first device load parameter is positively correlated with the load capacity, and the value of the second device load parameter is negatively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the negative number of the first device load parameter value corresponding to each load device and the value of the second device load parameter, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system; in the case where the values of the first device load parameter and the second device load parameter are both negatively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the value of the first device load parameter and the value of the second device load parameter, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system.
[0106] Optionally, in this embodiment, the values of the first device load parameter and the second device load parameter are positively correlated with the load capacity, which can be understood as the larger the values of the first device load parameter and the second device load parameter, the stronger the load capacity of the corresponding load device, and vice versa.
[0107] It should be noted that the negative number of the above-mentioned first device load parameter value and / or the negative number of the second device load parameter value can be understood as directly taking the negative number of the first device load parameter value and / or the negative number of the second device load parameter value.
[0108] As an optional scheme, the above method also includes: when each device load information also includes a third device load parameter for indicating the load capacity of the corresponding load device, and the third device load parameter, the first device load parameter and the second device load parameter all belong to different dimensions, enumerating each load device in the first group of load devices in the second coordinate system, wherein the third coordinate axis of the second coordinate system is associated with the first device load parameter, the fourth coordinate axis of the second coordinate system is associated with the second device load parameter, and the fifth coordinate axis of the second coordinate system is associated with the third device load parameter; determining the load capacity of each load device according to the coordinate position of each load device in the second coordinate system, wherein the load capacity is related to the straight-line distance between the coordinate position and the coordinate origin of the second coordinate system.
[0109] Optionally, in this embodiment, the second coordinate system may include but is not limited to a three-dimensional coordinate system, wherein the third coordinate axis may be understood as the x-axis of the three-dimensional coordinate system, the fourth coordinate axis may be understood as the y-axis of the three-dimensional coordinate system, and the fifth coordinate axis may be understood as the z-axis of the three-dimensional coordinate system. The above is only an example and is not specifically limited in this embodiment.
[0110] As an optional solution, determining the first load device from the second group of load devices and creating a game on the first load device includes: determining the load device with a median load capacity in the second group of load devices as the first load device; creating a game on the first load device, and sending the network address and port identifier corresponding to the first load device to the first access device.
[0111] Optionally, in this embodiment, determining the load device with a median load capacity in the second group of load devices as the first load device can be understood as determining the load device whose load parameter of the first device and the load parameter of the second device in the second group of load devices are close after weighting as the first load device.
[0112] In an exemplary embodiment, the selection can be made according to the principle of Pareto Optimality, and a load device at the middle value of Pareto Optimality is selected as the first load device, wherein: Figure 6 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application, such as Figure 6 As shown, point 602, point 604, point 606, point 608 and point 610 are all Pareto optimal values, so the load device represented by point 602 at the middle value can be selected as the first load device for this allocation of the single bureau.
[0113] It should be noted that the above-mentioned Pareto Optimality, also known as Pareto efficiency, refers to an ideal state of resource allocation. Assuming that a group of people and allocable resources change from one allocation state to another, without making anyone worse off, at least one person becomes better off. This is Pareto improvement or Pareto optimization. The Pareto optimal state means that there is no room for more Pareto improvements; in other words, Pareto improvement is the path and method to achieve Pareto optimality.
[0114] As an optional solution, the load capacity of each load device in the first group of load devices is determined by enumeration method according to the first device load parameter and the second device load parameter, including: determining the first device load parameter corresponding to each load device according to the first weight parameter and the first current device load parameter corresponding to each load device, wherein the first current device load parameter represents the device load parameter of the first dimension reported in the most recent round corresponding to each load device, the first weight parameter represents the ratio of the device load parameter of each load device in the first dimension reported in the target round to the sum of the device load parameters of each load device in the first dimension reported in the target round, the target round represents the previous round of the most recent round, the first weight parameter is set to 0 in the first round, and the first device load parameter represents the first weight parameter and the sum of the first current device load parameter; determine the second device load parameter corresponding to each load device according to the second weight parameter and the second current device load parameter corresponding to each load device, wherein the second current device load parameter represents the device load parameter of the second dimension reported in the most recent round corresponding to each load device, the second weight parameter represents the ratio of the device load parameter of each load device in the second dimension reported in the target round to the sum of the device load parameters of each load device in the second dimension reported in the target round, the second weight parameter is set to 0 in the first round, and the second device load parameter represents the sum of the second weight parameter and the second current device load parameter; determine the load capacity of each load device in the first group of load devices by enumeration method according to the first device load parameter and the second device load parameter.
[0115] Exemplarily, when it is necessary to allocate load devices, the weights of all load devices are calculated (corresponding to the aforementioned device load information), and the weight w (cpu, memory) is calculated as (the current CPU weight of the load device + the CPU idle rate reported last time, the current memory weight of the load device + the remaining memory reported last time), where the initial values of the current CPU weight and current memory weight of the load device are 0. After completing the weight update for all load devices, the data of each weight dimension is inverted for decision making, such as inverting (0.2, 30000) to (-0.2, -30000). According to the principle of Pareto optimality, the load device at the middle value of Pareto optimality is selected.
[0116] As an optional solution, determining the first load device from the second group of load devices and creating a game on the first load device includes: obtaining the load information of the first group of devices through the first device allocation process every first time period, wherein each device load information is reported by the corresponding load device to the first group of device allocation process through the corresponding device agent process every second time period, the first device allocation process is a device allocation process predetermined in the first group of device allocation processes, and the second time period is less than the first time period; in response to the first data request, determining the first load device from the second group of load devices through the second device allocation process, and creating a game on the first load device.
[0117] Optionally, in this embodiment, the first device allocation process may be understood as one of the first group of device allocation processes corresponding to the first group of load devices, and the first group of device allocation processes manages the target load cluster in parallel.
[0118] It should be noted that the above-mentioned first duration is set to be greater than the second duration. In other words, the rate at which each device agent process uploads the device load information of the corresponding load device is faster than the rate at which the first device allocation process obtains the first group of device load information.
[0119] In an exemplary embodiment, the first device allocation process may be a device allocation process with a sequence number of a preset value that is in operation. For example, the first device allocation process is the device allocation process with the smallest sequence number. Figure 7 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application, such as Figure 7 As shown, each load cluster is currently working on the device allocation process with the smallest sequence number ( Figure 7 The dscenter shown in the figure performs minute-level reporting, which can avoid the jitter of the load value of the entire load cluster caused by alternating reporting between different dscenters, and try to ensure the coherence and consistency of the load change of the entire load cluster.
[0120] As an optional solution, in response to the first data request, determining a first load device from the second group of load devices through a second device allocation process, and creating a game on the first load device, including:
[0121] In response to the first data request, sending a game creation instruction to the first load device through the second device allocation process, wherein the game creation instruction is used to instruct the target device agent process corresponding to the first load device to create a game on the first load device;
[0122] In response to the game creation instruction, a load capacity of the first load device is self-checked through the target device proxy process;
[0123] When the load capacity of the first load device meets the preset conditions, a game is created on the first load device, and a creation success instruction is sent to the second device allocation process, wherein the creation success instruction is used to inform the second device allocation process that the first load device has completed the creation of a game, and the device load information includes the creation success instruction;
[0124] When the load capacity of the first load device does not meet the preset conditions, a creation failure instruction is sent to the second device allocation process, wherein the creation failure instruction is used to inform the second device allocation process that the first load device has not completed the creation of a game, and the device load information includes the creation failure instruction.
[0125] Optionally, in this embodiment, the second device allocation process may be understood as a device allocation process randomly selected from the first group of device allocation processes, and may be the same as or different from the first device allocation process.
[0126] It should be noted that the above-mentioned game creation instruction can be used to instruct the first load device to establish game content corresponding to a game, including but not limited to pulling the corresponding game model, etc.
[0127] Optionally, in this embodiment, the target device proxy process corresponds to the first load device, and the target device proxy process is used to manage the first load device and report device parameter information related to the first load device to the first group device allocation process every second time period.
[0128] It should be noted that the above self-check process includes the pre-startup check strategy. When the load device is actually started, a final check is made on the remaining resource margin. If the margin is insufficient, the start is rejected to ensure that the load device is not over-started and the stability of the load device is guaranteed.
[0129] As an optional solution, the above method also includes:
[0130] Obtaining a load consumption parameter pre-set for a game, wherein the load consumption parameter is used to indicate a load overhead caused by the first load device creating a game;
[0131] In a case where a game creation instruction has been sent to the first load device through the second device allocation process and the second device allocation process has not received a creation success instruction or a creation failure instruction, in response to a second data request sent by the second access device, the target load device information corresponding to the first load device is updated according to the load consumption parameter;
[0132] In the case where the updated target load device information indicates that the first load device cannot create another game in response to the second data request, a third group of load devices excluding the first load device is determined according to the load information of the first group of devices, and a second load device is determined from the third group of load devices, and a game corresponding to the second data request is created on the second load device, wherein the load capacity of any load device in the third group of load devices is better than that of other load devices in the first group of load devices except the third group of load devices, and the load capacities of any two load devices in the third group of load devices are not better than each other;
[0133] When the updated target load device information indicates that the first load device allows the creation of another game in response to the second data request, a fourth group of load devices is determined based on the load information of the first group of devices and the load consumption parameters, and a second load device is determined from the fourth group of load devices, and a game corresponding to the second data request is created on the second load device, wherein the load capacity of any load device in the fourth group of load devices is better than other load devices in the first group of load devices except the fourth group of load devices, and the load capacity of any two load devices in the fourth group of load devices is not better than each other.
[0134] Optionally, in this embodiment, the above load consumption parameters can be understood as experience values of a game of different types. By withholding the remaining allocatable memory and ports in this reporting cycle in advance, load devices whose resources have been exhausted are eliminated in advance, and a game is allocated to a load device with more idle resources.
[0135] In an exemplary embodiment, the above-mentioned acquisition of the preset load consumption parameter is to indicate the load overhead generated by the first load device when creating the game. For example, if a game requires a lot of calculations and graphics processing, the load consumption parameter can be expressed as the required CPU and GPU resources.
[0136] It should be noted that when the second device allocation process sends a game creation instruction to the load device, if the second device allocation process does not receive an instruction on creation success or failure, it is necessary to update the target load device information corresponding to the first load device according to the load consumption parameters.
[0137] If the updated target load device information indicates that the first load device cannot respond to the second data request and create a game again, then based on the load information of the first group of devices, a third group of load devices that does not include the first load device can be determined. Then a second load device is selected from the third group of load devices, and a game corresponding to the second data request is created on it. In the third group of load devices, the load capacity of any load device is better than that of other load devices in the first group of load devices except the third group of load devices. And the load capacities of any two load devices in the third group of load devices are not better than each other.
[0138] If the updated target load device information indicates that the first load device can continue to respond to the second data request and create a game, then the fourth group of load devices can be determined based on the first group of device load information and load consumption parameters. Then, a second load device is selected from the fourth group of load devices, and a game corresponding to the second data request is created on it. In the fourth group of load devices, the load capacity of any load device is better than other load devices in the first group of load devices except the fourth group of load devices. And the load capacity of any two load devices in the fourth group of load devices is not better than each other.
[0139] In summary, based on the pre-set load consumption parameters and device load information, appropriate load devices can be selected to create games to ensure optimal performance and load balance.
[0140] For example, for a game that has been assigned to a matching server but dsagent has not reported to confirm the actual start, dscenter records it and occupies the withheld resources. If a game is not confirmed for more than 5 reporting cycles, dscenter regards it as a failed start and releases the withheld resources it occupies. Multiple parallel dscenters all follow the above withholding strategy to ensure that they are not over-allocated, thereby ensuring the allocation stability and quality of the entire cluster.
[0141] It should be noted that Figure 8 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application, such as Figure 8As shown in the figure, there are multiple parallel dscenters in each load cluster, and any dscenter can allocate a single bureau to any dsagent. For example, if there are M dscenters and X dsagents in a load cluster, each dscenter will receive reports from each of the X dsagents and allocate a single bureau to the load devices managed by the X dsagents. Each dscenter will record the CPU idle rate, memory margin, and single bureau available port margin of the load device managed by each dsagent. Since the dsagent reports the load information every second, the load information of each dsagent managed by the dsagent on the dscenter is also updated every second. The dscenter needs to adopt a reasonable load balancing strategy for each allocation. In each load cluster, the load information of each load device is reported to the dscenter by the dsagent in seconds. The dsagent reports the CPU idle rate, memory margin, single bureau available port margin of the load device it manages, and the newly added single bureau that has not been confirmed by the corresponding dscenter. After the dscenter confirms the new single bureau within this reporting cycle, the dsagent does not need to carry the confirmed single bureau information in the next report. The processing method for ending a single game within this reporting period is similar to that for a new single game.
[0142] As an optional solution, the above method also includes:
[0143] Get the total number of device allocation processes of the first group of device allocation processes;
[0144] Determine a first load threshold and a second load threshold according to the first device load parameter, the second device load parameter and the total number of device allocation processes, wherein the first load threshold represents a ratio of the first device load parameter to the total number of device allocation processes, and the second load threshold represents a ratio of the second device load parameter to the total number of device allocation processes;
[0145] In response to the first data request, the second group of load devices allowed to be allocated in the current round of the second device allocation process is determined based on the first load threshold and the second load threshold, wherein the first device load parameter corresponding to each load device in the second group of load devices is less than or equal to the first load threshold, and the second device load parameter is less than or equal to the second load threshold.
[0146] Optionally, in this embodiment, the first load threshold and the second load threshold can be understood as the maximum load that a device allocation process allows to be allocated at one time. In other words, when the load of a load device is less than the load threshold, it will definitely not belong to the second group of load devices.
[0147] For example, in order to prevent a huge amount of start allocation from entering a certain load device during the load reporting update cycle, causing the load device to experience OOM and affect all ongoing single games or new single games to fail, a withholding strategy is proposed. According to the experience values of different types of single games, the remaining allocatable memory and ports in this reporting cycle are withheld in advance, and the load devices with exhausted resources are removed in advance, and the single games are allocated to more idle load devices, ensuring the stability and quality of subsequent single game starts. For example, there are M dscenters in a load cluster, and a dsagent reports its own free memory and ports as x, y. Then this dscenter can only allocate x / M, y / M memory and ports this time, and the dscenter will update the balance when this dsagent reports next time.
[0148] As an optional solution, in response to the first data request, determining the target load cluster according to network parameters between the first access device and the plurality of load clusters includes:
[0149] Arrange the multiple load clusters according to the response speed according to the network parameters between the first access device and the multiple load clusters to obtain a target load cluster set;
[0150] Each time, a load cluster with the fastest response speed is selected from the target load cluster set, and the cluster load capacity of the selected load cluster is determined;
[0151] When the cluster load capacity does not meet the preset load condition, the selected load cluster is deleted from the target load cluster set;
[0152] When the cluster load capacity meets the preset load condition, the selected load cluster is determined as the target load cluster.
[0153] The following is a further explanation of this application with reference to specific examples:
[0154] This application mainly provides a global game matching solution, which mainly includes the following contents:
[0155] 1) It provides a high-performance load cluster distribution solution that acts on the entire distribution process. The entire process of distributing load devices does not require querying the database, and the distribution can be completed quickly in a short time;
[0156] 2) Provides a solution to improve the resource utilization of load cluster load devices;
[0157] 3) Propose a load reporting and incremental synchronization mechanism to ensure accurate and reliable update of the load of each load device, and avoid major online accidents caused by unreliable load device status updates due to reporting timing problems, and memory overflow caused by overload of load device allocation;
[0158] 4) A load distribution algorithm is proposed. Through a multi-level withholding mechanism and load balancing strategy, a large number of starts are prevented from rushing into a machine in a short period of time, causing sharp changes in the machine's CPU, memory and other indicators, ensuring stable distribution of a single game and reducing the start failure rate.
[0159] The existing multi-load cluster allocation scheme for global games generally adopts a random routing strategy to evenly distribute the games on each load device in terms of quantity. When a game start request is sent to the matching server, the player selects a cluster dscenter and then uses a random algorithm to select a dsagent to create a single game.
[0160] From the above analysis, there are many problems in directly using the above technical solutions. The random algorithm may not be able to achieve complete balance. There may be a small number of openings on some load devices, low resource utilization, or too many single games randomly assigned to the same load device at a certain time point, resulting in opening failures or even OOM affecting all single games on the entire machine. This application solves various problems existing in the random routing allocation solution for load clusters.
[0161] For global games on the same server, players should be matched based on their network latency, and players with the same network latency should be matched into the same game to protect the fairness and experience of the players. For a single game, it is crucial to assign it to a load cluster with the lowest possible network latency and sufficient capacity.
[0162] Since there are multiple load clusters in many places around the world, there are multiple machines in one load cluster. Since most games have a variety of different maps, modes, and gameplay, the various machine resources consumed by each single game are different. It is impossible to achieve true load balancing by simply allocating single games to different load devices according to the number of single games. Therefore, a solution is needed to solve the load balancing of various machines.
[0163] In order to improve the efficiency of the start-up and avoid frequent database reading and writing during the single-game allocation process, a more efficient allocation strategy needs to be adopted. In order to ensure that the allocation process is reliable and prevent the failure of a single-game start after allocation, a reliable mechanism needs to be designed to ensure the rationality of the allocation.
[0164] In order to solve various problems of the random routing allocation scheme of load clusters and achieve efficient and high-quality full-load cluster allocation, a load-balanced global game load cluster allocation scheme is proposed.
[0165] For high-PCU global FPS games, in order to improve the player's combat experience and machines, load clusters will be deployed in multiple regions around the world. Each load cluster consists of multiple load devices. After the player is actually matched successfully, the single game is played on a load device, and this load device must ensure that each player has as low a delay as possible. Since the large number of load devices in multiple load clusters is costly, reasonable planning and deployment are required to maximize the utilization of each load device.
[0166] This solution is also applicable to other games with high PCU, high requirements for real-time operation and global server matching that require load cluster distribution.
[0167] The following is an explanation of the application scenarios of this solution in the game. Fig. 9 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application, such as Fig. 9 As shown, including but not limited to the following steps:
[0168] S1, after entering the game lobby, players can choose to complete their teammates and click the Start button to start the full-server match. The client will carry the player's network delay to participate in the match. The matching server will match some players into multi-player teams based on the network delay of all players participating in the match, and match multiple teams with similar network delays into a single game.
[0169] S2, the successfully matched players will enter a random point in the game with the randomly generated AI. The game will start with a suitable load device in the load cluster with the lowest network delay that is not fully loaded, based on the network delay of all players in the single game, and the players will connect to this load device to fight.
[0170] According to the above introduction, the technical solution described in this application, after the player initiates a matching request, the matching server will match the players from all over the world according to their respective network delays. Generally speaking, players with relatively close network delays for load clusters in different regions will be assigned to a single game. For example, in a single game, 10 players have network delay ranges of [110-120], [30-40], [60-80], [140-160], [210-220] (unit: milliseconds) for 5 load clusters A, B, C, D, and E. When the matching server successfully matches the player to enter a single game, it will request to allocate a single game. If the B load cluster is not fully loaded at this time, request to allocate a single game to the B load cluster. When the B load cluster is fully loaded, try to allocate a single game from the load clusters that are not fully loaded in C, A, D, and E in turn.
[0171] Since multiple load clusters are deployed in many locations around the world, take the five load clusters A, B, C, D, and E as an example. Each of these five load clusters has several parallel dscenters to jointly manage the entire cluster, and each cluster also has several dsagents to manage each load device in the cluster.
[0172] The dscenter with the smallest serial number in each load cluster performs minute-level reporting, which can avoid jitter of the load value of the entire load cluster caused by alternating reports between different dscenters, and try to ensure the coherence and consistency of the load changes of the entire load cluster, and select the one with the smallest serial number.
[0173] The load balancing solution within the cluster mainly consists of load reporting and incremental synchronization mechanism, load balancing distribution strategy, withholding strategy and pre-startup check strategy.
[0174] Among them, load reporting and incremental synchronization mechanism: In each load cluster, the load information of each load device is reported to dscenter by dsagent in seconds. dsagent reports the CPU idle rate, memory margin, single-station available port margin, and newly added single stations that have not been confirmed by the corresponding dscenter of the managed load device. After dscenter confirms the new single station in this reporting cycle, dsagent does not need to carry the information of the confirmed single station in the next report. The processing method of ending a single station in this reporting cycle is similar to that of a new single station.
[0175] Load balancing allocation strategy: There are multiple parallel dscenters in each load cluster, and any dscenter can allocate a single bureau to any dsagent. For example, there are M dscenters and X dsagents in load cluster B. Each dscenter will receive reports from each of the X dsagents and allocate a single bureau to the load devices managed by the X dsagents. Each dscenter will record the CPU idle rate, memory margin, and single-burst available port margin of the load devices managed by each dsagent. Since dsagent reports load information every second, the load information of each dsagent managed by the dsagent on the dscenter is also updated every second. dscenter needs to adopt a reasonable load balancing strategy for each allocation. When a dscenter makes an allocation, it calculates the weights of all load devices. The calculation method of weight w (cpu, memory) is (current CPU weight of the load device + its last reported CPU idle rate, current memory weight of the load device + its last reported remaining memory), where the initial values of the current CPU weight and current memory weight of the load device are 0. After completing the weight update for all load devices, the data of each weight dimension is inverted to make a decision, such as inverting (0.2, 30000) to (-0.2, -30000). According to the principle of Pareto optimality, the load device at the middle value of Pareto optimality is selected.
[0176] Withholding strategy: In order to prevent a huge amount of game allocation from entering a certain load device during the load reporting update cycle, causing the load device to have OOM and affect all ongoing single games or new single games to fail to start, a withholding strategy is proposed. According to the experience of different types of single games, the remaining allocatable memory and ports in this reporting cycle are withheld in advance, and the load devices with exhausted resources are removed in advance, and the single games are allocated to more idle load devices, ensuring the stability and quality of subsequent single game starts. For example, there are M dscenters in the B load cluster, and a dsagent reports its own free memory and ports as x, y. Then this dscenter can only allocate memory and ports of x / M, y / M this time, and the dscenter will update the remaining amount when this dsagent reports next time. For single games that have been allocated to the matching server but the dsagent has not reported to confirm the actual start, the dscenter will record them and occupy the withheld resources. For single games that have not been confirmed for more than 5 reporting cycles, the dscenter will regard the start as a failure and release the withheld resources it occupies. Multiple parallel dscenters all follow the above withholding strategy to ensure that they are not over-allocated, thereby ensuring the allocation stability and quality of the entire cluster.
[0177] Pre-deployment inspection strategy: When the load device is actually deployed, a final check is performed on the remaining resource margin. If the margin is insufficient, the deployment is rejected to ensure that the load device is not over-deployed and the stability of the load device is guaranteed.
[0178] Fig.10 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application, such as Fig.10 As shown in the figure, based on the load balancing solution between the above clusters (load cluster 1 and load cluster 2) and the load balancing solution within the cluster, a complete load balancing global game load cluster allocation solution is formed. The whole solution is divided into reporting and allocation. The reporting process periodically updates the load information according to multiple strategies, and the allocation process allocates the most suitable load device according to the load information.
[0179] Fig.11 is a schematic diagram of another optional method for determining a load device according to an embodiment of the present application, such as Fig.11 As shown, when the match is successful, the optimal load cluster currently available is found, such as load cluster B. If load cluster B is fully loaded, the suboptimal C, A, D and E are selected in turn. If it is not fully loaded, a dscenter is randomly selected in the current load cluster to send a request for allocating a load device. The dscenter selects a load device to create a single game based on the load information of the load devices reported by multiple dsagents, and notifies the client of the IP and port of the load device. The client connects to this load device to start the player's game.
[0180] Using this solution, when the single-game limit is 200 starts, the CPU remaining warning value is 20%, and the memory remaining warning value is 10G, the target application performs multiple sets of repeated stress tests on 150 load devices in a single load cluster at different start speeds. The start success rate and load cluster load device stability results are shown in Table 1.
[0181] Through this embodiment, the utilization rate of the load cluster load equipment can be significantly improved and the machine cost can be reduced. The stability of the load equipment can also be significantly improved to prevent the business from being affected by the impact of a large number of traffic peaks. It can also ensure a faster single-office allocation speed and avoid a large number of operations on the database to ensure the load balance of the load cluster allocation.
[0182] Table 1 Overall effect of this scheme
[0183]
[0184] This solution uses a high-performance reliable reporting and confirmation method. If the machine scale of a specific cluster is too large or the number of load devices is large, resulting in a sharp drop in the performance of the reporting confirmation feedback mechanism, redis and other methods can also be used to ensure the reliability of the load cluster allocation, thereby ensuring the performance of the allocation. If necessary, the evaluation of the resource utilization of the entire load cluster and load devices can be supplemented with more diversified indicators in addition to CPU, memory, port, single bureau number, etc., so as to achieve a more stringent and diversified restriction purpose.
[0185] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0186] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0187] According to another aspect of the embodiments of the present application, a load device determination device for implementing the above load device determination method is also provided. Fig.12 As shown, the device comprises:
[0188] An acquisition module 1202 is configured to acquire a first data request sent by a first access device, wherein the first data request is used to request to start a game in a target application;
[0189] A determination module 1204 is configured to determine, in response to the first data request, a target load cluster according to network parameters between the first access device and a plurality of load clusters, wherein the target load cluster is a load cluster whose network parameters satisfy a preset network parameter condition among the plurality of load clusters;
[0190] The processing module 1206 is used to determine the second group of load devices according to the first group of device load information reported by the first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacity of any two load devices in the second group of load devices is not better than each other;
[0191] The creation module 1208 is used to determine the first load device from the second group of load devices and create the game on the first load device.
[0192] As an optional scheme, the device is used to determine the second group of load devices based on the first group of device load information reported by the first group of load devices in the following manner: obtain the first device load parameter and the second device load parameter corresponding to each load device in the first group of device load information; determine the load capacity of each load device in the first group of load devices by enumeration method based on the first device load parameter and the second device load parameter; determine the second group of load devices based on the load capacity of each load device.
[0193] As an optional scheme, the device is used to determine the load capacity of each load device in the first group of load devices by enumeration method according to the load parameters of the first device and the load parameters of the second device in the following manner, including: enumerating each load device in the first group of load devices in a first coordinate system, wherein the first coordinate axis of the first coordinate system is associated with the load parameters of the first device, and the second coordinate axis of the first coordinate system is associated with the load parameters of the second device; determining the load capacity of each load device according to the coordinate position of each load device in the first coordinate system, wherein the load capacity is related to the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system.
[0194] As an optional scheme, the device is used to enumerate each load device in the first group of load devices in the first coordinate system in the following manner, including: when the values of the first device load parameter and the second device load parameter are both positively correlated with the load capacity, determining the coordinate position of each load device on the first coordinate system according to the negative number of the first device load parameter value corresponding to each load device and the negative number of the second device load parameter value, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system; when the first device load parameter is positively correlated with the load capacity and the value of the second device load parameter is negatively correlated with the load capacity In the case where the values of the first device load parameter and the second device load parameter corresponding to each load device are negatively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the negative number of the first device load parameter value and the second device load parameter value, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system; in the case where the values of the first device load parameter and the second device load parameter are both negatively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the value of the first device load parameter and the value of the second device load parameter, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system.
[0195] As an optional scheme, the device is also used to: when each device load information also includes a third device load parameter for indicating the load capacity of the corresponding load device, and the third device load parameter, the first device load parameter and the second device load parameter all belong to different dimensions, enumerate each load device in the first group of load devices in a second coordinate system, wherein the third coordinate axis of the second coordinate system is associated with the first device load parameter, the fourth coordinate axis of the second coordinate system is associated with the second device load parameter, and the fifth coordinate axis of the second coordinate system is associated with the third device load parameter; determine the load capacity of each load device according to the coordinate position of each load device in the second coordinate system, wherein the load capacity is related to the straight-line distance between the coordinate position and the coordinate origin of the second coordinate system.
[0196] As an optional scheme, the device is used to determine the first load device from the second group of load devices and create the game on the first load device in the following manner: determine the load device with a median load capacity in the second group of load devices as the first load device; create the game on the first load device, and send the network address and port identifier corresponding to the first load device to the first access device.
[0197] As an optional scheme, the device is used to determine the load capacity of each load device in the first group of load devices by enumeration method according to the first device load parameter and the second device load parameter in the following manner: determine the first device load parameter corresponding to each load device according to the first weight parameter and the first current device load parameter corresponding to each load device, wherein the first current device load parameter represents the device load parameter of the first dimension reported in the most recent round corresponding to each load device, the first weight parameter represents the ratio of the device load parameter of each load device in the first dimension reported in the target round to the sum of the device load parameters of each load device in the first dimension reported in the target round, the target round represents the round before the most recent round, the first weight parameter is set to 0 in the first round, and the first device load parameter represents the first weight parameter. The second device load parameter corresponding to each load device is determined according to the second weight parameter and the second current device load parameter corresponding to each load device, wherein the second current device load parameter represents the device load parameter of the second dimension reported in the most recent round corresponding to each load device, the second weight parameter represents the ratio of the device load parameter of each load device in the second dimension reported in the target round to the sum of the device load parameters of each load device in the second dimension reported in the target round, the second weight parameter is set to 0 in the first round, and the second device load parameter represents the sum of the second weight parameter and the second current device load parameter; the load capacity of each load device in the first group of load devices is determined by enumeration method according to the first device load parameter and the second device load parameter.
[0198] As an optional scheme, the device is used to determine the first load device from the second group of load devices and create the game on the first load device in the following manner: obtaining the load information of the first group of devices through the first device allocation process every first time period, wherein each device load information is reported to the first group of device allocation process by the corresponding load device through the corresponding device agent process every second time period, the first device allocation process is a device allocation process predetermined in the first group of device allocation processes, and the second time period is less than the first time period; in response to the first data request, determining the first load device from the second group of load devices through the second device allocation process, and creating the game on the first load device.
[0199] As an optional solution, the device is used to respond to the first data request in the following manner, determine the first load device from the second group of load devices through the second device allocation process, and create the game on the first load device: in response to the first data request, send a game creation instruction to the first load device through the second device allocation process, wherein the game creation instruction is used to instruct the target device agent process corresponding to the first load device to create the game on the first load device; in response to the game creation instruction, perform a self-check on the load capacity of the first load device through the target device agent process; if the load capacity of the first load device meets the preset conditions, create the game on the first load device, and send a creation success instruction to the second device allocation process, wherein the creation success instruction is used to inform the second device allocation process that the first load device has completed the creation of the game, and the device load information includes the creation success instruction; if the load capacity of the first load device does not meet the preset conditions, send a creation failure instruction to the second device allocation process, wherein the creation failure instruction is used to inform the second device allocation process that the first load device has not completed the creation of the game, and the device load information includes the creation failure instruction.
[0200] As an optional solution, the device is also used to: obtain a load consumption parameter pre-set for the game, wherein the load consumption parameter is used to indicate the load overhead caused by the first load device creating the game; when the game creation instruction has been sent to the first load device through the second device allocation process and the second device allocation process has not received the creation success instruction or the creation failure instruction, in response to a second data request sent by a second access device, update the target load device information corresponding to the first load device according to the load consumption parameter; when the updated target load device information indicates that the first load device cannot create the game again in response to the second data request, determine a third group of load devices that does not include the first load device according to the first group of device load information, determine a second load device from the third group of load devices, and create a connection with the second load device on the second load device. A game corresponding to a data request, wherein the load capacity of any load device in the third group of load devices is better than the other load devices in the first group of load devices except the third group of load devices, and the load capacities of any two load devices in the third group of load devices are not better than each other; when the updated target load device information indicates that the first load device allows the creation of the game again in response to the second data request, a fourth group of load devices is determined according to the first group of device load information and the load consumption parameters, and the second load device is determined from the fourth group of load devices, and a game corresponding to the second data request is created on the second load device, wherein the load capacity of any load device in the fourth group of load devices is better than the other load devices in the first group of load devices except the fourth group of load devices, and the load capacities of any two load devices in the fourth group of load devices are not better than each other.
[0201] As an optional scheme, the device is also used to: obtain the total number of device allocation processes of the first group of device allocation processes; determine a first load threshold and a second load threshold based on the first device load parameter, the second device load parameter and the total number of device allocation processes, wherein the first load threshold represents the ratio of the first device load parameter to the total number of device allocation processes, and the second load threshold represents the ratio of the second device load parameter to the total number of device allocation processes; in response to the first data request, determine the second group of load devices allowed to be allocated in the current round of the second device allocation process based on the first load threshold and the second load threshold, wherein the first device load parameter corresponding to each load device in the second group of load devices is less than or equal to the first load threshold, and the second device load parameter is less than or equal to the second load threshold.
[0202] As an optional scheme, the device is used to respond to the first data request in the following manner and determine the target load cluster according to the network parameters between the first access device and multiple load clusters: arrange the multiple load clusters according to response speed according to the network parameters between the first access device and the multiple load clusters to obtain a target load cluster set; select the load cluster with the fastest response speed from the target load cluster set each time, and determine the cluster load capacity of the selected load cluster; if the cluster load capacity does not meet the preset load condition, delete the selected load cluster from the target load cluster set; if the cluster load capacity meets the preset load condition, determine the selected load cluster as the target load cluster.
[0203] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0204] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1309, and / or installed from a removable medium 1311. When the computer program is executed by the central processor 1301, various functions provided in the embodiments of the present application are executed.
[0205] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0206] Fig.13 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.
[0207] It should be noted that Fig.13 The computer system 1300 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0208] like Fig.13As shown, the computer system 1300 includes a central processing unit 1301 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1302 (ROM) or the program loaded from the storage part 1308 to the random access memory 1303 (RAM). Various programs and data required for system operation are also stored in the random access memory 1303. The central processing unit 1301, the read-only memory 1302 and the random access memory 1303 are connected to each other through a bus 1304. The input / output interface 1305 (Input / Output interface, i.e., I / O interface) is also connected to the bus 1304.
[0209] The following components are connected to the input / output interface 1305: an input section 1306 including a keyboard, a mouse, etc.; an output section 1307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN card, a modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the input / output interface 1305 as needed. A removable medium 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1310 as needed so that a computer program read therefrom is installed into the storage section 1308 as needed.
[0210] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1309, and / or installed from the removable medium 1311. When the computer program is executed by the central processor 1301, various functions defined in the system of the present application are executed.
[0211] According to another aspect of the embodiment of the present application, an electronic device for implementing the above load device determination method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Fig.14As shown, the electronic device includes a memory 1402 and a processor 1404. The memory 1402 stores a computer program, and the processor 1404 is configured to execute the steps in any of the above method embodiments through the computer program.
[0212] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0213] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0214] S1, obtaining a first data request sent by a first access device, wherein the first data request is used to request to start a game in a target application;
[0215] S2, in response to the first data request, determining a target load cluster according to network parameters between the first access device and the multiple load clusters, wherein the target load cluster is a load cluster whose network parameters meet preset network parameter conditions among the multiple load clusters;
[0216] S3, determining a second group of load devices according to the first group of device load information reported by the first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacities of any two load devices in the second group of load devices are not better than each other;
[0217] S4, determining a first load device from the second group of load devices, and creating a game on the first load device.
[0218] Alternatively, a person skilled in the art may understand that: Fig.14 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig.14 The electronic device and the electronic equipment described above are not limited in structure. Fig.14 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.14 Different configurations are shown.
[0219] Among them, the memory 1402 can be used to store software programs and modules, such as the program instructions / modules corresponding to the load device determination method and device in the embodiment of the present application. The processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, that is, realizing the above-mentioned load device determination method. The memory 1402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1402 may further include a memory remotely located relative to the processor 1404, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1402 may be specifically, but not limited to, used to store information such as load device parameters. As an example, such as Fig.14 As shown, the memory 1402 may include, but is not limited to, the acquisition module 1202, the determination module 1204, the processing module 1206, and the creation module 1208 in the load device determination device. In addition, it may also include, but is not limited to, other module units in the load device determination device, which will not be repeated in this example.
[0220] Optionally, the transmission device 1406 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1406 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0221] In addition, the electronic device further includes: a display 1408 for displaying the game; and a connection bus 1410 for connecting various module components in the electronic device.
[0222] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a peer-to-peer network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0223] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the load device determination method provided in various optional implementations of the above-mentioned load device determination aspect.
[0224] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0225] S1, obtaining a first data request sent by a first access device, wherein the first data request is used to request to start a game in a target application;
[0226] S2, in response to the first data request, determining a target load cluster according to network parameters between the first access device and the multiple load clusters, wherein the target load cluster is a load cluster whose network parameters meet preset network parameter conditions among the multiple load clusters;
[0227] S3, determining a second group of load devices according to the first group of device load information reported by the first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacities of any two load devices in the second group of load devices are not better than each other;
[0228] S4, determining a first load device from the second group of load devices, and creating a game on the first load device.
[0229] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0230] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0231] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0232] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0233] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0234] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0235] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0236] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining a load device, characterized in that: include: Obtaining a first data request sent by a first access device, wherein the first data request is used to request to start a game in a target application; In response to the first data request, determining a target load cluster according to network parameters between the first access device and multiple load clusters, wherein the target load cluster is a load cluster whose network parameters meet preset network parameter conditions among the multiple load clusters; Determine a second group of load devices according to first group device load information reported by a first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacities of any two load devices in the second group of load devices are not better than each other; A first load device is determined from the second group of load devices, and the game is created on the first load device.
2. The method according to claim 1, characterized in that The determining of the second group of load devices according to the first group of device load information reported by the first group of load devices includes: Obtaining the first device load parameter and the second device load parameter corresponding to each load device in the first group of device load information; Determine the load capacity of each load device in the first group of load devices by using an enumeration method according to the first device load parameter and the second device load parameter; The second group of load devices is determined according to the load capacity of each load device.
3. The method according to claim 2, characterized in that Determining the load capacity of each load device in the first group of load devices by enumeration according to the first device load parameter and the second device load parameter includes: Enumerating each load device in the first group of load devices in a first coordinate system, wherein a first coordinate axis of the first coordinate system is associated with the first device load parameter, and a second coordinate axis of the first coordinate system is associated with the second device load parameter; The load capacity of each load device is determined according to the coordinate position of each load device in the first coordinate system, wherein the load capacity is related to the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system.
4. The method according to claim 3, characterized in that The enumerating each load device in the first group of load devices in the first coordinate system includes: In the case where the values of the first device load parameter and the second device load parameter are both positively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the negative number of the first device load parameter value corresponding to each load device and the negative number of the second device load parameter value, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system; In the case where the load parameter of the first device is positively correlated with the load capacity, and the value of the load parameter of the second device is negatively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the negative number of the value of the load parameter of the first device corresponding to each load device and the value of the load parameter of the second device, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system; In the case where the values of the first device load parameter and the second device load parameter are both negatively correlated with the load capacity, the coordinate position of each load device on the first coordinate system is determined according to the value of the first device load parameter and the value of the second device load parameter, wherein the load capacity is negatively correlated with the straight-line distance between the coordinate position and the coordinate origin of the first coordinate system.
5. The method according to claim 2, characterized in that: The method further comprises: In a case where each device load information further includes a third device load parameter for indicating the load capacity of the corresponding load device, and the third device load parameter and the first device load parameter and the second device load parameter are all of different dimensions, each load device in the first group of load devices is enumerated in a second coordinate system, wherein a third coordinate axis of the second coordinate system is associated with the first device load parameter, a fourth coordinate axis of the second coordinate system is associated with the second device load parameter, and a fifth coordinate axis of the second coordinate system is associated with the third device load parameter; The load capacity of each load device is determined according to the coordinate position of each load device in the second coordinate system, wherein the load capacity is related to the straight-line distance between the coordinate position and the coordinate origin of the second coordinate system.
6. The method according to claim 2, characterized in that The step of determining a first load device from the second group of load devices and creating the game on the first load device includes: Determine the load device with a median load capacity in the second group of load devices as the first load device; The game is created on the first load device, and the network address and port identifier corresponding to the first load device are sent to the first access device.
7. The method according to claim 2, characterized in that Determining the load capacity of each load device in the first group of load devices by enumeration according to the first device load parameter and the second device load parameter includes: Determine the first device load parameter corresponding to each load device according to the first weight parameter corresponding to each load device and the first current device load parameter, wherein the first current device load parameter represents the device load parameter under the first dimension reported in the most recent round corresponding to each load device, the first weight parameter represents the ratio of the device load parameter under the first dimension reported by each load device in the target round to the sum of the device load parameters under the first dimension reported by each load device in the target round, the target round represents the round before the most recent round, the first weight parameter is set to 0 in the first round, and the first device load parameter represents the sum of the first weight parameter and the first current device load parameter; Determine the second device load parameter corresponding to each load device according to the second weight parameter corresponding to each load device and the second current device load parameter, wherein the second current device load parameter represents the device load parameter under the second dimension reported in the most recent round corresponding to each load device, the second weight parameter represents the ratio of the device load parameter under the second dimension reported by each load device in the target round to the sum of the device load parameters under the second dimension reported by each load device in the target round, the second weight parameter is set to 0 in the first round, and the second device load parameter represents the sum of the second weight parameter and the second current device load parameter; The load capacity of each load device in the first group of load devices is determined by enumeration method according to the first device load parameter and the second device load parameter.
8. The method according to claim 1, characterized in that The step of determining a first load device from the second group of load devices and creating the game on the first load device includes: Obtaining the first group of device load information at first time intervals through the first device allocation process, wherein each device load information is reported by the corresponding load device to the first group of device allocation process through the corresponding device proxy process at second time intervals, the first device allocation process is a device allocation process predetermined in the first group of device allocation processes, and the second time interval is less than the first time interval; In response to the first data request, a first load device is determined from the second group of load devices through a second device allocation process, and the game is created on the first load device.
9. The method according to claim 8, characterized in that In response to the first data request, determining a first load device from the second group of load devices through a second device allocation process, and creating the game on the first load device, comprises: In response to the first data request, sending a game creation instruction to the first load device through the second device allocation process, wherein the game creation instruction is used to instruct the target device agent process corresponding to the first load device to create the game on the first load device; In response to the game creation instruction, performing a self-check on the load capacity of the first load device through the target device agent process; In the case where the load capacity of the first load device meets the preset condition, the game is created on the first load device, and a creation success instruction is sent to the second device allocation process, wherein the creation success instruction is used to inform the second device allocation process that the first load device has completed the creation of the game, and the device load information includes the creation success instruction; When the load capacity of the first load device does not meet the preset condition, a creation failure instruction is sent to the second device allocation process, wherein the creation failure instruction is used to inform the second device allocation process that the first load device has not completed the creation of the game, and the device load information includes the creation failure instruction.
10. The method according to claim 9, characterized in that The method further comprises: Acquire a load consumption parameter pre-set for the game, wherein the load consumption parameter is used to indicate a load overhead caused by the first load device creating the game; In a case where the game creation instruction has been sent to the first load device through the second device allocation process and the second device allocation process has not received the creation success instruction or the creation failure instruction, in response to a second data request sent by the second access device, updating the target load device information corresponding to the first load device according to the load consumption parameter; In the case where the updated target load device information indicates that the first load device cannot create the game again in response to the second data request, a third group of load devices excluding the first load device is determined according to the first group of device load information, and a second load device is determined from the third group of load devices, and a game corresponding to the second data request is created on the second load device, wherein the load capacity of any load device in the third group of load devices is better than that of other load devices in the first group of load devices except the third group of load devices, and the load capacities of any two load devices in the third group of load devices are not better than each other; In a case where the updated target load device information indicates that the first load device allows the re-creation of the game in response to the second data request, a fourth group of load devices is determined based on the first group of device load information and the load consumption parameters, and the second load device is determined from the fourth group of load devices, and a game corresponding to the second data request is created on the second load device, wherein the load capacity of any load device in the fourth group of load devices is better than that of other load devices in the first group of load devices except the fourth group of load devices, and the load capacities of any two load devices in the fourth group of load devices are not better than each other.
11. The method according to claim 8, characterized in that The method further comprises: Obtain the total number of device allocation processes of the first group of device allocation processes; Determine a first load threshold and a second load threshold according to the first device load parameter, the second device load parameter and the total number of device allocation processes, wherein the first load threshold represents a ratio of the first device load parameter to the total number of device allocation processes, and the second load threshold represents a ratio of the second device load parameter to the total number of device allocation processes; In response to the first data request, the second group of load devices allowed to be allocated in the current round of the second device allocation process is determined based on the first load threshold and the second load threshold, wherein the first device load parameters corresponding to each load device in the second group of load devices are less than or equal to the first load threshold, and the second device load parameters are less than or equal to the second load threshold.
12. The method according to claim 1, characterized in that The step of determining, in response to the first data request, a target load cluster according to network parameters between the first access device and a plurality of load clusters includes: Arrange the multiple load clusters according to response speeds according to network parameters between the first access device and the multiple load clusters to obtain a target load cluster set; Selecting the load cluster with the fastest response speed from the target load cluster set each time, and determining the cluster load capacity of the selected load cluster; If the cluster load capacity does not meet the preset load condition, deleting the selected load cluster from the target load cluster set; When the cluster load capacity meets the preset load condition, the selected load cluster is determined as the target load cluster.
13. A device for determining a load device, characterized in that: include: An acquisition module, configured to acquire a first data request sent by a first access device, wherein the first data request is used to request to start a game in a target application; a determination module, configured to determine, in response to the first data request, a target load cluster according to network parameters between the first access device and a plurality of load clusters, wherein the target load cluster is a load cluster whose network parameters satisfy a preset network parameter condition among the plurality of load clusters; A processing module, configured to determine a second group of load devices according to first group of device load information reported by a first group of load devices, wherein the target load cluster includes the first group of load devices, the first group of load devices includes the second group of load devices, each device load information in the first group of device load information includes a first device load parameter and a second device load parameter for indicating the load capacity of the corresponding load device in different dimensions, the load capacity of any load device in the second group of load devices is better than other load devices in the first group of load devices except the second group of load devices, and the load capacity of any two load devices in the second group of load devices is not better than each other; A creation module is used to determine a first load device from the second group of load devices and create the game on the first load device.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 12.
15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 12 are implemented.
16. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 12 through the computer program.