Resource allocation method and apparatus, computing device, and computer-readable storage medium

In the cloud gaming scenario, the control device selects a target computing device with good network quality and idle resources to provide computing resources for the terminal, which solves the terminal waiting problem caused by insufficient computing resources of the cloud server and improves the user experience.

CN113069760BActive Publication Date: 2025-10-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110454029.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-26
Publication Date
2025-10-10
Estimated Expiration
2041-04-26

AI Technical Summary

Technical Problem

In a cloud gaming scenario, when a large number of terminals are playing cloud games simultaneously within the area covered by the cloud server, limited computing resources cause some terminals to queue up and wait, increasing waiting time.

Method used

The control device receives the resource allocation request of the terminal, determines the target computing device whose network quality information meets the conditions and has idle computing resources, and sends a resource allocation response to the terminal, instructing the target computing device to provide computing resources.

Benefits of technology

It reduces the time that terminals wait for computing services, improves data interaction efficiency, ensures high network quality between target computing devices and terminals, and reduces queuing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113069760B_ABST
    Figure CN113069760B_ABST
Patent Text Reader

Abstract

The application discloses a resource allocation method and device, a computing device and a computer readable storage medium, and belongs to the technical field of clouds. The method allocates a target computing device, in which network quality information satisfies a first condition and idle computing resources exist, to a terminal through a control device. Since idle computing resources exist in the target computing device, a subsequent terminal does not need to queue and wait for the target computing device to provide computing services when requesting computing resources from the target computing device, thereby reducing the time length of waiting for the computing device to provide computing services.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud technology, and particularly relates to a resource allocation method and device, a computing device and a computer readable storage medium. BACKGROUND

[0002] With the development of cloud computing technology, cloud games relying on cloud computing technology are also increasing. Cloud game is an online game technology based on cloud computing technology. In the cloud game scenario, the cloud server generally runs the game and renders the game picture. The compressed data after rendering is transmitted to the terminal. The terminal does not need a high-end processor and a graphics card, and only needs to have basic video decompression capability to decompress the game picture to display the game picture.

[0003] At present, the cloud server providing cloud game service can be multiple, and the multiple cloud servers are respectively responsible for each terminal in a certain area range, that is, each cloud server only provides cloud game computing service for each terminal in a certain area range.

[0004] When a large number of terminals in the area range responsible by a cloud server simultaneously perform cloud game, due to the limited computing resources of the cloud server, some terminals can be queued to wait for the cloud server to provide service, which increases the waiting time of the terminal to perform cloud game. Therefore, a method for allocating computing resources is urgently needed to reasonably allocate the computing resources in the device (such as a cloud server) and avoid the terminal waiting for a long time for the computing service of other devices (such as a cloud server). SUMMARY

[0005] The embodiments of the present application provide a resource allocation method, device, computing device and computer readable storage medium, which can avoid the terminal waiting for a long time for the computing service of other devices. The technical solution is as follows:

[0006] In one aspect, a resource allocation method is provided, and the method is executed by a control device, and the method comprises:

[0007] Receiving a resource allocation request of a terminal, wherein the resource allocation request carries network quality information of a plurality of first candidate computing devices, and the network quality information is used to indicate the network quality between the corresponding first candidate computing device and the terminal;

[0008] Determining a target computing device from the plurality of first candidate computing devices, wherein the network quality information of the target computing device meets a first condition, and there is idle computing resource in the target computing device;

[0009] Sending a resource allocation response to the terminal, wherein the resource allocation response is used to indicate that the target computing device provides computing resource for the terminal.

[0010] In another aspect, a resource allocation method is provided, the method being executed by a terminal, the method comprising:

[0011] Acquire network quality information of a plurality of first candidate computing devices, where the network quality information is used to indicate network quality between the corresponding first candidate computing devices and the terminal;

[0012] Sending a resource allocation request to the control device, where the resource allocation request carries network quality information of the plurality of first candidate computing devices;

[0013] A resource allocation response is received, where the resource allocation response is used to indicate that a target computing device among the multiple first candidate computing devices provides computing resources for the terminal, wherein network quality information of the target computing device meets a first condition and there are idle computing resources in the target computing device.

[0014] In another aspect, a resource allocation device is provided, the device comprising:

[0015] a receiving module, configured to receive a resource allocation request from a terminal, wherein the resource allocation request carries network quality information of a plurality of first candidate computing devices, wherein the network quality information is used to indicate the network quality between any corresponding first candidate computing device and the terminal;

[0016] a determination module, configured to determine a target computing device from the plurality of first candidate computing devices, wherein the network quality information of the target computing device satisfies a first condition and there are idle computing resources in the target computing device;

[0017] The sending module is used to send a resource allocation response to the terminal, where the resource allocation response is used to instruct the target computing device to provide computing resources for the terminal.

[0018] In some embodiments, the resource allocation request is used to request allocation of a candidate computing device where the target cloud game instance is located for the terminal, the idle computing resources include the target cloud game instance, and the number of terminals currently served by the target cloud game instance does not reach the maximum number of terminals of the target cloud game instance, and the terminals currently served by the target cloud game instance do not include the terminal.

[0019] In some embodiments, before receiving the resource allocation request, the apparatus further includes a first determining module:

[0020] The receiving module is further configured to receive a device acquisition request from the terminal, wherein the device acquisition request is used to indicate a candidate computing device to be allocated to provide computing resources for the terminal;

[0021] The first determining module is configured to determine the plurality of first candidate computing devices from a plurality of candidate computing devices based on the device acquisition request;

[0022] The sending module is further configured to send a device acquisition response to the terminal, where the device acquisition response is used to indicate that the plurality of first candidate computing devices are allocated to the terminal.

[0023] In some embodiments, the device acquisition request carries address information of the terminal;

[0024] The first determining module includes:

[0025] a first determining unit, configured to determine, based on the address information of the terminal, operator information corresponding to the address information;

[0026] The second determining unit is configured to determine a plurality of candidate computing devices corresponding to the operator information among the plurality of candidate computing devices as the plurality of first candidate computing devices.

[0027] In some embodiments, the second determining unit is further configured to:

[0028] For any candidate computing device among the multiple candidate computing devices, if the any candidate computing device corresponds to the operator information and the distance between the any candidate computing device and the terminal meets the second condition, the any candidate computing device is determined as a first candidate computing device.

[0029] In some embodiments, the apparatus further comprises:

[0030] A first acquisition module, configured to acquire a plurality of network delays between the terminal and the target computing device;

[0031] The second acquisition module is used to acquire the network quality level of the target computing device based on the multiple network delays.

[0032] The second acquisition module includes:

[0033] a determining unit, configured to determine target network quality information of the target computing device based on the multiple network delays, wherein the target network quality information is used to indicate the network quality between the terminal and the target computing device during a process in which the target computing device provides a computing service for the terminal;

[0034] An acquiring unit is configured to acquire a network quality level of the target computing device based on the target network quality information.

[0035] In another aspect, a resource allocation device is provided, the device comprising:

[0036] an acquisition module, configured to acquire network quality information of a plurality of first candidate computing devices, wherein the network quality information is used to indicate network quality between the corresponding first candidate computing devices and the terminal;

[0037] a sending module, configured to send a resource allocation request to the control device, wherein the resource allocation request carries network quality information of the plurality of first candidate computing devices;

[0038] A receiving module is used to receive a resource allocation response, where the resource allocation response is used to indicate that a target computing device among the multiple first candidate computing devices provides computing resources for the terminal, wherein the network quality information of the target computing device meets a first condition and there are idle computing resources in the target computing device.

[0039] In some embodiments, the resource allocation request is used to request allocation of a candidate computing device where a target cloud game instance is located for the terminal, the idle computing resources include the target cloud game instance, and the number of terminals currently served by the target cloud game instance does not reach the maximum number of terminals of the target cloud game instance, and the terminals currently served by the target cloud game instance do not include the terminal;

[0040] The sending module is further configured to send a game running request to the target computing device, wherein the game running request is used to instruct the running of the cloud game deployed in the target cloud game instance;

[0041] The receiving module is also used to receive streaming media data generated during the operation of the cloud game.

[0042] In some embodiments, the sending module is further configured to send a device acquisition request to the control device, wherein the device acquisition request is used to indicate a candidate computing device that is allocated to provide computing resources for the terminal;

[0043] The receiving module is further configured to receive a device acquisition response, where the device acquisition response is used to indicate that the plurality of first candidate computing devices are allocated to the terminal.

[0044] In some embodiments, the apparatus further comprises:

[0045] a detection module, configured to detect a network delay between the terminal and the target computing device in response to the target computing device providing a computing service for the terminal, and obtain multiple network delays of the target computing device;

[0046] The sending module is configured to send the multiple network delays to the control device.

[0047] On the other hand, a computing device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the resource allocation method described in the above aspects.

[0048] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed in the resource allocation method as described in the above aspects.

[0049] On the other hand, a computer program product or computer program is provided, which includes computer program code, which is stored in a computer-readable storage medium. A processor of a computing device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computing device performs the operations performed in the resource allocation method described in the above aspects.

[0050] The beneficial effects of the technical solution provided by the embodiments of the present application are:

[0051] By controlling the device, a target computing device whose network quality information meets the first condition and has idle computing resources is allocated to the terminal. Since there are idle computing resources in the target computing device, when subsequent terminals request computing resources from the target computing device, they do not need to queue up and wait for the target computing device to provide computing services, thereby reducing the time the terminal waits for the computing device to provide computing services. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0053] Figure 1 This is a schematic diagram of the structure of a communication system provided by an embodiment of the present application;

[0054] Figure 2 This is a flow chart of a resource allocation method provided in an embodiment of the present application;

[0055] Figure 3 This is a flow chart of a resource allocation method provided in an embodiment of the present application;

[0056] Figure 4 This is a flow chart of a method for obtaining a network quality level provided in an embodiment of the present application;

