Compiling task scheduling method and device and electronic equipment

By receiving information about tasks to be compiled and obtaining compilation records from the compilation machines, the compilation machines are allocated reasonably, solving the problem of low compilation efficiency caused by the limited number of compilation machines, and achieving faster compilation and reduced waiting time.

CN115220703BActive Publication Date: 2026-07-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-04-19
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

When the number of compilation machines is limited, the lack of a scheduling strategy in existing technologies leads to slow compilation speed, low compilation efficiency, and long compilation task time and waiting time.

Method used

By receiving information about tasks to be compiled, it determines whether there are candidate idle compilation machines in the current compilation machine, obtains their compilation records, and rationally allocates compilation machines based on the information about tasks to be compiled and the compilation records, thereby reducing compilation time and waiting time by utilizing the compilation records of candidate idle compilation machines.

Benefits of technology

It achieves reasonable allocation of compilation tasks, reduces compilation time and waiting time, and improves compilation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115220703B_ABST
    Figure CN115220703B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of compiling task scheduling method, device, electronic equipment and computer readable storage medium, involve task scheduling field.The method comprises: receiving to-be-compiled task information;Determine whether there is candidate idle compiling machine in current time compiling machine, if there is, obtain the compiling record of each candidate idle compiling machine, according to to-be-compiled task information and the compiling record of candidate idle compiling machine, from candidate idle compiling machine, determine the compiling machine of executing to-be-compiled task.The present application is determined by to-be-compiled task information and the compiling record of candidate idle compiling machine, from candidate idle compiling machine, to determine the compiling machine of executing to-be-compiled task.Thereby it is based on to-be-compiled task information and the compiling record of candidate idle compiling machine, to reasonably allocate the compiling machine of executing compiling to-be-compiled task, to reduce the compiling time of to-be-compiled task and the waiting time of to-be-compiled task, improve compiling efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of task scheduling technology, and more specifically, to a compilation task scheduling method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the continuous development of electronic technology, electronic products are becoming increasingly powerful. Applications capable of various functions are compiled from source code, essentially converting high-level languages ​​into binary language that computers can understand. However, in actual compilation work, due to the large number of tasks to be compiled and the frequent compilation required for each task, the limited number of compilation machines is often operating at full capacity. Therefore, given the large number of tasks to be compiled but the limited number of compilation machines, it is necessary to rationally allocate the compilation machines for each task. In existing technologies, the direct allocation of tasks without a scheduling strategy often results in slow compilation speeds, leading to inefficient use of compilation machines, longer compilation times and waiting times, and lower compilation efficiency. Summary of the Invention

[0003] This application provides a compilation task scheduling method, apparatus, electronic device, and computer-readable storage medium to solve the technical problem of low compilation efficiency.

[0004] According to one aspect of this application, a compiler task scheduling method is provided, the method comprising:

[0005] Receive information about tasks to be compiled;

[0006] Determine whether there are candidate idle compilation machines in the current compilation machine. If so, obtain the compilation records of each candidate idle compilation machine. Candidate idle compilation machines include compilation machines whose compilation tasks have not reached the preset number in the current time.

[0007] Based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines, the compilation machine to execute the task to be compiled is determined from the candidate idle compilation machines.

[0008] In one possible implementation, the existence of a candidate idle compilation machine in the current compilation time is determined by any of the following methods:

[0009] In the compilation records of each compilation machine, does the current time correspond to the preset number of compilation tasks?

[0010] Whether the processor utilization rate of each compilation machine is greater than the preset threshold.

[0011] In one possible implementation, the compilation record includes a compilation task identifier, and the task information to be compiled includes the task identifier to be compiled.

[0012] Based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines, the compilation machine to execute the task to be compiled is determined from the candidate idle compilation machines, including:

[0013] Determine whether a task identifier to be compiled exists in the compilation task identifiers of the compilation record;

[0014] If it exists, determine the compilation machine to execute the compilation task from the candidate idle compilation machines corresponding to the task identifier.

[0015] In one possible implementation, the compilation log includes the compilation time corresponding to the compilation task.

[0016] From the candidate idle compilation machines corresponding to the task identifier, determine the compilation machine to execute the task, including:

[0017] Calculate the time difference between the compilation time of the task to be compiled and the current time in the compilation records of the candidate idle compilation machines corresponding to each task identifier. Select the candidate idle compilation machine corresponding to the task identifier with the smallest time difference as the compilation machine to execute the task to be compiled.

[0018] In one possible implementation, the compilation record includes the compilation time corresponding to the compilation task, and the compilation task identifier in the compilation record does not contain a task identifier to be compiled.

[0019] Based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines, the compilation machine to execute the task to be compiled is determined from the candidate idle compilation machines, including:

[0020] Among all candidate idle compilation machines, the candidate idle compilation machine with the smallest time difference between the compilation time corresponding to any compilation task and the current time is selected as the compilation machine to execute the compilation task.

[0021] In one possible implementation, the method also includes:

[0022] Record the task identifier to be compiled and the corresponding compilation time in the compilation record of the compilation machine that executes the task to be compiled.

[0023] In one possible implementation, the information about the task to be compiled includes a task identifier and a historical compilation machine identifier corresponding to the task. The historical compilation machine identifier is the identifier of the historical compilation machine that executed the task before the current time. The compilation record includes the compilation time corresponding to the task.

[0024] Based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines, the compilation machine to execute the task to be compiled is determined from the candidate idle compilation machines, including:

[0025] If the candidate idle compilation machines include historical compilation machines, then calculate the time difference between the compilation time of the task to be compiled and the current time in the compilation records of each historical compilation machine, and identify the historical compilation machine corresponding to the task to be compiled with the smallest time difference as the compilation machine to execute the task to be compiled.

