Compiling resource scheduling method and device, equipment, medium and program product
By forming a client cluster in the compilation resource cluster and determining the target client according to the user's target partition and compilation task type, the problem of low compilation resource utilization in the existing technology is solved, and efficient compilation resource management and task support during peak periods is achieved.
Patent Information
- Application Number
- CN202411904912.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, the compiled and packaged computers are in a decentralized management state, with high management costs and cannot support a large number of compilation tasks during peak periods, resulting in low resource utilization.
By forming a cluster of multiple clients for compilation and packaging, obtaining the target compilation type of the target partition to which the user belongs and the compilation task, and determining the target client according to the load status of each client, and issuing the compilation task to the target client for execution.
It improves the utilization rate of compilation resources, reduces the cost of equipment management, and can support a large number of compilation tasks during peak periods, avoiding resource bottlenecks.
Smart Images

Figure CN119829286A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a compilation resource scheduling method, device, equipment, medium and program product. Background Art
[0002] With the continuous development of electronic technology, the functions of electronic products are becoming more and more powerful, and the application programs that can realize various functions are all compiled from source code.
[0003] In the prior art, the compilation and packaging of source code needs to be performed on a dedicated computer, and the computers dedicated to compilation and packaging are in a decentralized management state, which has high management costs. During the peak period of version release, the number of computers for compilation and packaging is limited, and it is unable to support the peak compilation and packaging tasks. During the trough period of compilation and packaging demand, the computers for compilation and packaging are idle for a long time, resulting in low utilization of compilation resources. Summary of the invention
[0004] The present invention provides a compilation resource scheduling method, device, equipment, medium and program product to solve the problem that compilation resources cannot be efficiently utilized.
[0005] According to one aspect of the present invention, a compilation resource scheduling method is provided, comprising:
[0006] In response to a compilation task issued by a user, obtaining a target partition to which the user belongs and a target compilation type of the compilation task;
[0007] Acquire the load status of each client in the compilation resource cluster, and determine the target client in the compilation resource cluster according to the target partition, the target compilation type and the load status of each client;
[0008] The compilation task is sent to the target client to instruct the target client to execute the compilation task.
[0009] According to another aspect of the present invention, a compilation resource scheduling device is provided, comprising:
[0010] A compilation type acquisition module, configured to, in response to a compilation task issued by a user, acquire a target partition to which the user belongs and a target compilation type of the compilation task;
[0011] A target client determination module, used to obtain the load status of each client in the compilation resource cluster, and determine the target client in the compilation resource cluster according to the target partition, the target compilation type and the load status of each client;
[0012] The compiling task execution module is used to send the compiling task to the target client and instruct the target client to execute the compiling task.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the compilation resource scheduling method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the compilation resource scheduling method described in any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements a compilation resource scheduling method according to any embodiment of the present disclosure.
[0019] The technical solution of the embodiment of the present invention, in response to the compilation task issued by the user, obtains the target partition to which the user belongs and the target compilation type of the compilation task, and then obtains the load status of each client in the compilation resource cluster, and determines the target client in the compilation resource cluster according to the target partition, the target compilation type and the load status of each client, and finally issues the compilation task to the target client to instruct the target client to execute the compilation task. The technical solution of the embodiment of the present invention improves the utilization rate of compilation resources by clustering multiple clients used for compilation and packaging and performing resource pooling management.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0022] Figure 1a is a flowchart of a compilation resource scheduling method provided according to Embodiment 1 of the present invention;
[0023] Figure 1b is a structural diagram of a compilation resource scheduling system provided according to Embodiment 1 of the present invention;
[0024] Figure 2 is a flowchart of a compilation resource scheduling method provided according to Embodiment 2 of the present invention;
[0025] Figure 3 is a schematic diagram of the structure of a compilation resource scheduling device provided according to Embodiment 3 of the present invention;
[0026] Figure 4 It is a structural schematic diagram of an electronic device for implementing the compilation resource scheduling method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Embodiment 1
[0030] Figure 1aA flowchart of a compilation resource scheduling method is provided for the first embodiment of the present invention. This embodiment is applicable to the situation where a plurality of clients for compilation and packaging are clustered and resource pooling management and scheduling are performed. The method can be executed by a compilation resource scheduling device. The compilation resource scheduling device can be implemented in the form of hardware and / or software. The compilation resource scheduling device can be configured in various general-purpose computing devices, for example, by a server that performs compilation resource scheduling in a compilation resource scheduling system.
[0031] To facilitate understanding, the compilation resource scheduling system is described in detail. The structure of the compilation resource scheduling system is as follows: Figure 1b As shown, it includes a server cluster composed of multiple servers and a compilation resource cluster composed of multiple clients for source code compilation. The server cluster is used to provide users with an operation interface for logging in and issuing compilation tasks. After obtaining the user's operation of issuing a compilation task, the server determines the target client in the compilation resource cluster according to the pre-set scheduling strategy, and sends the current compilation task to the target client for execution.
[0032] like Figure 1a As shown, the compilation resource scheduling method includes:
[0033] S110 . In response to a compilation task issued by a user, obtain a target partition to which the user belongs and a target compilation type of the compilation task.
[0034] A compilation task is a source code compilation task that is configured by the user in the operation interface provided by the server cluster and sent to a server in the server cluster. A compilation task includes the storage address of the source code to be compiled in the code repository and the compilation type required by the current compilation task (i.e., the target compilation type). The compilation types can include Linux compilation, MacOS compilation, Ant compilation, Maven compilation, and Docker compilation, etc.
[0035] In the field of financial technology, there is often a large demand for compiling and packaging project source codes. Compilation and packaging need to be performed on dedicated computers, but the computers dedicated to compilation and packaging are in a decentralized management state, which has high management costs. During the peak period of version releases, the limited number of computers for compilation and packaging cannot support the peak compilation and packaging tasks. During the trough period of compilation and packaging demand, the computers for compilation and packaging are idle for a long time, resulting in low utilization of compilation resources.
[0036] In an embodiment of the present invention, the user configures the compilation task through the operation interface provided by the server cluster. The configuration content includes the storage address of the source code to be compiled in the code warehouse and the compilation type required for the current compilation task. After completing the task content configuration, the compilation task is issued. After receiving the compilation task issued by the user, the management node in the server cluster reads the target partition to which the current user belongs, for example, city A or city B. The management node sends the compilation task to the server in the target partition in the server cluster for processing according to the partition to which the current user belongs.
[0037] The server receiving the compilation task first obtains the target partition to which the user issuing the compilation task belongs, and obtains the target compilation type of the compilation task, so as to schedule the compilation resources in the compilation resource cluster according to the target partition and the target compilation type.
[0038] S120: Obtain the load status of each client in the compilation resource cluster, and determine the target client in the compilation resource cluster according to the target partition, the target compilation type, and the load status of each client.
[0039] The compilation resource cluster contains multiple clients for compiling project source code. Different clients can support different compilation types.
[0040] The load status is used to indicate the amount of tasks currently borne by the client. For example, the load status may include multiple dimensions such as the number of tasks to be processed by the client, the utilization rate of the client's central processing unit (CPU) or the memory utilization rate.
[0041] In an embodiment of the present invention, in order to fully utilize the compilation resources in the compilation resource cluster, the server needs to obtain the load status of each client in the compilation resource cluster. Specifically, a load status acquisition request can be sent to each client to obtain the load status fed back by each client. Further, based on a pre-set scheduling strategy, the target client is determined in the compilation resource cluster according to the target partition, the target compilation type, and the load status of each client. By forming a cluster of multiple clients for compilation and packaging, and performing resource scheduling after the user issues a compilation task, high concurrency can be supported and the utilization rate of compilation resources can be improved.
[0042] Exemplarily, the pre-set scheduling strategy may be to first determine, according to the target partition, multiple first candidate clients whose partitions are the target partitions in the compilation resource cluster. Further, according to the target compilation type, multiple second candidate clients that support the target compilation type are searched among the multiple first candidate clients. Finally, the client with the least pending tasks among the multiple second candidate clients is selected as the target client. The target client may also be determined from a set of multiple second candidate clients according to the target compilation type and the load status of the multiple second candidate clients. For example, first determine, according to the target compilation type, that the current compilation task is a computationally intensive task, and then select the target client with the lightest CPU load among the multiple second candidate clients.
[0043] S130: Send the compilation task to the target client to instruct the target client to execute the compilation task.
[0044] In the embodiment of the present invention, after determining the target client, the server sends the compilation task to the target client. The target client can read the project source code from the code warehouse according to the code warehouse address included in the compilation task. Further, according to the compilation type of the compilation task, the project source code is compiled, and the compiled application installation package is fed back to the server.
[0045] The technical solution of the embodiment of the present invention, in response to the compilation task issued by the user, obtains the target partition to which the user belongs and the target compilation type of the compilation task, and then obtains the load status of each client in the compilation resource cluster, and determines the target client in the compilation resource cluster according to the target partition, the target compilation type and the load status of each client, and finally issues the compilation task to the target client to instruct the target client to execute the compilation task. The technical solution of the embodiment of the present invention, by clustering multiple clients used for compilation and packaging, performs resource pooling management, reduces equipment management costs, and improves compilation resource utilization.
[0046] Embodiment 2
[0047] Figure 2 This is a flowchart of a compilation resource scheduling method provided in the second embodiment of the present invention. This embodiment further refines the above embodiment and provides specific steps for determining a target client in a compilation resource cluster according to the target partition, target compilation type, and the load status of each client. Figure 2 As shown, the method includes:
[0048] S210 . In response to a compilation task issued by a user, obtain a target partition to which the user belongs and a target compilation type of the compilation task.
[0049] S220: Obtain the load status of each client in the compilation resource cluster, and determine, according to the target partition, at least one first candidate client whose partition is the target partition in the compilation resource cluster to form a first candidate client set.
[0050] In an embodiment of the present invention, after the server obtains the target partition to which the user belongs and the target compilation type of the compilation task, in order to ensure the utilization of the compilation resources in the compilation resource cluster, it is necessary to further obtain the load status of each client in the compilation resource cluster. Specifically, the client load status can be requested from the client agent deployed on the client, wherein the client agent can be used to configure the local service environment of the server, monitor CPU utilization, memory utilization, and disk utilization, etc., and can also uniformly manage the source code media, files generated by the compilation process, certificates, and keys, etc. Among them, the load status can include multiple dimensions such as the number of pending tasks on the client, the CPU utilization or memory utilization of the client, etc.
[0051] Furthermore, according to the target partition, at least one first candidate client whose partition is the target partition is first determined in the compilation resource cluster to form a first candidate client set. By screening the first candidate clients whose partition is the target partition, it can be ensured that the client executing the compilation operation, the server performing the compilation resource scheduling, and the user initiating the compilation task are in the same partition, which can reduce network delay and improve data transmission speed.
[0052] Exemplarily, if the target partition is the A city partition, then at least one first candidate client whose partition is the A city partition is first determined in the compilation resource cluster to form a first candidate client set.
[0053] S230: Determine, according to the target coding type, at least one second candidate client supporting the target coding type in the first candidate client set to form a second candidate client set.
[0054] In the embodiment of the present invention, different clients in the compilation resource cluster can support different compilation types. After determining the first candidate client set according to the target partition, further according to the target compilation type of the compilation task, at least one second candidate client supporting the target compilation type is determined in the first candidate client set to form a second candidate client set. By setting clients supporting different compilation types, high concurrency support capability can be achieved, and multiple applications of different compilation types can be supported to be compiled and packaged simultaneously.
[0055] S240: Determine a target client in the second candidate client set according to the target compilation type and the load status of each client in the second candidate client set.
[0056] In an embodiment of the present invention, after determining the second candidate client set according to the target compilation type, the target client is further determined in the second candidate client set according to the target compilation type and the load status of each client in the second candidate client set. Specifically, it can be determined whether the current compilation task is a memory-intensive task or a computation-intensive task according to the target compilation type. When the compilation task is a computation-intensive task, the target client is determined based on the CPU load status of each client in the second candidate client set; when the compilation task is a memory-intensive task, the target client is determined based on the memory load status of each client in the second candidate client set.
[0057] It is also possible to determine whether the compilation task supports parallel execution according to the target compilation type. If it supports parallel execution, at least one third client pre-divided to process parallel tasks can be selected from the second candidate client set, and then the client with the least tasks to be executed can be selected from the at least one third client as the target client; if it does not support parallel execution, at least one third client pre-divided to process serial tasks can be selected from the second candidate client set, and then the client with the least tasks to be executed can be selected from the at least one third client as the target client. By determining the target client for executing the compilation task according to the target partition to which the user belongs, the target compilation type of the compilation task, and the load status of each client in the compilation resource cluster, on the one hand, a large number of peak resource bottlenecks for compilation and packaging services can be solved, and on the other hand, the utilization rate of compilation resources can be improved.
[0058] Optionally, determining a target client in the second candidate client set according to the target compilation type and the load status of each client in the second candidate client set includes:
[0059] According to the target compilation type, determine whether the compilation task supports parallel execution;
[0060] In the case that the compilation task does not support parallel execution, at least one third candidate client pre-classified as a serial task execution category is determined in the second candidate client set to form a third candidate client set;
[0061] A target client is determined according to a load status of each client in the third candidate client set.
[0062] In this optional embodiment, a method for determining a target client in the second candidate client set based on the target compilation type and the load status of each client in the second candidate client set is provided: first, based on the target compilation type, determine whether the compilation task supports parallel execution; if the compilation task does not support parallel execution, determine in the second candidate client set at least one third candidate client that is pre-classified into the serial task execution category to form a third candidate client set.
[0063] In the case that the compilation task supports parallel execution, at least one third candidate client pre-classified into the parallel task execution category is determined in the second candidate client set to form a third candidate client set.
[0064] Finally, the target client is determined according to the load status of each client in the third candidate client set. Specifically, the target client can be determined according to the CPU utilization of each client in the third candidate client set, and the target client can also be determined according to the number of pending tasks of each client in the third candidate client set. By separating tasks that support parallel execution and tasks that do not support parallel execution and processing them by different clients, and determining the target client according to the load status of the corresponding client, the compilation resource utilization rate can be improved.
[0065] Optionally, determining the target client according to the load status of each client in the third candidate client set includes:
[0066] Compare the number of pending tasks of each client in the third candidate client set with the number threshold respectively;
[0067] A target client is determined among the third candidate clients whose number of tasks to be processed is less than the number threshold.
[0068] In this optional embodiment, a specific method for determining the target client according to the load status of each client in the third candidate client set is provided: the number of pending tasks of each client in the third candidate client set is compared with the number threshold, and the target client is determined among the third candidate clients whose number of pending tasks is less than the number threshold. By comparing the number of pending tasks with the number threshold, among the third candidate clients whose number of pending tasks is less than the number threshold, the client with the least number of pending tasks is determined as the target client. On the one hand, the utilization rate of compilation resources can be improved, and on the other hand, the waiting time of compilation tasks can be reduced, thereby improving compilation efficiency.
[0069] Optionally, determining the target client in the second candidate client set according to the target compilation type and the load status of each client in the second candidate client set further includes:
[0070] Determine the task type of the compilation task according to the target compilation type; the task types include computation-intensive and memory-intensive;
[0071] A target client is determined in the second candidate client set according to the task type and the CPU occupancy and memory occupancy of each client in the second candidate client set.
[0072] In this optional embodiment, another method of determining the target client in the second candidate client set is provided according to the target compilation type and the load status of each client in the second candidate client set: determining the task type of the compilation task according to the target compilation type, wherein the task type includes computationally intensive and memory intensive. Exemplarily, MacOS compilation can be determined as a computationally intensive task.
[0073] Furthermore, the target client is determined in the second candidate client set according to the task type and the CPU occupancy rate and memory occupancy rate of each client in the second candidate client set. By determining the task type of the compilation task through the target compilation type, it is possible to determine which dimension of resources the compilation task has a high demand for, and thus determine the target client according to the load status of the dimensional resources of each client in the second candidate client set, which can avoid the compilation task failure caused by insufficient client computing / storage resources and ensure the reliability of task compilation.
[0074] Optionally, determining a target client in the second candidate client set according to the task type and the CPU occupancy rate and the memory occupancy rate of each client in the second candidate client set includes:
[0075] When the task type is computationally intensive, the second candidate client with the lowest CPU occupancy rate in the second candidate client set is determined as the target client;
[0076] When the CPU occupancy rate of each client in the second candidate client set is the same, the second candidate client with the lowest memory occupancy rate in the second candidate client set is determined as the target client.
[0077] In this optional embodiment, a specific method for determining a target client in the second candidate client set based on the task type and the CPU occupancy rate and memory occupancy rate of each client in the second candidate client set is provided: when the task type is computationally intensive, the second candidate client with the lowest CPU occupancy rate in the second candidate client set is determined as the target client; when the CPU occupancy rate of each client in the second candidate client set is the same, the second candidate client with the lowest memory occupancy rate in the second candidate client set is determined as the target client. When the task type is memory intensive, the second candidate client with the lowest memory occupancy rate in the second candidate client set is determined as the target client; when the memory occupancy rate of each client in the second candidate client set is the same, the second candidate client with the lowest CPU occupancy rate in the second candidate client set is determined as the target client. Reasonable allocation of compilation resources is performed by considering resource occupancy in different dimensions and task type.
[0078] S250: Send the compilation task to the target client to instruct the target client to execute the compilation task.
[0079] The technical solution of the embodiment of the present invention, in response to a compilation task issued by a user, obtains the target partition to which the user belongs and the target compilation type of the compilation task, obtains the load status of each client in the compilation resource cluster, and determines at least one first candidate client whose partition is the target partition in the compilation resource cluster according to the target partition to form a first candidate client set, further, according to the target compilation type, determines at least one second candidate client supporting the target compilation type in the first candidate client set to form a second candidate client set, and according to the target compilation type and the load status of each client in the second candidate client set, determines the target client in the second candidate client set, and finally issues the compilation task to the target client to instruct the target client to execute the compilation task. By simultaneously determining the target client to execute the compilation task according to the target partition to which the user belongs, the target compilation type of the compilation task and the load status of each client in the compilation resource cluster, on the one hand, a large number of peak resource bottlenecks of compilation and packaging services can be solved, and on the other hand, the utilization rate of compilation resources can be improved.
[0080] Embodiment 3
[0081] Figure 3 A schematic diagram of the structure of a compilation resource scheduling device provided in Embodiment 3 of the present invention.
[0082] like Figure 3 As shown, the device comprises:
[0083] A compilation type acquisition module 310 is used to obtain, in response to a compilation task issued by a user, a target partition to which the user belongs and a target compilation type of the compilation task;
[0084] The target client determination module 320 is used to obtain the load status of each client in the compilation resource cluster, and determine the target client in the compilation resource cluster according to the target partition, the target compilation type and the load status of each client;
[0085] The compiling task execution module 330 is used to send the compiling task to the target client, and to instruct the target client to execute the compiling task.
[0086] The technical solution of the embodiment of the present invention, in response to the compilation task issued by the user, obtains the target partition to which the user belongs and the target compilation type of the compilation task, and then obtains the load status of each client in the compilation resource cluster, and determines the target client in the compilation resource cluster according to the target partition, the target compilation type and the load status of each client, and finally issues the compilation task to the target client to instruct the target client to execute the compilation task. The technical solution of the embodiment of the present invention improves the utilization rate of compilation resources by clustering multiple clients used for compilation and packaging and performing resource pooling management.
[0087] Optionally, the target client determination module includes:
[0088] A first set determining unit, configured to determine, according to the target partition, at least one first candidate client in the compilation resource cluster, whose partition is the target partition, to form a first candidate client set;
[0089] A second set determining unit, configured to determine, according to the target coding type, at least one second candidate client supporting the target coding type in the first candidate client set to form a second candidate client set;
[0090] The target client determination unit is used to determine a target client in the second candidate client set according to the target compilation type and the load status of each client in the second candidate client set.
[0091] Optionally, the target client determination unit includes:
[0092] An execution mode determination subunit, used to determine whether the compilation task supports parallel execution according to the target compilation type;
[0093] A third set determination subunit is used to determine, in the second candidate client set, at least one third candidate client pre-classified into a serial task execution category to form a third candidate client set when the compilation task does not support parallel execution;
[0094] The first target client determination subunit is used to determine the target client according to the load status of each client in the third candidate client set.
[0095] Optionally, the target client determination unit further includes:
[0096] A task type determination subunit, used to determine the task type of the compilation task according to the target compilation type; the task type includes computation-intensive and memory-intensive;
[0097] The second target client determination subunit is used to determine a target client in the second candidate client set according to the task type and the CPU occupancy rate and the memory occupancy rate of each client in the second candidate client set.
[0098] Optionally, the first target client determines a subunit, specifically configured to:
[0099] Comparing the number of pending tasks for each client in the third candidate client set with the number threshold respectively;
[0100] A target client is determined among third candidate clients whose number of tasks to be processed is less than the number threshold.
[0101] Optionally, the second target client determination subunit is specifically configured to:
[0102] In the case where the task type is computationally intensive, determining a second candidate client with the lowest CPU occupancy rate in the second candidate client set as a target client;
[0103] When the CPU occupancy rate of each client in the second candidate client set is the same, the second candidate client with the lowest memory occupancy rate in the second candidate client set is determined as the target client.
[0104] The compilation resource scheduling device provided in the embodiment of the present invention can execute the compilation resource scheduling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0105] In the technical solution of the present invention, the collected information is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0106] Embodiment 4
[0107] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.
[0108] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, applicators, blade applicators, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0109] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0110] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0111] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a compilation resource scheduling method.
[0112] In some embodiments, the compilation resource scheduling method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the compilation resource scheduling method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the compilation resource scheduling method in any other appropriate manner (e.g., by means of firmware).
[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or application.
[0115] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data applier), or a computing system that includes a middleware component (e.g., an application applier), or a computing system that includes a frontend component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0118] A computing system may include a client and an application server. The client and the application server are generally remote from each other and usually interact through a communication network. The relationship between the client and the application server is generated by computer programs running on corresponding computers and having a client-application server relationship with each other. The application server may be a cloud application server, also known as a cloud computing application server or a cloud host, which is a host product in a cloud computing application system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS applications.
[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0120] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A compilation resource scheduling method, characterized in that: include: In response to a compilation task issued by a user, obtaining a target partition to which the user belongs and a target compilation type of the compilation task; Acquire the load status of each client in the compilation resource cluster, and determine the target client in the compilation resource cluster according to the target partition, the target compilation type and the load status of each client; The compilation task is sent to the target client to instruct the target client to execute the compilation task.
2. The method according to claim 1, characterized in that Determining a target client in the compilation resource cluster according to the target partition, the target compilation type, and the load status of each client includes: According to the target partition, determining in the compilation resource cluster at least one first candidate client whose partition is the target partition to form a first candidate client set; According to the target coding type, determining at least one second candidate client supporting the target coding type in the first candidate client set to form a second candidate client set; A target client is determined in the second candidate client set according to the target compilation type and the load status of each client in the second candidate client set.
3. The method according to claim 2, characterized in that Determining a target client in the second candidate client set according to the target compilation type and a load state of each client in the second candidate client set includes: Determining whether the compilation task supports parallel execution according to the target compilation type; In the case that the compilation task does not support parallel execution, determining at least one third candidate client pre-classified as a serial task execution category in the second candidate client set to form a third candidate client set; A target client is determined according to a load status of each client in the third candidate client set.
4. The method according to claim 2, characterized in that: Determining a target client in the second candidate client set according to the target compilation type and the load status of each client in the second candidate client set further includes: Determining a task type of the compilation task according to the target compilation type; the task type includes computation-intensive and memory-intensive; A target client is determined in the second candidate client set according to the task type and the CPU occupancy and the memory occupancy of each client in the second candidate client set.
5. The method according to claim 3, characterized in that: Determining a target client according to a load state of each client in the third candidate client set includes: Comparing the number of pending tasks for each client in the third candidate client set with the number threshold respectively; A target client is determined among third candidate clients whose number of tasks to be processed is less than the number threshold.
6. The method according to claim 4, characterized in that Determining a target client in the second candidate client set according to the task type and the CPU occupancy rate and the memory occupancy rate of each client in the second candidate client set includes: In the case where the task type is computationally intensive, determining a second candidate client with the lowest CPU occupancy rate in the second candidate client set as a target client; When the CPU occupancy rate of each client in the second candidate client set is the same, the second candidate client with the lowest memory occupancy rate in the second candidate client set is determined as the target client.
7. A compilation resource scheduling device, characterized in that: include: A compilation type acquisition module, configured to, in response to a compilation task issued by a user, acquire a target partition to which the user belongs and a target compilation type of the compilation task; A target client determination module, used to obtain the load status of each client in the compilation resource cluster, and determine the target client in the compilation resource cluster according to the target partition, the target compilation type and the load status of each client; The compiling task execution module is used to send the compiling task to the target client and instruct the target client to execute the compiling task.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the compilation resource scheduling method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the compilation resource scheduling method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the compilation resource scheduling method according to any one of claims 1 to 6.