An adaptive server-side construction machine scheduling method and system

Through the adaptive server-side builder scheduling method, the builder resources are dynamically allocated, which solves the problems of traditional CI/CD tools in game development, low resource utilization and poor scalability, and achieves efficient and stable task execution and resource utilization improve system reliability.

CN118642830BActive Publication Date: 2024-12-06HUANLE ENTERTAINMENT SHANGHAI TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411117423.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-06
Estimated Expiration
2044-08-15

Smart Images

  • Figure CN118642830B_ABST
    Figure CN118642830B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of information processing technology, and specifically relates to an adaptive server-side builder scheduling method and system. The method includes: setting a builder scheduling mechanism, in a multi-threaded scheduling mechanism, allocating unlocked and idle builders to task orders and running them alternately; in a single-threaded scheduling mechanism, allocating unlocked and idle builders to task orders in sequence and running them in sequence. The system includes: a single-threaded scheduling mechanism setting module, a multi-threaded scheduling mechanism setting module, a server-side builder queue module, and a global node setting module. The present invention improves the builder scheduling technology, mainly in: improving task execution efficiency, reducing operation and maintenance costs, optimizing resource utilization, improving system reliability, etc.; it can better provide high-quality services for game development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to an adaptive server-side builder scheduling method and system. Background Art

[0002] The Chinese game market has shown a steady growth trend since 2020, with actual sales revenue reaching 296.513 billion yuan in 2021, a year-on-year increase of 6.40%. This growth momentum has attracted more and more companies to invest in the field of game research and development. In the process of game software development and deployment, build tools play a vital role. Build tools are responsible for automating the software build, testing, and deployment process, helping development teams improve efficiency, reduce human errors, and ensure software consistency. At present, Jenkins, as an open source automation server, is widely used in continuous integration (CI) and continuous delivery (CD) environments. Jenkins provides the ability to flexibly configure and manage build pipelines, supports multiple functions through rich plug-ins, and is compatible with multiple operating systems and programming languages.

[0003] In game development, building and testing tasks are often complex and large. Traditional CI / CD tools have the following deficiencies in task scheduling and resource management:

[0004] Management complexity: Jenkins uses a master-slave architecture, and managing a large number of build machines (agents) requires a lot of configuration and maintenance work. The decentralized management and configuration of each node increases the complexity and cost of overall management.

[0005] Low resource utilization: In the scheduling system, resource allocation is usually static and cannot adapt to changes in task load in real time. This static allocation may cause some build machines to be idle while other build machines are overloaded, resulting in low resource utilization.

[0006] Scalability issues: When dealing with large concurrent build tasks, the master node of Jenkins can easily become a bottleneck, affecting the overall performance and response speed of the system. This bottleneck is particularly evident in high-frequency game building and testing environments.

[0007] Insufficient task atomicity: The scheduling system cannot guarantee the atomicity of task execution, resulting in the inability to automatically roll back or retry tasks when they fail or are interrupted, affecting the stability and reliability of the build process. Summary of the invention

[0008] The purpose of the present invention is to solve the technical problems existing in the background technology. To this end, an adaptive server-side builder scheduling method and system are provided.

[0009] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0010] An adaptive server-side builder scheduling method includes the following steps:

[0011] Step S1: After the system is started, the builder scheduling mechanism is set, including a single-thread scheduling mechanism and a multi-thread scheduling mechanism;

[0012] Step S2: creating a task order in the multi-thread scheduling mechanism;

[0013] Step S3: determining the type of the task order, including a non-build-locked type order and a build-locked type order;

[0014] Step S31: the task order is a non-build-locked type order;

[0015] Randomly take out a batch of build machines from the global queue, and traverse the taken out build machines to check whether there are idle build machines;

[0016] If there are no idle build machines, an error is returned and another batch of build machines are randomly selected;

[0017] If there is an idle build machine, operate the flow log, output the build machine allocation currently in progress, and determine whether the build machine is locked;

[0018] Randomly assign unlocked and idle build machines to subtasks within the order;

[0019] Step S32: the task order is a build lock type order;

[0020] Set the initial status of the order to queue status;

[0021] Set the subtask status under the order to queue status;

