Compiling method and system

By combining and splitting multiple compilation commands that depend on the same source file and executing them by multiple distributed compilation servers, the problem of low compilation acceleration efficiency in the existing technology is solved, and a more efficient compilation process is achieved.

CN119960755APending Publication Date: 2025-05-09HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311790753.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-11-09
Filing Date
2023-12-22
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The prior art has low acceleration efficiency during the compilation process, resulting in a longer running time taken by the compilation process.

Method used

By combining multiple compilation commands that depend on the same source file, a compilation command is generated, and one of the multiple distributed compilation servers executes the combined compilation command. At the same time, the compilation command is split into multiple subcommands and executed in a distributed manner to speed up the compilation process.

Benefits of technology

Improve the compilation efficiency, reduce the running time taken by the compilation process, and further optimize the compilation efficiency by reducing the duplicate transfer of compiled source files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960755A_ABST
    Figure CN119960755A_ABST
Patent Text Reader

Abstract

The invention provides a compiling method and system.The method comprises the steps that a first server obtains M compiling commands, and the compiling commands are used for converting source codes corresponding to the compiling commands into target codes corresponding to the source codes; the first server identifies a first compilation command set from the M compilation commands, wherein the first compilation command set comprises N compilation commands depending on the same source file; the first server combines K compilation commands in the first compilation command set to obtain a first compilation command, M is greater than or equal to N, N is greater than or equal to K, M, N and K are all positive integers greater than or equal to 2, and a source code corresponding to the first compilation command is a first source code; and the first server sends the first compiling command to a first compiling server, and the first compiling server executes the first compiling command to obtain a first target code corresponding to the first source code. According to the method, the compiling process can be accelerated, the compiling efficiency is improved, and the time occupied by the compiling process is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to the Chinese patent application with application number 202311489541.0 filed with the State Intellectual Property Office of China on November 9, 2023, and priority to the Chinese patent application with invention name “Method and computing device for building compilation acceleration for Windows”, all contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of computers, and more specifically, to a compilation method and system. Background Art

[0003] Compilation is the process of using a compiler to convert a source program written in a source language into a target program written in a target language. These target programs (or instructions) are packaged in a format that is an executable target program and stored in the form of binary disk files.

[0004] At present, accelerating the compilation process to reduce the running time occupied by the compilation process has become an important research field. In a related compilation acceleration technology, the compilation process is accelerated by the computing power of multiple remote distributed execution machines. This acceleration process is distributed acceleration based on the granularity of compilation commands, and the acceleration efficiency is low.

[0005] Therefore, how to improve the efficiency of compilation and reduce the running time occupied by the compilation process has become a technical problem that urgently needs to be solved. Summary of the invention

[0006] The present application provides a compilation method, which can accelerate the compilation process, thereby improving the compilation efficiency and reducing the running time occupied by the compilation process.

[0007] In a first aspect, a compilation method is provided, comprising: a first server obtains M compilation commands, each of which is used to convert a source code corresponding to the source code into a target code corresponding to the source code; the first server identifies a first compilation command set from the M compilation commands, the first compilation command set includes N compilation commands, and the source files that the N compilation commands depend on are the same; the first server combines K compilation commands in the first compilation command set to obtain a first compilation command, wherein M is greater than or equal to N, N is greater than or equal to K, M, N, and K are all positive integers greater than or equal to 2, and the source code corresponding to the first compilation command is a first source code; the first server sends the first compilation command to a first compilation server, and the first compilation server executes the first compilation command to obtain a first target code corresponding to the first source code, and the first compilation server is one of a plurality of distributed compilation servers.

[0008] In the above technical solution, K compilation commands that depend on the same source file are combined to obtain a compilation command, and a compilation server among multiple distributed compilation servers executes the combined compilation command, which can improve the compilation efficiency as a whole and reduce the running time occupied by the compilation process.

[0009] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the first server identifying a second compilation command set from the M compilation commands, the second compilation command set including L compilation commands, the L compilation commands depending on the same source files, and the second compilation command set is different from the first compilation command set;

[0010] The first server combines P compile commands in the second compile command set to obtain a second compile command, wherein M is greater than or equal to L, L is greater than or equal to P, L and P are both positive integers greater than or equal to 2, and the source code corresponding to the second compile command is a second source code; the first server sends the second compile command to a second compile server, and the second compile server executes the second compile command to obtain a second target code corresponding to the second source code, and the second compile server is another compile server among the multiple distributed compile servers.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, the N compile commands satisfy at least one of the following:

[0012] N compilation commands are of the same type;

[0013] N compilation commands depend on the same source code files;

[0014] The source data files that N compilation commands depend on are the same;

[0015] N compilation commands rely on the same compilation directory and / or environment variables;

[0016] N compilation commands depend on the same precompiled header file.

[0017] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the first server sends the source files on which the K compilation commands depend to the first compilation server, and the source files include at least one of the following: source code files, source data files, compilation directories and / or environment variables, and precompiled header files.

[0018] In the above technical solution, since the compilation commands in the first compilation command set depend on the same compilation source files, when sending a combined compilation command to the first compilation server, only one compilation source file (including but not limited to source code files, source data files, compilation directories and / or environment variables, precompiled header files, etc.) needs to be sent, and there is no need to send the same number of compilation source files as the compilation commands in the first compilation command set, thereby further improving the compilation efficiency and reducing the running time occupied by the compilation process.

[0019] In combination with the first aspect, in certain implementations of the first aspect, the method is applied to a cloud scenario, which includes a cloud management platform and an infrastructure for providing cloud services managed by the cloud management platform, the infrastructure including at least one cloud data center, each of which is provided with at least one server, the at least one server including the first server and the multiple distributed compilation servers.

[0020] In combination with the first aspect, in some implementations of the first aspect, the cloud service includes a compilation acceleration service, and the method also includes: the cloud management platform provides a purchase interface for the compilation acceleration service, and the purchase interface is used to provide different types of compilation acceleration services to tenants; the cloud management platform selects the first server and the multiple distributed compilation servers from the at least one server for use by the tenant according to the type of compilation acceleration service purchased by the tenant, and installs compilation programs on the multiple distributed compilation servers respectively, and the compilation program is used to execute compilation commands, and the compilation commands include the first compilation command and / or the second compilation command.

[0021] In the above technical solution, the process of accelerating compilation can be provided to tenants in the form of compilation acceleration cloud service.

[0022] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: the cloud management platform obtains a compilation task created by the tenant on the first server, and the compilation task includes the M compilation commands; the cloud management platform sends a first instruction to the first server, and the first instruction is used to instruct the first server to obtain the M compilation commands, identify the first compilation command set from the M compilation commands, and combine the K compilation commands in the first compilation command set to obtain the first compilation command.

[0023] In a second aspect, a compiling method is provided, comprising: a first server acquires M compiling commands, each of the compiling commands is used to convert a source code corresponding to the source code into a target code corresponding to the source code, wherein M is a positive integer greater than or equal to 2, the M compiling commands include a third compiling command and a fourth compiling command, the execution of the fourth compiling command depends on a third target code obtained by executing the third compiling command, the third target code is a target code corresponding to a third source code, and the third source code is a source code corresponding to the third compiling command; the first server splits the third compiling command into a plurality of third compiling subcommands; the first server sends the plurality of third compiling subcommands to a plurality of distributed compiling servers respectively, and the plurality of distributed compiling servers respectively execute the third compiling subcommands received respectively to obtain the third target code; the first server splits the fourth compiling command into a plurality of fourth compiling subcommands; the first server sends the third target code and the plurality of fourth compiling subcommands to a plurality of distributed compiling servers respectively, and the plurality of distributed compiling servers respectively execute the fourth compiling subcommands received respectively and the third target code to obtain a fourth target code corresponding to a fourth source code, and the fourth source code is a source code corresponding to the fourth compiling command.

[0024] In the above technical solution, for multiple compilation commands that need to be executed serially, by splitting one compilation command into multiple sub-commands, and executing the multiple sub-commands in a distributed manner through multiple compilation servers, the waiting time before the execution of the next compilation command can be greatly shortened, thereby accelerating the compilation process, improving the compilation efficiency, and reducing the running time occupied by the compilation process.

