A resource scheduling method and device, electronic equipment and storage medium

CN116795531BActive Publication Date: 2026-10-30CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211392102.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-08
Publication Date
2026-10-30
Estimated Expiration
2042-11-08

AI Technical Summary

Technical Problem

此种情况下虽采用重试机制,能够对失败的资源进行重复操作直至资源成功开通,可满足用户需求,但造成了用户体验较差的问题且对整个系统而言增加了不稳定性

Benefits of technology

[0008]第四方面,本申请提供一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行本申请实施例所提供的任意一种资源调度方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116795531B_ABST
    Figure CN116795531B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a resource scheduling method, a resource scheduling device, an electronic device, a chip and a computer readable storage medium, wherein the method comprises: setting an initial average time consumption of a system successfully opening a resource; obtaining a resource opening queue concurrency number based on the initial average time consumption; acquiring a plurality of resource opening requests; and scheduling resources of the system based on the resource opening queue concurrency number and the plurality of resource opening requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a resource scheduling method, resource scheduling device, electronic device, chip, and computer-readable storage medium. Background Technology

[0002] With the rapid development of internet technology, the number of users served by enterprises, universities, and government agencies is increasing daily, leading to a growing demand for high-performance equipment. Cloud computing, due to its large scale, distributed nature, high availability, scalability, security, and cost-effectiveness, has become a future trend in internet technology and is highly favored by many organizations, whose businesses are gradually adopting cloud computing.

[0003] Currently, when users activate block storage, they all use RESTful API calls. Due to the characteristics of the Hypertext Transfer Protocol (HTTP), this method cannot establish a connection for a long time. Therefore, the activation of block storage resources is an asynchronous call, meaning that the caller receives a response immediately after initiating the request, but the specific activation status is unknown (activating resources is a time-consuming operation), requiring monitoring of the current request. Generally, the success rate of block storage activation is high when request concurrency is low, but frequent calls under intensive request conditions may lead to some resources succeeding, some resources taking too long to activate, and some resources failing to activate. The usual solution to this situation is as follows: When a user activates resources, the details of the activated resources, i.e., the user information, are recorded, and a monitoring task is added to this record. After starting, the monitoring task periodically sends resource activation query requests to OpenStack and updates the resource activation record based on the returned results. If the returned request indicates successful activation, the entire resource activation process is complete; if activation fails, the request is re-initiated until the resource is successfully activated. Although a retry mechanism can be used in this situation to repeat the operation on the failed resource until the resource is successfully opened, which can meet the user's needs, it causes a poor user experience and increases the instability of the entire system. Summary of the Invention

[0004] This application provides a resource scheduling method, a resource scheduling device, an electronic device, a chip, and a computer-readable storage medium.

[0005] The technical solution of this application embodiment is implemented as follows: In a first aspect, embodiments of this application provide a resource scheduling method, including: Set the initial average time taken for the system to successfully activate resources; Based on the initial average latency, the concurrent number of resource activation queues is obtained; Get multiple resource activation requests; The system's resources are scheduled based on the concurrent number of resource activation queues and the multiple resource activation requests.

[0006] Secondly, embodiments of this application provide a resource scheduling apparatus, including: Acquisition Unit: Used to acquire multiple resource activation requests; Scheduling unit: used to set the initial average time for successful resource activation in the system; also used to obtain the concurrent number of resource activation queues based on the initial average time; and also used to schedule the resources of the system based on the concurrent number of resource activation queues and the multiple resource activation requests.

[0007] Thirdly, this application provides an electronic device, including: a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute any of the resource scheduling methods provided in the embodiments of this application.

[0008] Fourthly, this application provides a chip, including: a processor, for calling and running a computer program from a memory, causing a device equipped with the chip to execute any of the resource scheduling methods provided in the embodiments of this application.

[0009] Fifthly, this application provides a computer-readable storage medium for storing a computer program that causes a computer to execute any of the resource scheduling methods provided in the embodiments of this application.