[0057] Figure 5 This is a flow chart of a resource allocation method in a cloud gaming scenario provided by an embodiment of the present application;

[0058] Figure 6 This is a schematic diagram of the working principle of a communication system in a cloud gaming scenario provided by an embodiment of the present application;

[0059] Figure 7 This is a block diagram of a resource allocation device provided in an embodiment of the present application;

[0060] Figure 8 This is a block diagram of a resource allocation device provided in an embodiment of the present application;

[0061] Figure 9 This is a block diagram of a resource allocation device provided in an embodiment of the present application;

[0062] Figure 10 This is a block diagram of a resource allocation device provided in an embodiment of the present application;

[0063] Figure 11 This is a structural block diagram of a terminal provided in an embodiment of the present application;

[0064] Figure 12 This is a structural block diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0066] In this application, the terms "first," "second," and the like are used to distinguish identical or similar items having substantially the same role and function. It should be understood that "first," "second," and "nth" do not have a logical or temporal dependency, nor do they limit quantity or execution order. It should also be understood that although the following description uses the terms "first," "second," and the like to describe various elements, these elements should not be limited by these terms.

[0067] These terms are simply used to distinguish one element from another. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element, without departing from the scope of various examples. Both the first element and the second element can be elements, and in some cases, can be separate and different elements.

[0068] Here, at least one refers to one or more than one, for example, at least one element can be one element, two elements, three elements, or any other integer greater than or equal to one. At least two refers to two or more than two, for example, at least two elements can be two elements, three elements, or any other integer greater than or equal to two.

[0069] The resource allocation solution provided in the embodiments of the present application relates to the field of cloud technology.

[0070] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide or local area network (WAN) to enable data computing, storage, processing, and sharing. Cloud technology encompasses network, information technology, integration, management platform, and application technologies, all based on the cloud computing business model. It can form a resource pool for on-demand, flexible, and convenient use. Cloud computing will become a crucial enabler. Backend services for technical network systems, such as those for video and image websites and portals, require significant computing and storage resources. With the rapid development and application of the internet, every item will likely have its own unique identifier, requiring transmission to backend systems for logical processing. Data of varying levels will be processed separately, and data from all industries will require robust system support, which can only be achieved through cloud computing.

[0071] Simply put, cloud computing involves performing computations using a vast array of cloud-based computing resources and returning the results to end users. More specifically, cloud computing is a computing model that distributes computing tasks across a resource pool comprised of numerous computers, enabling various application systems to access computing power, storage space, and information services as needed. The network that provides these resources is called the "cloud." To users, these resources appear infinitely scalable, readily available, usable on demand, and scalable at any time, with a pay-per-use policy.

[0072] As a provider of cloud computing infrastructure, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose and use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.

[0073] Based on logical functional divisions, the PaaS (Platform as a Service) layer can be deployed on top of the IaaS layer, and the SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. SaaS can also be deployed directly on top of IaaS. PaaS is a platform for software execution, such as databases and web containers. SaaS is a variety of business software, such as web portals and text messaging apps. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.

[0074] It should be noted that in the embodiments of this application, the aforementioned cloud computing is applied to cloud gaming scenarios. In short, cloud gaming is a gaming method based on cloud computing, which places the logical calculations and screen rendering logic that should be performed on the terminal in the cloud. The game screen and instructions calculated and rendered by the cloud server are compressed and transmitted to the terminal via the network. The terminal only needs to perform simple decoding and screen display, as well as command interaction.

[0075] Specifically, cloud gaming, also known as gaming on demand, is an online gaming technology based on cloud computing. Cloud gaming technology enables thin clients with relatively limited graphics and data processing capabilities to run high-quality games. In a cloud gaming scenario, the game is not played on the player's gaming terminal, but rather on a cloud server. The cloud server renders the game scene as a video and audio stream, which is then transmitted to the player's gaming terminal over the network. The player's gaming terminal does not need powerful graphics and data processing capabilities; it only needs basic streaming media playback capabilities and the ability to receive player input commands and send them to the cloud server.

[0076] Of course, in some embodiments, the resource allocation scheme proposed in this application can also be used in scenarios other than cloud gaming. For example, in an online video playback scenario, the terminal selects the CDN (Content Delivery Network) with the best network quality through the method provided in the embodiments of this application. A CDN node is also a computing device.

[0077] The abbreviations or key terms involved in the embodiments of this application are defined below.

[0078] Terminal: Also known as a smart terminal or mobile smart terminal, this refers to a device that features a variety of human-computer interaction methods, internet access, and typically runs various operating systems and possesses significant processing power. In some embodiments, mobile smart terminals include, but are not limited to, smartphones, tablets, in-vehicle terminals, and handheld game consoles.

[0079] Edge computing nodes are a logical abstraction of the fundamental common capabilities of various edge-side product forms, such as edge gateways, edge controllers, and edge servers. These products offer common capabilities such as real-time edge data analysis, local data storage, and real-time network connectivity. Providing users with the closest, fastest, and appropriate edge computing node (e.g., where a cloud gaming server is deployed) can reduce network latency by at least 30-80ms compared to centralized deployments, significantly improving the user experience.

[0080] RTT (Round-Trip Time), also known as network latency or delay, is a critical performance metric in computer networks. Simply put, RTT is the time it takes for a datagram to travel between two points on a network. It is a key parameter that influences TCP (Transmission Control Protocol) performance and characterizes network health. Alternatively, RTT refers to the total delay from the time the sender sends data until the sender receives an acknowledgment from the receiver (the receiver sends an acknowledgment immediately upon receiving the data).

[0081] Figure 1 This is a schematic diagram of the structure of a communication system provided in an embodiment of the present application, see Figure 1 The communication system 100 includes a computing device 101, a terminal 102, and a control device 103. In the communication system 100, the number of computing devices 101 can be multiple, the number of terminals 102 can be at least one, and the number of control devices 103 can be at least one. The computing device 101 and the control device 103 in the communication system 100 can both be servers. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal 102 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0082] The computing devices 101 in the communication system 100 can be deployed in different areas. For example, one computing device 101 is deployed in area B, and another computing device 101 is deployed in area A. Each computing device 101 can provide computing services to terminals 102 in its area, and can also provide computing services to terminals 102 in other areas, thereby reducing the computing power loss of the terminals 102. For example, a computing device 101 deployed in area B can provide computing services to terminals 102 in area A.

[0083] The computing resources provided by each computing device 101 to the terminal 102 can be cloud computing resources. For example, in the application scenario of cloud gaming, the cloud computing resources are cloud gaming instances, wherein cloud games are deployed within the cloud gaming instances and cloud games are run within the cloud gaming instances. The cloud gaming instances represent virtual computing resources and include a collection of basic computing components such as a CPU (Central Processing Unit), an operating system, a network, a disk, and a GPU (Graphics Processing Unit). In some embodiments, the computing devices 101 are also referred to as edge computing nodes.

[0084] Each control device 103 within the communication system 100 is configured to allocate computing devices 101 to terminals 102 within multiple regions, so that the terminals 102 can use the computing resources within the allocated computing devices 101, thereby achieving resource allocation. The computing device 101 allocated by each control device 103 to a particular terminal 102 can be located in the same region as the terminal 102. For example, the control device 103 allocates a computing device 101 deployed in region A to a terminal 102 in region A. Alternatively, the computing device 101 allocated to a terminal 102 can be located in a different region than the terminal 102. For example, the control device 103 allocates a computing device 101 deployed in region B to a terminal 102 in region A.

[0085] In some embodiments, when the communication system 100 includes one control device 103, the control device 103 is responsible for allocating computing devices 101 to each terminal 102 within the communication system 100. When the communication system 100 includes multiple control devices 103, each control device 103 is responsible for allocating computing devices 101 to terminals 102 within a certain area within the communication system 100.

[0086] To further illustrate the process of controlling the device to allocate computing resources to the terminal, see Figure 2 The flowchart shown is a resource allocation method provided in an embodiment of the present application, which is executed by a control device.

[0087] 201. The control device receives a resource allocation request from a terminal, where the resource allocation request carries network quality information of multiple first candidate computing devices, where the network quality information is used to indicate network quality between the corresponding first candidate computing devices and the terminal.

[0088] The terminal is any terminal. The resource allocation request is used to request that a computing device for providing computing services be allocated to the terminal from the multiple first candidate computing devices. In some embodiments, the resource allocation request also carries address information of the multiple first candidate computing devices, wherein the address information of a first candidate computing device includes the IP (Internet Protocol) address of the first candidate computing device. Accordingly, the address information of the multiple first candidate computing devices can form an IP address list, that is, the IP address list includes the IP address of each first candidate computing device in the multiple first candidate computing devices.

[0089] The multiple first candidate computing devices are candidate computing devices assigned by the control device to provide computing resources for the terminal. The network quality information of the multiple first candidate computing devices includes network quality information of each first candidate computing device in the multiple first candidate computing devices. The network quality information of a first candidate computing device is used to indicate the network quality between the first candidate computing device and the terminal. The one first candidate computing device is any candidate computing device in the multiple first candidate computing devices.

[0090] In cloud gaming scenarios, as a "killer application" of cloud computing, cloud gaming is leading a revolution in how games are played. However, significant network latency between computing devices and terminals can affect the user experience of cloud gaming. Therefore, control devices can consider network latency when assigning computing devices to terminals.

[0091] In some embodiments, the network quality information of a first candidate computing device includes an average network delay between the first candidate computing device and the terminal. The average network delay between the first candidate computing device and the terminal is the average duration of the network delay between the first candidate computing device and the terminal per unit time.

[0092] 202. The control device determines a target computing device from the multiple first candidate computing devices, where network quality information of the target computing device meets a first condition and idle computing resources exist in the target computing device.