[0025] In combination with the second aspect, in certain implementations of the second aspect, the method is applied to a cloud scenario, which includes a cloud management platform and an infrastructure for providing cloud services managed by the cloud management platform, the infrastructure including at least one cloud data center, each of which is provided with at least one server, the at least one server including the first server and the multiple distributed compilation servers.

[0026] In combination with the second aspect, in some implementations of the second aspect, the cloud service includes a compilation acceleration service, and the method also includes: the cloud management platform provides a purchase interface for the compilation acceleration service, and the purchase interface is used to provide different types of compilation acceleration services to tenants; the cloud management platform selects the first server and the multiple distributed compilation servers from the at least one server for use by the tenant according to the type of compilation acceleration service purchased by the tenant, and respectively installs a compilation program on the multiple distributed compilation servers, and the compilation program is used to execute a compilation command, and the compilation command includes the multiple third compilation sub-commands and the multiple fourth compilation sub-commands.

[0027] In combination with the second aspect, in some implementations of the second aspect, the method also includes: the cloud management platform obtains a compilation task created by the tenant on the first server, and the compilation task includes the M compilation commands; the cloud management platform sends a second instruction to the first server, and the second instruction is used to instruct the first server to obtain the M compilation commands, split the third compilation command into multiple third compilation sub-commands and send them to the multiple distributed compilation servers for execution to obtain the third target code, and split the fourth compilation command into multiple fourth compilation sub-commands and send them together with the third target code to the multiple distributed compilation servers for execution to obtain the fourth target code.

[0028] In a third aspect, a compilation system is provided, the system comprising: a first server and a first compilation server, wherein the first server is used to obtain M compilation commands, each of which is used to convert a source code corresponding to the source code into a target code corresponding to the source code; the first server is also used to identify a first compilation command set from the M compilation commands, the first compilation command set includes N compilation commands, and the source files that the N compilation commands depend on are the same; the first server is also used to combine K compilation commands in the first compilation command set to obtain a first compilation command, wherein M is greater than or equal to N, N is greater than or equal to K, M, N, and K are all positive integers greater than or equal to 2, and the source code corresponding to the first compilation command is a first source code; the first server is also used to send the first compilation command to the first compilation server; the first compilation server is used to receive and execute the first compilation command to obtain a first target code corresponding to the first source code, and the first compilation server is one of the multiple distributed compilation servers.

[0029] In combination with the third aspect, in some implementations of the third aspect, the system also includes a second compile server, the first server is further used to identify a second compile command set from the M compile commands, the second compile command set includes L compile commands, the L compile commands depend on the same source files, and the second compile command set is different from the first compile command set; the first server is further used to combine P compile commands in the second compile command set to obtain a second compile command, wherein M is greater than or equal to L, L is greater than or equal to P, L and P are both positive integers greater than or equal to 2, and the source code corresponding to the second compile command is a second source code; the first server is further used to send the second compile command to a second compile server; the second compile server is used to receive and execute the second compile command to obtain a second target code corresponding to the second source code, and the second compile server is another compile server among the multiple distributed compile servers.

[0030] In conjunction with the third aspect, in some implementations of the third aspect, the N compilation commands satisfy at least one of the following:

[0031] N compilation commands are of the same type;

[0032] N compilation commands depend on the same source code files;

[0033] The source data files that N compilation commands depend on are the same;

[0034] N compilation commands rely on the same compilation directory and / or environment variables;

[0035] N compilation commands depend on the same precompiled header file.

[0036] In combination with the third aspect, in certain implementations of the third aspect, the first server is further used to send the source files that the K compilation commands depend on to the first compilation server, and the source files include at least one of the following: source code files, source data files, compilation directories and / or environment variables, and precompiled header files.

[0037] In combination with the third aspect, in certain implementations of the third aspect, the system is applied to a cloud scenario, which includes a cloud management platform and an infrastructure for providing cloud services managed by the cloud management platform, the infrastructure including at least one cloud data center, each of which is provided with at least one server, the at least one server including the first server and the multiple distributed compilation servers.

[0038] In combination with the third aspect, in some implementations of the third aspect, the cloud service includes a compilation acceleration service, and the cloud management platform is used to provide a purchase interface for the compilation acceleration service, and the purchase interface is used to provide different types of compilation acceleration services to tenants; the cloud management platform is also used to select the first server and the multiple distributed compilation servers from the at least one server for use by the tenant according to the type of compilation acceleration service purchased by the tenant, and install compilation programs on the multiple distributed compilation servers respectively, and the compilation program is used to execute compilation commands, and the compilation commands include the first compilation command and / or the second compilation command.

[0039] In combination with the third aspect, in certain implementations of the third aspect, the cloud management platform is further used to obtain the compilation task created by the tenant on the first server, and the compilation task includes the M compilation commands; the cloud management platform is further used to send a first instruction to the first server, and the first instruction is used to instruct the first server to obtain the M compilation commands, identify the first compilation command set from the M compilation commands, and combine the K compilation commands in the first compilation command set to obtain the first compilation command.

[0040] It should be understood that the beneficial effects of each implementation method in the third aspect can be referred to the beneficial effects corresponding to each implementation method in the first aspect, and will not be repeated here.

[0041] In a fourth aspect, a compilation system is provided, the system comprising: a first server and a plurality of distributed compilation servers, the first server being used to obtain M compilation commands, wherein M is a positive integer greater than or equal to 2, each of the compilation commands being used to convert a source code corresponding to the source code into a target code corresponding to the source code, the M compilation commands comprising a third compilation command and a fourth compilation command, the execution of the fourth compilation command being dependent on a third target code obtained by executing the third compilation command, the third target code being a target code corresponding to a third source code, and the third source code being a source code corresponding to the third compilation command; the first server being further used to split the third compilation command into a plurality of third compilation sub-commands; the first server being further used to send the plurality of third compilation sub-commands to the plurality of distributed compilation servers respectively; the plurality of distributed compilation servers being configured to execute the third compilation command and the fourth compilation command being configured to execute the third compilation command and the third target code being a target code corresponding to the third source code, and the third source code being a source code corresponding to the third compilation command; The first server is further used to obtain and execute the third compilation subcommands received by each of the multiple distributed compilation servers; the first server is further used to obtain the third target code obtained by the multiple distributed compilation servers respectively executing the third compilation subcommands received by each of the multiple distributed compilation servers; the first server is further used to split the fourth compilation command into multiple fourth compilation subcommands; the first server is further used to send the third target code and the multiple fourth compilation subcommands to the multiple distributed compilation servers respectively; the multiple distributed compilation servers are further used to obtain and execute the third target code and the fourth compilation subcommands received by each of the multiple distributed compilation servers; the first server is further used to obtain the fourth target code corresponding to the fourth source code obtained by the multiple distributed compilation servers respectively executing the fourth compilation subcommands received by each of the multiple distributed compilation servers and the third target code, and the fourth source code is the source code corresponding to the fourth compilation command.

[0042] In combination with the fourth aspect, in certain implementations of the fourth aspect, the system is applied to a cloud scenario, which includes a cloud management platform and an infrastructure for providing cloud services managed by the cloud management platform, the infrastructure including at least one cloud data center, each of which is provided with at least one server, the at least one server including the first server and the multiple distributed compilation servers.

[0043] In combination with the fourth aspect, in certain implementations of the fourth aspect, the cloud service includes a compilation acceleration service, and the cloud management platform is used to provide a purchase interface for the compilation acceleration service, and the purchase interface is used to provide different types of compilation acceleration services to tenants; the cloud management platform is also used to select the first server and the multiple distributed compilation servers from the at least one server for use by the tenant according to the type of compilation acceleration service purchased by the tenant, and respectively install compilation programs on the multiple distributed compilation servers, and the compilation program is used to execute a compilation command, and the compilation command includes the multiple third compilation sub-commands and the multiple fourth compilation sub-commands.

[0044] In combination with the fourth aspect, in certain implementations of the fourth aspect, the cloud management platform is further used to obtain a compilation task created by the tenant on the first server, where the compilation task includes the M compilation commands; the cloud management platform is further used to send a second instruction to the first server, where the second instruction is used to instruct the first server to obtain the M compilation commands, split the third compilation command into multiple third compilation sub-commands and send them to the multiple distributed compilation servers for execution to obtain the third target code, split the fourth compilation command into multiple fourth compilation sub-commands and send them together with the third target code to the multiple distributed compilation servers for execution to obtain the fourth target code.