[0010] The resource scheduling method provided in this application embodiment sets an initial average time for successful resource activation; based on the initial average time, obtains the concurrent number of resource activation queues; acquires multiple resource activation requests; and schedules the system's resources based on the concurrent number of resource activation queues and the multiple resource activation requests. This method links the time for successful resource activation to the number of threads in the thread pool, and the number of monitoring tasks is determined based on the number of threads in the thread pool. This fundamentally controls the number of monitoring tasks, and the frequency of monitoring task calls is determined by the average resource activation time, reducing the number of system interface calls, saving system memory, and improving the overall reliability of the system. Attached Figure Description

[0011] Figure 1 Schematic diagram of the implementation process of the resource scheduling method provided in the embodiments of this application Figure 1 ; Figure 2 A schematic diagram of the implementation process of the resource scheduling method provided for the application example of this application. Figure 2 ; Figure 3This is a diagram illustrating a user-initiated resource activation request, provided as an application example for this application. Figure 4 This is a schematic diagram of the structure of the resource scheduling device provided in the embodiments of this application; Figure 5 A schematic structural diagram of an electronic device provided in the embodiments of this application; Figure 6 This is a schematic structural diagram of the chip provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0013] It should be noted that, in the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, in the embodiments of this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0014] In the description of the embodiments of this application, the term "correspondence" may indicate that there is a direct or indirect correspondence between two things, or that there is an association between two things, or that there is a relationship of instruction and being instructed, configuration and being configured, etc.

[0015] To gain a more detailed understanding of the features and technical content of this application, the implementation of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit this application.

[0016] Figure 1 Schematic diagram of the implementation process of the resource scheduling method provided in the embodiments of this application Figure 1 ,like Figure 1 As shown in the figure, this application provides a resource scheduling method, which includes the following steps: Step 101: Set the initial average time for the system to successfully activate resources.

[0017] Here, the time taken for the system to successfully activate resources refers to the time from when the user initiates a resource activation request to when the system successfully activates the resource. In practical applications, those skilled in the art can select the time taken for N historical successful resource activations based on experience, calculate their average time, and set the initial average time taken for the system to successfully activate resources based on the average time taken for the N historical successful resource activations; alternatively, the initial average time taken for the system to successfully activate resources can be set based on the extreme conditions of this system in different environments.

[0018] For example, the system is an OpenStack cloud computing management platform, and the resources may be storage resources.

[0019] Step 102: Based on the initial average time consumption, obtain the concurrent number of resource activation queues.

[0020] Specifically, the average latency is inversely proportional to the concurrent number of resource activation queues. This can be calculated based on a resource scheduling algorithm to obtain the concurrent number of resource activation queues. For example, a resource scheduling algorithm based on PID control can be used.

[0021] By calculating the concurrency of the resource activation queue based on the average time it takes for the system to successfully activate resources, the time taken to successfully activate resources can be linked to the number of threads in the thread pool. The number of monitoring tasks is determined based on the number of threads in the thread pool, thereby fundamentally controlling the number of monitoring tasks. The frequency of monitoring task calls is determined by the average resource activation time, reducing the number of system interface calls, saving system memory, and improving the overall reliability of the system.

[0022] Step 103: Obtain multiple resource activation requests.

[0023] Step 104: Based on the concurrent number of resource activation queues and the multiple resource activation requests, schedule the resources of the system.

[0024] The resource scheduling method provided in other embodiments of this application, wherein scheduling of the system's resources based on the concurrent number of the resource activation queue and the plurality of resource activation requests includes: storing the plurality of resource activation requests in a storage module; A specific number of resource activation requests are read from the storage module in the order in which they are obtained, the specific number being determined based on the concurrency of the resource activation queue; for each resource activation request read, the system's interface is invoked to initiate the resource activation request based on the resource parameter information of the resource activation request. Generate the specified number of monitoring tasks, and monitor the resource activation status of each resource activation request that initiates a resource activation request to the system through the monitoring tasks; Based on the resource activation status, update the status of the corresponding resource activation request.

[0025] Specifically, the acquired multiple resource activation requests are stored in the storage module; the resource activation requests include: user information and detailed resource parameters.