[0026] In one possible implementation, the task to be compiled includes at least one of the following: a module to be compiled, a source file to be compiled, and a source program to be compiled.

[0027] According to another aspect of this application, a compiler task scheduling apparatus is provided, the apparatus comprising:

[0028] The receiving module is used to receive information about the tasks to be compiled.

[0029] The acquisition module is used to determine whether there are candidate idle compilation machines in the current time compilation machine. If there are, the compilation records of each candidate idle compilation machine are acquired. Candidate idle compilation machines include compilation machines whose current time compilation tasks have not reached the preset number.

[0030] The module determines the compilation machine to execute the compilation task based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines.

[0031] According to another aspect of this application, an electronic device is provided, the electronic device comprising:

[0032] One or more processors;

[0033] Memory;

[0034] One or more computer programs, wherein the one or more computer programs are stored in memory and configured to be executed by one or more processors, the one or more programs being configured to: perform the compiler task scheduling method as shown in the first aspect of this application.

[0035] For example, in a third aspect of this application, a computing device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0036] The memory is used to store at least one executable instruction that causes the processor to perform an operation corresponding to the translation task scheduling method shown in the first aspect of this application.

[0037] According to another aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when run on a processor, enables the processor to execute the compiler task scheduling method as shown in the first aspect of this application.

[0038] For example, in a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the compilation task scheduling method shown in the first aspect of the present application.

[0039] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various alternative implementations of the first aspect described above.

[0040] The beneficial effects of the technical solution provided in this application are:

[0041] This application receives information about tasks to be compiled and determines whether there are any candidate idle compilation machines among the compilation machines at the current time whose number of compilation tasks has not reached a preset number. When candidate idle compilation machines exist, the application determines the compilation machine to execute the task to be compiled from among the candidate idle compilation machines based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines. This achieves a reasonable allocation of compilation machines to execute the task to be compiled based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines, thereby reducing the compilation time and waiting time of the task to be compiled and improving compilation efficiency. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0043] Figure 1 An optional system architecture diagram for a compiler task scheduling method provided in an embodiment of the present invention;

[0044] Figure 2 One of the flowcharts of a compilation task scheduling method provided in this application embodiment;

[0045] Figure 3 This is one of the application scenario diagrams of a compiler task scheduling method provided in the embodiments of this application;

[0046] Figure 4This is a second schematic diagram illustrating an application scenario of a compiler task scheduling method provided in this application embodiment;

[0047] Figure 5 This is the third schematic diagram illustrating an application scenario of a compiler task scheduling method provided in this application embodiment;

[0048] Figure 6 An interactive timing diagram of a compiler task scheduling method provided in an embodiment of this application;

[0049] Figure 7 A second flowchart illustrating a compilation task scheduling method provided in this application embodiment;

[0050] Figure 8 This is a schematic diagram of the structure of a compiler task scheduling device provided in an embodiment of this application;

[0051] Figure 9 This is a schematic diagram of the structure of an electronic device for compiler task scheduling provided in an embodiment of this application. Detailed Implementation

[0052] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0053] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0055] In actual compilation work, due to the large number of tasks to be compiled and the frequent compilation of each task, the limited number of compilation machines are usually running at full capacity. Therefore, when there are many tasks to be compiled but a limited number of compilation machines, it is necessary to rationally allocate the compilation machines for each task. During the execution of a compilation task, a cache file is generated for that task. This cache file will help reduce compilation time when the same task is executed again on the same compilation machine.

[0056] However, in the existing technology, the direct distribution of tasks to be compiled without a scheduling strategy often results in slow compilation speed, inefficient use of the compilation machine, long compilation time and waiting time for the tasks to be compiled, and low compilation efficiency.

[0057] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0058] First, combine Figure 1 The specific implementation scenarios provided in the embodiments of this application are described below. The system involved in the embodiments of this invention can be a distributed system formed by multiple nodes (any form of computing device in the network, such as a server or a user terminal) connected through network communication.

[0059] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not restricted herein.

[0060] See Figure 1 , Figure 1This is an optional system architecture diagram of the compilation task scheduling method provided in this embodiment of the invention. The distributed system in this scenario consists of multiple nodes (any form of computing device in the network, such as servers or user terminals) and clients. These nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In the distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.

[0061] Specifically, in this scenario, a task node is a node that generates a task to be compiled. This task can be any task requiring compilation in front-end or back-end development, such as a module to be compiled, a source file to be compiled, or a source program to be compiled. Therefore, the compilation task scheduling method of this application can be applied to scheduling scenarios for any task to be compiled in front-end or back-end development. In the scenario of this embodiment, there can be one or more task nodes. Figure 1 The application scenario diagram shown is for illustrative purposes only and does not limit the number of task nodes in this application. The number of tasks to be compiled in each task node can be one or more, and the number of tasks to be compiled in each task node can be the same or different.

[0062] Furthermore, the scheduling node can schedule the compilation tasks issued by the task nodes, thereby allocating the compilation tasks to compilation machines for compilation. The scheduling node can be a node within the task nodes or a node independent of the task nodes, such as a physical node or cloud node independent of the task nodes. Thus, the scheduling node allocates the compilation tasks of the task nodes by executing the compilation task scheduling method of this application embodiment, determining the compilation machine to execute the compilation tasks. Specifically, it receives the compilation task information and determines whether there are candidate idle compilation machines among the compilation machines at the current time whose compilation tasks have not reached a preset number. When candidate idle compilation machines exist, the compilation machine to execute the compilation tasks is determined from among the candidate idle compilation machines based on the compilation task information and the compilation records of the candidate idle compilation machines. This achieves reasonable allocation of compilation machines to execute the compilation tasks based on the compilation task information and the compilation records of the candidate idle compilation machines, thereby reducing the compilation time and waiting time of the compilation tasks and improving compilation efficiency.