[0045] It should be understood that the beneficial effects of each implementation method in the fourth aspect can be referred to the beneficial effects corresponding to each implementation method in the second aspect, and will not be repeated here.

[0046] In a fifth aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method in the first aspect or any possible implementation of the first aspect.

[0047] In a sixth aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method in the second aspect or any possible implementation of the second aspect.

[0048] In a seventh aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computing device cluster, the computing device cluster executes the method in the first aspect and any one of the implementations of the first aspect.

[0049] In an eighth aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computing device cluster, the computing device cluster executes the method in the second aspect and any one of the implementations of the second aspect.

[0050] In a ninth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method in the first aspect and any one of the implementations of the first aspect.

[0051] In a tenth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method in the second aspect and any one of the implementations of the second aspect.

[0052] By way of example, these computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), Flash memory, electrically EPROM (EEPROM), and hard drive.

[0053] Optionally, as an implementation manner, the above-mentioned storage medium may specifically be a non-volatile storage medium. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is a schematic diagram of a cloud scenario applicable to an embodiment of the present application.

[0055] Figure 2 It is a schematic flow chart of a compilation method provided in an embodiment of the present application.

[0056] Figure 3 It is a schematic diagram of a combined compilation command provided in an embodiment of the present application.

[0057] Figure 4 It is a schematic flow chart of a compilation method provided in an embodiment of the present application.

[0058] Figure 5 It is a schematic flow chart of a compilation method provided in an embodiment of the present application.

[0059] Figure 6 It is a schematic diagram of a split compilation command provided in an embodiment of the present application.

[0060] Figure 7It is a schematic block diagram of a compilation system 700 provided in an embodiment of the present application.

[0061] Figure 8 It is a schematic diagram of the architecture of a server 1500 provided in an embodiment of the present application.

[0062] Fig. 9 It is a schematic diagram of the architecture of a server cluster provided in an embodiment of the present application.

[0063] Fig.10 It is a schematic diagram of the connection between servers 1500A and 1500B through a network provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0065] The present application will present various aspects, embodiments or features around a system including multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.

[0066] In addition, in the embodiments of the present application, words such as "exemplary" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.

[0067] In the embodiments of the present application, "corresponding (corresponding, relevant)" and "corresponding (corresponding)" can sometimes be used interchangeably. It should be pointed out that when the distinction between them is not emphasized, the meanings they intend to express are consistent.

[0068] The business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0069] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0070] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0071] Compilation is the process of using a compiler to convert a source program written in a source language into a target program written in a target language. These target programs (or instructions) are packaged in a format that is an executable target program and stored in the form of a binary disk file. The target program is also called an executable target file.

[0072] As an example, the source language can be understood as a high-level language that people are familiar with, such as C / C++ language, and the target language can be understood as a low-level language that can be recognized and run by a computer, such as 0 and 1 binary language.

[0073] The above compilation process is usually divided into the following steps:

[0074] 1. Pre-processing: Processing preprocessor instructions in the source code, such as #include, #define, etc.

[0075] 2. Compilation: The preprocessed source code is converted into assembly language after a series of lexical analysis, syntax analysis, semantic analysis and optimization.

[0076] 3. Assembly: Convert assembly language into target machine code (machine language).

[0077] 4. Linking: Link the libraries and modules required by the program to form a complete executable target file (or executable file), which is loaded into the memory and executed by the system.

[0078] Therefore, the main goal of the compilation process is to optimize the performance of the code and reduce the running time, while also ensuring that the generated program has correct semantics and behavior. Specifically, the above compilation process can be performed by a compiler, which receives the source code as input and converts it into an executable object file or a low-level language that the computer can recognize and run.

[0079] There are many types of compilers, and the design and implementation of the compiler may vary depending on the language and platform. For example, the compiler may include the GNU compiler collection (GCC), Microsoft Visual C++ compiler (MSVC), etc.

[0080] GCC is a compiler suite developed by the GNU project that supports a variety of programming languages, including C, C++, Objective-C, Fortran, Ada, etc. GCC is the default compiler for many operating systems, such as Linux, and is also part of many embedded system development tool chains.

[0081] MSVC is a C++ compiler developed by Microsoft. MSVC is usually used with the Visual Studio development environment and supports multiple programming paradigms, including procedural, object-oriented, and generic programming. It also provides a wealth of development tools and libraries, including debuggers, code editors, performance analyzers, and memory managers. The MSVC compiler supports multiple operating systems, including Windows, Linux, and macOS.

[0082] It should be understood that the compile command executed on GCC may also be referred to as a GCC compile command, and the compile command executed on MSVC may also be referred to as an MSVC compile command.

[0083] At present, accelerating the compilation process to reduce the running time occupied by the compilation process has become an important research field. In a related compilation acceleration technology, multiple compilation commands are obtained and distributed to multiple remote distributed execution machines for execution. In this way, the compilation process is accelerated by utilizing the computing power of multiple remote distributed execution machines. In this acceleration technology, although multiple distributed execution machines can be used to execute multiple compilation commands respectively to accelerate the compilation process in a distributed manner, distributed acceleration can only be performed at the compilation command level.

[0084] An embodiment of the present application provides a compilation method, which can accelerate the compilation process, thereby improving the compilation efficiency and reducing the running time occupied by the compilation process.

[0085] In one possible implementation, the method provided in the embodiment of the present application can be applied to a cloud scenario as a product related to compilation acceleration in a cloud scenario, and sold to users in the form of a cloud service (cloud service of a compilation acceleration package).

[0086] For the convenience of description, the following Figure 1 , describe the cloud scenario in detail.

[0087] Figure 1 is a schematic block diagram of a cloud scenario applicable to an embodiment of the present application. Figure 1 As shown, the cloud scenario may include: a cloud management platform 110 , the Internet 120 , and a client 130 .

[0088] like Figure 1 As shown, the cloud management platform 110 is used to manage the infrastructure that provides multiple cloud services. The infrastructure includes multiple cloud data centers, each of which includes multiple servers, each of which includes cloud service resources to provide corresponding cloud services for tenants.

[0089] The cloud management platform 110 may be located in a cloud data center, which may provide an access interface (such as an interface or an application program interface (API)). The tenant may operate the client 130 to remotely access the access interface to register a cloud account and password on the cloud management platform 110, and log in to the cloud management platform 110. After the cloud management platform 110 successfully authenticates the cloud account and password, the tenant may further pay to select and purchase a virtual machine of specific specifications (processor, memory, disk) on the cloud management platform 110. After the paid purchase is successful, the cloud management platform 110 provides the remote login account and password of the purchased virtual machine, and the client 130 may remotely log in to the virtual machine, install and run the tenant's application in the virtual machine. Therefore, the tenant may create, manage, log in and operate a virtual machine in the cloud data center through the cloud management platform 110. Among them, the virtual machine may also be called a cloud server (elastic compute service, ECS) or an elastic instance (different cloud service providers have different names).

[0090] In an embodiment of the present application, the tenant can also pay to purchase a compilation acceleration package on the cloud management platform 110. After the payment is successful, the cloud management platform 110 selects servers of corresponding specifications and quantity in the cloud data center according to the acceleration package purchased by the user, and installs a compilation acceleration tool (also referred to as compilation acceleration software, or compilation program) on the server, so that the compilation acceleration tools on these servers can execute the method provided in the embodiment of the present application, thereby accelerating the compilation process, improving compilation efficiency, and reducing the running time occupied by the compilation process.

[0091] It should be understood that the cloud management platform 110 can provide different types of acceleration packages for tenants to choose and purchase, and the different types of acceleration packages correspond to different charging standards, which also means that the acceleration levels that can be provided are different. That is, different types of acceleration packages correspond to different numbers of servers that install the compilation acceleration tool.

[0092] It should be understood that tenants of cloud services can be individuals, enterprises, schools, hospitals, administrative agencies, etc.

[0093] The functions of the cloud management platform 110 include, but are not limited to, user console, computing management service, network management service, storage management service, authentication service, and image management service. The user console provides an interface or API to interact with tenants, the computing management service is used to manage servers running virtual machines and containers and bare metal servers, the network management service is used to manage network services (such as gateways, firewalls, etc.), the storage management service is used to manage storage services (such as data bucket services), the authentication service is used to manage tenant accounts and passwords, and the image management service is used to manage virtual machine images. Tenants can use the client 130 to log in to the cloud management platform 110 through the Internet 120 to manage the rented cloud services.