[0093] In some embodiments, the target computing device's network quality information meeting the first condition includes: the target computing device's network quality information falling within a target quality information range. If the network quality information of a first candidate computing device falls within the target quality information range, it indicates that the network quality between the terminal and the first candidate computing device is high, and the first candidate computing device meets the first condition, and the first candidate computing device is selected as the target computing device.

[0094] If the network quality information of a first candidate computing device includes the average network delay between the first candidate computing device and the terminal, the target quality information range accordingly includes all network delays that are less than a first network delay threshold. That is, if the average network delay between a first candidate computing device and the terminal is less than the first network delay threshold, the first candidate computing device meets the first condition and is therefore selected as the target computing device.

[0095] It should be noted that the above-mentioned first network delay threshold can be set according to the actual application scenario, and the first network delay threshold set in different application scenarios can be different. Taking the cloud gaming scenario as an example, the first network delay threshold set in different types of cloud gaming scenarios can be different. For example, the first network delay threshold set in the type 1 cloud gaming scenario is 80ms, while the first network delay threshold set in the type 2 cloud gaming scenario is 100ms.

[0096] In the same cloud gaming scenario, if the network type of the terminal is different, the first network delay threshold set will also be different. For example, in the same cloud gaming scenario, if the network type of the terminal is a wireless (WiFi) network or a 5G (The 5th Generation Mobile Communication Technology, fifth generation mobile communication technology) network, the average network delay within 10 to 20ms is an excellent network and does not affect the user experience, then the first network delay threshold can be set to 20ms. If the network type of the terminal is a 4G (The 4th Generation Mobile Communication Technology, fourth generation mobile communication technology) network, the average network delay within 40 to 60ms is an excellent network and does not affect the user experience, then the first network delay threshold can be set to 60ms. Here, the embodiment of the present application does not limit the first network delay threshold.

[0097] 203. The control device sends a resource allocation response to the terminal, where the resource allocation response is used to instruct the target computing device to provide computing resources for the terminal.

[0098] The resource allocation response carries the address information of the target computing device.

[0099] The control device allocates the target computing device to the terminal through step 203 to notify the terminal that it can use the computing resources in the target computing device.

[0100] The method provided in an embodiment of the present application allocates a target computing device whose network quality information satisfies a first condition and has idle computing resources to a terminal by controlling the device. Since the target computing device has idle computing resources, subsequent terminals that request computing resources from the target computing device do not need to wait in line for the target computing device to provide computing services, thereby reducing the time the terminal waits for the computing device to provide computing services. Furthermore, since the network quality information of the target computing device satisfies the first condition, the network quality between the target computing device and the terminal is relatively high during the process of the target computing device providing computing services to the terminal, thereby ensuring the efficiency of data interaction between the target computing device and the terminal.

[0101] In some embodiments, the terminal may first request the control device to allocate multiple first candidate node devices, and then the terminal obtains the network quality information of the multiple first candidate computing devices and reports the network quality information of the multiple first candidate computing devices to the control device. The control device allocates the target computing device to the terminal based on the network quality information of the multiple first candidate computing devices. For further explanation of this process, see Figure 3 The figure shows a flow chart of a resource allocation method provided by an embodiment of the present application.

[0102] 301. The terminal sends a device acquisition request to the control device, where the device acquisition request is used to indicate a candidate computing device that is allocated to provide computing resources for the terminal.

[0103] The device acquisition request carries the address information of the terminal, such as the IP address of the terminal.

[0104] The process of the terminal sending an acquisition request to the control device can be triggered by a user operation instruction. Taking the cloud gaming scenario as an example, a cloud game list is displayed on the display interface of the terminal, and the cloud game list can be composed of multiple cloud game icons. When it is detected that the user has started a cloud game icon in the cloud game list, the terminal is triggered to send a device acquisition request to the control device.

[0105] Among them, the start operation is the operation instruction of the user to start the cloud game, which can be a click operation such as a single-click operation, a double-click operation, or a click operation of other actions.

[0106] 302. The control device receives a device acquisition request from the terminal.

[0107] 303. The control device determines multiple first candidate computing devices from multiple candidate computing devices based on the device acquisition request.

[0108] The multiple candidate computing devices are computing devices located in different regions, and the operators of the multiple candidate computing devices may be different. For example, the operators of some of the multiple candidate computing devices are operator 1, the operators of some of the candidate computing devices are operator 2, and the operators of some of the candidate computing devices are operator 3.

[0109] In some embodiments, for any candidate computing device among the multiple candidate computing devices, the control device stores the correspondence between the address information of any candidate computing device, the regional identifier of the regional range to which it belongs, and the operator information of the operator. The regional identifier of the regional range to which any candidate computing device belongs can be the name of the regional range or the code of the regional range (such as a zip code). For example, if the regional range to which any candidate computing device belongs is regional range A, the regional identifier of the regional range can be "regional range A". The operator information of the operator is used to uniquely indicate the operator.

[0110] For ease of description, the embodiment of the present application records the corresponding relationship as the corresponding relationship of any candidate computing device. Among them, the corresponding relationship of the multiple candidate node devices can be as shown in Table 1, the candidate computing devices indicated by the address information 1-3 are candidate computing devices 1-3, the areas indicated by the area information 1-3 are area ranges 1-3, and the operators indicated by the operator information 1-2 are operators 1-2, wherein candidate computing device 1 is located in area range 1, and the operator of candidate computing device 1 is operator 1. Candidate computing device 2 is located in area range 2, and the operator of candidate computing device 2 is operator 1. Candidate computing device 3 is located in area range 3, and the operator of candidate computing device 3 is operator 3.

[0111] Table 1

[0112] Regional identification Address information Operator information Area ID 1 Address information 1 Operator Information 1 Area ID 2 Address information 2 Operator Information 1 Area ID 3 Address information 3 Operator Information 2

[0113] In some embodiments, the plurality of candidate computing devices belong to a plurality of area scopes, and the plurality of target area scopes are located in the plurality of area scopes, wherein at least one area scope exists in one target area scope, and one candidate computing device exists in each area scope, and the target area scope is indicated by a target area identifier. In some embodiments, the control device can store the correspondence of the plurality of candidate computing devices belonging to the same target area scope in parallel. For example, the correspondence of the plurality of candidate computing devices shown in Table 2, which is an example based on Table 1. As can be seen from Table 2, candidate computing devices 1-2 are located in target area 1 indicated by target area identifier 1, and area scopes 1-2 belong to target area 1. Candidate computing device 3 is located in target area 2 indicated by target area identifier 2, and area scope 3 belongs to target area 2.

[0114] Table 2

[0115]

[0116] Since the operators of different terminals can be different, in order to enable the candidate computing devices allocated by the control device for different terminals to be able to communicate with the terminals, the operators of the candidate computing devices allocated by the control device for the terminal can be the same as the operator of the terminal. Since the plurality of first candidate computing devices are the candidate computing devices allocated by the control device for the terminal, in some embodiments, the operators of the plurality of first candidate computing devices are the same as the operator of the terminal.

[0117] In some embodiments, the control device can first determine the operator of the terminal, and then allocate candidate computing devices with the same operator to the terminal. For example, step 303 can be implemented by the process shown in steps 3031-3032.

[0118] Step 3031, the control device determines the operator information corresponding to the address information of the terminal based on the address information of the terminal.

[0119] The address information of the terminal can be the IP address of the terminal.

[0120] Different operators use different forms of address information, so the control device can determine the operator information corresponding to the address information of the terminal based on the address information of the terminal and the forms of address information of various operators, wherein the operator indicated by the determined operator information is the operator of the terminal.

[0121] In some embodiments, the control device can query the IP address database and query the operator information and location information corresponding to the address information from the IP address database. The IP address database stores multiple IP addresses, each of which corresponds to an operator information and a location information. The operator information corresponding to an IP address is used to indicate the operator of the device with the IP address, and the location information corresponding to an IP address is used to indicate the location of the device with the IP address. For example, the name of the province or city where the device is located.

[0122] Step 3032: The control device determines the multiple candidate computing devices corresponding to the operator information among the multiple candidate computing devices as the multiple first candidate computing devices.

[0123] In some embodiments, the control device queries the multiple address information corresponding to the operation information from the correspondence between the multiple stored candidate computing devices, and the multiple candidate computing devices indicated by the multiple address information are also the multiple first candidate computing devices.

[0124] In another possible implementation, some of the candidate computing devices, which share the same operator as the terminal, may be far away from the terminal. The network quality between these candidate computing devices and the terminal may not be very good, and the likelihood that these candidate computing devices will ultimately provide computing resources to the terminal is also relatively low. In this case, the control device may not assign these candidate computing devices to the terminal to reduce the detection pressure on the candidate terminal. In this case, step 3032 can be replaced by step A below.

[0125] Step A: For any candidate computing device among the multiple candidate computing devices, if the any candidate computing device corresponds to the operator information and the distance between the any candidate computing device and the terminal meets the second condition, the control device determines the any candidate computing device as a first candidate computing device.

[0126] The second condition includes that the distance between the candidate computing device and the terminal is less than a distance threshold. The distance threshold set in different application scenarios is different. Here, the embodiment of the present application does not limit the distance threshold. Through step A, each first candidate computing device determined by the control device has the same operator as the terminal and the distance between it and the terminal is less than the distance threshold.

[0127] For the above step A, in some embodiments, the control device may first determine a candidate computing device with the same operator as the terminal from multiple candidate computing devices, and then determine a first candidate computing device that meets the second condition from the candidate computing devices with the same operator as the terminal, such as the following steps A1 and A3.

[0128] Step A1: The control device determines multiple candidate computing devices corresponding to the operator information among the multiple candidate computing devices as multiple second candidate computing devices.

[0129] This step A1 is similar to the above-mentioned step 3032. Here, this embodiment of the application does not elaborate on this step A1.

[0130] Step A3: The control device determines the multiple first candidate computing devices from the multiple second candidate computing devices, and the distances between the multiple first candidate computing devices and the terminal meet the second condition.

