Work order submission method and device based on blocking queue
By using the work order submission method based on blocking queues in cloud computing, the problem of resource allocation conflicts in the cloud resource delivery process is solved, and the success rate and efficiency of resource delivery are improved.
Patent Information
- Application Number
- CN202410701482.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-08-23
AI Technical Summary
During the delivery process of cloud computing resources, when operation and maintenance personnel from multiple departments submit work orders at the same time, it may cause conflicts in the allocation of CPU, memory, and IP, resulting in resource delivery failure, increasing the workload of operation and maintenance personnel, and affecting resources. Provide efficiency.
Using the work order submission method based on blocking queue, by obtaining the resource demand of the work order to be queued, determining the preset and current occupancy of the resource blocking queue, judging whether the work order to be queued can be added to the queue, and based on the queue position Make submissions and optimize resource reservation and planning.
It reduces conflicts during the resource distribution process, improves the success rate of cloud resource distribution, reduces the workload between systems, and enables reasonable resource planning.
Smart Images

Figure CN118535339A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of cloud computing technology, and in particular to the field of data processing technology, and can also be used in the financial field. Specifically, it relates to a method and device for submitting a work order based on a blocking queue. Background Art
[0002] According to industry rules and regulations, changes can only be made within the specified time period. When cloud resources are released, a work order is created in advance, configuration information such as CPU and memory is filled in, and the implementation time is planned. When the implementation time arrives, the resource release service will carry out the release operation.
[0003] The resource distribution service distributes resources by calling the cloud management platform. Operation and maintenance personnel need to enter the cloud management operation and maintenance interface to obtain the remaining resources. The distribution operation is performed by multiple personnel from multiple departments to submit work orders. If multiple personnel distribute to the same resource domain, it may cause the CPU, memory, and IP to be unable to be allocated, resulting in the failure of resource distribution. In addition, when manually evaluating the number of resources to be distributed, it is necessary to check the work orders submitted by other personnel, which increases the workload and affects the efficiency of resource provision. Summary of the invention
[0004] In response to at least one problem existing in the prior art, the present application provides a work order submission method and device based on a blocking queue, which can pre-occupy resources through a blocking queue, reduce resource issuance conflicts during the operation and maintenance personnel's resource issuance process, and improve the success rate of cloud resource issuance.
[0005] According to a first aspect of the present application, a method for submitting a work order based on a blocking queue is provided, the method comprising:
[0006] Obtaining the work order to be queued and determining the resource demand of the work order to be queued;
[0007] Determine the preset total amount of resources and the current amount of resources occupied by the resource blocking queue;
[0008] Determine whether the to-be-queued work order can be added to the resource blocking queue according to the preset total resource amount, the current resource occupied amount and the resource demand amount;
[0009] In response to being able to join the resource blocking queue, determining an entry position of the to-be-entered work order, and submitting the to-be-entered work order according to the entry position.
[0010] In some optional methods of this embodiment, determining the resource requirement of the work order to be queued includes:
[0011] Determine resource configuration information of the work order to be queued for CPU, memory and subnet;
[0012] Determine the CPU requirement, memory requirement and subnet requirement of the work order to be queued according to the resource configuration information;
[0013] The CPU requirement, memory requirement and subnet requirement are determined as the resource requirement.
[0014] In some optional methods of this embodiment, the resource blocking queue includes a CPU blocking queue, a memory blocking queue, and a subnet blocking queue, and the determining of the preset total amount of resources and the current occupied amount of resources of the resource blocking queue includes:
[0015] Determine a preset total amount of CPU, a preset total amount of memory, and a preset total amount of subnets, and determine the preset total amount of CPU, the preset total amount of memory, and the preset total amount of subnets as the preset total amount of resources;
[0016] Determine the current CPU occupied amount, the current memory occupied amount, and the current subnet occupied amount, and determine the current CPU occupied amount, the current memory occupied amount, and the current subnet occupied amount as the current resource occupied amount.
[0017] In some optional methods of this embodiment, determining whether the to-be-queued work order can be added to the resource blocking queue according to the preset total resource amount, the current resource occupied amount, and the resource demand amount includes:
[0018] Determine the sum of the current resource usage and resource demand;
[0019] In response to the sum of the current resource usage and the resource demand being greater than or equal to the preset total resource amount, determining that the to-be-queued work order cannot be added to the resource blocking queue;
[0020] In response to the sum of the current resource occupation amount and the resource demand amount being less than the preset resource total amount, it is determined that the to-be-queued work order can be added to the resource blocking queue.
[0021] In some optional manners of this embodiment, the step of determining that the sum of the current resource occupation amount and the resource demand amount is greater than or equal to the preset total resource amount includes:
[0022] Performing a first judgment operation, a second judgment operation, and a third judgment operation on the work order to be queued, and obtaining a first judgment result, a second judgment result, and a third judgment result;
[0023] In response to at least one of the first judgment result, the second judgment result and the third judgment result being yes, determining that the sum of the current resource occupation amount and the resource demand amount is greater than or equal to the preset total resource amount;
[0024] Among them, the steps of the first judgment operation include: determining whether the sum of the current CPU occupied amount and the CPU demand is greater than or equal to the preset CPU total amount; the steps of the second judgment operation include: determining whether the sum of the current memory occupied amount and the memory demand is greater than or equal to the preset memory total amount; the third judgment operation includes: determining whether the sum of the current subnet occupied amount and the subnet demand is greater than or equal to the preset subnet total amount.
[0025] In some optional manners of this embodiment, the step of determining that the sum of the current resource occupation amount and the resource demand amount is less than the preset total resource amount includes:
[0026] In response to the first judgment result, the second judgment result and the third judgment result being no, it is determined that the sum of the current resource occupation amount and the resource demand amount is less than the preset total resource amount.
[0027] In some optional methods of this embodiment, determining the queue entry position of the to-be-queued work order includes:
[0028] Determine the work order type of the work order to be queued according to the resource demand, wherein the work order type includes a resource delivery type and a resource release type;
[0029] In response to the work order type being the resource delivery type, determining that the queue entry position of the to-be-queued work order is the tail of the resource blocking queue;
[0030] In response to the work order type being the resource release type, determining the queue entry position of the to-be-queued work order to be the head of the resource blocking queue.
[0031] In some optional methods of this embodiment, determining the type of the work order to be queued according to the resource demand includes:
[0032] In response to the resource demand indicating that the to-be-queued work order performs an application operation or a capacity expansion operation, determining that the work order type is the resource delivery type;
[0033] In response to the resource demand indicating that the to-be-queued work order performs a deletion operation or a reduction operation, the work order type is determined to be the resource release type.
[0034] In some optional methods of this embodiment, the work order to be queued includes a CPU to-be-queued sub-work order, a memory to-be-queued sub-work order, and a subnet to-be-queued sub-work order, the resource blocking queue includes a CPU blocking sub-queue, a memory blocking sub-queue, and a subnet blocking sub-queue, and the determining of the queue entry position of the work order to be queued also includes:
[0035] Determine, according to the CPU demand, a first work order sub-type of the CPU to-be-queued sub-work order;
[0036] In response to the first work order subtype being the resource delivery type, determining that the queue entry position of the CPU to-be-queued sub-work order is the tail of the CPU blocking sub-queue;
[0037] In response to the first work order subtype being the resource release type, determining the queue position of the CPU to-be-queued sub-work order to be the head of the CPU blocking sub-queue;
[0038] Determine, according to the memory demand, a second work order sub-type of the memory queued sub-work order;
[0039] In response to the second work order subtype being the resource delivery type, determining the queue entry position of the memory to-be-queued sub-work order to be the tail of the memory blocking sub-queue;
[0040] In response to the second work order subtype being the resource release type, determining the queue entry position of the memory to-be-queued sub-work order to be the head of the memory blocking sub-queue;
[0041] Determine, according to the subnet demand, a third work order subtype of the subnet's to-be-queued sub-work order;
[0042] In response to the third work order subtype being the resource delivery type, determining that the entry position of the subnet to-be-queued sub-work order is the tail of the subnet blocking sub-queue;
[0043] In response to the third work order subtype being the resource release type, determining the queue entry position of the subnet to-be-queued sub-work order to be the head of the subnet blocking sub-queue.
[0044] Some optional methods of this embodiment also include:
[0045] In response to being unable to join the resource blocking queue, determining that submission of the to-be-queued work order fails;
[0046] Output prompt information for the work order to be queued, wherein the prompt information is used to instruct the user to adjust at least one of the CPU to-be-queued sub-work order, the memory to-be-queued sub-work order, and the subnet to-be-queued sub-work order.
[0047] In some optional methods of this embodiment, after submitting the work order to be queued, the method further includes:
[0048] The current resource usage and the preset total resource amount of the resource blocking queue are updated.
[0049] In some optional methods of this embodiment, before obtaining the work order to be queued, the process further includes:
[0050] The resource blocking queue is initialized, the remaining amount of resources of the resource blocking queue is determined, and the remaining amount of resources is determined as the preset total amount of resources.
[0051] According to a second aspect of the present application, a work order submission device based on a blocking queue is also provided, the device comprising:
[0052] A resource demand determination module is configured to obtain a work order to be queued and determine the resource demand of the work order to be queued;
[0053] A resource blocking queue determination module is configured to determine the total amount of preset resources and the current amount of resource occupation of the resource blocking queue;
[0054] An entry judgment module is configured to determine whether the to-be-entered work order can be added to the resource blocking queue according to the preset total resource amount, the current resource occupied amount and the resource demand amount;
[0055] The work order submission module is configured to determine the entry position of the to-be-entered work order in response to being able to join the resource blocking queue, and submit the to-be-entered work order according to the entry position.
[0056] According to the third aspect of the present application, an electronic device is also provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the work order submission method based on a blocking queue are implemented.
[0057] According to a fourth aspect of the present application, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the work order submission method based on a blocking queue are implemented.
[0058] According to a fifth aspect of the present application, a computer program product is also provided, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the work order submission method based on a blocking queue.
[0059] The present application provides a method and device for submitting a work order based on a blocking queue, which optimizes the previous scheduled resource issuance, and pre-occupies resources when a work order is created through a blocking queue. It can provide a reference for the number of available issuances for operation and maintenance personnel during the work order creation stage, reduce the workload of switching between systems, reasonably plan resources, and improve the success rate of cloud resource issuance. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 This is one of the flow charts of a method for submitting a work order based on a blocking queue according to an embodiment of the present application;
[0062] Figure 2 This is a second flowchart of a method for submitting a work order based on a blocking queue according to an embodiment of the present application;
[0063] Figure 3 The third flowchart of a method for submitting a work order based on a blocking queue according to an embodiment of the present application;
[0064] Figure 4 This is a fourth flowchart of a method for submitting a work order based on a blocking queue according to an embodiment of the present application;
[0065] Figure 5 This is a fifth flowchart of a method for submitting a work order based on a blocking queue according to an embodiment of the present application;
[0066] Figure 6 This is a sixth flowchart of a method for submitting a work order based on a blocking queue according to an embodiment of the present application;
[0067] Figure 7 This is a flowchart of a method for submitting a work order based on a blocking queue according to an embodiment of the present application;
[0068] Figure 8 It is a structural schematic diagram of a work order submission device based on a blocking queue according to an embodiment of the present application;
[0069] Fig. 9 The present invention is a block diagram of an electronic device for implementing a work order submission method based on a blocking queue according to an embodiment of the present application. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] An embodiment of the present application provides a work order submission method based on a blocking queue, such as Figure 1 As shown, the method includes:
[0072] Step 10: Obtain the work order to be queued, and determine the resource demand of the work order to be queued;
[0073] Step 20: Determine the total amount of preset resources and the current amount of resources occupied by the resource blocking queue;
[0074] Step 30: Determine whether the to-be-queued work order can be added to the resource blocking queue according to the preset total resource amount, the current resource occupied amount and the resource demand amount;
[0075] Step 40: In response to being able to join the resource blocking queue, determining the queue entry position of the to-be-queued work order, and submitting the to-be-queued work order according to the queue entry position.
[0076] This embodiment provides a work order submission method based on a blocking queue. Joining the queue means pre-occupying resources. When it is impossible to join the queue, the resources are full and the work order cannot be submitted. The previous scheduled resource issuance can be optimized. By blocking the queue, resources are pre-occupied when the work order is created. During the work order creation stage, the operation and maintenance personnel can be provided with a reference for the number of available issuances, thereby reducing the workload of switching between systems, reasonably planning resources, and improving the success rate of cloud resource issuance.
[0077] Next, Figure 1 The steps are described in detail:
[0078] Step 10: Obtain the work order to be queued and determine the resource demand of the work order to be queued.
[0079] In this embodiment, the work order to be queued is generally a work order filled out by the operation and maintenance personnel on the cloud management platform, where a work order generally refers to a record or instruction document used in managing and processing work requests or tasks. It contains information such as the description of the task, resource requirements, processing flow, person in charge, and status. The purpose of the work order is to systematically manage and track various work tasks to ensure that they are completed on time and properly processed.
[0080] Work orders can be used in a variety of different scenarios, such as information technology support, equipment maintenance, service requests, project management, etc. Through work orders, organizations can more effectively allocate resources, track work progress, record work history, optimize workflows, etc.
[0081] After obtaining the work order to be queued, Figure 2 As shown, the resource requirements of the work orders to be queued are further determined based on the following steps:
[0082] Step 101: Determine resource configuration information of the work order to be queued for CPU, memory and subnet.
[0083] Memory: Memory is where computers store data and programs. When the computer starts, the operating system and other necessary software are loaded into the memory so that the CPU can access and execute them. Memory is usually divided into two categories: primary memory (RAM) and secondary memory (such as hard drives). RAM is used to temporarily store running programs and data, while secondary memory is used to store data long-term.
[0084] Subnet: A subnet is a logically independent subsection of a network, which can be a collection of one or more IP address ranges. A subnet usually consists of a group of hosts (computers, servers, etc.) and network devices (routers, switches, etc.) that share the same network address prefix. Subnets can be used to help manage network traffic, security, and organize network structures.
[0085] CPU (Central Processing Unit): The CPU is the core component of a computer, responsible for executing instructions in a computer program and processing data. It includes the arithmetic logic unit (ALU) and the control unit, which can perform various operations such as arithmetic operations, logical operations, and data transfer. The performance of the CPU has a significant impact on the overall speed and efficiency of the computer.
[0086] It should be noted that memory, subnet, and CPU play different but closely related roles in a computer system, among which:
[0087] Memory and CPU: Memory is where the data and instructions needed by the CPU to execute programs are stored. The CPU reads instructions and data from the memory, performs calculations, and writes the results back to the memory. Therefore, fast data exchange between the memory and the CPU is necessary for the normal operation of the computer system.
[0088] Memory and subnets: The relationship between memory and subnets is often reflected in network communications. When a program in a computer system needs to obtain data from the network, the data is transferred to the computer's memory through the network. The subnet provides a network structure that connects computers and ensures that the data can be accurately transferred to the memory of the target computer.
[0089] CPU and subnet: When the CPU communicates with other computers or devices over the network, it uses a subnet to transmit data. For example, when a computer executes a network request, the CPU sends data packets to the target device, and the subnet is responsible for routing these data packets on the network to ensure that they reach the correct destination.
[0090] In summary, the relationship between memory, subnet and CPU is that they together constitute the complete process of data storage, processing and transmission in the computer system. Memory provides the CPU with the data and instructions needed to execute programs, while the subnet provides the network infrastructure that connects the computer system, allowing the CPU to communicate with other computers or devices.
[0091] Therefore, in this embodiment, the resource delivery is mainly limited by the CPU, memory and subnet. This application provides a java class with class attributes of work order queue, CPU remaining, CPU occupied, memory remaining, memory occupied, subnet remaining, and subnet occupied. According to the java class, the usage of various resources is determined in real time. When determining the resource demand of the work order to be queued, it is necessary to determine the resource configuration information of the work order to be queued for the CPU, memory and subnet.
[0092] Step 102: Determine the CPU requirement, memory requirement, and subnet requirement of the work order to be queued according to the resource configuration information;
[0093] Step 103: Determine the CPU requirement, memory requirement, and subnet requirement as the resource requirement.
[0094] In this embodiment, according to the resource configuration information of CPU, memory and subnet, the CPU requirement, memory requirement and subnet requirement of the work order to be queued can be determined respectively, thereby determining the resource requirement.
[0095] Step 20: Determine the preset total amount of resources and the current occupied amount of resources in the resource blocking queue.
[0096] In this embodiment, before obtaining the work order to be queued, the method further includes:
[0097] The resource blocking queue is initialized, the remaining amount of resources of the resource blocking queue is determined, and the remaining amount of resources is determined as the preset total amount of resources.
[0098] In a specific example, when the system is initialized, the cloud interface is called to obtain the number of remaining resources, and the total number of CPU, memory, and IP is initialized to be equal to the number of remaining resources, the number of resource occupancy is zero, and the resource blocking queue is empty.
[0099] In some optional embodiments of this embodiment, Figure 3 As shown, the resource blocking queue includes a CPU blocking queue, a memory blocking queue, and a subnet blocking queue, and the determination of the preset total amount of resources and the current amount of resources occupied by the resource blocking queue includes:
[0100] Step 201: determine a preset total amount of CPU, a preset total amount of memory, and a preset total amount of subnets, and determine the preset total amount of CPU, the preset total amount of memory, and the preset total amount of subnets as the preset total amount of resources.
[0101] In this step, the remaining CPU, remaining memory and remaining subnet are determined, and the remaining CPU, remaining memory and remaining subnet are respectively determined as the preset total CPU amount, the preset total memory amount and the preset total subnet amount, and finally the preset total resource amount is obtained.
[0102] Step 202: determine the current CPU occupied amount, the current memory occupied amount and the current subnet occupied amount, and determine the current CPU occupied amount, the current memory occupied amount and the current subnet occupied amount as the current resource occupied amount.
[0103] In this step, the current CPU occupied amount, the current memory occupied amount and the current subnet occupied amount are determined as the current resource occupied amount.
[0104] Step 30: Determine whether the to-be-queued work order can be added to the resource blocking queue based on the preset total resource amount, the current resource occupied amount and the resource demand amount.
[0105] Further, if Figure 4 As shown, step 30 further includes:
[0106] Step 301: Determine the sum of the current resource usage and resource demand;
[0107] Step 302: In response to the sum of the current resource usage and the resource demand being greater than or equal to the preset total resource amount, determining that the to-be-queued work order cannot be added to the resource blocking queue;
[0108] Step 303: In response to the sum of the current resource usage and the resource demand being less than the preset total resource amount, determining that the to-be-queued work order can be added to the resource blocking queue.
[0109] It should be noted that if Figure 5 As shown, the step of determining that the sum of the current resource usage and the resource demand is greater than or equal to the preset total resource amount includes:
[0110] Step 3021: perform a first judgment operation, a second judgment operation, and a third judgment operation on the work order to be queued, and obtain a first judgment result, a second judgment result, and a third judgment result;
[0111] Among them, the steps of the first judgment operation include: determining whether the sum of the current CPU occupied amount and the CPU demand is greater than or equal to the preset CPU total amount; the steps of the second judgment operation include: determining whether the sum of the current memory occupied amount and the memory demand is greater than or equal to the preset memory total amount; the third judgment operation includes: determining whether the sum of the current subnet occupied amount and the subnet demand is greater than or equal to the preset subnet total amount.
[0112] Step 3022: In response to at least one of the first judgment result, the second judgment result, and the third judgment result being yes, determine that the sum of the current resource occupation amount and the resource demand amount is greater than or equal to the preset total resource amount.
[0113] In this step, that is, as long as one of the first judgment result, the second judgment result and the third judgment result is yes, it is determined that the sum of the current resource occupancy and resource demand is greater than or equal to the preset total resource amount. That is, if the occupied amount and resource demand of one of the blocking sub-queues are greater than or equal to the total resource amount of the corresponding blocking sub-queue, it means that the resources have reached the upper limit of issuance, and none of the three blocking sub-queues can be inserted.
[0114] In some optional embodiments of this embodiment, Figure 5 As shown, the step of determining that the sum of the current resource usage and the resource demand is less than the preset total resource amount includes:
[0115] Step 3023: In response to the first judgment result, the second judgment result and the third judgment result being no, determining that the sum of the current resource occupation amount and the resource demand amount is less than the preset total resource amount.
[0116] In this step, that is, if the first judgment result, the second judgment result and the third judgment result are all no, it is determined that the sum of the current resource occupancy and resource demand is less than the preset total resource amount, and it is determined that the work order to be queued can be added to the resource blocking queue.
[0117] Step 40: In response to being able to join the resource blocking queue, determining the queue entry position of the to-be-queued work order, and submitting the to-be-queued work order according to the queue entry position.
[0118] In this step, after being able to join the resource blocking queue, it is also necessary to determine the queue entry position of the work order to be queued, and submit the work order to be queued according to the queue entry position.
[0119] In some optional embodiments of this embodiment, Figure 6 As shown, determining the queue entry position of the work order to be queued includes:
[0120] Step 401: Determine the work order type of the work order to be queued according to the resource demand, wherein the work order type includes a resource delivery type and a resource release type.
[0121] Ticket types usually refer to the way of classifying tickets (or work requests) when managing and processing them, based on factors such as the nature, content, or purpose of the ticket. Different organizations or systems may have different ticket types, and the specific ticket type is usually defined based on the organization's needs and business processes. The following are some common ticket types for this application:
[0122] Fault Ticket: Used to report and handle faults, problems or errors in systems, equipment or services. This type of ticket usually needs to be handled in a timely manner to restore the normal operation of the system.
[0123] Change Ticket: used to request changes or updates to systems, devices, or services. Change Tickets may involve changes to software updates, configuration modifications, system upgrades, etc.
[0124] Service Request Ticket: used to request specific services or support, such as account activation, password reset, software installation, etc. This type of ticket usually involves daily service and support work.
[0125] Consulting Ticket: used to request technical or business consultation or advice. This type of ticket usually does not involve specific operations or changes, but is a consultation for specific issues or needs.
[0126] Report Ticket: Used to report problems, anomalies, or events that do not require immediate processing. Report Tickets are usually used to record problems or anomalies for future reference or processing.
[0127] Approval Ticket: used to request approval for certain actions or changes. This type of ticket usually requires approval or review by superiors or relevant departments.
[0128] Maintenance work orders: used to plan and schedule maintenance work for systems, equipment or services. Maintenance work orders usually involve system maintenance, equipment maintenance, service updates and other aspects.
[0129] Different types of work orders usually require different types of resource support to complete. For example, a fault work order requires more computing resources to be allocated to handle system faults, while a service request work order requires more human resources to provide support services. Therefore, when processing a work order, the system needs to determine the type and quantity of resources allocated to the work order based on the work order type, and then perform the corresponding resource distribution operation. In other words, fault work orders and service request work orders are resource distribution types; change work orders are used to request changes or updates to systems, devices, or services. If the software program occupies less memory after the update, the change work order is a resource release type.
[0130] In some optional methods of this embodiment, the type of the work order to be queued can also be determined according to the resource demand, including:
[0131] Step 4011: In response to the resource demand indicating that the queued work order executes an application operation or a capacity expansion operation, determine that the work order type is the resource delivery type.
[0132] Step 4012: In response to the resource demand indicating that the queued work order performs a deletion operation or a reduction operation, the work order type is determined to be the resource release type.
[0133] In this step, the operation to be performed on the work order to be queued can also be determined according to the resource demand filled in by the operation and maintenance personnel when creating the work order to be queued, such as application operation, expansion operation, deletion operation or reduction operation, where:
[0134] Application operation usually refers to the process of requesting specific resources or permissions from the system. In some systems or platforms, users may need to submit applications by filling out forms, sending emails, or other means to obtain the required resources or permissions. This process usually requires providing necessary information, such as resource type, quantity, and usage period, so that system administrators or relevant personnel can review and process it.
[0135] Scaling refers to the process of adding system resources to meet the growth or change in system requirements. For example, in a computer system, scaling may include adding servers, increasing storage capacity, increasing network bandwidth, etc. In a cloud computing environment, scaling usually refers to dynamically adding virtual machine instances or allocating more cloud resources to cope with increased demand. The purpose of scaling is to ensure that the system can meet user needs and maintain normal operation and performance.
[0136] A delete operation usually refers to the process of removing or clearing specific resources or data from a system. In many systems, a delete operation may involve deleting files, records, accounts, configurations, etc. This process may require confirmation by an administrator or relevant personnel to ensure that important data or resources are not accidentally deleted, and may include some verification steps, such as confirming the authority of the operation, providing additional confirmation information, etc.
[0137] Scaling down refers to the process of reducing system resources to accommodate a reduction or change in system demand. In contrast to scaling up, scaling down may involve reducing the number of servers, freeing up storage space, reducing network bandwidth, and so on. In a cloud computing environment, scaling down usually refers to dynamically reducing virtual machine instances or releasing cloud resources that are no longer needed to reduce costs or improve resource utilization. The purpose of scaling down is to ensure that the system can use resources efficiently and avoid wasting resources.
[0138] Therefore, when the resource demand indicates that the work order to be queued performs an application operation or an expansion operation, the work order type is determined to be the resource issuance type; when the resource demand indicates that the work order to be queued performs a deletion operation or a reduction operation, the work order type is determined to be the resource release type.
[0139] Step 402: In response to the work order type being the resource delivery type, determining that the entry position of the to-be-entered work order is the tail of the resource blocking queue;
[0140] Step 403: In response to the work order type being the resource release type, determining that the entry position of the to-be-queued work order is the head of the resource blocking queue.
[0141] In this embodiment, since work orders of resource release type can release system resources, in terms of task execution priority, work orders to be queued of resource release type are higher than work orders to be queued of resource issuance type. Specifically: when the work order type is the resource issuance type, the entry position of the work order to be queued is determined to be the tail of the resource blocking queue; when the work order type is the resource release type, the entry position of the work order to be queued is determined to be the head of the resource blocking queue.
[0142] Furthermore, when executing the scheduled work order task, the tasks to be queued are obtained from the head of the queue and executed, and the deletion tasks are executed first according to the execution order, so that there are more idle resources and it is guaranteed that all resources in the queue can be issued and completed.
[0143] In order to improve the efficiency and accuracy of the work order to be queued, in some optional methods of this embodiment, the work order to be queued and the resource blocking queue are split, wherein the work order to be queued includes a CPU queued sub-work order, a memory queued sub-work order and a subnet queued sub-work order, and the resource blocking queue includes a CPU blocking sub-queue, a memory blocking sub-queue and a subnet blocking sub-queue, and the determining of the queue position of the work order to be queued also includes:
[0144] Determine, according to the CPU demand, a first work order sub-type of the CPU to-be-queued sub-work order;
[0145] In response to the first work order subtype being the resource delivery type, determining that the queue entry position of the CPU to-be-queued sub-work order is the tail of the CPU blocking sub-queue;
[0146] In response to the first work order subtype being the resource release type, determining the queue position of the CPU to-be-queued sub-work order to be the head of the CPU blocking sub-queue;
[0147] Determine, according to the memory demand, a second work order sub-type of the memory queued sub-work order;
[0148] In response to the second work order subtype being the resource delivery type, determining the queue entry position of the memory to-be-queued sub-work order to be the tail of the memory blocking sub-queue;
[0149] In response to the second work order subtype being the resource release type, determining the queue entry position of the memory to-be-queued sub-work order to be the head of the memory blocking sub-queue;
[0150] Determine, according to the subnet demand, a third work order subtype of the subnet's to-be-queued sub-work order;
[0151] In response to the third work order subtype being the resource delivery type, determining that the entry position of the subnet to-be-queued sub-work order is the tail of the subnet blocking sub-queue;
[0152] In response to the third work order subtype being the resource release type, determining the queue entry position of the subnet to-be-queued sub-work order to be the head of the subnet blocking sub-queue.
[0153] In this embodiment, the work orders to be enqueued and the resource blocking queue are split, and the sub-work orders can be added to the corresponding resource blocking sub-queue, thereby improving the accuracy of enqueuing, and the enqueuing of the above-mentioned memory sub-work orders to be enqueued, CPU sub-work orders to be enqueued, and subnet sub-work orders to be enqueued can be executed concurrently, further improving the efficiency of work order enqueuing.
[0154] In some optional embodiments of this embodiment, Figure 7 As shown, it also includes:
[0155] Step 50: In response to being unable to join the resource blocking queue, determining that the work order to be added to the queue fails to be submitted;
[0156] Step 60: output prompt information for the work order to be queued, wherein the prompt information is used to instruct the user to adjust at least one of the CPU sub-work order to be queued, the memory sub-work order to be queued, and the subnet sub-work order to be queued.
[0157] In this embodiment, when it is impossible to join the resource blocking queue and it is determined that the submission of the work order to be queued has failed, a prompt message for the failed work order can also be output, so that the user can adjust at least one of the CPU queued sub-work order, the memory queued sub-work order and the subnet queued sub-work order according to the prompt message, thereby improving the queueing (submission) success rate of the work order to be queued.
[0158] In some optional methods of this embodiment, after submitting the work order to be queued, the method further includes:
[0159] The current resource usage and the preset total resource amount of the resource blocking queue are updated.
[0160] In this step, after each work order to be queued is submitted, the current resource occupied amount and the preset total amount of resources of the resource blocking queue need to be updated, that is, the current resource occupied amount and the preset total amount of resources of each resource blocking sub-queue.
[0161] Here, it is necessary to explain that if it is a work order of resource release type such as deletion, reduction, etc., the total length of the queue is the total amount of resources, and the number of objects in the queue is the number of occupied resources. If resources are released and queued, it is regarded as occupying resources. In theory, resources are released, but they are occupied.
[0162] Specifically, even if a resource is released (for example, an object is removed from the system), if this operation is achieved by putting the resource back into the queue, the system still regards it as occupied. Because although the resource is released, it is still marked as "occupied" in the queue, so the system considers that the resource is still unavailable. Although the resource is released in a sense (it is removed from the queue), the number of objects in the queue has not decreased, so the system needs to consider expanding the total length of the queue to accommodate more objects. Because although some resources in the queue are released, the overall resource occupancy has not changed, and sufficient queue capacity is still required to manage these resources. Therefore, the total capacity is expanded, for example, the queue is expanded to twice the length of the number of released resources.
[0163] The technical solution of this application optimizes the previous scheduled resource delivery, pre-occupies resources when a work order is created, and can provide operation and maintenance personnel with a reference for the number of resources that can be delivered during the work order creation stage, thereby reducing the workload of switching between systems, reasonably planning resources, and improving the success rate of resource delivery.
[0164] The information collected in the technical solution of this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0165] Based on the same inventive concept, the embodiments of the present application also provide a work order submission device based on a blocking queue, which can be used to implement the method described in the above embodiments, as described in the following embodiments. Since the principle of the problem solved by the work order submission device based on a blocking queue is similar to that of a work order submission method based on a blocking queue, the implementation of a work order submission device based on a blocking queue can refer to the implementation of a work order submission method based on a blocking queue, and the repeated parts will not be repeated. As used below, the terms "unit" or "module" can be a combination of software and / or hardware that implements predetermined functions. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0166] It should be noted that the work order submission method and device based on blocking queue provided in the embodiment of the present invention can be used in the financial field, and can also be used in any technical field other than the financial field. The embodiment of the present invention does not limit the application field of the work order submission method and device based on blocking queue.
[0167] like Figure 8 As shown, the work order submission device based on the blocking queue includes:
[0168] The resource requirement determination module 601 is configured to obtain the work order to be queued and determine the resource requirement of the work order to be queued;
[0169] The resource blocking queue determination module 602 is configured to determine the total amount of preset resources and the current amount of resource occupation of the resource blocking queue;
[0170] The queue entry judgment module 603 is configured to determine whether the queue entry work order can be added to the resource blocking queue according to the preset total resource amount, the current resource occupied amount and the resource demand amount;
[0171] The work order submission module 604 is configured to determine the queue entry position of the to-be-queued work order in response to being able to join the resource blocking queue, and submit the to-be-queued work order according to the queue entry position.
[0172] In some optional aspects of this embodiment, the resource demand determination module is further configured to:
[0173] Determine resource configuration information of the work order to be queued for CPU, memory and subnet;
[0174] Determine the CPU requirement, memory requirement and subnet requirement of the work order to be queued according to the resource configuration information;
[0175] The CPU requirement, memory requirement and subnet requirement are determined as the resource requirement.
[0176] In some optional aspects of this embodiment, the resource blocking queue determination module is further configured to:
[0177] Determine a preset total amount of CPU, a preset total amount of memory, and a preset total amount of subnets, and determine the preset total amount of CPU, the preset total amount of memory, and the preset total amount of subnets as the preset total amount of resources;
[0178] Determine the current CPU occupied amount, the current memory occupied amount, and the current subnet occupied amount, and determine the current CPU occupied amount, the current memory occupied amount, and the current subnet occupied amount as the current resource occupied amount.
[0179] In some optional embodiments of this embodiment, the queue entry judgment module is further configured as follows:
[0180] Determine the sum of the current resource usage and resource demand;
[0181] In response to the sum of the current resource usage and the resource demand being greater than or equal to the preset total resource amount, determining that the to-be-queued work order cannot be added to the resource blocking queue;
[0182] In response to the sum of the current resource occupation amount and the resource demand amount being less than the preset resource total amount, it is determined that the to-be-queued work order can be added to the resource blocking queue.
[0183] In some optional manners of this embodiment, the step of determining that the sum of the current resource occupation amount and the resource demand amount is greater than or equal to the preset total resource amount includes:
[0184] Performing a first judgment operation, a second judgment operation, and a third judgment operation on the work order to be queued, and obtaining a first judgment result, a second judgment result, and a third judgment result;
[0185] In response to at least one of the first judgment result, the second judgment result and the third judgment result being yes, determining that the sum of the current resource occupation amount and the resource demand amount is greater than or equal to the preset total resource amount;
[0186] Among them, the steps of the first judgment operation include: determining whether the sum of the current CPU occupied amount and the CPU demand is greater than or equal to the preset CPU total amount; the steps of the second judgment operation include: determining whether the sum of the current memory occupied amount and the memory demand is greater than or equal to the preset memory total amount; the third judgment operation includes: determining whether the sum of the current subnet occupied amount and the subnet demand is greater than or equal to the preset subnet total amount.
[0187] In some optional manners of this embodiment, the step of determining that the sum of the current resource occupation amount and the resource demand amount is less than the preset total resource amount includes:
[0188] In response to the first judgment result, the second judgment result and the third judgment result being no, it is determined that the sum of the current resource occupation amount and the resource demand amount is less than the preset total resource amount.
[0189] In some optional embodiments of this embodiment, the work order submission module includes:
[0190] A work order type determination unit is configured to determine the work order type of the work order to be queued according to the resource demand, wherein the work order type includes a resource delivery type and a resource release type;
[0191] A first queue entry position determination unit, in response to the work order type being the resource delivery type, determines that the queue entry position of the to-be-queued work order is the tail of the resource blocking queue;
[0192] The second enqueue position determining unit, in response to the work order type being the resource release type, determines the enqueue position of the to-be-enqueued work order to be the head of the resource blocking queue.
[0193] In some optional aspects of this embodiment, the work order type determination unit is further configured to:
[0194] In response to the resource demand indicating that the to-be-queued work order performs an application operation or a capacity expansion operation, determining that the work order type is the resource delivery type;
[0195] In response to the resource demand indicating that the to-be-queued work order performs a deletion operation or a reduction operation, the work order type is determined to be the resource release type.
[0196] In some optional methods of this embodiment, the work order to be queued includes a CPU to-be-queued sub-work order, a memory to-be-queued sub-work order, and a subnet to-be-queued sub-work order, the resource blocking queue includes a CPU blocking sub-queue, a memory blocking sub-queue, and a subnet blocking sub-queue, and the work order submission module is further configured as follows:
[0197] Determine, according to the CPU demand, a first work order sub-type of the CPU queued sub-work order;
[0198] In response to the first work order subtype being the resource delivery type, determining that the queue entry position of the CPU to-be-queued sub-work order is the tail of the CPU blocking sub-queue;
[0199] In response to the first work order subtype being the resource release type, determining the queue position of the CPU to-be-queued sub-work order to be the head of the CPU blocking sub-queue;
[0200] Determine, according to the memory demand, a second work order sub-type of the memory queued sub-work order;
[0201] In response to the second work order subtype being the resource delivery type, determining the queue entry position of the memory to-be-queued sub-work order to be the tail of the memory blocking sub-queue;
[0202] In response to the second work order subtype being the resource release type, determining the queue entry position of the memory to-be-queued sub-work order to be the head of the memory blocking sub-queue;
[0203] Determine, according to the subnet demand, a third work order subtype of the subnet's to-be-queued sub-work order;
[0204] In response to the third work order subtype being the resource delivery type, determining the queue entry position of the subnet to-be-queued sub-work order to be the tail of the subnet blocking sub-queue;
[0205] In response to the third work order subtype being the resource release type, determining the queue entry position of the subnet to-be-queued sub-work order to be the head of the subnet blocking sub-queue.
[0206] In some optional aspects of this embodiment, the work order submission device based on the blocking queue is further configured as follows:
[0207] In response to being unable to join the resource blocking queue, determining that submission of the to-be-queued work order fails;
[0208] Output prompt information for the work order to be queued, wherein the prompt information is used to instruct the user to adjust at least one of the CPU to-be-queued sub-work order, the memory to-be-queued sub-work order, and the subnet to-be-queued sub-work order.
[0209] In some optional aspects of this embodiment, the work order submission device based on the blocking queue further includes:
[0210] The resource update module is configured to update the current resource occupancy amount and the preset resource total amount of the resource blocking queue after the work order to be queued is submitted.
[0211] In some optional aspects of this embodiment, the work order submission device based on the blocking queue further includes:
[0212] The resource initialization module is configured to initialize the resource blocking queue before obtaining the work order to be queued, determine the remaining resources of the resource blocking queue, and determine the remaining resources as the preset total resource amount.
[0213] According to an embodiment of the present disclosure, the present application also provides an electronic device, a readable storage medium and a computer program product.
[0214] An electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of a work order submission method based on a blocking queue of the aforementioned embodiment.
[0215] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the steps of a work order submission method based on a blocking queue in the aforementioned embodiment.
[0216] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of a work order submission method based on a blocking queue in the aforementioned embodiment.
[0217] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0218] like Fig. 9As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0219] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0220] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 901 executes the various methods and processes described above, such as a method for submitting a work order based on a blocking queue.
[0221] For example, in some embodiments, a method for submitting a work order based on a blocking queue may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the method for submitting a work order based on a blocking queue described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute a method for submitting a work order based on a blocking queue in any other appropriate manner (e.g., by means of firmware).
[0222] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0223] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0224] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0225] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0226] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0227] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0228] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of this disclosure can be achieved, and this document is not limited here.
[0229] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A work order submission method based on a blocking queue, characterized in that: include: Obtaining the work order to be queued and determining the resource demand of the work order to be queued; Determine the preset total amount of resources and the current amount of resources occupied by the resource blocking queue; Determine whether the to-be-queued work order can be added to the resource blocking queue according to the preset total resource amount, the current resource occupied amount and the resource demand amount; In response to being able to join the resource blocking queue, determining an entry position of the to-be-entered work order, and submitting the to-be-entered work order according to the entry position.
2. The method according to claim 1, characterized in that The determining of the resource requirement of the work order to be queued includes: Determine resource configuration information of the work order to be queued for CPU, memory and subnet; Determine the CPU requirement, memory requirement and subnet requirement of the work order to be queued according to the resource configuration information; The CPU requirement, memory requirement and subnet requirement are determined as the resource requirement.
3. The method according to claim 2, characterized in that The resource blocking queues include a CPU blocking queue, a memory blocking queue, and a subnet blocking queue. The determining of the total amount of preset resources and the current amount of resource occupied by the resource blocking queues includes: Determine a preset total amount of CPU, a preset total amount of memory, and a preset total amount of subnets, and determine the preset total amount of CPU, the preset total amount of memory, and the preset total amount of subnets as the preset total amount of resources; Determine the current CPU occupied amount, the current memory occupied amount, and the current subnet occupied amount, and determine the current CPU occupied amount, the current memory occupied amount, and the current subnet occupied amount as the current resource occupied amount.
4. The method according to claim 3, characterized in that The determining whether the to-be-queued work order can be added to the resource blocking queue according to the preset total resource amount, the current resource occupied amount and the resource demand amount includes: Determine the sum of the current resource usage and resource demand; In response to the sum of the current resource usage and the resource demand being greater than or equal to the preset total resource amount, determining that the to-be-queued work order cannot be added to the resource blocking queue; In response to the sum of the current resource occupation amount and the resource demand amount being less than the preset resource total amount, it is determined that the to-be-queued work order can be added to the resource blocking queue.
5. The method according to claim 4, characterized in that The step of determining that the sum of the current resource usage and the resource demand is greater than or equal to the preset total resource amount includes: Performing a first judgment operation, a second judgment operation, and a third judgment operation on the work order to be queued, and obtaining a first judgment result, a second judgment result, and a third judgment result; In response to at least one of the first judgment result, the second judgment result and the third judgment result being yes, determining that the sum of the current resource occupation amount and the resource demand amount is greater than or equal to the preset total resource amount; Among them, the steps of the first judgment operation include: determining whether the sum of the current CPU occupied amount and the CPU demand is greater than or equal to the preset CPU total amount; the steps of the second judgment operation include: determining whether the sum of the current memory occupied amount and the memory demand is greater than or equal to the preset memory total amount; the third judgment operation includes: determining whether the sum of the current subnet occupied amount and the subnet demand is greater than or equal to the preset subnet total amount.
6. The method according to claim 5, characterized in that The step of determining that the sum of the current resource usage and the resource demand is less than the preset total resource amount includes: In response to the first judgment result, the second judgment result and the third judgment result being no, it is determined that the sum of the current resource occupation amount and the resource demand amount is less than the preset total resource amount.
7. The method according to claim 2, characterized in that Determining the queue entry position of the work order to be queued includes: Determine the work order type of the work order to be queued according to the resource demand, wherein the work order type includes a resource delivery type and a resource release type; In response to the work order type being the resource delivery type, determining that the entry position of the to-be-entered work order is the tail of the resource blocking queue; In response to the work order type being the resource release type, determining the queue entry position of the to-be-queued work order to be the head of the resource blocking queue.
8. The method according to claim 7, characterized in that Determining the type of the work order to be queued according to the resource demand includes: In response to the resource demand indicating that the to-be-queued work order performs an application operation or a capacity expansion operation, determining that the work order type is the resource delivery type; In response to the resource demand indicating that the to-be-queued work order performs a deletion operation or a reduction operation, the work order type is determined to be the resource release type.
9. The method according to claim 7, characterized in that: The work orders to be queued include CPU queued sub-work orders, memory queued sub-work orders and subnet queued sub-work orders, the resource blocking queue includes CPU blocking sub-queue, memory blocking sub-queue and subnet blocking sub-queue, and the step of determining the queue entry position of the work orders to be queued also includes: Determine, according to the CPU demand, a first work order sub-type of the CPU queued sub-work order; In response to the first work order subtype being the resource delivery type, determining that the queue entry position of the CPU to-be-queued sub-work order is the tail of the CPU blocking sub-queue; In response to the first work order subtype being the resource release type, determining the queue entry position of the CPU to-be-queued sub-work order to be the head of the CPU blocking sub-queue; Determine, according to the memory demand, a second work order sub-type of the memory queued sub-work order; In response to the second work order subtype being the resource delivery type, determining the queue entry position of the memory to-be-queued sub-work order to be the tail of the memory blocking sub-queue; In response to the second work order subtype being the resource release type, determining the queue entry position of the memory to-be-queued sub-work order to be the head of the memory blocking sub-queue; Determine, according to the subnet demand, a third work order subtype of the subnet's to-be-queued sub-work order; In response to the third work order subtype being the resource delivery type, determining the queue entry position of the subnet to-be-queued sub-work order to be the tail of the subnet blocking sub-queue; In response to the third work order subtype being the resource release type, determining the queue entry position of the subnet to-be-queued sub-work order to be the head of the subnet blocking sub-queue.
10. The method according to claim 9, characterized in that Also includes: In response to being unable to join the resource blocking queue, determining that submission of the to-be-queued work order fails; Output prompt information for the work order to be queued, wherein the prompt information is used to instruct the user to adjust at least one of the CPU to-be-queued sub-work order, the memory to-be-queued sub-work order, and the subnet to-be-queued sub-work order.
11. The method according to claim 1, characterized in that: After submitting the work order to be added to the team, the method further includes: The current resource usage and the preset total resource amount of the resource blocking queue are updated.
12. The method according to claim 1, characterized in that Before obtaining the work order to be queued, the following steps are also included: The resource blocking queue is initialized, the remaining amount of resources of the resource blocking queue is determined, and the remaining amount of resources is determined as the preset total amount of resources.
13. A work order submission device based on a blocking queue, characterized in that: include: A resource demand determination module is configured to obtain a work order to be queued and determine the resource demand of the work order to be queued; A resource blocking queue determination module is configured to determine the total amount of preset resources and the current amount of resource occupation of the resource blocking queue; An entry judgment module is configured to determine whether the to-be-entered work order can be added to the resource blocking queue according to the preset total resource amount, the current resource occupied amount and the resource demand amount; The work order submission module is configured to determine the entry position of the to-be-entered work order in response to being able to join the resource blocking queue, and submit the to-be-entered work order according to the entry position.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of a work order submission method based on a blocking queue as described in any one of claims 1 to 12 are implemented.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a work order submission method based on a blocking queue as described in any one of claims 1 to 12 are implemented.
16. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of a work order submission method based on a blocking queue as described in any one of claims 1 to 12 are implemented.