[0094] Figure 2 is a schematic flow chart of a compilation method provided in an embodiment of the present application. Figure 2 As shown, the method may include steps 210-240, and steps 210-240 are described in detail below.

[0095] Step 210: Obtain M compile commands.

[0096] In the embodiment of the present application, M compile commands can be obtained or intercepted. Each compile command is used to convert the source code corresponding to each other into the target code corresponding to the source code. The source code corresponding to each compile command can be the same or different, and the present application does not make specific restrictions on this.

[0097] The present application does not specifically limit the types of the M compilation commands. For example, they may be GCC compilation commands, or they may also be MSVC compilation commands.

[0098] Specifically, the trigger machine (corresponding to the first server mentioned above) can dynamically obtain M compilation commands when executing the compilation task. As an example, the trigger machine can be a physical machine (or server) installed with a window operating system, and a compilation acceleration tool (also called compilation acceleration software, or compilation program) is installed on the window operating system, and the compilation acceleration tool is used to dynamically obtain M compilation commands when the window operating system executes the compilation task.

[0099] For example, Figure 1 Taking the cloud scenario shown as an example, the trigger machine can be a cloud server in a cloud data center. After the tenant purchases the compilation acceleration package, the cloud management platform 110 can install a compilation acceleration tool on the cloud server, and the compilation acceleration tool can dynamically obtain M compilation commands when the cloud server executes the tenant's compilation task.

[0100] It should be understood that the above-mentioned compilation task may be, for example, a construction process of executing an application, that is, converting a source program code of an application into an executable file of the application.

[0101] Step 220: Automatically identify a first compilation command set from the M compilation commands, where the first compilation command set includes N compilation commands that depend on the same source file.

[0102] In an embodiment of the present application, after obtaining M compilation commands, N compilation commands that depend on the same source file can be automatically identified from the M compilation commands. The N compilation commands have the same compilation dependencies, or it can be said that the source files that these N compilation commands depend on are the same.

[0103] Specifically, after acquiring M compile commands, the trigger machine identifies N compile commands with the same compile dependency among the M compile commands, and forms the first compile command set with the N compile commands.

[0104] The N compilation commands have the same compilation dependency, which means that the N compilation commands need to meet at least one of the following compilation conditions:

[0105] 1. The types of compilers that execute the N compilation commands are the same.

[0106] That is, the types of the N compile commands are the same. For example, the types of the N compile commands are all GCC compile commands or MSVC compile commands.

[0107] 2. The source code files that the N compilation commands depend on need to be the same.

[0108] For example, information such as file content and file path of the source code files that the N compilation commands depend on needs to be the same.

[0109] 3. The source data files that the N compilation commands depend on need to be the same.

[0110] 4. The compilation directory and environment variables that the N compilation commands depend on need to be the same.

[0111] 5. The precompiled header files that the N compilation commands depend on need to be the same.

[0112] For example, the precompiled header (PCH) files that the N compilation commands depend on need to be the same.

[0113] It should be understood that PCH files are a compiler processing technology that can greatly speed up compilation. The compiler pre-compiles some commonly used header files and macros into binary code to generate a precompiled header file. When compiling other files, directly use this precompiled header file to avoid repeatedly compiling these commonly used header files and macros.

[0114] 6. The N compilation commands have obvious combination characteristics.

[0115] For example, the N compilation products corresponding to the N compilation commands are named as follows: xxx_1.o, xxx_2.o...xxx_N.o.

[0116] It should be understood that the compilation product can be understood as the target program obtained after compilation.

[0117] Step 230: Combine K compile commands in the first compile command set into a first compile command.

[0118] In the embodiment of the present application, after the first compilation command set is determined, the compilation commands included in the first compilation command set may be combined. Specifically, K compilation commands in the first compilation command set may be combined into one compilation command, such as the first compilation command.

[0119] In the embodiment of the present application, M is greater than or equal to N, N is greater than or equal to K, and M, N, and K are all positive integers greater than or equal to 2.

[0120] That is to say, all the compilation commands included in the first compilation command set can be combined into one compilation command (for example, the first compilation command), or some of the compilation commands included in the first compilation command set can be combined into one compilation command (for example, the first compilation command), which is not specifically limited in the embodiments of the present application.

[0121] It should be noted that after the above K compile commands are combined into the first compile command, the original compile structure and link results of the K compile commands cannot be affected.

[0122] The following describes a specific example of how to combine a group of compile commands into one compile command.

[0123] For example, a similar set of compilation commands are as follows:

[0124] \third_party\llvm\bin\clang-cl.exe / c-DBUILD_DEMO demo1.c-Igxn-I / buildtools / demoInclude / FX / WS-Xclang-add-plugin-Xclang / Fodemo1.obj / Fd"demo.pdb"

[0125] \third_party\llvm\bin\clang-cl.exe / c-DBUILD_DEMO demo2.c-Igxn-I / buildtools / demoInclude / FX / WS-Xclang-add-plugin-Xclang / Fodemo2.obj / Fd"demo.pdb"

[0126] \third_party\llvm\bin\clang-cl.exe / c-DBUILD_DEMO demo3.c-Igxn-I / buildtools / demoInclude / FX / WS-Xclang-add-plugin-Xclang / Fodemo3.obj / Fd"demo.pdb"

[0127] \third_party\llvm\bin\clang-cl.exe / c-DBUILD_DEMO demoN.c-Igxn-I / buildtools / demoInclude / FX / WS-Xclang-add-plugin-Xclang / FodemoN.obj / Fd"demo.pdb"

[0128] The following is an example of the combined compilation command:

[0129] \third_party\llvm\bin\clang-cl.exe / c-DBUILD_DEMO demo.c-Igen-I / buildtools / demoInclude / FX / WS-Xclang-add-plugin-Xclang / Fodemo.obj / Fd"demo.pdb"

[0130] Step 240: Distribute the first compilation command to a first execution machine, and the first execution machine executes the first compilation command to obtain a first compilation product.

[0131] Specifically, after the trigger machine combines the K compile commands to obtain the first compile command, the trigger machine may distribute the first compile command to the first execution machine (corresponding to the first compile server mentioned above).

[0132] It should be understood that the first execution machine is one of the multiple distributed execution machines. As an example, the first execution machine can be a physical machine (or server) with a window operating system installed, and a compilation acceleration tool (also called compilation acceleration software, or compilation program) is installed on the window operating system, and the compilation acceleration tool is used to execute the first compilation command to obtain the first compilation product (also called the first compilation result).

[0133] As an example, the first compilation product may be understood as a first target code corresponding to a first source code, wherein the first source code is a source code corresponding to the first compilation command.

[0134] In some embodiments, the trigger machine may also send the source files that the K compile commands depend on to the first execution machine: the source files include at least one of the following: source code files, source data files, compilation directories and / or environment variables, and precompiled header files that the K compile commands depend on. Since the source files that the K compile commands depend on are the same, the source files that the K compile commands depend on can also be understood as the source files that the first compile command depends on.

[0135] For example, Figure 1 Taking the cloud scenario shown as an example, the above-mentioned multiple distributed execution machines (corresponding to the multiple compilation servers mentioned above) can be multiple cloud servers in a cloud data center. After the tenant purchases the compilation acceleration package, the cloud management platform 110 selects a corresponding number of cloud servers from the cloud data center according to the type of acceleration package purchased by the user, and installs the compilation acceleration tool in each of the selected cloud servers. The above-mentioned first execution machine is a cloud server among the multiple cloud servers that receives the first compilation command, and the compilation acceleration tool installed on the cloud server is used to execute the first compilation command to obtain a first compilation product (for example, a first target code).

[0136] It should be noted that each compilation command corresponds to a compilation product, and the first compilation product can be understood as a target product of a combination of K compilation products corresponding to K compilation commands. In some embodiments, the target product can also be called a compilation target.

[0137] Optionally, in some embodiments, after obtaining the first compilation command, the trigger machine may also send the first compilation command to the scheduling management machine, and the scheduling management machine selects a first execution machine for receiving the first compilation command from multiple distributed execution machines, and sends the first compilation command to the first execution machine.

[0138] It should be understood that the above-mentioned scheduling management machine can be a physical machine (or server) installed with a Linux operating system, and the scheduling management machine is used to schedule execution machines for receiving and executing compilation commands (compilation commands obtained by trigger machine combination) from multiple distributed execution machines.