[0063] This application provides a compiler task scheduling method. The execution subject of this method can be various terminal devices or server devices with task scheduling capabilities, or it can be a device or chip integrated on these devices. As an optional implementation, it can be a scheduling node in a compiler task scheduling system. Figure 2 The diagram shown is a flowchart of a compilation task scheduling method provided in an embodiment of this application. The method includes the following steps:

[0064] S201: Receive information about the task to be compiled.

[0065] Specifically, in this embodiment, the information of tasks to be compiled can be received through a scheduling node in the compilation task scheduling system described above. The scheduling node executing the compilation task scheduling method can be a task node containing tasks to be compiled, or it can be an independent node without tasks to be compiled. When the scheduling node is a node among task nodes containing tasks to be compiled, on the one hand, the scheduling node can receive task information to be compiled from other task nodes; on the other hand, the module in the scheduling node used to perform compilation task scheduling can also receive task information to be compiled from the task modules within that node. Furthermore, when the scheduling node is an independent node without tasks to be compiled, the scheduling node can receive task information to be compiled from any task node.

[0066] Specifically, the information about the tasks to be compiled can include information about one or multiple tasks. Specifically, the information can include a task identifier, which can be identified using numbers, letters, or text, or a combination of at least two of these methods. For example, the task identifier could be "wechat". Additionally, the information can include a task version identifier, used to identify different versions of the same task. For example, the task version identifier could be "Version 1.0.2". Furthermore, the information can also include the identifier of the compilation machine that executed the compilation task before the current time, as well as the task size, etc.

[0067] S202: Determine whether there are candidate idle compilation machines in the current compilation machine. If so, obtain the compilation records of each candidate idle compilation machine.

[0068] Specifically, in real-world scenarios, any task node may generate multiple tasks to be compiled. These tasks can be any task that needs to be compiled in front-end or back-end development, such as modules, source files, or source programs to be compiled. Each task to be compiled will be compiled frequently, for example, 500 times per day. Therefore, when the number of compilation machines is limited, there will be situations where tasks to be compiled need to wait. Thus, after receiving the task information in step S201, it can be determined whether there are any candidate idle compilation machines at the current time. Candidate idle compilation machines include compilation machines where the number of compilation tasks at the current time has not reached a preset number. That is, candidate idle compilation machines can be compilation machines where the number of compilation tasks at the current time has not yet reached saturation. For example, the saturation number of compilation tasks (i.e., the preset number) of a candidate idle compilation machine can be one or more compilation tasks. For example, when the saturation number of compilation tasks of a compilation machine is one compilation task, then a compilation machine can be considered a candidate idle compilation machine only if it has not executed any compilation tasks at the current time. For example, when the saturation workload of a compiler is multiple compilation tasks, such as three compilation tasks, then when the number of compilation tasks executed by the compiler at the current time is less than three, such as zero, one, or two compilation tasks, it can be considered as a candidate idle compiler.

[0069] One method for determining candidate idle compilation machines is to obtain the compilation task list of each compilation machine and determine whether the number of compilation tasks in each machine's list is less than a preset number, i.e., the saturation task volume of that compilation machine, to determine whether a compilation machine can be considered an idle candidate. Alternatively, compilation machines can broadcast their compilation task information, such as whether the compilation task volume of that machine has reached its saturation task volume. The scheduling node can then determine candidate idle compilation machines by receiving this broadcast information. Furthermore, candidate idle compilation machines can also be determined by whether the processor utilization rate of each compilation machine reaches a preset threshold. For example, when a compilation machine's compilation task volume reaches its saturation task volume, its processor utilization rate can reach 80%. Therefore, if the processor utilization rate of a compilation machine is less than 80%, its compilation task volume can be considered below its saturation task volume, and thus, that compilation machine can be considered an idle candidate.

[0070] After identifying candidate idle compilation machines, their compilation records can be obtained. For example, compilation records can be obtained from the compilation logs of each candidate idle compilation machine, or from the storage space of the compilation machine. Alternatively, the compilation records of candidate idle compilation machines can be obtained from the server that manages the compilation machines.

[0071] The compilation record may include the identifier of the compilation task compiled by the compilation machine, the compilation time of each compilation task, and the number of times each compilation task was compiled, etc.

[0072] S203: Based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines, determine the compilation machine to execute the task to be compiled from the candidate idle compilation machines.

[0073] This application receives information about tasks to be compiled and determines whether there are any candidate idle compilation machines among the compilation machines at the current time whose number of compilation tasks has not reached a preset number. When candidate idle compilation machines exist, the compilation machine to execute the task is determined from among the candidate idle compilation machines based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines. This achieves the rational allocation of compilation machines to execute the tasks based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines, thereby reducing the compilation time and waiting time of the tasks to be compiled and improving compilation efficiency.

[0074] In one embodiment of this application, in step S202 above, determining whether there is a candidate idle compilation machine in the current time compilation machine can be done in any of the following ways:

[0075] In the compilation records of each compilation machine, does the current time correspond to the preset number of compilation tasks?

[0076] Whether the processor utilization rate of each compilation machine is greater than the preset threshold.

[0077] Specifically, candidate idle compilation machines can be determined by obtaining the compilation task list of each compilation machine and checking whether the number of compilation tasks in each machine's list is less than a preset number, i.e., the saturation workload of that compilation machine. Alternatively, candidate idle compilation machines can be determined by checking whether the processor utilization of each compilation machine reaches a preset threshold. For example, when a compilation machine reaches its saturation workload, its processor utilization can reach 80%. Therefore, if the processor utilization of a compilation machine is less than 80%, its compilation task volume can be considered below saturation, and thus, that compilation machine can be considered a candidate idle compilation machine.