[0022] The pre-allocated builder set is taken out, and the taken-out builder set is traversed to check whether the builder set has an idle builder;

[0023] If there is no idle builder machine, an error is returned and the pre-allocated builder machine set is reset;

[0024] If there is an idle build machine, operate the flow log, output the build machine allocation currently in progress, and determine whether the build machine is locked;

[0025] If the build machine is locked, the order continues to queue;

[0026] If the builder is not locked, the order status is changed to the ready-to-allocate status, the builder is allocated according to the subtask queue status, and the allocated builder is locked or unlocked.

[0027] The following is a technical solution further defined by the method of the present invention: in a single-thread scheduling mechanism, all task orders of the builder to be assigned are retrieved and sorted, and whether there is an idle builder from the global queue according to the order sequence;

[0028] If there is no idle build machine, an error is returned and the build machine scheduling ends;

[0029] If there is an idle build machine, set the execution host of all subtasks of the order to that build machine;

[0030] The build machine dispatching for each order is completed in the order sequence.

[0031] The following is a technical solution further defined by the method in the present invention, in which the single-thread scheduling mechanism and the multi-thread scheduling mechanism are performed simultaneously or separately.

[0032] The following is a technical solution further defined by the method of the present invention, in which both the single-thread scheduling mechanism and the multi-thread scheduling mechanism include user-created task orders and non-user-created task orders;

[0033] Non-user created task orders are managed by the management end to confirm whether the single-thread scheduling mechanism or the multi-thread scheduling mechanism is enabled.

[0034] The following is a technical solution further defined by the method in the present invention, wherein a build lock type order includes a partial build lock type order and a global build lock type order;

[0035] A partial build lock type order includes: at least one subtask that locks the build machine and at least one subtask that does not lock the build machine;

[0036] When executing a subtask that locks a build machine, the subtask runs on the corresponding locked build machine, and the corresponding build machine is locked;

[0037] When executing a subtask of an unlocked build machine, the subtask is run on the corresponding unlocked build machine, and the build machine that has completed the subtask is released;

[0038] All subtasks in the global build lock type order lock the build machine;

[0039] The subtask runs on the corresponding locked build machine, locking all build machines. After all subtasks in the order are completed, all build machines are released.

[0040] The following is a technical solution further limited by the method in the present invention. At any time, the specified global node is enabled and set, the target builder selected by the current task order becomes invalid, and the current task order schedules the builder according to the specified global node.

[0041] The following is a technical solution further defined by the method in the present invention. At any time after the global node is turned on, the specified global node is closed and the current task order restores the original builder scheduling mechanism.

[0042] An adaptive server-side builder scheduling system, used to implement the above-mentioned server-side builder scheduling method, including: a single-thread scheduling mechanism setting module, a multi-thread scheduling mechanism setting module, a server-side builder queue module and a global node setting module;

[0043] A single-threaded scheduling mechanism setting module is used to retrieve and sort all task orders of the build machines to be assigned, and schedule the build machines from the server-side build machine queue module according to the order sequence; wherein the task orders include user-created task orders and non-user-created task orders;

[0044] A multi-threaded scheduling mechanism setting module is used to schedule build machines from the server-side build machine queue module for all task orders to be assigned to build machines; wherein the task orders include user-created task orders and non-user-created task orders;

[0045] The global node setting module is used to schedule the builder from the server-side builder queue module according to the specified global node for all task orders to be assigned or already assigned to the builder; wherein the task orders include user-created task orders and non-user-created task orders.

[0046] The following is a technical solution further defined by the system in the present invention, the single-threaded scheduling mechanism setting module includes: a task order creation unit, an order retrieval unit, an order sorting unit, a builder query unit, and a builder allocation unit;

[0047] Task order creation unit, used for users to create custom task orders;

[0048] An order retrieval unit, used for retrieving task orders to be assigned to build machines;

[0049] An order sorting unit, used to sort all retrieved task orders;

[0050] A builder query unit, used to query idle build machines in order of orders;

[0051] The build machine allocation unit is used to allocate the same idle build machine to all subtasks of the same task order.

[0052] The following is a technical solution further defined by the system in the present invention, the multi-threaded scheduling mechanism setting module includes: a task order creation unit, a task order query unit, a builder random fetching unit, a builder query unit, a log update unit, an order status setting unit, a builder allocation unit, and a builder locking unit;