[0026] Before storing the multiple resource activation requests into the storage module, the key parameters of the multiple resource activation requests are verified, and the verified resource activation requests are stored into the storage module. For example, the key parameters are resource size and / or resource type.

[0027] For example, the interface is a RESTful interface.

[0028] Here, the specific quantity is determined based on the concurrent number of the resource activation queue. For example, the specific quantity can be the same as the concurrent number of the resource activation queue. For instance, when the concurrent number of the resource activation queue is 10, ten resource activation requests are read from the storage module in the order in which the multiple resource activation requests are obtained.

[0029] In related technologies, the number of threads in the thread pool is fixed when resources are opened, which will lead to the following problems: (1) There is no obvious problem when the number of user requests is low, but when the number of user requests is large, it will increase the failure rate of the system to open resources. (2) The number of threads in the thread pool cannot be dynamically changed according to the expansion of the system cluster. It must be implemented by modifying the code and redeploying, which increases the upgrade cost and risk.

[0030] In this application, for each resource activation request sent to the system, the time taken for each successful resource activation is recorded. When the number of requests reaches M, the average time taken for each of the M successful resource activations is calculated, where M is a preset value. For illustration, M represents 10 requests, which can be obtained by tracking the time taken for each successful activation request using Zipkin. Based on the average time taken for each of the M successful resource activations, the concurrent access count of the resource activation queue is updated.

[0031] Based on this, the resource scheduling method provided in other embodiments of this application further includes: continuously acquiring the time taken for each resource to be successfully activated, and when the number of acquisitions reaches M, calculating the average time taken for the M resources to be successfully activated, where M is a preset value; Update the concurrent access count of the resource access queue based on the average time taken to successfully access the M resources.

[0032] Specifically, the average latency is inversely proportional to the concurrent number of resource activation queues. This can be calculated based on a resource scheduling algorithm to obtain the concurrent number of resource activation queues. For example, a resource scheduling algorithm based on PID control can be used.

[0033] In this way, by dynamically generating a resource activation thread pool based on the current system state, the real-time performance and success rate of resource activation are effectively guaranteed. The algorithm is also applicable to cluster expansion, thus eliminating the need to restart the service and reducing operational costs.

[0034] In addition, in related technologies, the number of monitoring tasks is the same as the number of resources opened in parallel, and the monitoring tasks call the system to obtain resource status too frequently, which will lead to the following problems: (1) The number of monitoring tasks increases with the increase of the number of resources opened in parallel, which may occupy a large amount of memory at the same time, thus affecting the main business. (2) The frequency of calling the underlying interface of the system is too high, and multiple calls may cause network congestion and reduce system reliability. However, the solution of this application controls the number of concurrent threads by dynamically generating a resource pool, which fundamentally controls the number of monitoring tasks, and the frequency of monitoring task calls is determined by the average resource opening time, thus reducing the number of interface calls.

[0035] In related technologies, after the monitoring task starts, it sends a resource activation query request to OpenStack and updates the resource activation record based on the returned result. If activation fails, it re-initiates the request until the resource is successfully activated. Although this retry mechanism can repeat the operation on failed resources until the resource is successfully activated, which can meet user needs, repeated operations in a short period of time cause a poor user experience and increase the instability of the entire system.

[0036] In other embodiments of this application, the step of monitoring the resource activation status of each resource activation request that initiates a resource activation request to the system through the monitoring task includes: Using the average time taken for the M resources to be successfully activated as the time interval, the monitoring task periodically calls the system's interface to obtain the resource activation status according to the time interval.

[0037] By linking the time it takes for monitoring tasks to send query requests to the average time it takes for the system to successfully activate resources, we can meet user needs, reduce user power consumption, and improve system stability.

[0038] In other embodiments of this application, updating the status of the corresponding resource activation request based on the resource activation status includes: For resource activation requests that are successfully activated, set their status to successful. For resource activation requests that fail to activate, their status is set to failed; where, For resource activation requests with a status set to successful, it indicates that the user's resource activation request process has ended and will not be read again in the next task; For resource activation requests with a status set to failed, they will be read again in the next task according to the order in which they were obtained.