[0078] In this embodiment, by receiving information about tasks to be compiled and determining whether the current time corresponds to a preset number of compilation tasks in the compilation records of each compilation machine, or by determining whether the processor utilization rate of each compilation machine is greater than a preset threshold, it is determined whether there are candidate idle compilation machines among the compilation machines at the current time where the number of compilation tasks has not reached the preset number. When candidate idle compilation machines exist, the compilation machine to execute the tasks to be compiled is determined from the candidate idle compilation machines based on the information about tasks to be compiled and the compilation records of candidate idle compilation machines. This achieves reasonable allocation of compilation machines to execute the tasks based on the information about tasks to be compiled and the compilation records of candidate idle compilation machines, thereby reducing the compilation time and waiting time of the tasks to be compiled and improving compilation efficiency.

[0079] In one embodiment of this application, the compilation record may include a compilation task identifier, the task information to be compiled may include the task identifier to be compiled, and step S203 above may include:

[0080] S2031: Determine whether there is a task identifier to be compiled in the compilation task identifier of the compilation record;

[0081] S2032: If it exists, determine the compilation machine to execute the compilation task from the candidate idle compilation machines corresponding to the task identifier.

[0082] Specifically, in real-world scenarios, compilation tasks often require frequent, multiple compilations. Each compilation process generates a cache file. Therefore, after a compilation task is completed, the compilation machine that performed the compilation will store the cache file for that task. Consequently, if a compilation machine that has previously compiled a task executes that task again, the compilation time will be significantly reduced because it has the cache file stored from the previous compilation.

[0083] Therefore, in this embodiment of the application, after determining whether there are candidate idle compilation machines in the current compilation machine, and after obtaining the compilation records of each candidate idle compilation machine, the compiler in the compilation record determines whether there is a task to be compiled in the compilation task identifier included in the compilation record; if so, the compiler to execute the task to be compiled is determined from the candidate idle compilation machines corresponding to the task to be compiled identifier.

[0084] Combination Figure 3The diagram shown illustrates one application scenario of the compilation task scheduling method provided in this application. This diagram is merely illustrative of the compilation scheduling method of this application, and the number of identifiers shown is not limited.

[0085] For example, such as Figure 3 As shown, the task information to be compiled received by the scheduling node may include one or more task identifiers, and the determined candidate idle compilation machines may be one or more. For example, in this scenario, the scheduling node receives multiple tasks to be compiled, whose task identifiers are M1, M2, M3, and M4, and the determined candidate idle compilation machines may include compilation machine a, compilation machine b, and compilation machine c. In this embodiment of the application, when the scheduling node determines the compilation machine for each task to be compiled, it can schedule and allocate according to the time order of the received task information. For example, the order of the received tasks to be compiled is M1, M2, M3, and M4. Therefore, according to the order of receiving the compilation information, the compilation machine for task M1 is determined first. Among the compilation machines a, b, and c, which are candidate idle compilation machines, the compilation record of compilation machine a includes the task identifier M1, that is, compilation machine a has executed task M1 before the current time. Therefore, compilation machine a stores the cache file generated when compiling M1, so compilation machine a can be used as the compilation machine to execute task M1, thereby reducing the compilation time of compiling M1.

[0086] For example, after determining the compilation machine for task M1, the compilation machine for task M2 can be determined according to the order in which the compilation information is received. Among the candidate idle compilation machines, the compilation records of compilation machines b and c include the identifier M2, meaning that compilation machines b and c executed task M2 before the current time. Therefore, compilation machines b and c store cache files generated during the compilation of M2, thus allowing the compilation machine executing task M2 to be determined from compilation machines b and c, thereby reducing the compilation time of M1. In the embodiments of this application, both compilation machines b and c can be determined as the compilation machine executing task M2. Further, determining one of compilation machines b and c as the compilation machine executing task M2 can be found in the embodiments below of this application.

[0087] Additionally, it should be noted that, as shown in the figure, after determining the compilation machine for the task M1 to be compiled, the compilation records of compilation machines b and c among the candidate idle compilation machines include the identifier M2 of the task to be compiled. In actual scenarios, after determining the compilation machine for the task M1 to be compiled, other compilation machines may dynamically appear as candidate idle compilation machines over time. That is, as time goes by, other compilation machines may not have reached their saturation level after completing their compilation tasks. Therefore, the compilation records of other candidate idle compilation machines may include the identifier M2 of the task to be compiled. The above scenario diagram in this application is only for illustrative purposes and does not show the above dynamic situation. However, the embodiments of this application may include the above situation, and the embodiments of this application do not specifically limit the dynamic situation.

[0088] This application receives information about tasks to be compiled and determines whether there are any candidate idle compilation machines among the compilation machines at the current time where the number of compilation tasks has not reached a preset number. When candidate idle compilation machines exist, it checks whether there is a task identifier in the compilation task identifier of the compilation record. If so, it determines the compilation machine to execute the task from the candidate idle compilation machines corresponding to the task identifier. That is, from the candidate idle compilation machines, it determines the compilation machine to execute the task from the compilation machines that have executed the task before the current time. Since the compilation machines that have executed the task store cache files generated during the compilation of the task, the compilation time can be greatly reduced when the task is executed again. Therefore, compared with the prior art of randomly assigning an idle compilation machine to a task to be compiled, the compilation task scheduling method of this application achieves reasonable allocation of compilation machines to execute the task, reduces the compilation time and waiting time of the task to be compiled, and improves compilation efficiency.

[0089] In another embodiment of this application, based on the above embodiments, the compilation record may further include the compilation time corresponding to the compilation task.