[0053] Task order creation unit, used for users to create custom task orders;

[0054] A task order query unit is used to query the type of task orders;

[0055] The builder random extraction unit is used to randomly extract a batch of build machines from the global queue;

[0056] A build machine query unit, used to query idle build machines and locked build machines;

[0057] A log updating unit, used for updating the log of the record builder allocation;

[0058] The order status setting unit is used to set the initial status of the order, the status of the subtask, and modify the order status;

[0059] A build machine allocation unit, used to allocate unlocked and idle build machines to subtasks within an order;

[0060] The build machine locking unit is used to lock or release the build machine.

[0061] Compared with the prior art, the present invention has the following technical effects:

[0062] Improve task execution efficiency: The present invention realizes intelligent scheduling and management of all CI / CD build machines through an adaptive server-side scheduling system and method. According to the real-time task load and resource conditions, the build machine resources are dynamically allocated and scheduled, and the most suitable build machine is selected to execute the task, thereby improving the task execution efficiency.

[0063] Reduced operation and maintenance costs: This invention reduces the need for manual intervention in the scheduling of build machines, reduces operation and maintenance costs and management complexity. Users do not need to spend a lot of time and energy manually managing and scheduling build machines, and can focus more on game development and deployment.

[0064] Optimize resource utilization: The present invention selects the most suitable builder to execute tasks according to the builder group configured by the user, avoiding resource waste and bottlenecks, and maximizing resource utilization. The system can fully utilize all available builder resources to ensure efficient execution of tasks.

[0065] Improve system reliability: The present invention can monitor the status of the build machine in real time and make adjustments according to the situation to ensure the stable execution of tasks. It can cope with emergencies such as build machine failures and network fluctuations, improving the reliability and stability of the system.

[0066] In summary, the present invention improves the builder scheduling technology, mainly in terms of: improving task execution efficiency, reducing operation and maintenance costs, optimizing resource utilization, and improving system reliability, which can better provide high-quality services for game development.

[0067] The present invention is further described below in conjunction with the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] 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 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.

[0069] Figure 1 It is a schematic flow chart of the method of the present invention;

[0070] Figure 2 It is a flow chart of the single thread scheduling mechanism in the present invention;

[0071] Figure 3 It is a flow chart of constructing a lock type order with two build lock situations in the present invention;

[0072] Figure 4 is a system block diagram of the present invention;

[0073] Figure 5 It is a schematic diagram of the construction machine scheduling process of non-construction locking type orders in the present invention;

[0074] Figure 6 It is a schematic diagram of the construction machine scheduling process for constructing a locked type order in the present invention. DETAILED DESCRIPTION

[0075] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.

[0076] like Figure 1-6 As shown, this embodiment provides an adaptive server-side builder scheduling method and an adaptive server-side builder scheduling system.

[0077] like Figure 1-3 As shown, an adaptive server-side construction machine scheduling method specifically includes the following steps:

[0078] 1. After the system is started, set up the builder scheduling mechanism, including the single-thread scheduling mechanism and the multi-thread scheduling mechanism. It should be noted that in the single-thread scheduling mechanism, the builder scheduling is carried out in the order of the task orders. After the previous task order is assigned a builder and runs, the next task order can be assigned a builder and run, and so on. For example, in the single-thread scheduling mechanism, there are task orders A1, B1, and C1 in sequence. Then, after task order A1 is scheduled and runs, task order B1 can be scheduled and run. After task order B1 runs, task order C1 can be scheduled and run. In the multi-thread scheduling mechanism, all task orders can be assigned build machines and run alternately: for example, in the multi-thread scheduling mechanism, there are task orders A2, B2, and C2. Then, task orders A2, B2, and C2 can be scheduled for build machines (unlocked and idle build machines) in no particular order. Finally, the single-thread scheduling mechanism and the multi-thread scheduling mechanism can be performed simultaneously or separately, that is, the scheduling of the build machines between task orders A1, B1, and C1 will not affect the scheduling of the build machines between task orders A2, B2, and C2.

[0079] 2. Multi-thread scheduling mechanism.