[0139] For example, Figure 3 As shown, the compilation command group A includes compilation command 1 and compilation command 2, and compilation command 1 and compilation command 2 are combined into compilation command A. The scheduling management machine selects distributed execution machine 1 from multiple distributed execution machines, and sends compilation command A to distributed execution machine 1. The compilation acceleration tool installed on the distributed execution machine 1 executes compilation command A to obtain compilation product A.

[0140] For example, Figure 3 As shown, the compilation command group B includes compilation command 3, compilation command 4, compilation command 5 and compilation command 6. Compilation command 3, compilation command 4, compilation command 5 and compilation command 6 are combined into compilation command B. The scheduling management machine selects distributed execution machine 2 from multiple distributed execution machines, and sends compilation command B to distributed execution machine 2. The compilation acceleration tool installed on the distributed execution machine 2 executes compilation command B to obtain compilation product B.

[0141] In the above technical solution, a compilation command is obtained by combining multiple compilation commands with the same compilation dependency, and the compilation command after the combination is executed by an execution machine in the distributed execution machine, thereby improving the compilation efficiency. In addition, since the compilation source files on which the K compilation commands before the combination depend are the same, when sending the first compilation command obtained by combining the K compilation commands to the first execution machine, only one compilation source file (including but not limited to source code files, source data files, compilation directories and / or environment variables, precompiled header files, etc.) needs to be sent, and there is no need to send the same number of compilation source files as the number of K compilation commands, thereby further improving the compilation efficiency and reducing the running time occupied by the compilation process.

[0142] The following takes the compilation process of building a browser as an example, combined with Figure 4 A specific process of the method provided in the embodiment of the present application is described in detail. It should be understood that Figure 4 The examples are only intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to Figure 4 The specific numerical values ​​or specific scenarios shown in the examples. Figure 4 The examples given below are obviously susceptible to various equivalent modifications or changes, and such modifications and changes also fall within the scope of the embodiments of the present application.

[0143] Figure 4 FIG. 1 is a schematic flow chart of another compilation method provided in an embodiment of the present application. Figure 4 As shown, the method may include steps 410-450, and steps 440-450 are described in detail below.

[0144] Step 410: Install the compilation acceleration software on a 32U64G physical machine (trigger machine).

[0145] In the embodiment of the present application, the above-mentioned 32U64G physical machine can also be called a trigger machine, on which the Windows 10 operating system is installed.

[0146] Step 420: Build 8 compilation acceleration execution machines.

[0147] In the embodiment of the present application, 8 16U32G Windows 10 machines can be selected as distributed execution machines, and the compilation acceleration software can be installed on the 8 16U32G machines respectively, so as to obtain 8 compilation acceleration execution machines.

[0148] It should be understood that the eight compilation acceleration execution machines may correspond to the multiple distributed execution machines mentioned above.

[0149] Step 430: Install the compilation acceleration software on a Linux machine.

[0150] In the embodiment of the present application, the Linux machine may correspond to the scheduling management machine mentioned above.

[0151] Step 440: The trigger machine combines multiple compilation commands for building the browser, and distributes the combined compilation commands to 8 compilation acceleration execution machines through Linux machines.

[0152] For details on how to combine multiple compilation commands, please refer to Figure 2 The description in will not be repeated here.

[0153] Step 450: The eight compilation acceleration execution machines respectively execute the combined compilation commands to finally obtain an executable browser file.

[0154] In the embodiment of the present application, the compilation command obtained by combining is executed by 8 compilation acceleration execution machines respectively, and the compilation time required to obtain the executable browser file is about 40 minutes. However, if the browser is built on the window 10 operating system of the trigger machine, the compilation time required to obtain the executable browser file is about 130 minutes. It can be seen that the compilation process can be significantly accelerated by the above 8 compilation acceleration execution machines, thereby improving the efficiency of compilation and reducing the running time occupied by the compilation process.

[0155] Figure 5 FIG. 1 is a schematic flow chart of another compilation method provided by an embodiment of the present application. Figure 5 As shown, the method may include steps 510-530, and steps 510-530 are described in detail below.

[0156] Step 510: Obtain M compile commands.

[0157] Step 510 corresponds to step 210. Please refer to the description in step 210 for details, which will not be repeated here.

[0158] It should be noted that the execution of the M (M is a positive integer greater than or equal to 2) compilation commands obtained in step 510 has dependencies, that is, the M compilation commands need to be executed serially, and the execution of one compilation command needs to depend on the compilation result of another compilation command.

[0159] As an example, assume that the M compilation commands include a third compilation command and a fourth compilation command, and the execution of the fourth compilation command depends on the third target code obtained by executing the third compilation command, the third target code is the target code corresponding to the third source code, and the third source code is the source code corresponding to the third compilation command.

[0160] Step 520: Decompose each compile command into multiple compile sub-commands.

[0161] In the embodiment of the present application, the compile command may be split, that is, the compile command may be split into multiple sub-compile commands.

[0162] For example, Figure 6 As shown, assuming that the M compilation commands obtained include compilation command 7 and compilation command 8, the execution of compilation command 8 needs to depend on the execution result of compilation command 7. In this embodiment of the application, compilation command 7 is split into compilation sub-commands 7 1 ~ Compile subcommand 7 Q , split compile command 8 into compile subcommand 8 1 -Compile subcommand 8 R .

[0163] It should be understood that compile command 7 may correspond to the third compile command mentioned above, compile command 8 may correspond to the fourth compile command mentioned above, and compile subcommand 7 may correspond to the third compile command mentioned above. 1 ~ Compile subcommand 7 Q Corresponding to the third compilation subcommands in the above text, the compilation subcommand 8 1 -Compile subcommand 8 R Corresponding to the multiple fourth compilation sub-commands in the above text.

[0164] Specifically, the compilation command may be split by a trigger machine. For a description of the trigger machine, please refer to the above description, which will not be repeated here.

[0165] Step 530: Send the multiple compilation sub-commands obtained by disassembly to multiple distributed execution machines respectively, and the multiple distributed execution machines respectively execute the multiple compilation sub-commands.

[0166] Specifically, after the trigger machine disassembles and obtains a plurality of compilation sub-commands, the plurality of compilation sub-commands may be sent to a plurality of distributed execution machines respectively, and the plurality of distributed execution machines respectively execute the plurality of compilation sub-commands.

[0167] As an example, the multiple third compile sub-commands may be sent to multiple distributed execution machines respectively, and the multiple distributed execution machines respectively execute the third compile sub-commands received respectively to obtain the third target code.

[0168] As an example, the third target code and the multiple fourth compilation sub-commands can also be sent to multiple distributed execution machines respectively, and the multiple distributed execution machines respectively execute the fourth compilation sub-commands and the third target code they have received to obtain a fourth target code corresponding to a fourth source code, and the fourth source code is the source code corresponding to the fourth compilation command.

[0169] Optionally, in some embodiments, after the trigger machine disassembles the multiple compilation sub-commands to obtain the multiple compilation sub-commands, it can also send the multiple compilation sub-commands to the scheduling management machine, and the scheduling management machine sends the multiple compilation sub-commands to multiple distributed execution machines respectively.

[0170] For example, Figure 6 As shown, the scheduling management machine can compile subcommand 7 1 ~ Compile subcommand 7 Q The dispatching management machine receives the compilation subcommand 7 from the distributed execution machine 1 to the distributed execution machine Q. 1 ~ Compile subcommand 7 Q After the compilation product, compile subcommand 7 1~ Compile subcommand 7 Q The compilation products and compilation subcommands 8 1 -Compile subcommand 8 R The commands are sent to distributed execution machines 1 to R respectively, and distributed execution machines 1 to R respectively execute the compilation sub-commands they receive.

[0171] It should be understood that the above-mentioned compilation product refers to the target code corresponding to the source code obtained after executing the compilation command or the compilation sub-command.

[0172] In an embodiment of the present application, for multiple compilation commands that are executed serially, each compilation command is split into multiple compilation sub-commands, and distributed accelerated execution is performed by multiple execution machines. In this way, the compilation efficiency of each compilation command is improved, thereby improving the compilation efficiency of multiple compilation commands that need to be executed serially as a whole.

[0173] Combination of the above Figures 1 to 6 , describes in detail the method provided by the embodiment of the present application, and will be combined with Figure 7-10 , describes in detail the embodiment of the device of the present application. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so the parts not described in detail can refer to the previous method embodiment.