[0039] In practical applications, when the status of a resource activation request is set to successful, another resource activation request is read from the storage module in the order in which the multiple resource activation requests were obtained, and the resource activation request is sent to the system call interface based on the resource parameters of the resource activation request.

[0040] The technical solution of this application will be further explained below with specific application examples.

[0041] refer to Figure 2 and Figure 3 , Figure 2 A schematic diagram of the implementation process of the resource scheduling method provided for the application example of this application. Figure 2 , Figure 3 This is a schematic diagram illustrating a user-initiated resource activation request provided in an embodiment of this application.

[0042] like Figure 2 As shown, the resource scheduling method provided in the application example of this application includes: Step 201: The user initiates a block storage creation request, and the resource creation request is obtained and saved to the database.

[0043] refer to Figure 3 Users can initiate a request to activate block storage resources through the platform, which will activate block storage resources under the R&D center resource pool. The platform will then retrieve the resource activation request sent by the user and save the user information and resource details to the database in a specific format.

[0044] Step 202: Calculate the time taken for each request in Zipkin, group them into sets of 10, and calculate the average time t. Based on the PID algorithm, calculate the number of concurrent queues c to be opened for resources.

[0045] Specifically, the initial average latency can be set based on empirical values, and the number of concurrent queues opened for resources can be calculated based on the initial average latency.

[0046] By statistically analyzing the time taken for each request in Zipkin, the average time t is calculated in groups of 10. Based on the PID algorithm, the number of concurrent queues c for updating resources is calculated according to t, and a thread resource pool is created based on c.

[0047] Step 203: Read c records from the database in chronological order based on c, and call the OpenStack interface to create resources.

[0048] The thread resource pool queries requests stored in the database in chronological order, with a query count of c. Based on the resource details, it calls the RESTful interface to initiate a resource creation request to OpenStack.

[0049] Step 204: Create c monitoring tasks based on c to monitor the resource generation status. The monitoring time interval is t. Initiate resource status queries to OpenStack in a round-robin fashion.

[0050] c monitoring tasks are generated to monitor resource availability. Each monitoring task is responsible for periodically calling the OpenStack interface to obtain the availability status of the resources. The call interval is the average time t (i.e., the first call is t, the second call is 2t, and so on).

[0051] Step 205: Update the request activation status.

[0052] If successful, the user request process is terminated; if it fails, the user request is marked for retry and will be processed in the next task.

[0053] The resource scheduling method provided in this application not only possesses good real-time performance and reliability, ensuring a high success rate for resource activation even with short block storage creation times, but also limits the number of resources activated simultaneously by controlling the number of concurrent threads, thereby limiting the number of monitoring tasks and ensuring low memory consumption and improving the overall reliability of the system. It is also applicable to cluster expansion, thus eliminating the need for subsequent service restarts and reducing operational costs.

[0054] One embodiment of this application also provides a resource scheduling device 400, see reference. Figure 4 The resource scheduling device 400 in this embodiment includes: Acquisition Unit 410: Used to acquire multiple resource activation requests; Scheduling unit 420: is used to set the initial average time taken for the system to successfully activate resources; is also used to obtain the concurrent number of resource activation queues based on the initial average time taken; and is also used to schedule the resources of the system based on the concurrent number of resource activation queues and the multiple resource activation requests.

[0055] In other embodiments of this application, the scheduling unit 420 is specifically configured to: store the plurality of resource activation requests in a storage module; read a specific number of resource activation requests from the storage module in the order in which the plurality of resource activation requests were obtained, wherein the specific number is determined based on the concurrency of the resource activation queue; for each resource activation request read, initiate a resource activation request by calling the system's interface based on the resource parameter information of the resource activation request; generate the specific number of monitoring tasks, and monitor the resource activation status of each resource activation request that initiates a resource activation request to the system through the monitoring tasks; and update the status of the corresponding resource activation request based on the resource activation status.

