Connection resource scheduling method, cloud platform and electronic equipment
By obtaining the scheduling delay factor and selecting the target terminal, the cloud platform's connection resources are reassigned, and the invalid occupation of resource allocation in high concurrency scenarios is solved, and the effective utilization of resources and smooth promotion of business is achieved.
Patent Information
- Application Number
- CN202411811665.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-10
AI Technical Summary
In high concurrency scenarios, the existing static resource allocation method leads to invalid occupation of connected resources, resulting in response delays and access difficulties, and affecting business promotion.
By responding to the connection resource scheduling request, obtain the scheduling delay factor, reassign the connection resources, force disconnect the connected terminal, and select the target terminal based on the attribute information of the reconnection request to optimize resource allocation.
It realizes effective scheduling of connected resources in high concurrency scenarios, optimizes resource utilization, alleviates queueing pressure, ensures smooth business progress, and controls the optimization processing time to achieve user unconsciousness.
Smart Images

Figure CN119697234A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud platforms, and in particular to a connection resource scheduling method, a cloud platform, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the rapid development of Internet technology and Internet of Things technology, in some cloud platform application scenarios, such as the centralized management platform of Internet of Things (IoT) devices and cloud gaming platform, a large number of terminal devices need to access the cloud platform for real-time communication, resulting in frequent high-concurrency connection requests, which puts higher requirements on the connection resource management and scheduling of the cloud platform.
[0003] Existing connection resource management solutions usually adopt a static allocation mechanism. The common practice is to estimate the maximum concurrency during the design phase and configure enough connection channels accordingly to meet the needs during peak hours. This static resource configuration method will quickly occupy the preset connection capacity, especially in the case of sudden high concurrency. Some of these occupied connection resources are invalid, such as the terminal device is not uploading data or the terminal is not in the game, resulting in delays in responding to new connection requests, or even long periods of inaccessibility, which seriously affects the advancement of business. Summary of the invention
[0004] In order to achieve effective scheduling of connection resources in high-concurrency scenarios and ensure the smooth progress of business, an embodiment of the present application provides a connection resource scheduling method. The method is applied to a cloud platform and includes the following steps: in response to a connection resource scheduling request, obtaining a scheduling delay factor; wherein the connection resource scheduling request is used to trigger the reallocation of connection resources among connected terminals and terminals to be connected; determining a target resource allocation algorithm from a plurality of resource allocation algorithms based on the scheduling delay factor; forcibly disconnecting the connection of the connected terminal and listening to the reconnection request sent by the connected terminal; selecting a target terminal from the connected terminal and the terminal to be connected based on the attribute information of the reconnection request and the target resource allocation algorithm; and allocating the connection resources to the target terminal.
[0005] Based on the above technical solution, it is possible to reallocate connection resources in high-concurrency scenarios, thereby optimizing the utility of connection resources, and to allocate occupied but invalid connection resources to terminals to be connected to a certain extent, thereby alleviating queuing pressure and realizing resource flow. At the same time, by determining the delay factor and selecting the resource allocation algorithm based on the delay factor, it is ensured that the reallocation of resources will not have a negative impact on the connected terminals in the target terminal, and at the same time effectively control the optimization processing time, so as to achieve user-imperceptible. Furthermore, by obtaining a reconnection request and selecting the target terminal based on the attributes of the reconnection request, the accuracy of data analysis can be guaranteed, close to the actual network status.
[0006] In one implementation, the method for obtaining the scheduling delay factor includes: determining a minimum response time for reconnecting after disconnection according to a network status of the connected terminal as the scheduling delay factor.
[0007] In one implementation, determining the minimum response time for reconnecting after disconnection based on the network status of the connected terminal includes: correcting the first transmission delay based on a status correction parameter to obtain a second transmission delay, selecting the minimum value of each of the second transmission delays, and determining it as the minimum response time for reconnecting after disconnection; wherein, the first transmission delay is obtained by the resource scheduling process by detecting the network connection between each of the connected terminals and the cloud platform when it is determined that the number of terminals to be connected reaches a second threshold; and the status correction parameter is determined by the resource scheduling process based on the amount of data transmitted per unit time between each of the connected terminals and the cloud platform based on the network connection.
[0008] The scheduling delay factor determined based on the above technical solution can ensure that after a forced disconnection, a reconnection request to the target terminal can be responded to normally, so as to maintain the network connection and reduce the impact on the services of the connected terminals.
[0009] In one implementation, the method for determining a target resource allocation algorithm from a plurality of resource allocation algorithms based on the scheduling delay factor includes: determining the total number of the connected terminals and the terminals to be connected; predicting the corresponding predicted calculation time in each resource allocation algorithm based on the total number; and selecting a resource allocation algorithm whose predicted calculation time is less than and has the smallest difference with the scheduling delay factor as the target resource allocation algorithm.
[0010] In one implementation, the resource allocation algorithms have different computational intensities.
[0011] In one implementation, the selecting of target terminals from the connected terminals and the terminals to be connected based on the attribute information of the reconnection request and the target resource allocation algorithm includes: evaluating the activity status of each of the connected terminals based on each of the attribute information to obtain a corresponding evaluation result; calculating the initial survival value of each of the connected terminals and each of the terminals to be connected based on the target resource allocation algorithm; correcting the initial survival value of each of the connected terminals according to the evaluation result to obtain a final survival value of each of the connected terminals; correcting the corresponding initial survival value based on the activity status of each of the terminals to be connected to obtain a final survival value of each of the terminals to be connected; and selecting a target number of target terminals from the connected terminals and the terminals to be connected based on each of the final survival values.
[0012] Based on the above technical solution, the activity status of the connected terminals and the active status of the terminals to be connected are evaluated, and the evaluation results are used to correct the initial survival value calculated by the resource scheduling algorithm. In this way, in the process of determining the survival value of each terminal, the business utility and real-time activity status of the terminal are taken into account at the same time, which can ensure the effective utilization of connection resources to a large extent.
[0013] In one implementation, allocating the available connection resources to the target terminal includes: responding to a reconnection request of a connected terminal among the target terminals to restore the connection; responding to a login request of a to-be-connected terminal among the target terminals to establish a connection with the to-be-connected terminal among the target terminals.
[0014] Based on the same inventive concept, an embodiment of the present application also provides a cloud platform, which schedules the connection resources of the platform based on the above method.
[0015] In addition, an embodiment of the present application also provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and the program or instruction implements the above method when executed by the processor.
[0016] The embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings constituting a part of the present application are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 creative work.
[0019] Figure 1 A flow chart of a connection resource scheduling method provided in an embodiment of the present application is shown.
[0020] Figure 2 A flow chart of a method for obtaining a scheduling delay factor in an embodiment of the present application is shown.
[0021] Figure 3 A flow chart of a method for determining a target resource allocation algorithm in an embodiment of the present application is shown.
[0022] Figure 4 A flow chart of a method for selecting a target terminal in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, and "first", "second" and various digital numbers are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.
[0025] The features, structures or characteristics in this application may be combined in one or more embodiments in any suitable manner. In various embodiments of this application, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0026] Some optional features in the embodiments of the present application may be implemented independently in some scenarios without relying on other features to solve corresponding technical problems and achieve corresponding effects. They may also be combined with other features in some scenarios as needed.
[0027] In this application, unless otherwise specified, the same or similar parts between the various embodiments can refer to each other. In the various embodiments of this application, if there is no special description and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships. The implementation methods of this application do not constitute a limitation on the scope of protection of this application.
[0028] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0029] The method provided in the embodiment of the present application is applied to a cloud platform. In a specific example, the cloud platform can be a cloud management platform for managing IoT terminal devices, or a cloud gaming platform, or other cloud service platforms that also need to effectively manage high-concurrency requests.
[0030] Please refer to Figure 1 The connection resource scheduling method provided in the embodiment of the present application specifically includes the following steps.
[0031] S101, in response to a connection resource scheduling request, obtaining a scheduling delay factor.
[0032] The connection resource scheduling request is used to trigger the reallocation of connection resources among the connected terminals and the terminals to be connected.
[0033] Specifically, the cloud platform maintains a connection resource pool for managing connection resources. The number of connection resources in the resource pool can be the maximum connection resources that the cloud platform can provide based on the system load, that is, the maximum number of connections, to avoid insufficient system resources due to too many terminals being connected.
[0034] The cloud platform creates a connection processing process and a resource scheduling process.
[0035] When the connection processing process receives a connection request from a terminal, it first determines whether there are idle connection resources in the resource pool. If so, it directly responds to the connection request and allocates connection resources to the connection request, thereby establishing a network connection with the terminal.
[0036] If there are no idle connection resources at present, the connection processing process will write the connection request into the queue and wait for the connection resources to be released, and then take the connection request out of the queue for processing.
[0037] In a high concurrency scenario, the number of connection requests in the queue may surge. When the number of connection requests in the queue exceeds a first threshold, the connection processing process automatically generates a connection resource scheduling request and sends it to the resource scheduling process to request reallocation of connection resources.
[0038] After receiving the connection resource scheduling request, the resource scheduling process first obtains the scheduling delay factor, which is used to indicate the disconnection time of the connected terminal. That is, after the connection is disconnected, the reconnection request can be responded to within the disconnection time and the connection can be restored.
[0039] In an example, see Figure 2 , the method for obtaining the scheduling delay factor includes the following steps.
[0040] S201, obtaining a connected terminal.
[0041] In implementation, the resource scheduling process can obtain the allocation objects of each connection resource by accessing the resource pool, and these allocation objects are connected terminals. It can be understood that the number of connected terminals is the same as the number of connection resources in the resource pool.
[0042] S202: Determine the network status of each connected terminal.
[0043] In implementation, the resource scheduling process monitors the queuing queue in real time, and when it is determined that the number of connection requests in the queuing queue reaches a second threshold, the network status of each connected terminal is evaluated.
[0044] In one implementation, the resource scheduling process can detect the network transmission delay between the connected terminal and the cloud platform in real time, and determine the network status of the connected terminal based on the first transmission delay obtained by the detection. The first transmission delay is determined based on the difference between the sending time of the detection message and the receiving time of the detection response message.
[0045] In another implementation, the resource scheduling process may detect the network connection between the connected terminal and the cloud platform to obtain a first transmission delay; obtain historical interaction messages between the connected terminal and the cloud platform, count the total amount of data of each interaction message and the connected time, and obtain a state correction parameter; based on the state correction parameter, correct the first transmission delay to obtain a second transmission delay. The second transmission delay is used to characterize the network state of the connected terminal. The second threshold is less than the first threshold.
[0046] In a specific example, the resource scheduling process can calculate the data transmission volume per unit time based on the total amount of data and the connected time, and determine the state correction parameter based on the data transmission volume per unit time, wherein the larger the data transmission volume per unit time, the larger the state correction parameter, and the correction parameter is greater than or equal to 1 and less than or equal to 1.2. Then, the second transmission delay is obtained by dividing the first transmission delay by the state correction parameter, that is, for a connected terminal with a larger data transmission volume per unit time, the corresponding second transmission delay is smaller.
[0047] S203: Determine a minimum response time for reconnecting after disconnection according to the network status of the connected terminal as a scheduling delay factor.
[0048] Accordingly, in one example, the minimum value among the first transmission delays is selected as the value of the scheduling delay factor.
[0049] In another example, the minimum value of each second transmission delay is selected as the value of the scheduling delay factor. Since the second transmission delay is the result of correcting the first transmission delay based on the state correction parameter, and when the data transmission volume per unit time is larger, the second transmission delay is reduced by a corresponding proportion, so that, to a certain extent, it can be ensured that the connected terminals with higher activity will not be unable to reconnect normally due to unreasonable values of the scheduling delay factor.
[0050] S102: Determine a target resource allocation algorithm from a plurality of resource allocation algorithms based on a scheduling delay factor.
[0051] Specifically, the resource allocation algorithm is used to calculate the survival value of each terminal to be calculated, so that the resource scheduling process can determine the resource allocation object based on the survival value. Among them, the survival value is used to reflect the utility that the resource allocation object can generate after being allocated to the connection resources. It is understandable that the definition of utility is different in different demand scenarios.
[0052] For example, in IoT applications, the utility generated by the terminals related to the key monitored objects is greater, and in cloud gaming applications, the utility generated by active players is greater. Therefore, the method of determining the utility can be defined according to the actual application needs, thereby setting the corresponding resource allocation algorithm.
[0053] The cloud platform is pre-configured with a variety of resource allocation algorithms. The differences between the resource allocation algorithms include different parameter ranges, different difficulty in obtaining parameters, and different algorithm complexity. Therefore, the computing intensity of each resource allocation algorithm is different. In other words, for the same number of terminals to be calculated, the computing time required is different.
[0054] In one example, the cloud platform is configured with two resource allocation algorithms. One resource allocation algorithm is to directly determine the initial survival value of each terminal to be calculated based on the priority of the terminal to be calculated, where the priority is pre-configured according to the terminal attributes. For example, in the cloud game application scenario, the corresponding priority can be determined according to the user's membership level. In the Internet of Things application scenario, the corresponding priority can be determined according to the device type or monitoring task attributes. Therefore, the resource scheduling process can directly obtain the priority of each terminal to be calculated, and output the initial survival value of each terminal to be calculated based on the corresponding relationship between the priority and the survival value.
[0055] Another resource allocation algorithm includes obtaining the parameter values of multiple dimensions of each terminal to be calculated, and calculating the corresponding initial survival value based on the parameters of multiple dimensions. For example, in the application scenario of cloud games, the corresponding initial survival value can be calculated based on the player's historical activity, payment information, interaction records with other players, and game progress. In the application scenario of the Internet of Things, the corresponding initial survival value can be calculated based on the operating parameters of the terminal device, business type, whether it is currently in the data reporting cycle, the amount of data to be sent, etc. Since it takes a lot of time to obtain and comprehensively calculate each parameter, there is a significant difference in the calculation time of the two algorithms. In high-concurrency scenarios, the difference in total calculation time will be magnified.
[0056] It is understandable that the specific algorithm can be selected according to the actual situation of the application scenario, and the present application is not limited thereto.
[0057] Please refer to Figure 3 The method of determining a target resource allocation algorithm from a plurality of resource allocation algorithms based on a scheduling delay factor includes: S301, determining the total number of connected terminals and terminals to be connected.
[0058] In implementation, the total number of connected terminals and the total number of terminals to be connected may be determined according to the number of connection resources and the number of connection requests in the queuing queue.
[0059] S302: Predict the corresponding calculation duration in each resource allocation algorithm based on the total quantity.
[0060] In one implementation, the calculation time of each resource allocation algorithm under different preset data volumes can be obtained in advance through multiple tests, so as to establish an association table to record the calculation time of each preset data volume under different resource allocation algorithms. The value range of the preset data volume includes the sum of the number of connected resources and the first threshold as the minimum value, the number of connected resources and the maximum capacity of the queue as the maximum value, and the intermediate node value is determined based on the historical highest queuing data. Alternatively, the intermediate node value is determined based on a fixed step size.
[0061] The resource scheduling process can match the preset quantities in the association table with the total quantity to match the target preset quantity that is not less than the total quantity and has the smallest difference with the total quantity, and use the calculation time corresponding to the target preset data under different resource allocation algorithms as the predicted calculation time.
[0062] S303: Select a resource allocation algorithm whose predicted calculation duration is less than and whose difference with the scheduling delay factor is the smallest as the target resource allocation algorithm.
[0063] The target resource allocation algorithm determined based on the above method can ensure that the calculation is completed in advance within the time range limited by the scheduling extension factor.
[0064] S103, forcibly disconnecting the connected terminal and monitoring a reconnection request sent by the connected terminal.
[0065] After determining the target resource allocation algorithm, all connected terminals are forced to disconnect the network connection with the cloud platform at the same time, and each connection port is monitored to receive the reconnection request sent by each connected terminal.
[0066] S104: Select a target terminal from the connected terminals and the terminals to be connected based on the attribute information of the reconnection request and the target resource allocation algorithm.
[0067] The attribute information of the reconnection request includes the sending frequency.
[0068] It is worth noting that when the connected terminal is forcibly disconnected, the calculation based on the target resource allocation algorithm begins. The start node of the monitoring period is the time of forced disconnection, and the end node is the time when the calculation is completed.
[0069] In an example, see Figure 4 The method for selecting a target terminal from connected terminals and terminals to be connected based on attribute information of a reconnection request and a target resource allocation algorithm includes the following steps.
[0070] S401, based on each attribute information, evaluating the activity status of each connected terminal to obtain a corresponding evaluation result.
[0071] In implementation, a reconnection control service is pre-implemented on each terminal to control the number of times the terminal sends a reconnection request when it finds that the connection is disconnected.
[0072] In one example, the reconnection control service monitors the network connection status by determining whether the network is disconnected based on the response status of a normal data packet. For example, if the heartbeat packet cannot be received normally or the cloud platform does not respond to the service request, the network connection is determined to be disconnected. In another example, the resource scheduling service sends a connection disconnection notification to each connected terminal before forcibly disconnecting the connection. After the reconnection control service detects the connection disconnection notification, it can determine that the network connection has been disconnected. In some other examples, the above two examples can also be combined to achieve monitoring of the network connection status.
[0073] When a network disconnection is detected, the reconnection control service determines the frequency of sending reconnection requests by evaluating the demand for interaction between the terminal and the cloud platform. The greater the demand, the higher the frequency.
[0074] In one example, the method for determining the demand degree includes obtaining the activity of the business process on the terminal that interacts with the cloud platform to determine the demand degree. The higher the activity degree, the higher the corresponding demand degree. Specifically, the activity of the business process can be evaluated by obtaining one or more performance indicators such as the CPU occupancy rate, memory usage, disk I / O and network I / O of the business process.
[0075] For example, a corresponding threshold range is determined in advance based on the CPU occupancy rates of the business process in different active states such as idle, normal, and busy, so as to determine the current active state of the business process based on the matching relationship between the CPU occupancy rate obtained in real time and the threshold range, and then the current demand for the business process is determined based on the corresponding relationship between the active state and the demand, and then the frequency of sending reconnection requests based on the demand is set. It can be understood that the corresponding relationship between the active state and the demand can be pre-configured on the terminal according to the business attributes of the terminal. Similarly, the corresponding relationship between the demand and the frequency of sending reconnection requests is also pre-configured on the terminal.
[0076] It is worth noting that the correspondence between the active state and the demand is personalized according to different terminal situations, and the correspondence between the demand and the sending frequency is uniformly set based on the global device. In this way, not only can the resource scheduling process uniformly evaluate the terminal according to the sending frequency, but also can realize personalized configuration of terminals of different importance to balance the evaluation results of the terminal. Generally speaking, the demand corresponding to a terminal with a higher degree of importance in the same active state is higher than that of a terminal with a lower degree of importance, and the sending frequency determined based on the same correspondence between the demand and the sending frequency is also higher. Among them, the importance of the terminal can be determined according to the actual application needs. For example, in the IoT application scenario, the importance of the terminal can be determined based on the device type, monitoring object, data collection cycle, etc.; in the cloud game scenario, the importance of the corresponding terminal can be determined based on the identity of the currently logged-in player, historical operation records, etc.
[0077] It is understandable that in actual application, the relevant corresponding relationship can be adjusted according to business needs, and the present application is not limited to this.
[0078] The reconnection control service sends a reconnection request to the cloud platform based on the determined sending frequency.
[0079] The resource scheduling process receives reconnection requests by listening to the corresponding port, and determines the sending frequency within the listening time. Based on the sending frequency, it evaluates the activity status of the connected terminal to obtain the evaluation result. Among them, the higher the sending frequency and the better the corresponding activity status, the better the corresponding evaluation result. It is worth noting that since there are differences in the connected terminals each time the resources are reallocated, when determining the activity status of each connected terminal, it is determined based on the relative relationship of each sending frequency. For example, each sending frequency can be sorted, and the corresponding order ranking is used as the value of the corresponding activity status to obtain the evaluation result, and the value setting method of the evaluation result can be set according to actual needs.
[0080] Specifically, the sending frequency may be determined according to the reconnection request actually received.
[0081] In one example, when the number of reconnection requests actually received is greater than 1, the minimum time interval between two reconnection requests is determined as the sending frequency; when the number actually received is 1, the difference between the receiving time of the reconnection request and the end time of the monitoring is first determined. If the difference is greater than the maximum time interval determined based on the actual reconnection request, the difference is used as the sending interval to calculate the corresponding sending frequency; if the difference is not greater than the above maximum time interval, the maximum time interval is used as the sending interval to calculate the corresponding sending frequency. Based on this, the corresponding value can be reasonably set for the terminal that cannot determine the sending frequency, providing a relatively accurate data basis for the subsequent calculation process.
[0082] If the number of reconnection requests actually received is equal to 0, the resource scheduling process directly sets the corresponding sending frequency. That is, when it is determined that the reconnection request cannot be received within the monitoring time due to network transmission conditions, the resource scheduling process can directly set the corresponding sending frequency according to the preset method.
[0083] In one example, the minimum value of the sending frequencies determined based on the actually received reconnection requests can be used as the sending frequency of each terminal that cannot receive the reconnection request within the monitoring time, so as to achieve unified degradation processing for the terminals with excessively long first transmission delay.
[0084] In another example, the smaller value between the average value and the median of each actual sending frequency can be used as the basic value, and the basic value can be proportionally reduced according to the size of each first transmission delay to serve as the corresponding sending frequency of the connected terminal, wherein the longer the first transmission delay is, the lower the configuration value obtained after compensation is, so that the terminal with excessively long first transmission delay is graded for degradation processing.
[0085] Based on the above method, by performing degradation processing on the terminal with too long first transmission delay, it can ensure to a certain extent that the terminal with better communication quality obtains more resource inclination, thereby reducing the allocation of resources to terminals with uncertain evaluation results, which causes unreasonable resource allocation.
[0086] In other implementations, when the actual number of reconnection requests is equal to 0, and the number of reconnection requests that should be received within the monitoring time period is estimated to be greater than 0 based on the first transmission delay, the corresponding terminal communication is determined to be abnormal, and it can be directly removed from this reallocation to release connection resources.
[0087] S402: Calculate the initial survival value of each connected terminal and each terminal to be connected based on the target resource allocation algorithm.
[0088] S403, modifying the initial survival value of each connected terminal according to the evaluation result to obtain the final survival value of each connected terminal; modifying the corresponding initial survival value based on the active state of each terminal to be connected to obtain the final survival value of each terminal to be connected.
[0089] In implementation, the evaluation result value corresponding to the connected terminal can be used to perform a secondary calculation on the initial survival value, and the calculation result can be used as the final survival value. The principle of correction is that the better the activity state, the higher the final survival value. In one example, the sum of the evaluation result value and the initial survival value can be used as the final survival value. It can be understood that a weight value can also be introduced in the calculation process to adjust the calculation result.
[0090] In one implementation, the resource scheduling process can also modify the corresponding initial survival value based on the activity status of each terminal to be connected. The principle of modification is to determine the corresponding activity status according to the number of requests sent by each terminal to be connected. The more times the request is sent and the more active it is, the higher the final survival value obtained by modification.
[0091] S404: Select a target number of target terminals from the connected terminals and the terminals to be connected based on the final survival values.
[0092] In implementation, the final survival value may be used to sort and the terminals with the highest target number may be selected as the target terminals, where the target number is the weight of the connection resources in the resource pool.
[0093] S105: Allocate connection resources to the target terminal.
[0094] In implementation, the method of allocating connection resources to the target terminal includes: responding to a reconnection request of a connected terminal in the target terminal to restore the connection; responding to a login request of a terminal to be connected in the target terminal to establish a connection with the terminal to be connected in the target terminal.
[0095] Based on the connection resource scheduling method provided in the embodiment of the present application, by forcibly disconnecting the connected terminal and completing the reallocation of connection resources within the time specified by the delay factor, in a high concurrency scenario, by reselecting the target terminal, the occupied but lower-utility connection resources can be forcibly released to a certain extent for use by the terminal to be connected that can generate greater utility. This can not only achieve the effective flow of connection resources and alleviate queuing pressure, but also provide resource utility from the overall operation level.
[0096] Furthermore, by reasonably determining the delay factor and selecting a resource allocation algorithm with corresponding computing intensity, it can be ensured that reconnection can be successfully achieved after the target terminal is determined, and that high concurrency scenarios under different network conditions can be adapted.
[0097] In addition, an embodiment of the present application also provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements a method as in any one of the implementations in the embodiments of the present application; wherein the processor may adopt a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits, for executing relevant programs to implement the method in any one of the implementations in the embodiments of the present application.
[0098] The processor may also be an integrated circuit electronic device with signal processing capability. In the implementation process, each step of the method in any implementation of the embodiments of the present application may be completed by an integrated logic circuit of hardware in the processor or by instructions in software form.
[0099] The above-mentioned processor can also be a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be combined and executed.
[0100] The software module may be located in a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines its hardware to complete the functions required to be performed by the units included in the data processing device of the embodiment of the present application, or executes the method in any one of the implementation modes in the embodiment of the present application.
[0101] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method when executed by a processor.
[0102] Those skilled in the art can understand that all or part of the steps in the above-mentioned implementation method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of each implementation method of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0103] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A connection resource scheduling method, characterized in that: Applied to a cloud platform, the method comprises the steps of: In response to a connection resource scheduling request, obtaining a scheduling delay factor; wherein the connection resource scheduling request is used to trigger reallocation of connection resources among connected terminals and terminals to be connected; Determining a target resource allocation algorithm from a plurality of resource allocation algorithms based on the scheduling delay factor; Forcibly disconnecting the connected terminal and monitoring a reconnection request sent by the connected terminal; Selecting a target terminal from the connected terminals and the terminals to be connected based on the attribute information of the reconnection request and the target resource allocation algorithm; The connection resource is allocated to the target terminal.
2. The method according to claim 1, characterized in that The method for obtaining the scheduling delay factor includes: The minimum response time for reconnecting after disconnection is determined according to the network status of the connected terminal as the scheduling delay factor.
3. The method according to claim 2, characterized in that Determining the minimum response time for reconnecting after disconnection according to the network status of the connected terminal includes: The first transmission delay is corrected based on the state correction parameter to obtain the second transmission delay, and the minimum value of each of the second transmission delays is selected to determine it as the minimum response time for reconnecting after disconnection; wherein, the first transmission delay is obtained by the resource scheduling process by detecting the network connection between each of the connected terminals and the cloud platform when it is determined that the number of terminals to be connected reaches a second threshold; the state correction parameter is determined by the resource scheduling process based on the amount of data transmitted per unit time between each of the connected terminals and the cloud platform based on the network connection.
4. The method according to claim 1, characterized in that: The method of determining a target resource allocation algorithm from a plurality of resource allocation algorithms based on the scheduling delay factor includes: Determining the total number of the connected terminals and the terminals to be connected; Predict the corresponding predicted calculation duration in each resource allocation algorithm based on the total quantity; A resource allocation algorithm whose predicted calculation duration is less than and whose difference with the scheduling delay factor is the smallest is selected as the target resource allocation algorithm.
5. The method according to claim 1, characterized in that The computational intensity of each of the resource allocation algorithms is different.
6. The method according to claim 1, characterized in that The selecting a target terminal from the connected terminal and the terminal to be connected based on the attribute information of the reconnection request and the target resource allocation algorithm comprises: Based on each of the attribute information, an activity state of each of the connected terminals is evaluated to obtain a corresponding evaluation result; Calculating the initial survival value of each of the connected terminals and each of the terminals to be connected based on the target resource allocation algorithm; According to the evaluation result, the initial survival value of each of the connected terminals is modified to obtain the final survival value of each of the connected terminals; based on the active state of each of the terminals to be connected, the corresponding initial survival value is modified to obtain the final survival value of each of the terminals to be connected; Based on each of the final survival values, a target number of target terminals are selected from the connected terminals and the terminals to be connected.
7. The method according to claim 1, characterized in that The allocating the available connection resources to the target terminal comprises: Responding to a reconnection request of a connected terminal among the target terminals to restore the connection; A login request of a terminal to be connected among the target terminals is responded to, so as to establish a connection with the terminal to be connected among the target terminals.
8. A cloud platform, characterized in that: The cloud platform schedules the connection resources of the platform based on the method described in any one of claims 1 to 7.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction implements the method according to any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Swarm intelligence edge network control system and multi-task scheduling method
CN111200795A
Resource optimization method and device of cloud game system, terminal equipment and medium
CN118708332A
Service monitoring method and system based on cloud computing platform
CN118819843A
Spatial-temporal cloud resource scheduling
US10749813B1