[0174] Figure 7 700 is a schematic block diagram of a compilation system 700 provided in an embodiment of the present application. The system 700 can be implemented by software, hardware, or a combination of both. The system 700 provided in an embodiment of the present application can implement the embodiment of the present application. Figure 2 or Figure 4 or Figure 5 As shown in the method flow, the system 700 includes: a first server 710 and a plurality of distributed compilation servers 720 .

[0175] In a possible implementation, the multiple distributed compile servers 720 include a first compile server, the first server 710 is used to obtain M compile commands, each of which is used to convert a source code corresponding to the source code into a target code corresponding to the source code; the first server 710 is also used to identify a first compile command set from the M compile commands, the first compile command set includes N compile commands, and the source files that the N compile commands depend on are the same; the first server 710 is also used to combine K compile commands in the first compile command set to obtain a first compile command, wherein M is greater than or equal to N, N is greater than or equal to K, M, N, and K are all positive integers greater than or equal to 2, and the source code corresponding to the first compile command is a first source code; the first server 710 is also used to send the first compile command to the first compile server; the first compile server is used to receive and execute the first compile command to obtain a first target code corresponding to the first source code, and the first compile server is one of the multiple distributed compile servers.

[0176] Optionally, the multiple distributed compilation servers 720 also include a second compilation server, and the first server 710 is further used to identify a second compilation command set from the M compilation commands, the second compilation command set includes L compilation commands, the L compilation commands depend on the same source files, and the second compilation command set is different from the first compilation command set; the first server 710 is further used to combine P compilation commands in the second compilation command set to obtain a second compilation command, wherein M is greater than or equal to L, L is greater than or equal to P, L and P are both positive integers greater than or equal to 2, and the source code corresponding to the second compilation command is a second source code; the first server 710 is further used to send the second compilation command to a second compilation server; the second compilation server is used to receive and execute the second compilation command to obtain a second target code corresponding to the second source code, and the second compilation server is another compilation server among the multiple distributed compilation servers.

[0177] Optionally, the N compilation commands satisfy at least one of the following:

[0178] N compilation commands are of the same type;

[0179] N compilation commands depend on the same source code files;

[0180] The source data files that N compilation commands depend on are the same;

[0181] N compilation commands rely on the same compilation directory and / or environment variables;

[0182] N compilation commands depend on the same precompiled header file.

[0183] Optionally, the first server 710 is further used to send source files that the K compilation commands depend on to the first compilation server, where the source files include at least one of the following: source code files, source data files, compilation directories and / or environment variables, and precompiled header files.

[0184] Optionally, the system 700 is applied to a cloud scenario, which includes a cloud management platform and an infrastructure for providing cloud services managed by the cloud management platform, the infrastructure including at least one cloud data center, each of which is provided with at least one server, and the at least one server includes the first server 710 and the multiple distributed compilation servers 720.

[0185] Optionally, the cloud service includes a compilation acceleration service, and the cloud management platform is used to provide a purchase interface for the compilation acceleration service, and the purchase interface is used to provide different types of compilation acceleration services to tenants; the cloud management platform is also used to select the first server 710 and the multiple distributed compilation servers 720 from the at least one server for use by the tenant according to the type of compilation acceleration service purchased by the tenant, and install compilation programs on the multiple distributed compilation servers 720 respectively, and the compilation program is used to execute compilation commands, and the compilation commands include the first compilation command and / or the second compilation command.

[0186] Optionally, the cloud management platform is also used to obtain a compilation task created by the tenant on the first server 710, and the compilation task includes the M compilation commands; the cloud management platform is also used to send a first instruction to the first server 710, and the first instruction is used to instruct the first server 710 to obtain the M compilation commands, identify the first compilation command set from the M compilation commands, and combine the K compilation commands in the first compilation command set to obtain the first compilation command.

[0187] In another possible implementation, the first server 710 is used to obtain M compilation commands, each of which is used to convert a corresponding source code into a target code corresponding to the source code, wherein M is a positive integer greater than or equal to 2, and the M compilation commands include a third compilation command and a fourth compilation command, and execution of the fourth compilation command depends on a third target code obtained by executing the third compilation command, the third target code is a target code corresponding to the third source code, and the third source code is a source code corresponding to the third compilation command; the first server 710 is further used to split the third compilation command into multiple third compilation sub-commands; the first server 710 is further used to send the multiple third compilation sub-commands to multiple distributed compilation servers respectively; and the multiple distributed compilation servers 720 are respectively used to obtain and execute the third compilation sub-commands received by each of them. command; the first server 710 is further used to obtain the third target code obtained by the multiple distributed compile servers 720 respectively executing the third compile sub-commands received by each of them; the first server 710 is further used to split the fourth compile command into multiple fourth compile sub-commands; the first server 710 is further used to send the third target code and the multiple fourth compile sub-commands to the multiple distributed compile servers respectively; the multiple distributed compile servers 720 are further used to obtain and execute the third target code and the fourth compile sub-commands received by each of them; the first server 710 is further used to obtain the fourth target code corresponding to the fourth source code obtained by the multiple distributed compile servers 720 respectively executing the fourth compile sub-commands received by each of them and the third target code, and the fourth source code is the source code corresponding to the fourth compile command.

[0188] The first server 710 and the plurality of distributed compiling servers 720 here may be embodied in the form of functional modules. The term "module" here may be implemented in the form of software and / or hardware, and is not specifically limited thereto.

[0189] For example, a "module" can be a software program, a hardware circuit, or a combination of the two that implements the above functions. Exemplarily, the implementation of the first server 710 is described below by taking the first server 710 as an example. Similarly, the implementation of multiple distributed compilation servers 720 can refer to the implementation of the first server 710.

[0190] The first server 710 is taken as an example of a software functional unit, and the first server 710 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the first server 710 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.

[0191] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0192] The first server 710 is taken as an example of a hardware functional unit. The first server 710 may also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0193] Therefore, the modules of each example described in the embodiments of the present application can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0194] In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation processes are detailed in the method embodiments above, which will not be repeated here.

[0195] The method provided in the embodiment of the present application can be performed by a server, which can also be referred to as a computing device or a computer system. It includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a processing unit, a memory and a memory control unit, and then the function and structure of the hardware are described in detail. The operating system is any one or more computer operating systems that implement business processing through a process, for example, a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system or a windows operating system. The application layer includes applications such as a browser, an address book, a word processing software, and an instant messaging software.

[0196] Furthermore, optionally, the computer system is a handheld device such as a smart phone, or a terminal device such as a personal computer, which is not particularly limited in this application, as long as the method provided by the embodiment of this application can be implemented. The execution subject of the method provided by the embodiment of this application can be a computing device, or a functional module in the computing device that can call and execute a program.

[0197] Combine the following Figure 8 , a server provided in an embodiment of the present application is described in detail. The server may be the first server mentioned above, or may also be the distributed encoding server mentioned above.

[0198] Figure 8 1 is a schematic diagram of the architecture of a server 1500 provided in an embodiment of the present application. The server 1500 may be a computer or other device with computing capabilities. Figure 8 The server 1500 shown includes at least one processor 1510 and a memory 1520 .

[0199] It should be understood that the present application does not limit the number of processors and memories in the server 1500 .

[0200] The processor 1510 executes the instructions in the memory 1520, so that the server 1500 implements the method provided by the present application. Alternatively, the processor 1510 executes the instructions in the memory 1520, so that the server 1500 implements the various functional modules provided by the present application, thereby implementing the method provided by the present application.

[0201] Optionally, the server 1500 further includes a communication interface 1530. The communication interface 1530 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the server 1500 and other devices or a communication network.

[0202] Optionally, the server 1500 further includes a system bus 1540, wherein the processor 1510, the memory 1520 and the communication interface 1530 are respectively connected to the system bus 1540. The processor 1510 can access the memory 1520 through the system bus 1540. For example, the processor 1510 can read and write data or execute code in the memory 1520 through the system bus 1540. The system bus 1540 is a peripheral component interconnect express (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus 1540 is divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0203] In a possible implementation, the function of the processor 1510 is mainly to interpret the instructions (or codes) of the computer program and process the data in the computer software. The instructions of the computer program and the data in the computer software can be stored in the memory 1520 or the cache 1516.