[0056] In other embodiments of this application, the scheduling unit 420 is further configured to continuously acquire the time taken for each resource to be successfully activated, and when the number of acquired resources reaches M, calculate the average time taken for the M resources to be successfully activated, where M is a preset value; and update the concurrent number of the resource activation queue based on the average time taken for the M resources to be successfully activated.

[0057] In other embodiments of this application, the scheduling unit 420 is specifically used to periodically call the system's interface to obtain the resource activation status by using the average time taken for the M resources to be successfully activated as the time interval.

[0058] In other embodiments of this application, the scheduling unit 420 is specifically used to calculate and update the concurrent number of the resource activation queue based on the average time taken for the M resources to be successfully activated, using a resource scheduling algorithm.

[0059] In other embodiments of this application, the scheduling unit 420 is specifically used to set the status of a resource activation request that has been successfully activated to "successful" and to set the status of a resource activation request that has failed to be activated to "failed". Specifically, for a resource activation request with a "successful" status, it indicates that the user's resource activation request process has terminated and will not be read again in the next task; for a resource activation request with a "failed" status, it will be read again in the next task according to the order in which the multiple resource activation requests were obtained.

[0060] Those skilled in the art should understand that Figure 4 The functions of each unit in the resource scheduling device 400 shown can be understood by referring to the relevant description of the aforementioned method. Figure 4 The functions of each unit in the resource scheduling device 400 shown can be implemented by a program running on a processor or by specific logic circuits.

[0061] Figure 5 This is a schematic structural diagram of an electronic device 500 provided in an embodiment of this application. Figure 5 The illustrated electronic device 500 includes a processor 510, which can call and run computer programs from memory to implement the methods in the embodiments of this application.

[0062] Optionally, such as Figure 5 As shown, the electronic device 500 may further include a memory 520. The processor 510 can retrieve and run computer programs from the memory 520 to implement the methods described in the embodiments of this application.

[0063] The memory 520 can be a separate device independent of the processor 510, or it can be integrated into the processor 510.

[0064] Optionally, such as Figure 5 As shown, the electronic device 500 may also include a transceiver 530, which the processor 510 can control to communicate with other devices. Specifically, it can send information or data to other devices or receive information or data sent by other devices.

[0065] The transceiver 530 may include a transmitter and a receiver. The transceiver 530 may further include antennas, and the number of antennas may be one or more.

[0066] The electronic device 500 may specifically be a resource scheduling device in the embodiments of this application, and the electronic device 500 may implement the corresponding processes implemented by the resource scheduling device in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.

[0067] Figure 6 This is a schematic structural diagram of the chip according to an embodiment of this application. Figure 6 The chip 600 shown includes a processor 610, which can call and run computer programs from memory to implement the methods in the embodiments of this application.

[0068] Optionally, such as Figure 6 As shown, chip 600 may further include memory 620. Processor 610 can retrieve and run computer programs from memory 620 to implement the methods described in this embodiment.

[0069] The memory 620 can be a separate device independent of the processor 610, or it can be integrated into the processor 610.

[0070] Optionally, the chip 600 may also include an input interface 630. The processor 610 can control the input interface 630 to communicate with other devices or chips; specifically, it can acquire information or data sent by other devices or chips.

[0071] Optionally, the chip 600 may also include an output interface 640. The processor 610 can control the output interface 640 to communicate with other devices or chips, specifically, to output information or data to other devices or chips.

[0072] This chip can be applied to the resource scheduling device in the embodiments of this application, and the chip can implement the corresponding processes implemented by the resource scheduling device in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.

[0073] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0074] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0075] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0076] It should be understood that the above-described memory is exemplary and not a limiting description. For example, the memory in the embodiments of this application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM), etc. That is to say, the memory in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0077] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to the resource scheduling apparatus in the embodiments of this application, and the computer program causes the computer to execute the corresponding processes implemented by the resource scheduling apparatus in the various methods of the embodiments of this application; for brevity, further details are omitted here.

[0078] This application also provides a computer program product, including computer program instructions. This computer program product can be applied to the resource scheduling device in the embodiments of this application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the resource scheduling device in the various methods of the embodiments of this application. For simplicity, further details are omitted here.