[0090] Step S2032, which involves determining the compilation machine to execute the compilation task from the candidate idle compilation machines corresponding to the task identifier, may further include:

[0091] Calculate the time difference between the compilation time of the task to be compiled and the current time in the compilation records of the candidate idle compilation machines corresponding to each task identifier. Select the candidate idle compilation machine corresponding to the task identifier with the smallest time difference as the compilation machine to execute the task to be compiled.

[0092] Specifically, in real-world scenarios, since compilation tasks often require multiple frequent compilations, and as these tasks are continuously updated, the cache files generated by each compilation machine during these compilations are also updated more frequently than the current time. Therefore, updated cache files are more effective in reducing the compilation time of the current task. In other words, among all candidate idle compilation machines, the one with the smallest time difference from the current time—that is, the compilation machine that most recently executed the task—can be considered to have the latest cache file, and thus is most helpful in reducing the compilation time of the current task.

[0093] Therefore, in this application embodiment, the compilation time of the task to be compiled and the current time can be calculated in the compilation records of the candidate idle compilation machines corresponding to each task to be compiled identifier. The candidate idle compilation machine corresponding to the task to be compiled with the smallest time difference is selected as the compilation machine to execute the task to be compiled.

[0094] Combination Figure 4 The diagram shown is a second application scenario illustration of the compilation task scheduling method provided in this application embodiment. This application scenario illustration is merely for illustrative purposes, and the number of identifiers shown in the diagram is not limited.

[0095] like Figure 4 As shown, based on the above embodiments, in this embodiment, the compilation record may further include the compilation time corresponding to each compilation task. Therefore, in the scenario of the above embodiments, when determining the compilation machine to execute the compilation task, if at least two candidate idle compilation machines have compilation records that include the compilation task identifier, that is, before the current time, at least two candidate idle compilation machines have executed the compilation task, for example, as shown in the figure, the compilation records of compilation machines b and c both include the compilation task identifier M2, where the compilation time of compilation machine b executing compilation M2 is t4, and the compilation time of compilation machine c executing compilation M2 is t5. Therefore, in this embodiment, the time difference between the compilation time of compilation machines b and c executing compilation M2 and the current time can be calculated respectively, that is, the time difference T4 between t4 and the current time, and the time difference T5 between t5 and the current time. Then, the candidate idle compilation machine corresponding to the smallest time difference is determined as the compilation machine to execute the compilation task M2. That is, the candidate idle compilation machine that has executed the compilation task closest to the current time is determined as the compilation machine to execute the compilation task.

[0096] It should be noted that, since a compilation task can only be compiled by one compilation machine at a time, the compilation time corresponding to the above compilation task can be either the compilation start time or the compilation end time of the compilation task. This application embodiment does not limit this.

[0097] Furthermore, after determining the compilation machine to execute the compilation task, if the compilation machine has multiple saturation tasks, that is, it can be understood that the compilation machine includes multiple compilation modules for executing compilation tasks, then it can also be determined whether there is a compilation module that executed the compilation task before the current time that is in an idle state. If there is, the compilation module that has executed the compilation task can be selected to compile the compilation task.

[0098] Therefore, in this embodiment, by calculating the time difference between the compilation time of the task to be compiled and the current time in the compilation records of the candidate idle compilation machines corresponding to each task identifier, the candidate idle compilation machine corresponding to the task identifier with the smallest time difference is selected as the compilation machine to execute the task. This allows the compilation machine that has executed the task closest to the current time to be determined as the task to be compiled is continuously updated. Since the compilation machine stores the latest cached files, the compilation time can be reduced to the minimum and the compilation efficiency can be improved.

[0099] In another embodiment of this application, the compilation record may further include the compilation time corresponding to the compilation task, and the compilation task identifier in the compilation record does not contain a task identifier to be compiled.

[0100] Step S203, which determines the compilation machine to execute the compilation task from the candidate idle compilation machines based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines, may include:

[0101] Among all candidate idle compilation machines, the candidate idle compilation machine with the smallest time difference between the compilation time corresponding to any compilation task and the current time is selected as the compilation machine to execute the compilation task.

[0102] Specifically, in real-world scenarios, if the compilation task identifier in the compilation record does not contain a task identifier to be compiled, that is, if there is no compilation machine among the candidate idle compilation machines that has executed the task to be compiled, then, since the compilation machine that has executed the compilation task most recently among the candidate idle compilation machines will have a portion of cached files in its underlying common code, this portion of cached files will help reduce the compilation time of the task to be compiled.

[0103] Therefore, in this embodiment of the application, the candidate idle compilation machine with the smallest time difference between the compilation time of any compilation task and the current time can be selected as the compilation machine to execute the compilation task.

[0104] Specifically, in combination Figure 4 As shown, when determining the compilation machine to execute task M3, the compiler records of the candidate idle compilers do not contain the identifier M3. In this case, the time difference between the compilation time of the task and the current time can be calculated for each compiler. Since the candidate idle compiler with the smallest time difference needs to be selected, the calculation can be performed by calculating the time difference between the compilation time of the task closest to the current time and the current time for each candidate idle compiler, thus determining the candidate idle compiler with the smallest time difference. For example, as... Figure 4 In the compilation log shown in the diagram, each compilation task is recorded in chronological order. For compilation machine a, the time difference T1 between the compilation time t1 of compilation task M5 and the current time can be calculated. For compilation machine b, the time difference T3 between the compilation time t3 of compilation task M6 and the current time can be calculated. For compilation machine c, the time difference T5 between the compilation time t5 of compilation task M2 and the current time can be calculated. The compilation machine with the smallest time difference is determined as the compilation machine to execute the task to be compiled. That is, the candidate idle compilation machine that has executed any compilation task closest to the current time is determined as the compilation machine to execute the task to be compiled. Since it is necessary to select the candidate idle compilation machine that has executed any compilation task closest to the current time, the compilation time corresponding to the compilation task can be the start time of compilation in the above calculation.