[0204] Optionally, the processor 1510 may be an integrated circuit chip with signal processing capabilities. As an example and not a limitation, the processor 1510 is a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Among them, the general-purpose processor is a microprocessor, etc. For example, the processor 1510 is a central processing unit (CPU).

[0205] Optionally, each processor 1510 includes at least one processing unit 1512 and a memory control unit 1514 .

[0206] Optionally, the processing unit 1512 is also called a core or kernel, which is the most important component of the processor. The processing unit 1512 is manufactured from single crystal silicon using a certain production process, and all calculations, command reception, command storage, and data processing of the processor are performed by the core. The processing units run program instructions independently and use the ability of parallel computing to speed up the running speed of the program. Various processing units have a fixed logical structure. For example, the processing unit includes logical units such as a first-level cache, a second-level cache, an execution unit, an instruction-level unit, and a bus interface.

[0207] In one implementation example, the memory control unit 1514 is used to control data interaction between the memory 1520 and the processing unit 1512. Specifically, the memory control unit 1514 receives a memory access request from the processing unit 1512, and controls access to the memory based on the memory access request. As an example and not a limitation, the memory control unit is a device such as a memory management unit (MMU).

[0208] In one implementation example, each memory control unit 1514 addresses the memory 1520 through the system bus. And an arbiter ( Figure 8 ), which is responsible for handling and coordinating competing accesses of multiple processing units 1512.

[0209] In an implementation example, the processing unit 1512 and the memory control unit 1514 are connected to each other through connection lines inside the chip, such as address lines, so as to achieve communication between the processing unit 1512 and the memory control unit 1514.

[0210] Optionally, each processor 1510 also includes a cache 1516, wherein the cache is a buffer for data exchange (called cache). When the processing unit 1512 wants to read data, it will first search for the required data from the cache. If it is found, it will be executed directly. If it is not found, it will be searched from the memory. Since the running speed of the cache is much faster than the memory, the role of the cache is to help the processing unit 1512 run faster.

[0211] The memory 1520 can provide a running space for the process in the server 1500. For example, the computer program (specifically, the program code) used to generate the process is stored in the memory 1520. After the computer program is executed by the processor to generate the process, the processor allocates a corresponding storage space for the process in the memory 1520. Furthermore, the above storage space further includes a text segment, an initialized data segment, a bit initialized data segment, a stack segment, a heap segment, etc. The memory 1520 stores the data generated during the operation of the process in the storage space corresponding to the above process, such as intermediate data, process data, etc.

[0212] Optionally, the storage is also called memory, and its function is to temporarily store the operation data in the processor 1510 and the data exchanged with the external storage such as the hard disk. As long as the computer is running, the processor 1510 will transfer the data to be calculated to the memory for calculation, and when the calculation is completed, the processing unit 1512 will transmit the result.

[0213] As an example and not limitation, memory 1520 is a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory is a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory is a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DRRAM). It should be noted that the memory 1520 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0214] The structure of the server 1500 listed above is only an example, and the present application is not limited thereto. The server 1500 of the embodiment of the present application includes various hardware in the computer system in the prior art. For example, the server 1500 also includes other memories besides the memory 1520, such as disk storage, etc. Those skilled in the art should understand that the server 1500 may also include other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the above-mentioned server 1500 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the above-mentioned server 1500 may also include only the devices necessary to implement the embodiment of the present application, and does not necessarily include Figure 8 All devices shown in .

[0215] The embodiment of the present application also provides a server cluster. The server cluster includes at least one server. The server can be a computing device. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0216] like Fig. 9 As shown, the server cluster includes at least one server 1500. The memory 1520 in one or more servers 1500 in the server cluster may store the same instructions for executing the above method.

[0217] In some possible implementations, the memory 1520 in one or more servers 1500 in the server cluster may also store partial instructions for executing the above method. In other words, the combination of one or more servers 1500 may jointly execute the instructions of the above method.

[0218] In some possible implementations, one or more servers in the server cluster may be connected via a network, which may be a wide area network or a local area network. Fig.10 A possible implementation is shown. Fig.10 As shown, two servers 1500A and 1500B are connected via a network. Specifically, they are connected to the network via a communication interface in each server.

[0219] It should be understood that Fig.10 The functions of the server 1500A shown in FIG. 1 may also be completed by a plurality of servers 1500. Similarly, the functions of the server 1500B may also be completed by a plurality of servers 1500.

[0220] In this embodiment, a computer program product including instructions is also provided, and the computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on a computing device, the computing device is caused to execute the method provided above, or the computing device is caused to implement the function of the apparatus provided above.

[0221] In this embodiment, a computer-readable storage medium is also provided. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions. When the instructions in the computer-readable storage medium are executed on a computing device, the computing device executes the method provided above.

[0222] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0223] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0224] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0225] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0226] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0227] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0228] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0229] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A compiling method, characterized in that: The method comprises: The first server obtains M compiling commands, each of which is used to convert a source code corresponding to the source code into a target code corresponding to the source code; The first server identifies a first compilation command set from the M compilation commands, where the first compilation command set includes N compilation commands, and the N compilation commands depend on the same source file; The first server combines K compile commands in the first compile command set to obtain a first compile command, wherein M is greater than or equal to N, N is greater than or equal to K, M, N, and K are all positive integers greater than or equal to 2, and the source code corresponding to the first compile command is a first source code; The first server sends the first compile command to a first compile server, and the first compile server executes the first compile command to obtain a first target code corresponding to the first source code. The first compile server is one of a plurality of distributed compile servers.

2. The method according to claim 1, characterized in that The method further comprises: The first server identifies a second compilation command set from the M compilation commands, the second compilation command set includes L compilation commands, the L compilation commands depend on the same source files, and the second compilation command set is different from the first compilation command set; The first server combines P compile commands in the second compile command set to obtain a second compile command, wherein M is greater than or equal to L, L is greater than or equal to P, L and P are both positive integers greater than or equal to 2, and the source code corresponding to the second compile command is a second source code; The first server sends the second compile command to a second compile server, and the second compile server executes the second compile command to obtain a second target code corresponding to the second source code. The second compile server is another compile server among the multiple distributed compile servers.

3. The method according to claim 1 or 2, characterized in that: The N compilation commands satisfy at least one of the following: The N compile commands are of the same type; The source code files that the N compilation commands depend on are the same; The source data files that the N compilation commands depend on are the same; The N compilation commands depend on the same compilation directory and / or environment variables; The N compilation commands depend on the same precompiled header file.

4. The method according to claim 3, characterized in that The method further comprises: The first server sends the source files on which the K compilation commands depend to the first compilation server, where the source files include at least one of the following: source code files, source data files, compilation directories and / or environment variables, and precompiled header files.

5. The method according to any one of claims 1 to 4, characterized in that The method is applied to a cloud scenario, which includes a cloud management platform and an infrastructure managed by the cloud management platform for providing cloud services, wherein the infrastructure includes at least one cloud data center, each of which is provided with at least one server, and the at least one server includes the first server and the multiple distributed compilation servers.

6. The method according to claim 5, characterized in that The cloud service includes a compilation acceleration service, and the method further includes: The cloud management platform provides a purchase interface for the compilation acceleration service, and the purchase interface is used to provide different types of compilation acceleration services to tenants; The cloud management platform selects the first server and the multiple distributed compilation servers from the at least one server for use by the tenant according to the type of compilation acceleration service purchased by the tenant, and installs compilation programs on the multiple distributed compilation servers respectively, the compilation program being used to execute compilation commands, and the compilation commands include the first compilation command and / or the second compilation command.

7. The method according to claim 6, characterized in that The method further comprises: The cloud management platform obtains a compilation task created by the tenant on the first server, where the compilation task includes the M compilation commands; The cloud management platform sends a first instruction to the first server, where the first instruction is used to instruct the first server to obtain the M compilation commands, identify the first compilation command set from the M compilation commands, and combine K compilation commands in the first compilation command set to obtain the first compilation command.