[0131] In one possible implementation, for any candidate computing device among the multiple second candidate computing devices, the control device stores the location of the candidate computing device. The control device determines the location of the terminal based on the address information of the terminal. The control device determines the distance between the candidate computing device and the terminal based on the location of the candidate computing device and the location of the terminal. If the distance between the candidate computing device and the terminal is less than the distance threshold, the distance between the candidate computing device and the terminal meets the second condition, and the control device determines the candidate computing device as a first candidate computing device.

[0132] For the above step A, in some embodiments, the control device may also first determine a candidate computing device that meets the second condition from multiple candidate computing devices, and then determine a first candidate computing device with the same operator as the terminal from the candidate computing devices that meet the second condition, such as the following steps A2 and A4.

[0133] Step A2: The control device determines multiple target candidate computing devices from the multiple candidate computing devices, and the distances between the multiple target candidate computing devices and the terminal meet the second condition.

[0134] This step A2 is similar to the above-mentioned step A3, and here, this embodiment of the application does not elaborate on this step A2.

[0135] Step A4: The control device determines multiple candidate computing devices corresponding to the operator information among the multiple target candidate computing devices as multiple first candidate computing devices.

[0136] This step A4 is similar to the above-mentioned step 3032. Here, this embodiment of the application does not elaborate on this step A4.

[0137] 304. The control device sends a device acquisition response to the terminal, where the device acquisition response is used to indicate that the multiple first candidate computing devices are allocated to the terminal.

[0138] The device obtains the response carrying the address information of the plurality of first candidate computing devices. In some embodiments, the address information of the plurality of first candidate computing devices may form an IP address list, that is, the IP address list includes the IP address of each of the plurality of first candidate computing devices.

[0139] 305. The terminal receives a device acquisition response.

[0140] After the terminal receives the device acquisition response, the terminal obtains the IP list from the device acquisition response. The candidate computing device indicated by each IP address in the IP list is also the first candidate computing device.

[0141] 306. The terminal obtains network quality information of multiple first candidate computing devices, where the network quality information is used to indicate network quality between the corresponding first candidate computing devices and the terminal.

[0142] In some embodiments, if the network quality information of a first candidate computing device includes an average network delay between the first candidate computing device and the terminal, this step 306 is implemented by the process shown in the following steps 3061-3062.

[0143] Step 3061: For any candidate computing device among the multiple first candidate computing devices, the terminal detects the network delay between the any candidate computing device and the terminal to obtain multiple network delays of the any candidate computing device.

[0144] The network delay of any candidate computing device is: the duration of a single detected network delay between the any candidate computing device and the terminal.

[0145] In some embodiments, the terminal sends a probe message to any candidate computing device based on the address information of the candidate computing device. When the candidate node device receives the probe message, it sends a probe confirmation response message to the terminal. After the terminal receives the probe confirmation response message, the terminal determines the difference between the time when the probe response message was received and the time when the probe message was sent as a network delay of the candidate computing device.

[0146] The probe message is used to detect the network delay between the candidate node device and the terminal. In some embodiments, the probe message is an ICMP (Internet Control Message Protocol) data packet. In this case, the process shown in step 3061 is the terminal performing the ICMP protocol network quality detection process. The probe confirmation response message is used to indicate that the candidate computing device has received the probe message.

[0147] Step 3062, the terminal determines the average network delay between the terminal and any candidate computing device based on the plurality of network delays of the any candidate computing device.

[0148] In some embodiments, the terminal determines the average network delay between the terminal and any candidate computing device as the average value of the plurality of network delays of the any candidate node device.

[0149] 307, the terminal sends a resource allocation request to the control device, and the resource allocation request carries the network quality information of the plurality of first candidate computing devices.

[0150] In some embodiments, in a cloud game scenario, the resource allocation request is used to request to allocate a candidate computing device where a target cloud game instance is located to the terminal. Optionally, the resource allocation request further carries an identifier of the target cloud game instance, and the target cloud game instance is a cloud game instance where a cloud game started by a user is deployed.

[0151] In another possible implementation, in a non-cloud game scenario, the resource allocation request further carries a target resource amount of computing resources required by the terminal.

[0152] 308, the control device receives the resource allocation request of the terminal.

[0153] 309, the control device determines a target computing device from the plurality of first candidate computing devices, and the network quality information of the target computing device satisfies a first condition, and there is idle computing resource in the target computing device.

[0154] The target computing device is a computing device allocated by the control device to the terminal for providing computing resources.

[0155] In some embodiments, the process shown in step 309 is implemented by the processes shown in steps 3092-3093.

[0156] Step 3091, the control device determines at least one third candidate computing device satisfying the first condition from the plurality of first candidate computing devices.

[0157] In some embodiments, for any candidate device in the plurality of first candidate computing devices, if the network quality information of the any candidate computing device belongs to a target quality information range, the network quality information of the any candidate computing device satisfies the any condition, and the control device determines the any candidate computing device as a third candidate computing device.

[0158] In some embodiments, the control device sorts the network quality information of the multiple first candidate computing devices in ascending order to obtain a network quality sequence. The control device determines each first candidate computing device corresponding to each piece of network quality information that belongs to the target quality information range in the network quality sequence as a third candidate computing device.

[0159] For example, if the network quality information of the multiple first candidate computing devices includes the average network delay of the multiple first candidate computing devices, the control device sorts the average network delay of the multiple first candidate computing devices in ascending order to obtain an average network delay sequence (i.e., a network quality sequence), and determines the first candidate computing devices corresponding to each average network delay in the average network delay sequence that is less than the first network delay threshold as a third candidate computing device.

[0160] Step 3092: The control device queries whether the at least one third candidate computing device has idle computing resources, and determines the third candidate computing device with idle computing resources as the target computing device.

[0161] In some embodiments, the control device stores computing resource allocation information for each of a plurality of candidate computing devices, wherein the computing resource allocation information for a candidate computing device includes first allocation information and second allocation information, wherein the first allocation information indicates idle computing resources in the candidate computing device, and the second allocation information indicates non-idle computing resources in the candidate computing device.

[0162] In a cloud gaming scenario, the computing resources of the candidate computing device include the cloud gaming instances within the candidate computing device. Each cloud gaming instance has a maximum number of terminals. The maximum number of terminals for a cloud gaming instance is the maximum number of terminals that the cloud gaming instance can provide services for. For example, the maximum number of terminals for a cloud gaming instance is 40, which means that the cloud gaming instance can provide computing services to a maximum of 40 terminals.

[0163] In the cloud gaming scenario, the idle computing resources of the candidate computing device include cloud gaming instances whose number of currently served terminals has not reached the corresponding maximum number of terminals, and the non-idle computing resources are cloud gaming instances whose number of served terminals has reached the corresponding maximum number of terminals. For ease of description, the cloud gaming instances whose number of currently served terminals has not reached the corresponding maximum number of terminals are recorded as idle cloud gaming instances, and the cloud gaming instances whose number of currently served terminals has reached the corresponding maximum number of terminals are recorded as busy cloud gaming instances or non-idle cloud gaming instances. The first allocation information of the candidate computing device includes the identifiers of each idle cloud gaming instance in the candidate computing device. Optionally, the first allocation information of the candidate computing device also includes the number of terminals currently served by each idle cloud gaming instance in the candidate computing device. Among them, the number of terminals currently served by a cloud gaming instance is the number of terminals currently provided by the cloud gaming instance. The second allocation information of the candidate computing device includes the identifiers of each non-idle cloud gaming instance in the candidate computing device. Optionally, the second allocation information of the candidate computing device also includes the maximum number of terminals for each non-idle cloud gaming instance in the candidate computing device.

[0164] For cloud gaming scenarios, in some embodiments, the control device obtains the identifier of the target cloud gaming instance from the resource allocation request. If the number of the at least one third candidate computing device is S, the control device queries the first allocation information of the i-th third candidate computing device among the S third candidate computing devices according to the order of the network quality information of the S third candidate computing devices from small to large. If the first allocation information of the i-th third candidate computing device includes the identifier of the target cloud gaming instance, it means that the number of terminals currently served by the target cloud gaming instance has not reached the maximum terminal data of the target cloud gaming instance, that is, the target cloud gaming instance in the i-th third candidate computing device is in an idle state, then the control device determines the i-th third candidate computing device as the target computing device and ends the query. If the first allocation information does not include the identifier of the target cloud gaming instance, this indicates that the target cloud gaming instance does not exist in the i-th third candidate computing device, or that the target cloud gaming instance exists in the i-th third candidate computing device, but the number of terminals currently served by the existing target cloud gaming instance has reached the maximum number of terminals for the target cloud gaming instance, and the target cloud gaming instance is busy. The control device then continues to query the (i+1)th third candidate computing device among the S third candidate computing devices until the target computing device is determined. Where S is an integer equal to 0, and i is an integer greater than, but less than or equal to, S.

[0165] Since the target computing device has not yet provided computing services to the terminal at this time, the terminal currently served by the target cloud game instance in the target computing device does not include the terminal.

[0166] In some embodiments, if a fast-path computing device is present among the at least one third candidate computing device, the control device directly determines the fast-path computing device as the target computing device. The fast-path computing device is a computing device that has established a dedicated communication channel for the target cloud gaming instance.

[0167] In another possible implementation, in a non-cloud gaming scenario, the idle computing resources in a candidate computing device are the computing resources that have not yet been allocated in the candidate computing device, and the non-idle computing resources are the computing resources that have been allocated. For this application scenario, the control device obtains the target resource amount of the computing resources required by the terminal from the resource allocation request. If the number of the at least one third candidate computing device is S, the control device queries the first allocation information of the i-th third candidate computing device among the S third candidate computing devices according to the order of the network quality information of the S third candidate computing devices from small to large. If the total amount of idle computing resources included in the first allocation information of the i-th third candidate computing device is greater than or equal to the target resource amount, it means that the i-th third candidate computing device can provide sufficient computing resources for the terminal, then the control device determines the i-th third candidate computing device as the target computing device and ends the query. If the total amount of idle computing resources included in the first allocation information of the i-th third candidate computing device is less than the target resource amount, it means that the i-th third candidate computing device cannot provide sufficient computing resources for the terminal, then the control device continues to query the i+1-th third candidate computing device among the S third candidate computing devices until the target computing device is determined.