[0080] 2.1. Create a task order in the multi-threaded scheduling mechanism. It should be noted that users can customize the creation of task orders, but task orders are not limited to task orders created by users, but also include task orders that are not created by users, such as task orders automatically generated by the system, and the task order needs to be assigned to a build machine and run on the build machine. The management end performs management operations to confirm that the single-threaded scheduling mechanism or the multi-threaded scheduling mechanism is enabled. In addition, the number of task orders is not limited to one, and multiple task orders can be processed simultaneously in the system of this embodiment. A task order consists of multiple subtasks.

[0081] 2.2. Determine the type of task order, including non-build-locked type orders and build-locked type orders.

[0082] 2.2.1. Task orders are non-build-locked type orders.

[0083] A batch of build machines are randomly taken out from the global queue, and the taken out build machines are traversed to check whether there are idle build machines; it should be noted that the global queue refers to: all build machine groups.

[0084] If there are no idle build machines, an error is returned and another batch of build machines are randomly selected.

[0085] If there is an idle build machine, operate the flow log, output the build machine allocation currently in progress, and determine whether the build machine is locked.

[0086] The locked idle build machines are discarded, and the unlocked and idle build machines are randomly assigned to the subtasks within the order, and the tasks are executed.

[0087] like Figure 5 As shown, for example: task orders A and B are non-build-locked type orders; task order A includes subtasks A1, A2, and A3, and task order B includes subtasks B1 and B2.

[0088] From the global queue of build machines a1, a2...b1, b2...c1, c2...d1, d2... and so on, build machines a1, a3, b1, b2, c1, d1, d2, d3, d4 are randomly taken out; among them, build machines a1, b2, c1, d1, d2, d4 and so on are unlocked and idle build machines.

[0089] Then, build machines a1, b2, c1, d1, d2, and d4 are randomly assigned to subtasks A1, A2, and A3 of task order A and subtasks B1 and B2 of task order B. Specifically: build machine b2 is assigned to subtask A1, build machine a1 is assigned to subtask A2, build machine d1 is assigned to subtask A3, build machine d4 is assigned to subtask B1, and build machine c1 is assigned to subtask B2; build machine d2 continues to be an unlocked and idle build machine, and is assigned to task orders of other build machines to be assigned.

[0090] Subtask A1 runs on build machine b2; subtask A2 runs on build machine a1; subtask A3 runs on build machine d1; subtask B1 runs on build machine d4; subtask B2 runs on build machine c1. The subtasks are run in no particular order.

[0091] 2.2.2. The task order is a build lock type order.

[0092] Set the initial state of the order to the queue state; it should be noted that the queue state of the task order means: waiting for the builder to be assigned, rather than the order between the task orders.

[0093] Set the subtask status under the order to the queue status; it should be noted that the queue status of the subtask means: waiting for the builder to allocate, rather than the order between subtasks.

[0094] The pre-allocated builder set is taken out, and the taken-out builder set is traversed to check whether the builder set has an idle builder. It should be noted that the pre-allocated builder set refers to: the specified builder group, not all builder groups. Therefore, it satisfies the user's custom design, that is, the user can customize the task order and customize the build group.

[0095] If there are no idle build machines, an error is returned and the set of pre-allocated build machines is reset.

[0096] If there is an idle build machine, operate the flow log, output the build machine allocation currently in progress, and determine whether the build machine is locked.

[0097] If the build machine is locked, the order continues to queue.

[0098] If the builder is not locked, the order status is changed to the ready-to-allocate status, and the builder is allocated according to the subtask queue status. The allocated builder is locked or unlocked until the builder allocation of all subtasks in the order is completed.

[0099] It should be noted that, based on whether the allocated build machine is locked or not, the build lock type order includes a partial build lock type order and a global build lock type order. Specifically:

[0100] A partial build lock type order includes: at least one subtask that locks the build machine and at least one subtask that does not lock the build machine.

[0101] When executing a subtask that locks a build machine, the subtask runs on the corresponding locked build machine, and the corresponding build machine is locked.

[0102] When executing a subtask that does not lock a build machine, the subtask runs on the corresponding unlocked build machine, and the build machine that has completed the subtask is released.

[0103] Global build lock type All subtasks within the order lock the build machine.