[0079] This application also provides a computer program. This computer program can be applied to the resource scheduling device in the embodiments of this application. When the computer program runs on a computer, it causes the computer to execute the corresponding processes implemented by the resource scheduling device in the various methods of the embodiments of this application. For simplicity, these will not be elaborated further here.

[0080] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0081] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0082] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0083] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0084] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0085] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a resource scheduling device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0086] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A resource scheduling method, characterized in that, include: Set the initial average time taken for the system to successfully activate resources; Based on the initial average time consumption, the concurrent number of resource activation queues is calculated using a resource scheduling algorithm based on PID control. Get multiple resource activation requests; The multiple resource activation requests are stored in the storage module; A specific number of resource activation requests are read from the storage module in the order in which they are obtained, the specific number being determined based on the concurrency of the resource activation queue; for each resource activation request read, the system's interface is invoked to initiate the resource activation request based on the resource parameter information of the resource activation request. Generate the specified number of monitoring tasks, and monitor the resource activation status of each resource activation request that initiates a resource activation request to the system through the monitoring tasks; Based on the resource activation status, update the status of the corresponding resource activation request; The time taken to successfully activate each resource is continuously acquired. When the number of acquired resources reaches M, the average time taken to successfully activate M resources is calculated, where M is a preset value. Update the concurrent access count of the resource access queue based on the average time taken to successfully access the M resources.

2. The resource scheduling method according to claim 1, characterized in that, The monitoring of the resource activation status of each resource activation request that initiates a resource activation request to the system through the monitoring task includes: Using the average time taken for the M resources to be successfully activated as the time interval, the monitoring task periodically calls the system's interface to obtain the resource activation status according to the time interval.

3. The resource scheduling method according to claim 1, characterized in that, The step of updating the concurrency count of the resource activation queue based on the average time taken to successfully activate the M resources includes: Based on the average time taken to successfully activate the M resources, the concurrent number of the resource activation queue is calculated and updated using the resource scheduling algorithm.

4. The resource scheduling method according to claim 1, characterized in that, The step of updating the status of the corresponding resource activation request based on the resource activation status includes: For resource activation requests that are successfully activated, set their status to successful. For resource activation requests that fail to activate, their status is set to failed; where, For resource activation requests with a status set to successful, it indicates that the user's resource activation request process has ended and will not be read again in the next task; For resource activation requests with a status set to failed, they will be read again in the next task according to the order in which they were obtained.

5. A resource scheduling device, characterized in that, include: Acquisition Unit: Used to acquire multiple resource activation requests; Scheduling unit: used to set the initial average time for successful resource activation in the system; also used to calculate the concurrent number of resource activation queues based on the initial average time using a resource scheduling algorithm based on PID control algorithm. The scheduling unit is also used to store the multiple resource activation requests in the storage module; The scheduling unit is further configured to read a specific number of resource activation requests from the storage module in the order in which the multiple resource activation requests are acquired, wherein the specific number is determined based on the concurrency of the resource activation queue; for each resource activation request read, the system interface is invoked to initiate the resource activation request based on the resource parameter information of the resource activation request; the specific number of monitoring tasks are generated to monitor the resource activation status of each resource activation request that initiates a resource activation request to the system; Based on the resource activation status, update the status of the corresponding resource activation request; The scheduling unit is also used to continuously acquire the time taken for each resource to be successfully activated. When the number of acquisitions reaches M, the average time taken for M resources to be successfully activated is calculated, where M is a preset value. The scheduling unit is also used to update the concurrent number of the resource activation queue based on the average time taken for the M resources to be successfully activated.

6. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to perform the resource scheduling method as described in any one of claims 1-4.

7. A chip, characterized in that, include: A processor for retrieving and running a computer program from memory, causing a device on which the chip is mounted to perform the resource scheduling method as described in any one of claims 1-4.

8. A computer-readable storage medium, characterized in that, Used to store computer programs that cause a computer to perform the resource scheduling method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Resource pool scheduling method and device

    CN111353696A