[0168] 310. The control device sends a resource allocation response to the terminal, where the resource allocation response is used to instruct the target computing device to provide computing resources for the terminal.

[0169] 311. The terminal receives a resource allocation response.

[0170] After the terminal receives the resource allocation response, the terminal obtains the address information of the target computing device from the resource allocation response. Based on the obtained address information, the terminal determines that the control device has allocated the target computing device to the terminal.

[0171] The method provided in an embodiment of the present application allocates a target computing device whose network quality information satisfies a first condition and has idle computing resources to a terminal by controlling the device. Since the target computing device has idle computing resources, subsequent terminals that request computing resources from the target computing device do not need to wait in line for the target computing device to provide computing services, thereby reducing the time the terminal waits for the computing device to provide computing services. Furthermore, since the network quality information of the target computing device satisfies the first condition, the network quality between the target computing device and the terminal is relatively high during the process of the target computing device providing computing services to the terminal, thereby ensuring the efficiency of data interaction between the target computing device and the terminal.

[0172] In some embodiments, after determining the target computing device assigned to the terminal by the control device, the terminal can request the target computing device to provide computing services. In the process of the target computing device providing computing services to the terminal, the terminal can also detect the network quality between the terminal and the target computing device in real time and upload the detection results to the control device. The control device evaluates and calculates the network quality of the target computing device based on the detection results of the terminal. For further explanation of this process, please refer to Figure 4 The figure shows a flow chart of a method for obtaining a network quality level provided in an embodiment of the present application.

[0173] 401. The terminal sends a computing service request to the target computing device, where the computing service request is used to request the target computing device to provide computing services for the terminal.

[0174] The computing service request carries the address information of the terminal. In some embodiments, the terminal sends the computing service request to the target computing device based on the address information of the target computing device.

[0175] In some embodiments, the terminal starts a first thread and uses the first thread to perform step 401.

[0176] In the cloud gaming application scenario, the computing service request is a game running request, wherein the game running request is used to instruct the running of the cloud game deployed in the target cloud gaming instance. At this time, the game running request also carries the identifier of the target cloud gaming instance. Running the cloud game deployed in the target cloud gaming instance is also the computing service requested by the terminal. In this cloud gaming scenario, the first thread can execute this step 401 based on webRTC (Real-time Transport Protocol).

[0177] In non-cloud gaming application scenarios, the computing service request also carries data to be processed. In this case, the computing service requested by the terminal is data processing of the data to be processed, such as data storage, data calculation and other data processing services.

[0178] 402. The target computing device provides computing services to the terminal based on the computing service request and obtains a service result.

[0179] After the target computing device receives the computing request, step 312 is executed.

[0180] In a cloud gaming application scenario, the target computing device obtains the identifier of the target cloud gaming instance from the computing service request and associates the target cloud gaming instance with the terminal. The target computing device also increments the number of terminals currently served by the target gaming instance by 1. If, after the increment, the number of terminals currently served by the target cloud gaming instance reaches the maximum number of terminals for the target cloud gaming instance, the target computing device deletes the identifier of the target cloud gaming instance from the first allocation information of the target computing device and adds the identifier of the target cloud gaming instance to the second allocation information of the target computing device, indicating that the target cloud gaming instance is busy. If, after the increment, the number of terminals currently served by the target cloud gaming instance does not reach the maximum number of terminals for the target cloud gaming instance, the target computing device does not delete the identifier of the target cloud gaming instance from the first allocation information of the target computing device nor does it add the identifier of the target cloud gaming instance to the second allocation information of the target computing device, indicating that the target cloud gaming instance is idle. When the allocation information of the target computing device is updated, the target computing device may send the updated allocation information to the control device. In some embodiments, the allocation information of the target computing device may also be maintained by the control device.

[0181] After the target computing device obtains the identifier of the target cloud game instance, it runs the cloud game deployed in the target cloud game instance, renders the game scene during the cloud game operation into a media stream (such as a video and audio stream), and uses the media stream as the service result. The media stream includes the media stream data generated by the cloud game deployed in the target cloud game instance during operation.

[0182] In non-cloud gaming scenarios, the target computing device obtains the data to be processed from the computing service request, processes the data to be processed, and uses the result of the data processing as the service result. If the data processing is data storage, the result of the data processing can be the storage address of the target computing device where the data to be processed is stored. If the data processing is data calculation, the result of the data processing can be the calculation result of the target computing device on the data to be processed.

[0183] 403. The target computing device sends the service result to the terminal.

[0184] 404. The terminal receives the service result.

[0185] In a cloud gaming scenario, when the service result received by the terminal is media stream data generated by a cloud game deployed in the target cloud game instance during running of the cloud game, the terminal plays the media stream data and displays a game scene of the cloud game.

[0186] 405. In response to the target computing device providing the terminal with a computing service, the terminal detects a network delay between the terminal and the target computing device to obtain multiple network delays of the target computing device.

[0187] In some embodiments, during the process in which the target computing device provides the terminal with a computing service, the terminal starts a second thread, and the second thread is used to perform step 405. The second thread and the first thread are two independent threads, or it can be understood that the second thread is a bypass thread for network quality detection in addition to the first thread. The second thread performs step 405 based on the ICMP protocol.

[0188] In a possible implementation, step 405 is the same as step 3061 described above, and here, the embodiments of the present application do not repeat step 405.

[0189] 406. The terminal sends the multiple network delays of the target computing device to the control device.

[0190] The terminal can periodically obtain a network delay of the target computing device during the process in which the target computing device provides the terminal with a computing service, and after obtaining a network delay of the target computing device, the terminal sends the obtained network delay to the control device.

[0191] In some embodiments, after the terminal obtains a network delay of the target computing device, a network quality report is generated, and the network quality report is sent to the control device.

[0192] In which, the network quality report carries the network delay. In some embodiments, the network quality report also carries the data reporting time, the manufacturer information of the terminal, the system type of the terminal, the system version of the terminal, the network type used by the terminal, and the network protocol followed by the network quality report. The data reporting time is the sending time of the network quality report. The network type of the terminal includes a WiFi network, a network of various generations of mobile communication technology or other types of communication networks, wherein the networks of various generations of mobile communication technology are such as 2G (The 2nd Generation Mobile Communication Technology, second generation mobile communication technology) network, 3G (The 3rd Generation Mobile Communication Technology, third generation mobile communication technology) network, 4G network, 5G network or an upgraded version of 5G network. The network protocol followed by the network quality report includes IPv4 (Internet Protocol version 4, Internet Communication Protocol version 4) or IPv6 (Internet Protocol version 6, Internet Communication Protocol version 6). For example, the data structure of the network quality report shown in Table 3.

[0193] Table 3

[0194] report_time Data reporting time server_ip Server IP manufacturer terminal manufacturers os_type System Type os_version System version rtt Network latency netaccesstype Network Type netprottype Internet Protocol (IPv4 / IPv6)

[0195] In some embodiments, after obtaining a network delay of the target computing device, if the network delay is greater than a second network delay threshold, which represents a network timeout, it is considered that packet loss has occurred in the service result transmitted under the network delay. The network delay field in the network quality report generated based on the network delay is set to empty, and the actual detected network delay is not set in the network delay field. The network delay field is used to store the network delay.

[0196] The second network delay threshold is less than or equal to the first network delay threshold. The second network delay threshold is set to different values ​​in different application scenarios. For example, the second network delay threshold set in application scenario 1 is 200ms, and the second network delay threshold set in application scenario 2 is 70ms. Here, the embodiment of the present application does not limit the second network delay threshold.

[0197] 407. The control device obtains multiple network delays between the terminal and the target computing device.

[0198] In some embodiments, each time a network quality report is received from the terminal, the control device obtains a network delay from the network delay field in the network quality report. If the network delay field is empty, the control device cannot obtain the network delay from the network delay field, and the control device may use the target identifier as the network delay obtained this time. The target identifier is used to indicate a network timeout, and the target identifier may be -1. The embodiment of the present application does not limit the representation of the target identifier.

[0199] In some embodiments, during the process of obtaining network delay from multiple network quality reports of the target computing device, the control device counts the total number of network quality reports in which the network delay field is not empty, and records this total number as a first number. The control device also counts the total number of network quality reports in which the network delay field is empty, and records this total number as a second number.

[0200] 408. The control device obtains a network quality level of the target computing device based on the multiple network delays.

[0201] Among them, the network quality level is the level of network quality between the terminal and the target computing device. The network quality level is positively correlated with the network quality, that is, the higher the network quality level, the higher the network quality between the terminal and the target computing device, and the lower the network quality level, the lower the network quality between the terminal and the target computing device.

[0202] In some embodiments, this step 408 is implemented by the process shown in steps 4081-4082 below.

[0203] Step 4081: The control device determines target network quality information of the target computing device based on the multiple network delays.

[0204] The target network quality information is used to indicate the network quality between the terminal and the target computing device during the process of the target computing device providing computing services to the terminal. In some embodiments, the target network quality information includes the average network delay, packet loss rate, and delay jitter of the target computing device.

[0205] In some embodiments, the control device calculates the sum of the network delays of non-target identifiers in the multiple network delays, and determines the ratio between the sum and the first number as the average network delay of the target computing device.

[0206] In some embodiments, the control device determines the packet loss rate as the ratio of the second number to the total number of network quality reports from the target computing device, wherein the total number is the sum of the first number and the second number.