[0105] Therefore, if the compilation task identifier in the compilation record does not contain a task identifier, meaning there is no compilation machine among the candidate idle compilation machines that has executed the task, the candidate idle compilation machine with the smallest time difference between the compilation time corresponding to any compilation task and the current time can be selected as the compilation machine to execute the task. Since the compilation machine that has executed the task most recently among the candidate idle compilation machines will have some cached files in its underlying common code, these cached files will help reduce the compilation time of the task and improve compilation efficiency.

[0106] In another embodiment of this application, step S204 may also be included:

[0107] S204: Record the task identifier to be compiled and the corresponding compilation time in the compilation record of the compilation machine that executes the task to be compiled.

[0108] Specifically, the compilation record can be stored in the compilation machine that performs the compilation task, or it can be stored in the server that manages the compilation machine.

[0109] This application embodiment records the identifier of the task to be compiled and the corresponding compilation time in the compilation record of the compilation machine executing the task to be compiled. This allows for the viewing of relevant compilation records when scheduling the task to be compiled later, so as to perform reasonable compilation task scheduling.

[0110] In another embodiment of this application, the task information to be compiled includes a task identifier and a historical compilation machine identifier corresponding to the task. The historical compilation machine identifier is the identifier of the historical compilation machine that executed the task before the current time. The compilation record includes the compilation time corresponding to the compilation task.

[0111] Step S203, which determines the compilation machine to execute the compilation task from the candidate idle compilation machines based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines, may include:

[0112] If the candidate idle compilation machines include historical compilation machines, then calculate the time difference between the compilation time of the task to be compiled and the current time in the compilation records of each historical compilation machine, and identify the historical compilation machine corresponding to the task to be compiled with the smallest time difference as the compilation machine to execute the task to be compiled.

[0113] Combination Figure 5 As shown, this is a third application scenario diagram of the compilation task scheduling method provided in this application embodiment. In this embodiment, since the information of the task to be compiled may include the identifier of the historical compilation machine that executed the task to be compiled before the current time, after determining the candidate idle compilation machine, the historical compilation machine can be selected from the candidate idle compilation machines according to the historical compilation machine identifier in the information of the task to be compiled. Then, in the compilation record of the historical compilation machine, the historical compilation machine corresponding to the identifier of the task to be compiled with the smallest time difference between the compilation time corresponding to the compilation task and the current time is selected as the compilation machine to execute the task to be compiled.

[0114] For example, as shown in the figure, when determining the compilation machine to execute the task M2 to be compiled, since the historical compilation machines that executed the compilation of M2 before the current time are compilation machine b and compilation machine c, the time difference between the compilation time corresponding to M2 and the current time in the compilation records of compilation machine b and compilation machine c can be calculated respectively. The compilation machine with the smallest time difference is selected as the compilation machine to execute the task to be compiled.

[0115] In this embodiment, the compiler that has executed the task to be compiled can be determined from the candidate idle compilers based on the task identifier and the historical compiler machine identifier corresponding to the task to be compiled in the task to be compiled information. Then, the time difference between the compilation time corresponding to the task to be compiled and the current time in the compilation records of each historical compiler machine is further calculated. The historical compiler machine corresponding to the task identifier with the smallest time difference is selected as the compiler machine to execute the task to be compiled, so as to reduce compilation time and improve compilation efficiency.

[0116] The following will combine Figure 6 and Figure 7 This document describes the specific implementation scenarios and the interaction sequence of the implementation process provided in the embodiments of this application. Figure 6 This is an interactive timing diagram of a compiler task scheduling method provided in an embodiment of this application. Figure 7 This is a second flowchart illustrating a compilation task scheduling method provided in an embodiment of this application.

[0117] As shown in the figure, in the scheduling scenario of any compilation task in front-end or back-end development, when a task node generates a compilation task, it can send the compilation task information to the scheduling node. After receiving the compilation task information, the scheduling node can first determine whether there is a candidate idle compilation machine in the current compilation machine whose compilation task volume has not yet been saturated. If there is no candidate idle compilation machine that meets the conditions, it can wait for the compilation machine to finish executing the compilation task so that a candidate idle compilation machine will appear.

[0118] If candidate idle compilation machines exist, their compilation records can be retrieved. Then, it can be determined whether a task to be compiled exists within the compilation task identifiers of these records. In other words, it can be determined whether a compilation machine among the candidate idle compilation machines has executed a task to be compiled before the current time. If so, the compilation machine that most recently executed the task can be identified and used as the next available candidate idle compilation machine. Specifically, the time difference between the compilation time of the task to be compiled and the current time is calculated, and the candidate idle compilation machine with the smallest time difference is identified. If no such machine exists, the compilation machine that most recently executed any compilation task can be identified and used as the next available candidate idle compilation machine. This process is repeated in the original text.

[0119] This application receives information about tasks to be compiled and determines whether there are any candidate idle compilation machines among the compilation machines at the current time whose number of compilation tasks has not reached a preset number. When candidate idle compilation machines exist, the compilation machine to execute the task is determined from among the candidate idle compilation machines based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines. This achieves the rational allocation of compilation machines to execute the tasks based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines, thereby reducing the compilation time and waiting time of the tasks to be compiled and improving compilation efficiency.

[0120] This application provides a compiler task scheduling device, such as... Figure 8 As shown, this is a schematic diagram of the structure of a compiler task scheduling device provided in an embodiment of this application. The compiler task scheduling device 80 may include: a receiving module 801, an acquiring module 802, and a determining module 803, wherein...