[0104] The subtask runs on the corresponding locked build machine, locking all build machines. After all subtasks in the order are completed, all build machines are released.

[0105] like Figure 6 As shown in the figure, for example: Task order A is a partial build lock type order, and task order B is a global build lock type order. Task order A includes subtasks A1, A2, and A3 (subtasks A1 and A2 need to lock the build machine, and subtask A3 does not lock the build machine), and task order B includes subtasks B1 and B2 (subtasks B1 and B2 both lock the build machine).

[0106] Take out the specified build group a and build group b. Build group a includes build machines a1, a2, ...; build group b includes build machines b1, b2, .... Among them, build machines a1 and a2 are idle and unlocked, build machines a3 and a4 are idle but locked (other task orders schedule the build machines and have not released them); build machines b1 and b2 are idle and unlocked.

[0107] Then, build machines a1 and a2 are randomly assigned to subtasks A1 and A2 (build machine a1 is assigned to subtask A1, and build machine a2 is assigned to subtask A2), and the build machines are locked; subtask A3 is in a queue state, and when build machine a4 is released, build machine a4 is assigned to subtask A3, and the build machine is not locked.

[0108] Subtask A1 runs on builder a1, subtask A2 runs on builder a2, and builder a1 and builder a2 are locked; subtask A3 runs on builder a4, builder a4 is not locked, and releases builder a1 or a2 that has completed the subtask execution.

[0109] Randomly assign build machines b1 and b2 to subtasks B1 and B2 (build machine b1 is assigned to subtask B1, and build machine b2 is assigned to subtask B2), and lock the build machines. Subtask B1 runs on build machine b1, and subtask B2 runs on build machine b2. Build machines b1 and b2 are locked. When subtask B1 is completed, build machine b1 is idle but locked; when all subtasks B1 and B2 in task order B are completed, build machines b1 and b2 are released.

[0110] 3. Single-thread scheduling mechanism.

[0111] 3.1. In the single-thread scheduling mechanism, retrieve and sort the task orders of all build machines to be assigned, and query whether there are idle build machines from the global queue according to the order sequence;

[0112] If there is no idle build machine, an error is returned and the build machine scheduling ends;

[0113] If there is an idle build machine, set the execution host of all subtasks of the order to that build machine and execute the tasks;

[0114] The build machine dispatching for each order is completed in the order sequence.

[0115] For example: Task order A includes subtasks A1, A2, and A3; task order B includes subtasks B1, B2, and B3; task order C includes subtasks C1, C2, and C3. Task orders A, B, and C are arranged in sequence.

[0116] In the global queue, at this time, build machines a1, b2, c1, and d1 are unlocked and idle build machines;

[0117] Then, task order A is randomly assigned to build machine b2, and subtasks A1, A2, and A3 are all run on build machine b2.

[0118] After task order A is finished running, at this time, the build machine d1 is an unlocked and idle build machine;

[0119] Task order B is assigned to builder d1, and subtasks B1, B2, and B3 are all run on builder d1.

[0120] After task order B is finished running, build machines a2, b1, and c1 are unlocked and idle build machines;

[0121] Task order C is randomly assigned to builder c1, and subtasks C1, C2, and C3 are all run on builder c1.

[0122] 4. Global node function: suitable for situations where task consistency is required.

[0123] 4.1. At any time, the specified global node is enabled, the target builder selected by the current task order becomes invalid, the current task order schedules the builder according to the specified global node, and executes the task.

[0124] 4.2. At any time after the global node is turned on, close the specified global node and the current task order will restore the original builder scheduling mechanism.

[0125] For example: Task order A includes subtasks A1, A2, and A3, and the global node sets the builder b2. Then subtasks A1, A2, and A3 are all run on the builder b2, thereby ensuring the consistency of the tasks.

[0126] like Figure 4 As shown, an adaptive server-side builder scheduling system is used for the above-mentioned server-side builder scheduling method, including: a single-thread scheduling mechanism setting module, a multi-thread scheduling mechanism setting module, a server-side builder queue module and a global node setting module.

[0127] The single-threaded scheduling mechanism setting module is used to retrieve and sort the task orders of all build machines to be assigned, and schedule the build machines from the server-side build machine queue module according to the order order to execute the tasks; among them, the task orders include user-created task orders and non-user-created task orders.