[0207] In some embodiments, the control device calculates a total standard deviation based on each network delay of the non-target identifier in the multiple network delays, and uses the total standard deviation as the delay jitter. The total standard deviation is shown in the following formula (1):

[0208] σ=sqrt(((x1-x)^ 2 +...+(x j -x)^ 2 +...+(x n -x)^ 2 ) / n)

[0209] Where σ is the total standard deviation, x is the average network delay, n is the total number of non-target network delays in the multiple network delays (i.e., the first number), and x j is the network delay of the jth non-target identifier, where j is an integer greater than 0 and less than or equal to n.

[0210] For example, in a cloud gaming scenario, during the life cycle of a cloud game, the terminal detects the network delay once per second. If the user who logs in to the terminal plays a cloud game for 10 minutes, the terminal detects 600 times, and the terminal sends a total of 600 network quality reports to the target computing device. The control device can count the first number, second number, and total number of the 600 network quality reports, and obtain the network delay carried in these 600 network quality messages. The network delay not carried is directly recorded as the target identifier. Based on the first number, second number, total number, and network delay carried in these 600 network quality messages, the control device can calculate the average network delay, packet loss rate, and delay jitter.

[0211] Step 4082: The control device obtains the network quality level of the target computing device based on the target network quality information.

[0212] In some embodiments, each performance indicator in the target quality information is provided with a corresponding weight, wherein the sum of the weights of the various performance indicators in the target quality information is 1. The weight of a performance indicator is used to indicate the importance of the performance indicator in measuring network quality. For example, the weight of average network delay is 60%, the weight of packet loss rate is 20%, and the weight of delay jitter is 20%. Different weights can be set for the same performance indicator in different application scenarios. Here, the embodiment of the present application does not limit the weight of each performance indicator in the target quality information.

[0213] In some embodiments, the control device performs a weighted summation on the weight of each performance indicator in the target quality information and the indicator value of each performance indicator to obtain the network quality level. For example, the network quality level is shown in the following formula (2):

[0214] W=A*W1+B*W2+C*W3

[0215] Where W is the network quality level, W1 is the weight of the average network delay, W2 is the weight of the packet loss rate, and W3 is the weight of the delay jitter.

[0216] The method provided in the embodiment of the present application reports multiple network delays of the target computing device to the control device through the terminal during the process of the target computing device providing computing services to the terminal, so that the control device can obtain the network quality level of the target computing device based on the multiple network delays to realize the evaluation calculation of the network quality of the target computing device. In the application scenario of cloud gaming, several computing devices are generally deployed in several major key areas (such as developed cities). The location of the computing devices may not be reasonable, and the user experience in other remote areas cannot be guaranteed. The control device can be used Figure 4 The process described above obtains the network quality level of each computing device, which can then be combined to guide the optimization of computing device site selection, thereby achieving the goal of improving user experience.

[0217] To further explain Figure 3 and Figure 4 For the implementation process, see Figure 5The flowchart of a resource allocation method in a cloud gaming scenario provided by an embodiment of the present application is shown. In a cloud gaming scenario, the terminal requests the cloud gaming backend (i.e., the control device) for a list of IP addresses of edge computing nodes of the same operator, and the edge computing nodes are also candidate computing devices. After receiving the request, the cloud gaming backend returns a list of IP addresses of the same operator to the terminal. The terminal performs a network quality detection of the ICMP protocol on the IP addresses in the IP address list to obtain the average network delay of each IP address, and each IP address represents a first candidate computing device. The terminal sends a resource allocation request to the cloud gaming backend, wherein the resource allocation request carries the IP address list and the average network delay of each IP address in the IP address list. The cloud gaming backend queries whether there are idle computing resources in the edge computing device indicated by each IP address in order of the average network delay from small to large, and returns the IP address of an available edge computing node (i.e., the target computing device) to the terminal, thereby completing the process of edge computing node speed measurement and site selection. When the terminal receives the IP of the available edge computing node, the terminal enters the cloud gaming game (the cloud gaming runs in this available edge computing node). At the same time, the terminal starts a bypass thread to perform continuous network quality detection of the edge computing node using the ICP protocol, with a detection frequency of 1 time per second. The terminal also reports the detection results (i.e., the various network delays of the edge computing node) to the cloud gaming backend, which performs data analysis based on the detection results to obtain the average network delay, packet loss rate, and delay jitter of the edge computing device to complete the network quality detection process of the edge computing node. The network quality detection process of the edge computing node can also be performed on each edge computing device in different areas.

[0218] To further explain Figure 3 and Figure 4 For the implementation process, see Figure 6 The following is a schematic diagram of the working principle of a communication system in a cloud gaming scenario provided by an embodiment of the present application. The communication system includes an IP list module, a dispatch module, a data analysis module, an edge computing node, and a terminal. The IP list module, the dispatch module, and the data analysis module can be deployed on a control device. The communication system mainly includes the following steps 1-5 when performing resource allocation.

[0219] Step 1. The IP list module returns the IP address list of the edge computing nodes of the same operator to the terminal. The IP address list can be configured in the background. In order to reduce the length of the IP address list and reduce invalid network detection by the terminal, when configuring the IP list address, the entire area it covers can be divided into multiple target area ranges. For example, the entire area it covers can be divided into four major target area ranges, such as target area ranges 1-4. For terminals in different area ranges, the IP list module will return different IP address lists so that the terminal can detect the edge computing nodes in the nearest area range. For example, the edge computing nodes indicated by the IP address list returned to the terminal are server clusters deployed in City A, City B, City C, City D, City E, City F and other areas.

[0220] Step 2: The terminal performs ICMP protocol network quality detection on the IP addresses in the returned IP address list to obtain the average network delay of each IP address, and sends the average network delay of each IP address to the scheduling module.

[0221] Step 3: The scheduling module determines whether there is an idle cloud gaming instance among the optimal edge computing nodes, based on the average network latency, in ascending order. If not, the scheduling module checks the next best edge computing node, and so on, until an edge computing node with an idle cloud gaming instance is found. For example, the edge computing node ultimately determined is a server in the cluster in City A. If no such edge computing node exists, the terminal enters the queue, waiting for an idle cloud gaming instance to appear.

[0222] Among them, the optimal edge computing node is the edge computing node indicated by the IP address with the smallest average network delay in the IP address list, and the suboptimal edge computing node is the edge computing node indicated by the IP address with the second smallest average network delay in the IP address list.

[0223] Step 4: The terminal direct connection scheduling module finally determines the edge computing node for cloud gaming, and at the same time starts a bypass thread to perform ICMP continuous network quality detection on the edge computing node.

[0224] Step 5: The terminal reports the detection results to the data analysis module, and the detection module evaluates and calculates the network quality of the edge computing node.

[0225] Figure 7 This is a block diagram of a resource allocation device provided in an embodiment of the present application, see Figure 7 The apparatus 700 includes a receiving module 701 , a receiving module 702 , and a sending module 703 .

[0226] A receiving module 701 is configured to receive a resource allocation request from a terminal, wherein the resource allocation request carries network quality information of multiple first candidate computing devices, where the network quality information indicates the network quality between the corresponding first candidate computing devices and the terminal;

[0227] A determination module 702 is configured to determine a target computing device from the plurality of first candidate computing devices, wherein the network quality information of the target computing device satisfies a first condition and there are idle computing resources in the target computing device;

[0228] The sending module 703 is configured to send a resource allocation response to the terminal, where the resource allocation response is used to instruct the target computing device to provide computing resources for the terminal.

[0229] In some embodiments, the resource allocation request is used to request allocation of a candidate computing device where the target cloud game instance is located for the terminal, the idle computing resources include the target cloud game instance, and the number of terminals currently served by the target cloud game instance does not reach the maximum number of terminals of the target cloud game instance, and the terminals currently served by the target cloud game instance do not include the terminal.

[0230] In some embodiments, the apparatus 700 further includes a first determining module 704, such as Figure 8 As shown, Figure 8 This is a block diagram of a resource allocation device implemented in the present application.

[0231] The receiving module 701 is further configured to receive a device acquisition request from the terminal, where the device acquisition request is used to indicate a candidate computing device to be allocated to provide computing resources for the terminal;

[0232] The first determining module 704 is configured to determine the plurality of first candidate computing devices from the plurality of candidate computing devices based on the device acquisition request;

[0233] The sending module 703 is further configured to send a device acquisition response to the terminal, where the device acquisition response is used to indicate that the multiple first candidate computing devices are allocated to the terminal.

[0234] In some embodiments, the device acquisition request carries address information of the terminal;

[0235] The first determining module 704 includes:

[0236] a first determining unit, configured to determine, based on the address information of the terminal, operator information corresponding to the address information;

[0237] The second determining unit is configured to determine a plurality of candidate computing devices corresponding to the operator information among the plurality of candidate computing devices as the plurality of first candidate computing devices.

[0238] In some embodiments, the second determining unit is further configured to:

[0239] For any candidate computing device among the multiple candidate computing devices, if the any candidate computing device corresponds to the operator information and the distance between the any candidate computing device and the terminal meets the second condition, the any candidate computing device is determined as a first candidate computing device.

[0240] In some embodiments, the apparatus 700 further includes:

[0241] A first acquisition module 705 is configured to acquire multiple network delays between the terminal and the target computing device;

[0242] The second acquisition module 706 is configured to acquire a network quality level of the target computing device based on the multiple network delays.

[0243] In some embodiments, the second obtaining module 706 includes:

[0244] a determining unit, configured to determine target network quality information of the target computing device based on the multiple network delays, wherein the target network quality information is used to indicate the network quality between the terminal and the target computing device during a process in which the target computing device provides a computing service for the terminal;

[0245] An acquiring unit is configured to acquire a network quality level of the target computing device based on the target network quality information.

[0246] The solution provided by the embodiment of the present application allocates a target computing device whose network quality information meets the first condition and has idle computing resources to the terminal. Since there are idle computing resources in the target computing device, when subsequent terminals request computing resources from the target computing device, they do not need to queue up and wait for the target computing device to provide computing services, thereby reducing the time the terminal waits for the computing device to provide computing services.