8. A compiling method, characterized in that: The method comprises: The first server obtains M compile commands, each of which is used to convert a source code corresponding to the source code into a target code corresponding to the source code, wherein M is a positive integer greater than or equal to 2, and the M compile commands include a third compile command and a fourth compile command, the execution of the fourth compile command depends on a third target code obtained by executing the third compile command, the third target code is a target code corresponding to the third source code, and the third source code is a source code corresponding to the third compile command; The first server splits the third compile command into a plurality of third compile sub-commands; The first server sends the plurality of third compile subcommands to a plurality of distributed compile servers respectively, and the plurality of distributed compile servers respectively execute the third compile subcommands received by themselves to obtain the third target code; The first server splits the fourth compile command into a plurality of fourth compile sub-commands; The first server sends the third target code and the plurality of fourth compile subcommands to a plurality of distributed compile servers respectively, and the plurality of distributed compile servers respectively execute the fourth compile subcommands and the third target code received by each of them to obtain a fourth target code corresponding to a fourth source code, where the fourth source code is a source code corresponding to the fourth compile command.

9. The method according to claim 8, characterized in that The method is applied to a cloud scenario, which includes a cloud management platform and an infrastructure managed by the cloud management platform for providing cloud services, wherein the infrastructure includes at least one cloud data center, each of which is provided with at least one server, and the at least one server includes the first server and the multiple distributed compilation servers.

10. The method according to claim 9, characterized in that The cloud service includes a compilation acceleration service, and the method further includes: The cloud management platform provides a purchase interface for the compilation acceleration service, and the purchase interface is used to provide different types of compilation acceleration services to tenants; The cloud management platform selects the first server and the multiple distributed compilation servers from the at least one server for use by the tenant according to the type of compilation acceleration service purchased by the tenant, and installs compilation programs on the multiple distributed compilation servers respectively, the compilation program being used to execute compilation commands, and the compilation commands including the multiple third compilation sub-commands and the multiple fourth compilation sub-commands.

11. The method according to claim 10, characterized in that The method further comprises: The cloud management platform obtains a compilation task created by the tenant on the first server, where the compilation task includes the M compilation commands; The cloud management platform sends a second instruction to the first server, where the second instruction is used to instruct the first server to obtain the M compilation commands, split the third compilation command into multiple third compilation sub-commands and send the commands to the multiple distributed compilation servers for execution to obtain the third target code, and split the fourth compilation command into multiple fourth compilation sub-commands and send the commands together with the third target code to the multiple distributed compilation servers for execution to obtain the fourth target code.

12. A compilation system, characterized in that: The system comprises: A first server is used to obtain M compiling commands, each of which is used to convert a source code corresponding to the source code into a target code corresponding to the source code; The first server is further configured to identify a first compilation command set from the M compilation commands, wherein the first compilation command set includes N compilation commands, and the N compilation commands depend on the same source file; The first server is further configured to combine K compile commands in the first compile command set to obtain a first compile command, wherein M is greater than or equal to N, N is greater than or equal to K, K is a positive integer greater than or equal to 2, and a source code corresponding to the first compile command is a first source code; The first server is further configured to send the first compile command to a first compile server; A first compile server is configured to receive and execute the first compile command to obtain a first target code corresponding to the first source code. The first compile server is one of a plurality of distributed compile servers.

13. The system according to claim 12, characterized in that The system also includes a second compile server, The first server is further configured to identify a second compilation command set from the M compilation commands, where the second compilation command set includes L compilation commands, the L compilation commands depend on the same source files, and the second compilation command set is different from the first compilation command set; The first server is further configured to combine P compile commands in the second compile command set to obtain a second compile command, wherein M is greater than or equal to L, L is greater than or equal to P, L and P are both positive integers greater than or equal to 2, and the source code corresponding to the second compile command is a second source code; The first server is further configured to send the second compile command to a second compile server; The second compile server is used to receive and execute the second compile command to obtain a second target code corresponding to the second source code. The second compile server is another compile server among the multiple distributed compile servers.

14. The system according to claim 12 or 13, characterized in that The N compilation commands satisfy at least one of the following: The N compile commands are of the same type; The source code files that the N compilation commands depend on are the same; The source data files that the N compilation commands depend on are the same; The N compilation commands depend on the same compilation directory and / or environment variables; The N compilation commands depend on the same precompiled header file.

15. The system according to claim 14, characterized in that The first server is further used to send the source files that the K compilation commands depend on to the first compilation server, and the source files include at least one of the following: source code files, source data files, compilation directories and / or environment variables, and precompiled header files.

16. The system according to any one of claims 12 to 15, characterized in that The system is applied to a cloud scenario, which includes a cloud management platform and an infrastructure managed by the cloud management platform for providing cloud services, wherein the infrastructure includes at least one cloud data center, each of which is provided with at least one server, and the at least one server includes the first server and the multiple distributed compilation servers.

17. The system according to claim 16, characterized in that The cloud service includes a compilation acceleration service, The cloud management platform is used to provide a purchase interface for the compilation acceleration service, and the purchase interface is used to provide different types of compilation acceleration services to tenants; The cloud management platform is further used to select the first server and the multiple distributed compilation servers from the at least one server for use by the tenant according to the type of compilation acceleration service purchased by the tenant, and install compilation programs on the multiple distributed compilation servers respectively, the compilation program is used to execute compilation commands, and the compilation commands include the first compilation command and / or the second compilation command.

18. The system according to claim 17, characterized in that The cloud management platform is further used to obtain a compilation task created by the tenant on the first server, wherein the compilation task includes the M compilation commands; The cloud management platform is further used to send a first instruction to the first server, where the first instruction is used to instruct the first server to obtain the M compilation commands, identify the first compilation command set from the M compilation commands, and combine K compilation commands in the first compilation command set to obtain the first compilation command.

19. A compilation system, characterized in that, The system comprises: A first server is configured to obtain M compile commands, each of which is configured to convert a source code corresponding to the source code into a target code corresponding to the source code, wherein M is a positive integer greater than or equal to 2, the M compile commands include a third compile command and a fourth compile command, execution of the fourth compile command depends on a third target code obtained by executing the third compile command, the third target code is a target code corresponding to a third source code, and the third source code is a source code corresponding to the third compile command; The first server is further used to split the third compile command into multiple third compile sub-commands; The first server is further configured to send the plurality of third compile sub-commands to a plurality of distributed compile servers respectively; A plurality of distributed compile servers, respectively used to obtain and execute the third compile sub-commands received by each of them; The first server is further configured to obtain the third target code obtained by the plurality of distributed compile servers respectively executing the third compile subcommands received by the plurality of distributed compile servers; The first server is further configured to split the fourth compile command into a plurality of fourth compile sub-commands; The first server is further configured to send the third target code and the plurality of fourth compile subcommands to a plurality of distributed compile servers respectively; The multiple distributed compile servers are further configured to obtain and execute the third target code and the fourth compile subcommand received by each server; The first server is further configured to obtain a fourth target code corresponding to a fourth source code obtained by the plurality of distributed compile servers respectively executing the fourth compile subcommand and the third target code received by each of the plurality of distributed compile servers, wherein the fourth source code is a source code corresponding to the fourth compile command.

20. The system according to claim 19, characterized in that The system is applied to a cloud scenario, which includes a cloud management platform and an infrastructure managed by the cloud management platform for providing cloud services, wherein the infrastructure includes at least one cloud data center, each of which is provided with at least one server, and the at least one server includes the first server and the multiple distributed compilation servers.

21. The system according to claim 20, characterized in that The cloud service includes a compilation acceleration service, The cloud management platform is used to provide a purchase interface for the compilation acceleration service, and the purchase interface is used to provide different types of compilation acceleration services to tenants; The cloud management platform is further used to select the first server and the multiple distributed compilation servers from the at least one server for use by the tenant according to the type of compilation acceleration service purchased by the tenant, and install compilation programs on the multiple distributed compilation servers respectively, the compilation program is used to execute compilation commands, and the compilation commands include the multiple third compilation sub-commands and the multiple fourth compilation sub-commands.

22. The system according to claim 21, characterized in that The cloud management platform is further used to obtain a compilation task created by the tenant on the first server, wherein the compilation task includes the M compilation commands; The cloud management platform is further used to send a second instruction to the first server, where the second instruction is used to instruct the first server to obtain the M compilation commands, split the third compilation command into multiple third compilation sub-commands and send the third compilation sub-commands to the multiple distributed compilation servers for execution to obtain the third target code, and split the fourth compilation command into multiple fourth compilation sub-commands and send the fourth compilation sub-commands together with the third target code to the multiple distributed compilation servers for execution to obtain the fourth target code.

23. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 11.

24. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 11.

25. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 11.