[0121] The receiving module 801 is used to receive information about the task to be compiled.

[0122] The acquisition module 802 is used to determine whether there are candidate idle compilation machines in the current time compilation machine. If there are, the compilation records of each candidate idle compilation machine are acquired. Candidate idle compilation machines include compilation machines whose current time compilation tasks have not reached a preset number.

[0123] Specifically, in real-world scenarios, any task node may generate multiple tasks to be compiled. These tasks can be any task that needs to be compiled in front-end or back-end development, such as modules, source files, or source programs to be compiled. The compilation record can include the identifier of the compilation task being compiled by the compilation machine, the compilation time of each task, and the number of times each task has been compiled.

[0124] The determination module 803 determines the compilation machine to execute the compilation task from the candidate idle compilation machines based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines.

[0125] In another embodiment, the existence of a candidate idle compilation machine in the current time compilation machine is determined by any of the following methods:

[0126] In the compilation records of each compilation machine, does the current time correspond to the preset number of compilation tasks?

[0127] Whether the processor utilization rate of each compilation machine is greater than the preset threshold.

[0128] In another embodiment, the compilation record includes a compilation task identifier, and the task to be compiled information includes the task to be compiled identifier.

[0129] Module 803 is defined, including:

[0130] The first determining unit is used to determine whether there is a task identifier to be compiled in the compilation task identifier of the compilation record;

[0131] The second determining unit is used to determine the compilation machine to execute the task to be compiled from the candidate idle compilation machines corresponding to the task to be compiled when there is a task to be compiled identifier in the compilation task identifier of the compilation record.

[0132] In another embodiment, the compilation record includes the compilation time corresponding to the compilation task, and the second determining unit is specifically used for:

[0133] Calculate the time difference between the compilation time of the task to be compiled and the current time in the compilation records of the candidate idle compilation machines corresponding to each task identifier. Select the candidate idle compilation machine corresponding to the task identifier with the smallest time difference as the compilation machine to execute the task to be compiled.

[0134] In another embodiment, the compilation record includes the compilation time corresponding to the compilation task.

[0135] The determination module 803 is specifically used to, when there is no task identifier to be compiled in the compilation task identifier in the compilation record, select the candidate idle compilation machine with the smallest time difference between the compilation time corresponding to any compilation task and the current time from among the candidate idle compilation machines as the compilation machine to execute the task to be compiled.

[0136] In another embodiment, the device further includes:

[0137] The recording module is used to record the identifier of the task to be compiled and the corresponding compilation time into the compilation record of the compilation machine that executes the task to be compiled.

[0138] In another embodiment, the task information to be compiled includes a task identifier and a historical compilation machine identifier corresponding to the task. The historical compilation machine identifier is the identifier of the historical compilation machine that executed the task before the current time. The compilation record includes the compilation time corresponding to the compilation task. The determination module 803 is specifically used for...

[0139] If the candidate idle compilation machines include historical compilation machines, then calculate the time difference between the compilation time of the task to be compiled and the current time in the compilation records of each historical compilation machine, and identify the historical compilation machine corresponding to the task to be compiled with the smallest time difference as the compilation machine to execute the task to be compiled.

[0140] This application receives information about tasks to be compiled and determines whether there are any candidate idle compilation machines among the compilation machines at the current time whose number of compilation tasks has not reached a preset number. When candidate idle compilation machines exist, the compilation machine to execute the task is determined from among the candidate idle compilation machines based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines. This achieves the rational allocation of compilation machines to execute the tasks based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines, thereby reducing the compilation time and waiting time of the tasks to be compiled and improving compilation efficiency.

[0141] This application provides an electronic device comprising: a memory and a processor; at least one program stored in the memory, which, when executed by the processor, achieves the following compared to existing technologies: This application receives information about tasks to be compiled and determines whether there are candidate idle compilation machines among the compilation machines at the current time whose number of compilation tasks has not reached a preset number. When candidate idle compilation machines exist, the application determines the compilation machine to execute the task to be compiled from the candidate idle compilation machines based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines. This enables the reasonable allocation of compilation machines to execute the task to be compiled based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines, thereby reducing the compilation time and waiting time of the task to be compiled and improving compilation efficiency.

[0142] In one alternative embodiment, an electronic device is provided, such as Figure 9 As shown, Figure 9 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.

[0143] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0144] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0145] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0146] The memory 4003 stores application code (computer program) that executes the solution of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.

[0147] Electronic devices include, but are not limited to: mobile phones, laptops, multimedia players, desktop computers, etc.

[0148] This application provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments.

[0149] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various alternative implementations of the multimedia data processing method described above.

[0150] This application receives information about tasks to be compiled and determines whether there are any candidate idle compilation machines among the compilation machines at the current time whose number of compilation tasks has not reached a preset number. When candidate idle compilation machines exist, the compilation machine to execute the task is determined from among the candidate idle compilation machines based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines. This achieves the rational allocation of compilation machines to execute the tasks based on the information about the task to be compiled and the compilation records of the candidate idle compilation machines, thereby reducing the compilation time and waiting time of the tasks to be compiled and improving compilation efficiency.