[0247] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0248] It should be noted that the resource allocation apparatus provided in the above embodiments uses the division of the functional modules described above as an example only when performing resource allocation. In actual applications, the functional allocation can be performed by different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to perform all or part of the functions described above. Furthermore, the resource allocation apparatus provided in the above embodiments and the resource allocation method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0249] Figure 9 This is a block diagram of a resource allocation device provided in an embodiment of the present application, see Figure 9 The apparatus 900 includes:

[0250] An acquisition module 901 is configured to acquire network quality information of a plurality of first candidate computing devices, where the network quality information indicates the network quality between the corresponding first candidate computing devices and the terminal;

[0251] A sending module 902 is configured to send a resource allocation request to a control device, wherein the resource allocation request carries network quality information of the plurality of first candidate computing devices;

[0252] The receiving module 903 is used to receive a resource allocation response, where the resource allocation response is used to indicate that a target computing device among the multiple first candidate computing devices provides computing resources for the terminal, wherein the network quality information of the target computing device meets the first condition and there are idle computing resources in the target computing device.

[0253] In some embodiments, the resource allocation request is used to request allocation of a candidate computing device where a target cloud game instance is located for the terminal, the idle computing resources include the target cloud game instance, and the number of terminals currently served by the target cloud game instance does not reach the maximum number of terminals of the target cloud game instance, and the terminals currently served by the target cloud game instance do not include the terminal;

[0254] The sending module 902 is further configured to send a game running request to the target computing device, wherein the game running request is used to instruct the running of the cloud game deployed in the target cloud game instance;

[0255] The receiving module 903 is further configured to receive streaming media data generated during the operation of the cloud game.

[0256] In some embodiments, the sending module 902 is further configured to send a device acquisition request to the control device, where the device acquisition request is used to indicate a candidate computing device that is allocated to provide computing resources for the terminal;

[0257] The receiving module 903 is further configured to receive a device acquisition response, where the device acquisition response is used to indicate that the multiple first candidate computing devices are allocated to the terminal.

[0258] In some embodiments, the apparatus 900 further includes a detection module 904, such as Figure 10 As shown, Figure 10 This is a block diagram of a resource allocation device implemented in the present application.

[0259] a detection module 904 configured to detect a network delay between the terminal and the target computing device in response to the target computing device providing a computing service for the terminal, and obtain multiple network delays of the target computing device;

[0260] The sending module 902 is configured to send the multiple network delays to the control device.

[0261] The solution provided in the embodiment of the present application allocates a target computing device whose network quality information meets the first condition and has idle computing resources to a terminal by controlling the device. Since there are idle computing resources in the target computing device, when subsequent terminals request computing resources from the target computing device, they do not need to queue up and wait for the target computing device to provide computing services, thereby reducing the time the terminal waits for the computing device to provide computing services.

[0262] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0263] It should be noted that the resource allocation apparatus provided in the above embodiments uses the division of the functional modules described above as an example only when performing resource allocation. In actual applications, the functional allocation can be performed by different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to perform all or part of the functions described above. Furthermore, the resource allocation apparatus provided in the above embodiments and the resource allocation method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0264] Figure 11This is a block diagram of the structure of a terminal provided in an embodiment of the present application. Terminal 1100 may be a portable mobile terminal, such as a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. Terminal 1100 may also be referred to as user equipment, a portable terminal, a laptop terminal, a desktop terminal, or other similar names.

[0265] Typically, the terminal 1100 includes a processor 1101 and a memory 1102 .

[0266] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0267] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1102 is used to store at least one program code, which is used to be executed by the processor 1101 to implement the resource allocation method provided in the method embodiment of the present application.

[0268] In some embodiments, terminal 1100 can also optionally include a peripheral device interface 1103 and at least one peripheral device. The processor 1101, the memory 1102 and the peripheral device interface 1103 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 1103 through a bus, a signal line or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 1104, a display screen 1105, a camera component 1106, an audio circuit 1107 and a power supply 1109.

[0269] The peripheral device interface 1103 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, the memory 1102 and the peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102 and the peripheral device interface 1103 can be implemented on a separate chip or circuit board, and the present embodiments are not limited in this regard.

[0270] The radio frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1104 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 1104 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 1104 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1104 can also include NFC (Near Field Communication) related circuitry, which is not limited by the present application.

[0271] The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1105 is a touch screen display, the display screen 1105 also has the ability to collect touch signals on the surface or above the surface of the display screen 1105. The touch signal can be input as a control signal to the processor 1101 for processing. At this time, the display screen 1105 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1105, which is set on the front panel of the terminal 1100; in other embodiments, there can be at least two display screens 1105, which are respectively set on different surfaces of the terminal 1100 or in a folding design; in other embodiments, the display screen 1105 can be a flexible display screen, which is set on the curved surface or folding surface of the terminal 1100. Even more, the display screen 1105 can be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0272] The camera assembly 1106 is used to capture images or videos. In some embodiments, the camera assembly 1106 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1106 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0273] The audio circuit 1107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 1101 for processing, or input into the radio frequency circuit 1104 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the terminal 1100. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, the audio circuit 1107 may also include a headphone jack.

[0274] Power supply 1109 is used to power various components in terminal 1100. Power supply 1109 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1109 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is charged via a wired line, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also support fast charging technology.

[0275] In some embodiments, the terminal 1100 further includes one or more sensors 1110 , including but not limited to: an acceleration sensor 1111 , a gyroscope sensor 1112 , a pressure sensor 1113 , an optical sensor 1115 , and a proximity sensor 1116 .

[0276] The accelerometer 1111 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the terminal 1100. For example, the accelerometer 1111 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 1101 can control the display screen 1105 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 1111. The accelerometer 1111 can also be used to collect game or user motion data.

[0277] The gyroscope sensor 1112 can detect the orientation and rotation angle of the terminal 1100. The gyroscope sensor 1112 can work with the acceleration sensor 1111 to collect the user's 3D movements on the terminal 1100. Based on the data collected by the gyroscope sensor 1112, the processor 1101 can implement the following functions: motion sensing (such as changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0278] The pressure sensor 1113 can be disposed at the side frame of the terminal 1100 and / or the lower layer of the display screen 1105. When the pressure sensor 1113 is disposed at the side frame of the terminal 1100, the holding signal of the user to the terminal 1100 can be detected, and the left-hand or right-hand recognition or the shortcut operation can be performed by the processor 1101 according to the holding signal collected by the pressure sensor 1113. When the pressure sensor 1113 is disposed at the lower layer of the display screen 1105, the controllability control on the UI interface can be realized by the processor 1101 according to the pressure operation of the user to the display screen 1105. The controllability control includes at least one of the button control, the scroll bar control, the icon control, and the menu control.

[0279] The optical sensor 1115 is used to collect the ambient light intensity. In one embodiment, the processor 1101 can control the display brightness of the display screen 1105 according to the ambient light intensity collected by the optical sensor 1115. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the display screen 1105 is decreased. In another embodiment, the processor 1101 can also dynamically adjust the shooting parameter of the camera assembly 1106 according to the ambient light intensity collected by the optical sensor 1115.

[0280] The proximity sensor 1116, also called the distance sensor, is usually disposed at the front panel of the terminal 1100. The proximity sensor 1116 is used to collect the distance between the user and the front of the terminal 1100. In one embodiment, when the proximity sensor 1116 detects that the distance between the user and the front of the terminal 1100 gradually decreases, the display screen 1105 is switched from the bright screen state to the off-screen state by the processor 1101; when the proximity sensor 1116 detects that the distance between the user and the front of the terminal 1100 gradually increases, the display screen 1105 is switched from the off-screen state to the bright screen state by the processor 1101.

[0281] Those skilled in the art can understand that Figure 11 The structure shown in the above description does not constitute a limitation on the terminal 1100, and can include more or less components than the drawings, or combine certain components, or adopt different component arrangements.

[0282] Figure 12It is a structural block diagram of a computing device provided in an embodiment of the present application. The computing device 1200 can be a server (such as a computing device or a control device in a method embodiment). The computing device 1200 may have relatively large differences due to different configurations or performances, and may include one or more CPUs (Central Processing Units, processors) 1201 and one or more memories 1202, wherein at least one program code is stored in the memory 1202, and the at least one program code is loaded and executed by the processor 1201 to implement the resource allocation method provided in each of the above-mentioned method embodiments. Of course, the computing device 1200 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The computing device 1200 may also include other components for implementing device functions, which will not be described in detail here.

[0283] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one computer program, and the at least one computer program is loaded and executed by a processor of a computer device to implement the operations performed by a computing device or a control device in the virtual resource allocation method in an embodiment of the present application.

[0284] An embodiment of the present application also provides a computer program product, which includes computer program code, which is stored in a computer-readable storage medium. A processor of a computing device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computing device executes the above-mentioned resource allocation method.

[0285] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0286] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A resource allocation method, characterized in that: The method is executed by a control device, and includes: receiving a resource allocation request from a terminal, the resource allocation request carrying network quality information of a plurality of first candidate computing devices, the network quality information being used to indicate network quality between the corresponding first candidate computing devices and the terminal; Determine a target computing device from the plurality of first candidate computing devices, wherein network quality information of the target computing device satisfies a first condition and idle computing resources exist in the target computing device; Sending a resource allocation response to the terminal, where the resource allocation response is used to instruct the target computing device to provide computing resources for the terminal, and the terminal is used to use a first thread to request the target computing device to provide computing services for the terminal; obtaining a plurality of network delays between the terminal and the target computing device, which are sent by the terminal, where the plurality of network delays are detected by the terminal using a second thread during a process in which the target computing device provides computing services for the terminal, where the second thread and the first thread are two independent threads; determining target network quality information of the target computing device based on the multiple network delays, the target network quality information being used to indicate the network quality between the terminal and the target computing device during the process of the target computing device providing computing services to the terminal, the target network quality information including the average network delay, packet loss rate, and delay jitter of the target computing device; Based on the target network quality information, a network quality level of the target computing device is obtained.