[0128] The multi-thread scheduling mechanism setting module is used to schedule the builder from the server-side builder queue module for all task orders to be assigned to the builder, so as to execute the task; wherein the task orders include user-created task orders and non-user-created task orders.

[0129] The global node setting module is used to schedule the builder from the server-side builder queue module according to the specified global node for all task orders to be assigned or already assigned to the builder, so as to execute the task; wherein the task orders include user-created task orders and non-user-created task orders.

[0130] The single-thread scheduling mechanism setting module includes: a task order creation unit, an order retrieval unit, an order sorting unit, a builder query unit, and a builder allocation unit.

[0131] Task order creation unit, used for users to create custom task orders;

[0132] An order retrieval unit, used for retrieving task orders to be assigned to build machines;

[0133] An order sorting unit, used to sort all retrieved task orders;

[0134] A builder query unit, used to query idle build machines in order of orders;

[0135] The build machine allocation unit is used to allocate the same idle build machine to all subtasks of the same task order.

[0136] The multi-threaded scheduling mechanism setting module includes: a task order creation unit, a task order query unit, a builder random fetching unit, a builder query unit, a log update unit, an order status setting unit, a builder allocation unit, and a builder locking unit.

[0137] Task order creation unit, used for users to create custom task orders;

[0138] A task order query unit is used to query the type of task orders;

[0139] The builder random extraction unit is used to randomly extract a batch of build machines from the global queue;

[0140] A build machine query unit, used to query idle build machines and locked build machines;

[0141] A log updating unit, used for updating the log of the record builder allocation;

[0142] The order status setting unit is used to set the initial status of the order, the status of the subtask, and modify the order status;

[0143] A build machine allocation unit, used to allocate unlocked and idle build machines to subtasks within an order;

[0144] The build machine locking unit is used to lock or release the build machine.

[0145] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Any technician familiar with the art can make many possible changes and modifications to the technical solution of the present invention by using the above disclosed methods and technical contents without departing from the scope of the technical solution of the present invention, or modify it into an equivalent embodiment of equivalent changes. Therefore, all equivalent changes made according to the shape, structure and principle of the present invention without departing from the content of the technical solution of the present invention should be included in the protection scope of the present invention.

Claims

1. An adaptive server-side builder scheduling method, It is characterized in that The following steps are involved: Step S1: After the system is started, the builder scheduling mechanism is set, including a single-thread scheduling mechanism and a multi-thread scheduling mechanism; Step S2: creating a task order in the multi-thread scheduling mechanism; Step S3: determining the type of the task order, including a non-build-locked type order and a build-locked type order; If the task order is a non-build-lock type order, jump to step S31; if the task order is a build-lock type order, jump to step S32; Step S31: the task order is a non-build-locked type order; Randomly take out a batch of build machines from the global queue, and traverse the taken out build machines to check whether there are idle build machines; If there are no idle build machines, an error is returned and another batch of build machines are randomly selected; If there is an idle build machine, operate the flow log, output the build machine allocation currently in progress, and determine whether the build machine is locked; Randomly assign unlocked and idle build machines to subtasks within the order; The dispatch is finished; Step S32: the task order is a build lock type order; Set the initial status of the order to queue status; Set the subtask status under the order to queue status; The pre-allocated builder set is taken out, and the taken-out builder set is traversed to check whether the builder set has an idle builder; If there is no idle builder machine, an error is returned and the pre-allocated builder machine set is reset; If there is an idle build machine, operate the flow log, output the build machine allocation currently in progress, and determine whether the build machine is locked; If the build machine is locked, the order continues to queue; If the builder is not locked, the order status is changed to the ready-to-allocate status, and the builder is allocated according to the subtask queue status, and the allocated builder is locked or unlocked; The scheduling is completed.

2. An adaptive server-side builder scheduling method as claimed in claim 1, It is characterized in that In the single-thread scheduling mechanism, all task orders of the build machines to be assigned are retrieved and sorted, and the global queue is queried to see if there are idle build machines in the order of the orders; If there is no idle build machine, an error is returned and the build machine scheduling ends; If there is an idle build machine, set the execution host of all subtasks of the order to that build machine; The build machine dispatching for each order is completed in the order sequence.