[0151] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0152] The above description is only a partial embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A compiler task scheduling method, characterized in that, include: Receive information about tasks to be compiled, including an identifier for the task to be compiled; Determine whether there are candidate idle compilation machines in the current compilation machine. If so, obtain the compilation record of each candidate idle compilation machine. The candidate idle compilation machines include compilation machines whose compilation tasks have not reached a preset number in the current time. The compilation record includes compilation task identifier and the compilation time corresponding to each compilation task identifier. Based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines, determine the compilation machine to execute the task to be compiled from the candidate idle compilation machines; The step of determining the compilation machine to execute the compilation task from the candidate idle compilation machines based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines includes: Determine whether the task identifier to be compiled exists in the compilation task identifiers included in the compilation records of the candidate idle compilation machines; If it exists, calculate the time difference between the compilation time corresponding to the task to be compiled and the current time in the compilation records of each candidate idle compilation machine corresponding to the task to be compiled. Then, select the candidate idle compilation machine corresponding to the task to be compiled with the smallest time difference as the compilation machine to execute the task to be compiled. If none exists, the candidate idle compilation machine with the smallest time difference between the compilation time of any compilation task and the current time among the candidate idle compilation machines shall be selected as the compilation machine to execute the compilation task.

2. The compilation task scheduling method according to claim 1, characterized in that, Determine whether there are candidate idle compilation machines in the current compilation machine using any of the following methods: In the compilation records of each of the aforementioned compilation machines, does the current time correspond to a preset number of compilation tasks? Whether the processor utilization rate of each of the aforementioned compilation machines is greater than a preset threshold.

3. The compilation task scheduling method according to claim 1 or 2, characterized in that, The method further includes: The identifier of the task to be compiled, and the corresponding compilation time, are recorded in the compilation record of the compilation machine that executes the task to be compiled.

4. The compilation task scheduling method according to claim 1, characterized in that, The information about the task to be compiled includes a task identifier and a historical compilation machine identifier corresponding to the task. The historical compilation machine identifier is the identifier of the historical compilation machine that executed the task before the current time. The compilation record includes the compilation time corresponding to the compilation task. The step of determining the compilation machine to execute the compilation task from the candidate idle compilation machines based on the information of the task to be compiled and the compilation records of the candidate idle compilation machines includes: If the candidate idle compilation machines include the historical compilation machines, then calculate the time difference between the compilation time of the task to be compiled and the current time in the compilation records of each historical compilation machine, and identify the historical compilation machine corresponding to the task to be compiled with the smallest time difference as the compilation machine to execute the task to be compiled.

5. The compilation task scheduling method according to claim 1, characterized in that, The task to be compiled includes at least one of the following: a module to be compiled, a source file to be compiled, and a source program to be compiled.

6. A compiler task scheduling device, characterized in that, include: A receiving module is used to receive information about a task to be compiled, wherein the information about the task to be compiled includes an identifier for the task to be compiled. The acquisition module is used to determine whether there are candidate idle compilation machines in the current time compilation machine. If there are, the compilation records of each candidate idle compilation machine are acquired. The candidate idle compilation machines include compilation machines whose compilation tasks have not reached a preset number at the current time. The compilation records include compilation task identifiers and the compilation time corresponding to each compilation task identifier. The determination module determines the compilation machine to execute the task to be compiled from the candidate idle compilation machines based on the task information to be compiled and the compilation records of the candidate idle compilation machines; When the determining module determines the compilation machine to execute the task to be compiled from the candidate idle compilation machines based on the task information to be compiled and the compilation records of the candidate idle compilation machines, it is specifically used for: Determine whether the task identifier to be compiled exists in the compilation task identifiers included in the compilation records of the candidate idle compilation machines; If it exists, calculate the time difference between the compilation time corresponding to the task to be compiled and the current time in the compilation records of each candidate idle compilation machine corresponding to the task to be compiled. Then, select the candidate idle compilation machine corresponding to the task to be compiled with the smallest time difference as the compilation machine to execute the task to be compiled. If none exists, the candidate idle compilation machine with the smallest time difference between the compilation time of any compilation task and the current time among the candidate idle compilation machines shall be selected as the compilation machine to execute the compilation task.

7. The compiler task scheduling device according to claim 6, characterized in that, Determine whether there are candidate idle compilation machines in the current compilation machine using any of the following methods: In the compilation records of each of the aforementioned compilation machines, does the current time correspond to a preset number of compilation tasks? Whether the processor utilization rate of each of the aforementioned compilation machines is greater than a preset threshold.

8. The compiler task scheduling device according to claim 6 or 7, characterized in that, The device further includes: The recording module is used to record the identifier of the task to be compiled and the corresponding compilation time into the compilation record of the compilation machine that executes the task to be compiled.

9. The compiler task scheduling device according to claim 6, characterized in that, The information about the task to be compiled includes a task identifier and a historical compilation machine identifier corresponding to the task. The historical compilation machine identifier is the identifier of the historical compilation machine that executed the task before the current time. The compilation record includes the compilation time corresponding to the compilation task. When the determining module determines the compilation machine to execute the task to be compiled from the candidate idle compilation machines based on the task information to be compiled and the compilation records of the candidate idle compilation machines, it is specifically used for: If the candidate idle compilation machines include the historical compilation machines, then calculate the time difference between the compilation time of the task to be compiled and the current time in the compilation records of each historical compilation machine, and identify the historical compilation machine corresponding to the task to be compiled with the smallest time difference as the compilation machine to execute the task to be compiled.

10. The compiler task scheduling device according to claim 6, characterized in that, The task to be compiled includes at least one of the following: a module to be compiled, a source file to be compiled, and a source program to be compiled.

11. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory; One or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to: perform the compiler task scheduling method according to any one of claims 1 to 5.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run on the processor, the processor performs the compilation task scheduling method according to any one of claims 1 to 5.

13. A computer program product, characterized in that, The computer program product includes computer instructions, and the processor of the computer device executes the computer instructions, causing the computer device to perform the compilation task scheduling method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Compiling platform, and compiling method and apparatus

    CN104965748A

  • Task scheduling method and device, storage medium and electronic device

    CN111506398A