2. The method according to claim 1, characterized in that The resource allocation request is used to request allocation of a candidate computing device where the target cloud game instance is located for the terminal, the idle computing resources include the target cloud game instance, and the number of terminals currently served by the target cloud game instance does not reach the maximum number of terminals of the target cloud game instance, and the terminals currently served by the target cloud game instance do not include the terminal.

3. The method according to claim 1 or 2, characterized in that Before receiving the resource allocation request from the terminal, the method further includes: receiving a device acquisition request from the terminal, where the device acquisition request is used to indicate a candidate computing device to be allocated to provide computing resources for the terminal; Determine the plurality of first candidate computing devices from a plurality of candidate computing devices based on the device acquisition request; A device acquisition response is sent to the terminal, where the device acquisition response is used to indicate that the plurality of first candidate computing devices are allocated to the terminal.

4. The method according to claim 3, characterized in that The device acquisition request carries the address information of the terminal; Determining the plurality of first candidate computing devices from a plurality of candidate computing devices based on the device acquisition request includes: Determining, based on the address information of the terminal, operator information corresponding to the address information; Determine a plurality of candidate computing devices corresponding to the operator information among the plurality of candidate computing devices as the plurality of first candidate computing devices.

5. The method according to claim 4, characterized in that After determining, based on the address information of the terminal, the operator information corresponding to the address information, the method further includes: For any candidate computing device among the multiple candidate computing devices, if the any candidate computing device corresponds to the operator information and the distance between the any candidate computing device and the terminal meets the second condition, the any candidate computing device is determined as a first candidate computing device.

6. A resource allocation method, characterized in that: The method is executed by a terminal, and includes: Acquire network quality information of a plurality of first candidate computing devices, where the network quality information is used to indicate network quality between the corresponding first candidate computing devices and the terminal; Sending a resource allocation request to the control device, where the resource allocation request carries network quality information of the plurality of first candidate computing devices; receiving a resource allocation response, the resource allocation response being used to instruct a target computing device among the plurality of first candidate computing devices to provide computing resources for the terminal, wherein network quality information of the target computing device satisfies a first condition and there are idle computing resources in the target computing device; Using a first thread to request the target computing device to provide computing services for the terminal; In response to the target computing device providing a computing service for the terminal, during the process of the target computing device providing the computing service for the terminal, using a second thread to detect a network delay between the terminal and the target computing device to obtain multiple network delays of the target computing device, the second thread and the first thread being two independent threads; sending the plurality of network delays to the control device; The control device is used to determine the target network quality information of the target computing device based on the multiple network delays, and obtain the network quality level of the target computing device based on the target network quality information. The target network quality information is used to indicate the network quality between the terminal and the target computing device during the process of the target computing device providing computing services to the terminal. The target network quality information includes the average network delay, packet loss rate and delay jitter of the target computing device.

7. The method according to claim 6, characterized in that The resource allocation request is used to request allocation of a candidate computing device where a target cloud game instance is located for the terminal, the idle computing resources include the target cloud game instance, the number of terminals currently served by the target cloud game instance does not reach the maximum number of terminals of the target cloud game instance, and the terminals currently served by the target cloud game instance do not include the terminal; After receiving the resource allocation response, the method further includes: Sending a game running request to the target computing device, where the game running request is used to instruct the running of the cloud game deployed in the target cloud game instance; Receive streaming media data generated during the operation of the cloud game.

8. The method according to claim 6 or 7, characterized in that Before obtaining network quality information of the plurality of first candidate computing devices, the method further includes: Sending a device acquisition request to the control device, where the device acquisition request is used to indicate a candidate computing device that is allocated to provide computing resources for the terminal; A device acquisition response is received, where the device acquisition response is used to indicate that the plurality of first candidate computing devices are assigned to the terminal.

9. A resource allocation device, characterized in that: The device comprises: a receiving module, configured to receive a resource allocation request from a terminal, wherein the resource allocation request carries network quality information of a plurality of first candidate computing devices, wherein the network quality information is used to indicate network quality between the corresponding first candidate computing devices and the terminal; a determination module, configured to determine a target computing device from the plurality of first candidate computing devices, wherein the network quality information of the target computing device satisfies a first condition and there are idle computing resources in the target computing device; a sending module, configured to send a resource allocation response to the terminal, wherein the resource allocation response is used to instruct the target computing device to provide computing resources for the terminal, and the terminal is configured to use a first thread to request the target computing device to provide computing services for the terminal; a first acquisition module, configured to acquire multiple network delays between the terminal and the target computing device, which are sent by the terminal, where the multiple network delays are detected by the terminal using a second thread during a process in which the target computing device provides computing services for the terminal, where the second thread and the first thread are two independent threads; A second acquisition module is used to determine the target network quality information of the target computing device based on the multiple network delays, where the target network quality information is used to indicate the network quality between the terminal and the target computing device during the process of the target computing device providing computing services to the terminal. The target network quality information includes the average network delay, packet loss rate and delay jitter of the target computing device; based on the target network quality information, the network quality level of the target computing device is acquired.

10. The device according to claim 9, characterized in that The resource allocation request is used to request allocation of a candidate computing device where the target cloud game instance is located for the terminal, the idle computing resources include the target cloud game instance, and the number of terminals currently served by the target cloud game instance does not reach the maximum number of terminals of the target cloud game instance, and the terminals currently served by the target cloud game instance do not include the terminal.

11. The device according to claim 9 or 10, characterized in that The apparatus further includes a first determining module; The receiving module is further configured to receive a device acquisition request from the terminal, wherein the device acquisition request is used to indicate a candidate computing device to be allocated to provide computing resources for the terminal; The first determining module is configured to determine the plurality of first candidate computing devices from a plurality of candidate computing devices based on the device acquisition request; The sending module is further configured to send a device acquisition response to the terminal, where the device acquisition response is used to indicate that the plurality of first candidate computing devices are allocated to the terminal.

12. The device according to claim 11, characterized in that The device acquisition request carries the address information of the terminal; The first determining module includes: a first determining unit, configured to determine, based on the address information of the terminal, operator information corresponding to the address information; The second determining unit is configured to determine a plurality of candidate computing devices corresponding to the operator information among the plurality of candidate computing devices as the plurality of first candidate computing devices.

13. The device according to claim 12, characterized in that The second determining unit is further configured to: For any candidate computing device among the multiple candidate computing devices, if the any candidate computing device corresponds to the operator information and the distance between the any candidate computing device and the terminal meets the second condition, the any candidate computing device is determined as a first candidate computing device.

14. A resource allocation device, characterized in that: The device comprises: an acquisition module, configured to acquire network quality information of a plurality of first candidate computing devices, wherein the network quality information is used to indicate network quality between the corresponding first candidate computing devices and the terminal; a sending module, configured to send a resource allocation request to the control device, wherein the resource allocation request carries network quality information of the plurality of first candidate computing devices; a receiving module, configured to receive a resource allocation response, the resource allocation response being used to instruct a target computing device among the plurality of first candidate computing devices to provide computing resources for the terminal, wherein network quality information of the target computing device satisfies a first condition and idle computing resources exist in the target computing device; A module for executing the following steps: utilizing a first thread to request the target computing device to provide computing services for the terminal; a detection module, configured to, in response to the target computing device providing a computing service for the terminal, detect a network delay between the terminal and the target computing device using a second thread during the process of the target computing device providing the computing service for the terminal, thereby obtaining multiple network delays of the target computing device, wherein the second thread and the first thread are two independent threads; The sending module is further configured to send the multiple network delays to the control device; The control device is used to determine the target network quality information of the target computing device based on the multiple network delays, and obtain the network quality level of the target computing device based on the target network quality information. The target network quality information is used to indicate the network quality between the terminal and the target computing device during the process of the target computing device providing computing services to the terminal. The target network quality information includes the average network delay, packet loss rate and delay jitter of the target computing device.

15. The device according to claim 14, characterized in that The resource allocation request is used to request allocation of a candidate computing device where a target cloud game instance is located for the terminal, the idle computing resources include the target cloud game instance, the number of terminals currently served by the target cloud game instance does not reach the maximum number of terminals of the target cloud game instance, and the terminals currently served by the target cloud game instance do not include the terminal; The sending module is further configured to send a game running request to the target computing device, wherein the game running request is used to instruct the running of the cloud game deployed in the target cloud game instance; The receiving module is also used to receive streaming media data generated during the operation of the cloud game.

16. The device according to claim 14 or 15, characterized in that The sending module is further configured to send a device acquisition request to the control device, wherein the device acquisition request is used to indicate a candidate computing device that is allocated to provide computing resources for the terminal; The receiving module is further configured to receive a device acquisition response, where the device acquisition response is used to indicate that the plurality of first candidate computing devices are allocated to the terminal.

17. A computing device, characterized in that The device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded by the processor and executes the resource allocation method according to any one of claims 1 to 5, or executes the resource allocation method according to any one of claims 6 to 8.

18. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store at least one computer program, and the at least one computer program is used to execute the resource allocation method according to any one of claims 1 to 5, or the resource allocation method according to any one of claims 6 to 8.

19. A computer program product, characterized in that The computer program product includes computer program code, which is stored in a computer-readable storage medium. A processor of a computing device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computing device executes the resource allocation method described in any one of claims 1 to 5, or executes the resource allocation method described in any one of claims 6 to 8.

Citation Information

Patent Citations

  • Game player matching method and apparatus, matching server and readable storage medium

    CN107920122A

  • Network request processing method and device, server and computer readable storage medium

    CN110365747A

  • Game control method and device, storage medium and electronic equipment

    CN111643889A