3. An adaptive server-side builder scheduling method as claimed in claim 2, It is characterized in that The single-thread scheduling mechanism and the multi-thread scheduling mechanism are performed simultaneously or separately.

4. The adaptive server-side builder scheduling method according to claim 2, It is characterized in that In both the single-thread scheduling mechanism and the multi-thread scheduling mechanism, both user-created task orders and non-user-created task orders are included; Non-user created task orders are managed by the management end to confirm whether the single-thread scheduling mechanism or the multi-thread scheduling mechanism is enabled.

5. The adaptive server-side builder scheduling method according to claim 1, It is characterized in that The build lock type order includes a partial build lock type order and a global build lock type order; A partial build lock type order includes: at least one subtask that locks the build machine and at least one subtask that does not lock the build machine; When executing a subtask that locks a build machine, the subtask runs on the corresponding locked build machine, and the corresponding build machine is locked; When executing a subtask of an unlocked build machine, the subtask is run on the corresponding unlocked build machine, and the build machine that has completed the subtask is released; All subtasks in the global build lock type order lock the build machine; The subtask runs on the corresponding locked build machine, locking all build machines. After all subtasks in the order are completed, all build machines are released.

6. The adaptive server-side builder scheduling method according to claim 1, It is characterized in that At any time, if the specified global node is enabled, the target builder selected by the current task order becomes invalid, and the current task order schedules the builder according to the specified global node.

7. An adaptive server-side builder scheduling method as claimed in claim 6, It is characterized in that At any time after the global node is turned on, close the specified global node and the current task order will restore the original builder scheduling mechanism.

8. An adaptive server-side builder scheduling system, used to implement the server-side builder scheduling method of any one of claims 1 to 7, It is characterized in that include: Single-threaded scheduling mechanism setting module, multi-threaded scheduling mechanism setting module, server builder queue module and global node setting module; A single-threaded scheduling mechanism setting module is used to retrieve and sort all task orders of the build machines to be assigned, and schedule the build machines from the server-side build machine queue module according to the order sequence; wherein the task orders include user-created task orders and non-user-created task orders; A multi-threaded scheduling mechanism setting module is used to schedule build machines from the server-side build machine queue module for all task orders to be assigned to build machines; wherein the task orders include user-created task orders and non-user-created task orders; The global node setting module is used to schedule the builder from the server-side builder queue module according to the specified global node for all task orders to be assigned or already assigned to the builder; wherein the task orders include user-created task orders and non-user-created task orders.

9. An adaptive server-side builder scheduling system as claimed in claim 8, It is characterized in that The single-thread scheduling mechanism setting module includes: task order creation unit, order retrieval unit, order sorting unit, builder query unit, and builder allocation unit; Task order creation unit, used for users to create custom task orders; An order retrieval unit, used for retrieving task orders to be assigned to build machines; An order sorting unit, used to sort all retrieved task orders; A builder query unit, used to query idle build machines in order of orders; The build machine allocation unit is used to allocate the same idle build machine to all subtasks of the same task order.

10. An adaptive server-side builder scheduling system as claimed in claim 8, It is characterized in that The multi-threaded scheduling mechanism setting module includes: a task order creation unit, a task order query unit, a builder random fetching unit, a builder query unit, a log update unit, an order status setting unit, a builder allocation unit, and a builder locking unit; Task order creation unit, used for users to create custom task orders; A task order query unit is used to query the type of task orders; The builder random extraction unit is used to randomly extract a batch of build machines from the global queue; A build machine query unit, used to query idle build machines and locked build machines; A log updating unit, used for updating the log of the record builder allocation; The order status setting unit is used to set the initial status of the order, the status of the subtask, and modify the order status; A build machine allocation unit, used to allocate unlocked and idle build machines to subtasks within an order; The build machine locking unit is used to lock or release the build machine.

Citation Information

Patent Citations

  • IOS application build server, cluster and method

    CN106066808A

  • Distributed scheduling method and business server

    CN113806035A

  • AI inference task scheduling method and system oriented to multiple heterogeneous environments

    CN115756833A

  • Message Controlled Application and Operating System Image Development and Deployment

    US20160028672A1

  • Cross-machine build scheduling system

    US20180150286A1