Resource scheduling method and device, equipment, medium and program product
By receiving and updating the inventory view, the problem of inaccurate inventory calculation in traditional cloud computing resource scheduling is solved, and the unified processing of inventory calculation and cloud host scheduling is realized, which improves the accuracy of inventory calculation and the success rate of cloud host startup.
Patent Information
- Application Number
- CN202411310914.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-13
Smart Images

Figure CN119127446A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of cloud computing technology, and in particular to a resource scheduling method, device, equipment, medium and program product. Background Art
[0002] In traditional cloud computing resource scheduling services, inventory calculations mainly rely on the reported data of the underlying physical resources. Since simple calculations are performed using the data reported by the underlying physical resources, there is a problem that there is a deviation between the scheduling and the actual inventory data and that the actual inventory situation cannot be reflected, which leads to inaccurate inventory calculations. Summary of the invention
[0003] In order to solve the above technical problems, the present disclosure provides a resource scheduling method, device, equipment, medium and program product.
[0004] A first aspect of an embodiment of the present disclosure provides a resource scheduling method, including:
[0005] receiving a pending request and determining a request type of the pending request;
[0006] When it is determined that the pending request is a cloud host scheduling request, a first inventory view is obtained, a cloud host scheduling operation corresponding to the pending request is performed based on the first inventory view, and the first inventory view is updated to obtain a second inventory view;
[0007] Synchronize the second inventory view to the first inventory calculation view, update the first inventory calculation view, and obtain the second inventory calculation view;
[0008] When the target inventory calculation request is received, an inventory calculation operation corresponding to the target inventory calculation request is performed based on the second inventory calculation view to obtain a first inventory calculation result, and the second inventory calculation view is updated based on the first inventory calculation result.
[0009] A second aspect of an embodiment of the present disclosure provides a resource scheduling device, including:
[0010] A request receiving module, used for receiving pending requests and determining the request type of the pending requests;
[0011] A first processing module is configured to obtain a first inventory view when determining that the pending request is a cloud host scheduling request, perform a cloud host scheduling operation corresponding to the pending request based on the first inventory view, and update the first inventory view to obtain a second inventory view;
[0012] A view synchronization module, used to synchronize the second inventory view with the first inventory calculation view, update the first inventory calculation view, and obtain the second inventory calculation view;
[0013] The second processing module is used to, when receiving the target inventory calculation request, perform the inventory calculation operation corresponding to the target inventory calculation request based on the second inventory calculation view to obtain the first inventory calculation result, and update the second inventory calculation view based on the first inventory calculation result.
[0014] A third aspect of the embodiments of the present disclosure provides an electronic device, including:
[0015] processor;
[0016] A memory for storing executable instructions;
[0017] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the resource scheduling method provided in the first aspect above.
[0018] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the resource scheduling method provided by the first aspect.
[0019] A fifth aspect of an embodiment of the present disclosure provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the resource scheduling method as described in the first aspect above is implemented.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] The resource scheduling method, device, equipment, medium and program product provided by the embodiment of the present disclosure can receive a pending request, determine the request type of the pending request, and when it is determined that the pending request is a cloud host scheduling request, obtain a first inventory view, perform a cloud host scheduling operation corresponding to the pending request based on the first inventory view, and update the first inventory view to obtain a second inventory view. Then, synchronize the second inventory view to the first inventory calculation view, update the first inventory calculation view, and obtain the second inventory calculation view. When a target inventory calculation request is received, the inventory calculation operation corresponding to the target inventory calculation request is performed based on the second inventory calculation view to obtain a first inventory calculation result, and the second inventory calculation view is updated based on the first inventory calculation result. Thus, the request type of the pending request can be determined. When it is a cloud host scheduling request, the first inventory calculation view is updated according to the scheduling data in the cloud host scheduling request, and then the target inventory calculation request received subsequently is executed according to the updated second inventory view, thereby ensuring the consistency between the inventory calculation view and the actual inventory situation and improving the accuracy of inventory calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 is a flow chart of a resource scheduling method provided by an embodiment of the present disclosure;
[0025] Figure 2 is a flow chart of another resource scheduling method provided by an embodiment of the present disclosure;
[0026] Figure 3 is a structural diagram of a resource scheduling device provided by an embodiment of the present disclosure;
[0027] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0029] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0032] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0033] Generally speaking, in traditional cloud computing resource scheduling services, inventory calculation is mainly based on the reported data of the underlying physical resources. Since the simple calculation is based on the data reported by the underlying physical resources, there is a problem that the scheduling and actual inventory data are deviated and cannot reflect the real inventory situation, which leads to inaccurate inventory calculation. To address this problem, the embodiments of the present disclosure provide a resource scheduling method, which is introduced below in conjunction with specific embodiments.
[0034] Figure 1 It is a flowchart of a resource scheduling method provided by an embodiment of the present disclosure. The method can be executed by a resource scheduling device. The resource scheduling device can be implemented in software and / or hardware. The resource scheduling device can be configured in an electronic device, such as a server or a terminal or a server cluster, wherein the terminal specifically includes a computer or a tablet computer, etc.
[0035] like Figure 1 As shown, the resource scheduling method provided in this embodiment includes the following steps.
[0036] S110: Receive a pending request and determine the request type of the pending request.
[0037] In an embodiment of the present disclosure, the electronic device may receive a pending request in real time, and after receiving the pending request, determine the request type of the pending request.
[0038] The pending request may be any scheduling request in the cloud computing scenario, including a cloud host scheduling request, an inventory calculation request, and the like.
[0039] Specifically, the electronic device can receive pending requests in real time based on an interface preset in the scheduling service, and determine the request type of the pending request based on interface parameters, wherein different interface parameters are set in the interface, and different interface parameters correspond to different request types.
[0040] S120: When it is determined that the pending request is a cloud host scheduling request, obtain a first inventory view, perform a cloud host scheduling operation corresponding to the pending request based on the first inventory view, and update the first inventory view to obtain a second inventory view.
[0041] In the embodiment of the present disclosure, the inventory view is a view required for executing cloud host scheduling. The inventory view may include computing resources required for cloud host scheduling, such as CPU usage, memory usage, etc.
[0042] Specifically, after initialization, the electronic device generates an inventory view and an inventory calculation view according to resource conditions and stores the two views, the inventory view is used to perform cloud host scheduling, and the inventory calculation view is used to perform inventory calculation, wherein the views in the inventory view and the inventory calculation view are consistent after initialization. When the electronic device determines that the request type of the pending request is a cloud host scheduling request, it obtains a first inventory view used to perform cloud host scheduling at the current moment, performs a cloud host scheduling operation based on the first inventory view, and updates the first inventory view based on the scheduling resources in the cloud host scheduling request to obtain a second inventory view, so as to execute subsequent cloud host scheduling requests.
[0043] In the embodiment of the present disclosure, the specific implementation method of executing the cloud host scheduling operation is similar to the existing implementation method of the cloud host scheduling operation, and will not be repeated here.
[0044] S130: Synchronize the second inventory view to the first inventory calculation view, update the first inventory calculation view, and obtain the second inventory calculation view.
[0045] The first inventory calculation view is a view used to perform inventory calculation operations.
[0046] Specifically, after obtaining the second inventory view, the electronic device synchronizes the resource data in the second inventory view to the first inventory calculation view to update the first inventory calculation view to obtain the second inventory calculation view, thereby ensuring the unified processing of the inventory calculation scheduling process and the cloud host scheduling process, avoiding the problem that the two parts of resource data are unaware of each other's usage status due to the separation of inventory calculation and cloud host scheduling, so that the resources in the second inventory calculation view are truly available, which improves the accuracy of inventory calculation, and does not affect the customer's normal business requests, that is, the execution of normal cloud host scheduling.
[0047] S140. When a target inventory calculation request is received, an inventory calculation operation corresponding to the target inventory calculation request is performed based on the second inventory calculation view to obtain a first inventory calculation result, and the second inventory calculation view is updated based on the first inventory calculation result.
[0048] The inventory calculation operation can be understood as an operation of allocating, managing and scheduling cloud computing resources. For example, the number of packages that can be opened is determined based on the package size in the inventory calculation request and the inventory calculation view.
[0049] Specifically, after obtaining the second inventory calculation view, when the electronic device receives the target inventory calculation request, it performs an inventory calculation operation based on the computing resources in the second inventory calculation view, thereby obtaining the first inventory calculation result corresponding to the target inventory calculation request, and at the same time, updates the second inventory calculation view according to the first inventory calculation result.
[0050] In the embodiment of the present disclosure, the specific implementation method of performing the inventory calculation operation is similar to the existing implementation method of performing inventory calculation, and will not be described in detail here.
[0051] In the disclosed embodiment, it is possible to receive a pending request, determine the request type of the pending request, and when it is determined that the pending request is a cloud host scheduling request, obtain a first inventory view, perform a cloud host scheduling operation corresponding to the pending request based on the first inventory view, and update the first inventory view to obtain a second inventory view. Then, the second inventory view is synchronized to the first inventory calculation view, the first inventory calculation view is updated to obtain a second inventory calculation view, and when a target inventory calculation request is received, the inventory calculation operation corresponding to the target inventory calculation request is performed based on the second inventory calculation view to obtain a first inventory calculation result, and the second inventory calculation view is updated based on the first inventory calculation result, thereby determining the request type of the pending request, and when it is a cloud host scheduling request, the first inventory calculation view is updated according to the scheduling data in the cloud host scheduling request, and then the target inventory calculation request received subsequently is executed according to the updated second inventory view, thereby ensuring the consistency between the inventory calculation view and the actual inventory situation and improving the accuracy of the inventory calculation.
[0052] Based on the above embodiments of the present disclosure, the accuracy of inventory calculation results can be improved and the startup success rate of the cloud host can be improved by unifying the scheduling process of inventory calculation and the scheduling process of the cloud host.
[0053] For example, suppose a cloud service provider needs to quickly start a large number of cloud hosts during peak hours. Through the solution of the above embodiments of the present disclosure, the scheduling service can be scheduled based on real-time and accurate inventory data to avoid startup failures caused by inventory calculation errors. Operation personnel can rely on the inventory data fed back by the system to perform resource management and scheduling optimization, ensuring that the startup success rate is close to 100% when resources are sufficient.
[0054] In an embodiment of the present disclosure, after determining the request type of the pending request, the resource scheduling method may further include: when determining that the pending request is an inventory calculation request, obtaining a first inventory calculation view; performing an inventory calculation operation corresponding to the pending request based on the first inventory calculation view to obtain a second inventory calculation result, and updating the first inventory calculation view based on the second inventory calculation result.
[0055] The inventory calculation request may be initiated regularly or irregularly by the inventory calculation service. The inventory calculation service initiates the inventory calculation request based on a preset setting or after responding to the user's inventory calculation operation, obtains calculation parameters from the preset service, generates an inventory calculation request based on the calculation parameters, and sends the inventory calculation request to the scheduling service of the electronic device.
[0056] The inventory calculation service and the scheduling service may be provided in the same electronic device or in different electronic devices, and there is no limitation here.
[0057] The calculation parameters may include the time information corresponding to the inventory calculation and the calculation package size. If the calculation parameters do not include the time information corresponding to the inventory calculation, the default time corresponding to the inventory calculation is the current time when the inventory calculation request is executed, that is, the inventory calculation view at the current time is obtained.
[0058] When the pending request is an inventory calculation request, the pending request includes calculation parameters.
[0059] Executing an inventory calculation operation corresponding to the pending request based on the first inventory calculation view may specifically include: executing an inventory calculation operation based on the calculation package size and the first inventory calculation view to obtain a second inventory calculation result.
[0060] In some embodiments of the present disclosure, when the pending request is an inventory calculation request, the pending request includes time information corresponding to the inventory calculation and the calculation package size. When the electronic device determines that the pending request is an inventory calculation request, it parses the pending request, obtains the time information corresponding to the inventory calculation and the calculation package size, determines the moment corresponding to the time information corresponding to the inventory calculation, obtains the inventory view at the moment, determines the inventory view at the moment as the first inventory view, performs an inventory calculation operation based on the first inventory view and the calculation package size, and obtains a second inventory calculation result.
[0061] In some other embodiments of the present disclosure, when the pending request is an inventory calculation request, the pending request includes a calculation package size. When the electronic device determines that the pending request is an inventory calculation request, the electronic device parses the pending request, obtains the calculation package size, and obtains the inventory view at the current moment, determines the inventory view at the current moment as the first inventory view, performs an inventory calculation operation based on the first inventory view and the calculation package size, and obtains a second inventory calculation result.
[0062] In the disclosed embodiment, when the request to be processed is an inventory calculation request, the inventory view at the moment corresponding to the inventory calculation request can be directly obtained according to the calculation parameters in the inventory calculation request, which is determined as the first inventory view, and the inventory calculation operation is performed based on the calculation package size and the first inventory view, thereby improving the accuracy of the obtained second inventory calculation result.
[0063] In an embodiment of the present disclosure, the resource scheduling method may further include: performing a view backup operation based on a target process and a preset time interval, and backing up a third inventory view at a time corresponding to the view backup operation; in response to an inventory calculation simulation operation, determining a simulation time point corresponding to the inventory calculation simulation operation, and obtaining a target inventory view corresponding to the simulation time point; performing an inventory calculation simulation operation based on the target inventory view, obtaining an inventory calculation simulation result, and feeding back the inventory calculation simulation result to an operator, so that the operator performs scheduling algorithm optimization processing based on the inventory calculation simulation result.
[0064] The third inventory view may be understood as a resource view corresponding to the cloud host scheduling at the time corresponding to the view backup operation.
[0065] The preset time interval may be understood as a preset time interval for backing up data in the inventory view.
[0066] Inventory calculation simulation operations can be understood as operations used to simulate inventory calculations at any time. For example, the creation and utilization of different packages in different time periods can be simulated based on the inventory view at any time, so as to achieve historical playback of the inventory occupancy process, help simulate user scenarios, and provide intuitive and feasible data. At the same time, the scheduling algorithm can also be optimized by performing inventory calculation simulations on historical inventory views.
[0067] Specifically, the electronic device can determine the target time for performing the view backup operation based on a preset time interval based on a preset snapshot tool or a target process for performing the snapshot operation, perform the view backup operation at the target time, and back up and store the inventory view. When responding to the inventory calculation simulation operation, the time when the inventory calculation needs to be simulated, that is, the simulation time point, is determined, the target inventory view corresponding to the simulation time point is obtained, the inventory calculation simulation operation is performed based on the target inventory view, the inventory calculation simulation result is obtained, and the inventory calculation simulation result is fed back to the operator or the customer, so that the operator or the customer performs scheduling algorithm optimization processing based on the inventory calculation simulation result.
[0068] For example, on a certain e-commerce promotion day, the demand for cloud resources surges. By regularly backing up inventory data and performing simulation calculations, operators can simulate the creation of different packages during the promotion period based on the backed-up inventory data, identify possible resource bottlenecks in advance, and perform optimization to ensure maximum resource utilization during the promotion period and reduce waste caused by resource fragmentation.
[0069] In the embodiments of the present disclosure, the inventory status data at any time or any time period can be obtained by backing up the inventory view, and then the inventory calculation simulation operation can be performed at any time or any time period. The historical inventory calculation playback data can be obtained or the resource usage of different packages in subsequent time periods can be simulated in advance, so as to better adjust the scheduling algorithm, improve inventory utilization, and improve user experience.
[0070] In an embodiment of the present disclosure, the resource scheduling method may further include: obtaining the request start time and request end time corresponding to the cloud host scheduling request based on preset tracking point information; determining the target time corresponding to executing the cloud host scheduling request based on the request start time and request end time, and feeding back the target time to the operator, so that the operator can optimize the scheduling algorithm based on the target time.
[0071] Among them, the preset tracking point information may include the start time and end time of the cloud host scheduling request, and may also include the inventory occupancy of each package in each time period.
[0072] For example, in the same period, different large packages and small packages have significantly different scheduling times by an order of magnitude through resource calculation through inventory. In this case, the operation and maintenance personnel can reconsider the scheduling resource allocation algorithm based on the target time, avoid excessive resource comparisons, and improve matching efficiency.
[0073] In the disclosed embodiment, the electronic device can obtain the request start time and request end time corresponding to each cloud host scheduling request by means of a tracking point, and then obtain the target time consumption corresponding to the cloud host scheduling request, and feed back the target time consumption to the operation personnel, so that the operation personnel can optimize the scheduling algorithm based on the target time consumption.
[0074] In some embodiments of the present disclosure, the resource scheduling method also includes: obtaining the target inventory occupancy time of different packages in each time period based on preset tracking point information, and / or obtaining the log information corresponding to the cloud host scheduling request, and feeding back the target time, target inventory occupancy time and / or log information to the operator.
[0075] Among them, inventory occupancy time can be understood as the length of time that the resources in a package are actually occupied and used to execute user tasks after a customer purchases a package.
[0076] In the disclosed embodiment, the electronic device can capture log information corresponding to the cloud host scheduling request based on a preset log capture tool. The log information may include customer identification information corresponding to the cloud host scheduling request, such as customer ID, resource data corresponding to the cloud host scheduling request, etc.
[0077] For example, a corporate user frequently initiates large-scale resource scheduling requests in the morning on weekdays. By analyzing the time consumption of scheduling requests of different scales through statistical log information and embedded data, the scheduling service can discover and optimize resource allocation strategies, reduce the delay of large-scale scheduling requests, and improve overall scheduling efficiency and user satisfaction.
[0078] In the disclosed embodiments, the electronic device can obtain data of more dimensions and perform data analysis by tracking points and / or capturing logs, so that operation and maintenance personnel can optimize the scheduling algorithm according to the data analysis results, thereby reducing the time consumption of cloud host scheduling requests and improving user experience.
[0079] Figure 2 is a flow chart of another resource scheduling method provided by an embodiment of the present disclosure, such as Figure 2 As shown, the resource scheduling method may specifically include the following steps:
[0080] S210: Receive a pending request and determine the request type of the pending request.
[0081] In the embodiment of the present disclosure, when the request type is an inventory calculation request, steps S220-S230 are executed; when the request type is a cloud host scheduling request, steps S240-S260 are executed.
[0082] S220: When it is determined that the request to be processed is an inventory calculation request, obtain a first inventory calculation view.
[0083] S230: Execute an inventory calculation operation corresponding to the pending request based on the first inventory calculation view to obtain a second inventory calculation result, and update the first inventory calculation view based on the second inventory calculation result.
[0084] S240: When it is determined that the pending request is a cloud host scheduling request, obtain a first inventory view, perform a cloud host scheduling operation corresponding to the pending request based on the first inventory view, and update the first inventory view to obtain a second inventory view.
[0085] S250: Synchronize the second inventory view to the first inventory calculation view, update the first inventory calculation view, and obtain the second inventory calculation view.
[0086] S260. When receiving the target inventory calculation request, perform an inventory calculation operation corresponding to the target inventory calculation request based on the second inventory calculation view to obtain a first inventory calculation result, and update the second inventory calculation view based on the first inventory calculation result.
[0087] It should be noted that the specific implementation of steps S210-S260 is similar to the implementation of the relevant steps in the above-mentioned embodiment of the present disclosure, and will not be repeated here.
[0088] In the disclosed embodiment, the request type of the pending request can be determined. When scheduling a request for a cloud host, the first inventory calculation view is updated according to the scheduling data in the cloud host scheduling request, and then the subsequently received target inventory calculation request is executed according to the updated second inventory view. When it is determined that the pending request is an inventory calculation request, the inventory calculation operation can be directly performed based on the first inventory calculation view, thereby ensuring the consistency between the inventory calculation view and the actual inventory situation and improving the accuracy of the inventory calculation.
[0089] Figure 3 It is a structural diagram of a resource scheduling device provided in an embodiment of the present disclosure.
[0090] In the disclosed embodiment, the resource scheduling device may be arranged in an electronic device, and is understood as a part of the functional modules in the electronic device. Specifically, the electronic device may be a server or a terminal or a server cluster, wherein the terminal specifically includes a computer or a tablet computer, etc., which is not limited here.
[0091] like Figure 3 As shown, the resource scheduling device 300 may include a request receiving module 310 , a first processing module 320 , a view synchronization module 330 and a second processing module 340 .
[0092] The request receiving module 310 may be configured to receive a request to be processed and determine a request type of the request to be processed.
[0093] The first processing module 320 can be used to obtain a first inventory view when determining that the pending request is a cloud host scheduling request, perform a cloud host scheduling operation corresponding to the pending request based on the first inventory view, and update the first inventory view to obtain a second inventory view.
[0094] The view synchronization module 330 may be used to synchronize the second inventory view to the first inventory calculation view, update the first inventory calculation view, and obtain the second inventory calculation view.
[0095] The second processing module 340 can be used to, when receiving a target inventory calculation request, perform an inventory calculation operation corresponding to the target inventory calculation request based on the second inventory calculation view, obtain a first inventory calculation result, and update the second inventory calculation view based on the first inventory calculation result.
[0096] In the disclosed embodiment, it is possible to receive a pending request, determine the request type of the pending request, and when it is determined that the pending request is a cloud host scheduling request, obtain a first inventory view, perform a cloud host scheduling operation corresponding to the pending request based on the first inventory view, and update the first inventory view to obtain a second inventory view. Then, the second inventory view is synchronized to the first inventory calculation view, the first inventory calculation view is updated to obtain a second inventory calculation view, and when a target inventory calculation request is received, the inventory calculation operation corresponding to the target inventory calculation request is performed based on the second inventory calculation view to obtain a first inventory calculation result, and the second inventory calculation view is updated based on the first inventory calculation result, thereby determining the request type of the pending request, and when it is a cloud host scheduling request, the first inventory calculation view is updated according to the scheduling data in the cloud host scheduling request, and then the target inventory calculation request received subsequently is executed according to the updated second inventory view, thereby ensuring the consistency between the inventory calculation view and the actual inventory situation and improving the accuracy of the inventory calculation.
[0097] In some embodiments of the present disclosure, the resource scheduling device 300 may further include a third processing module.
[0098] The third processing module can be used to, after determining the request type of the pending request, obtain a first inventory calculation view when it is determined that the pending request is an inventory calculation request; perform an inventory calculation operation corresponding to the pending request based on the first inventory calculation view to obtain a second inventory calculation result, and update the first inventory calculation view based on the second inventory calculation result.
[0099] In some embodiments of the present disclosure, when the pending request is an inventory calculation request, the pending request includes calculating the package size.
[0100] The third processing module can be specifically used to perform an inventory calculation operation based on the calculated package size and the first inventory calculation view to obtain a second inventory calculation result.
[0101] In some embodiments of the present disclosure, the resource scheduling device 300 may further include a view backup module and a calculation simulation module.
[0102] The view backup module may be used to perform a view backup operation based on a target process and a preset time interval, and to back up the third inventory view at a time corresponding to the view backup operation.
[0103] The calculation simulation module can be used to respond to inventory calculation simulation operations, determine the simulation time point corresponding to the inventory calculation simulation operation, and obtain the target inventory view corresponding to the simulation time point; perform inventory calculation simulation operations based on the target inventory view, obtain inventory calculation simulation results, and feed back the inventory calculation simulation results to the operation personnel, so that the operation personnel can optimize the scheduling algorithm based on the inventory calculation simulation results.
[0104] In some embodiments of the present disclosure, the resource scheduling device 300 may further include a time consumption statistics module.
[0105] The time consumption statistics module can be used to obtain the request start time and request end time corresponding to the cloud host scheduling request based on the preset tracking point information; determine the target time consumption corresponding to the execution of the cloud host scheduling request based on the request start time and request end time, and feed back the target time consumption to the operation personnel, so that the operation personnel can optimize the scheduling algorithm based on the target time consumption.
[0106] In some embodiments of the present disclosure, the resource scheduling device 300 may further include a data acquisition module.
[0107] The data acquisition module can be used to obtain the target inventory occupancy time of different packages in each time period based on the preset tracking point information, and / or obtain the log information corresponding to the cloud host scheduling request.
[0108] The time consumption statistics module is specifically used to feed back the target time consumption, target inventory occupancy time consumption and / or log information to the operation personnel.
[0109] It should be noted that Figure 3 The resource scheduling device 300 shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.
[0110] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.
[0111] In the disclosed embodiment, Figure 4The electronic device shown may be a server or a terminal or a server cluster, wherein the terminal specifically includes a computer or a tablet computer, etc., which is not limited here.
[0112] like Figure 4 As shown, the electronic device may include a processor 410 and a memory 420 storing computer program instructions.
[0113] Specifically, the processor 410 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0114] The memory 420 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 420 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 420 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 420 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 420 is a non-volatile solid-state memory. In a particular embodiment, the memory 420 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0115] The processor 410 reads and executes the computer program instructions stored in the memory 420 to perform the steps of the resource scheduling method provided in the embodiment of the present disclosure.
[0116] In one example, the electronic device may further include a transceiver 430 and a bus 440. Figure 4 As shown, the processor 410, the memory 420 and the transceiver 430 are connected via a bus 440 and communicate with each other.
[0117] The bus 440 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 440 may include one or more buses.
[0118] The embodiments of the present disclosure further provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the resource scheduling method provided by the embodiments of the present disclosure.
[0119] The above-mentioned storage medium may, for example, include a memory 420 of computer program instructions, and the above-mentioned instructions may be executed by the processor 410 of the electronic device to complete the resource scheduling method provided in the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0120] The embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the resource scheduling method provided by the embodiments of the present disclosure is implemented, and the various processes and effects in the above-mentioned embodiments of the present disclosure can be implemented, which will not be repeated here.
[0121] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A resource scheduling method, characterized in that: include: Receiving a pending request and determining a request type of the pending request; When it is determined that the pending request is a cloud host scheduling request, a first inventory view is obtained, a cloud host scheduling operation corresponding to the pending request is performed based on the first inventory view, and the first inventory view is updated to obtain a second inventory view; Synchronize the second inventory view to the first inventory calculation view, update the first inventory calculation view, and obtain the second inventory calculation view; When a target inventory calculation request is received, an inventory calculation operation corresponding to the target inventory calculation request is performed based on the second inventory calculation view to obtain a first inventory calculation result, and the second inventory calculation view is updated based on the first inventory calculation result.
2. The method according to claim 1, characterized in that After determining the request type of the request to be processed, the method further includes: When it is determined that the pending request is an inventory calculation request, obtaining the first inventory calculation view; An inventory calculation operation corresponding to the pending request is performed based on the first inventory calculation view to obtain a second inventory calculation result, and the first inventory calculation view is updated based on the second inventory calculation result.
3. The method according to claim 2, characterized in that When the pending request is an inventory calculation request, the pending request includes calculating a package size, and performing an inventory calculation operation corresponding to the pending request based on the first inventory calculation view includes: The inventory calculation operation is performed based on the calculation package size and the first inventory calculation view to obtain the second inventory calculation result.
4. The method according to claim 1, characterized in that: The method further comprises: Performing a view backup operation based on the target process and a preset time interval, backing up the third inventory view at a time corresponding to the view backup operation; In response to the inventory calculation simulation operation, determining a simulation time point corresponding to the inventory calculation simulation operation, and acquiring a target inventory view corresponding to the simulation time point; The inventory calculation simulation operation is performed based on the target inventory view to obtain an inventory calculation simulation result, and the inventory calculation simulation result is fed back to the operation personnel so that the operation personnel can perform scheduling algorithm optimization processing based on the inventory calculation simulation result.
5. The method according to claim 1, characterized in that The method further comprises: Obtaining the request start time and request end time corresponding to the cloud host scheduling request based on the preset tracking point information; The target time required to execute the cloud host scheduling request is determined based on the request start time and the request end time, and the target time required is fed back to the operator so that the operator can optimize the scheduling algorithm based on the target time required.
6. The method according to claim 5, characterized in that The method further comprises: Based on the preset tracking point information, the target inventory occupancy time of different packages in each time period is obtained, and / or the log information corresponding to the cloud host scheduling request is obtained; The step of feeding back the target time consumption to the operation personnel includes: The target time consumption, the target inventory occupancy time consumption and / or the log information are fed back to the operation personnel.
7. A resource scheduling device, characterized in that: include: A request receiving module, used for receiving a request to be processed and determining a request type of the request to be processed; a first processing module, configured to, when determining that the pending request is a cloud host scheduling request, obtain a first inventory view, perform a cloud host scheduling operation corresponding to the pending request based on the first inventory view, and update the first inventory view to obtain a second inventory view; A view synchronization module, used to synchronize the second inventory view with the first inventory calculation view, update the first inventory calculation view, and obtain a second inventory calculation view; The second processing module is configured to, upon receiving a target inventory calculation request, perform an inventory calculation operation corresponding to the target inventory calculation request based on the second inventory calculation view to obtain a first inventory calculation result, and update the second inventory calculation view based on the first inventory calculation result.
8. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the resource scheduling method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the resource scheduling method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or instruction is executed by a processor, the resource scheduling method according to any one of claims 1 to 6 is implemented.
