Method and apparatus for generating executable files

By compiling source code files concurrently on multiple physical devices and using container images to share hardware resource requirements, the problem of long compilation time under the limitation of a single device's hardware resources is solved, and significant time-consuming reduction is achieved.

CN118409763BActive Publication Date: 2024-10-08北京壁仞科技开发有限公司 +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410877110.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-08
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

When compiling source code files, the hardware resources of a single physical device are limited, which causes the compilation to take too long when the file size is large, and the time to generate executable files also increases accordingly.

Method used

By obtaining software development configuration files, deploying container images on multiple physical devices, and using multiple device hardware resources to compile source code files concurrently, ensure that hardware resource requirements are shared in a consistent compilation environment and reduce delays in the compilation and linking process.

Benefits of technology

It effectively reduces the compilation time and shortens the time to generate executable files. Especially when the hardware resource requirements exceed the limit of a single device, an 83.3% reduction is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118409763B_ABST
    Figure CN118409763B_ABST
Patent Text Reader

Abstract

The present application relates to a method and apparatus for generating an executable file. Based on the present application, a target container can be deployed on a local physical device, and a container image can be deployed on at least two selected physical devices as the target container. In the process of generating an executable file, the compilation of the source code file can be executed concurrently based on multi-device hardware resources in a consistent compilation environment by calling the container image deployed on at least two selected physical devices, so as to utilize the hardware resources of multiple devices to meet the hardware resource requirements of the compilation under the premise of ensuring the consistency of the compilation environment, thereby reducing the compilation time of the source code file when the hardware resource requirements of the compilation exceed the hardware resources of a single device, and further, reducing the time consumption of generating the executable file on the basis of reducing the compilation time consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of resource scheduling, and in particular to a method for generating an executable file, an apparatus for generating an executable file, a device cluster, a non-transitory computer-readable storage medium, and a computer program product. Background Art

[0002] An executable file is a form of computer program, and the executable file includes machine language instructions so that computer hardware can implement corresponding functions by executing the machine language instructions. Generally, an executable file can be generated by a single physical device based on a source code file, and the source code file can be written in a high-level language such as C or C++, and in the process of generating an executable file, the source code file needs to be compiled to convert the high-level language of the source code file into machine language.

[0003] In order to ensure the consistency of the compilation environment for all files in the source code file, the process of generating an executable file is undertaken by a single physical device. However, the hardware resources of a single physical device are limited. Therefore, if the number of source code files is too large, resulting in the hardware resource requirements for compilation exceeding the single-device hardware resources that a single physical device can provide, then the compilation of the source code files will take a long time, and accordingly, the generation of the executable file will take a long time. For example, for a source code file with a file size of tens of thousands, the compilation time of a single physical device with 128 CPU cores exceeds 3 hours. On this basis, the time to generate an executable file based on the source code file will be even longer.

[0004] It can be seen that when the hardware resource requirements for compilation exceed the hardware resources of a single device, how to reduce the time consumed in generating an executable file becomes a technical problem to be solved in the prior art. Summary of the invention

[0005] Embodiments of the present application provide a method for generating an executable file, an apparatus for generating an executable file, a device cluster, a non-transitory computer-readable storage medium, and a computer program product, which help reduce the time spent on generating an executable file when the compiled hardware resource requirements exceed the hardware resources of a single device.

[0006] In one embodiment of the present application, a method for generating an executable file is provided, comprising:

[0007] Obtaining a software development configuration file; wherein the software development configuration file includes container configuration information and resource configuration information, the container configuration information is used to indicate the container configuration of the target container deployed on the local physical device, and the resource configuration information is used to indicate multi-device hardware resources provided by at least two selected physical devices selected from the multiple physical devices;

[0008] Deploy at least two container images for the target container using the container configuration information on at least two of the selected physical devices indicated by the resource configuration information;

[0009] Calling at least two of the container images, so that at least two file groups of source code files are compiled concurrently based on the multi-device hardware resources; wherein at least two of the container images enable the same compiler when being called, so that the at least two file groups are compiled concurrently under the same compilation environment;

[0010] In response to the completion of the compilation of at least two of the container images executed concurrently, the target container is called to link at least two compiled files obtained by compiling the at least two file groups concurrently into an executable file.

[0011] In some examples, optionally, the resource configuration information includes the number of devices of the selected physical devices and the single-device hardware resources provided by each of the selected physical devices, the multi-device hardware resources are determined by the number of devices and the single-device hardware resources, and the hardware resources used by any one of the container images when being called are determined by the single-device hardware resources of the selected physical device.

[0012] In some examples, optionally, at least two available compilers are encapsulated in the target container and at least two of the container images, the software development configuration file also includes compilation mode information, the compilation mode information is used to indicate a selected compiler among the at least two available compilers, and the calls to the at least two container images are based on the compilation mode information, so that the at least two container images enable the same selected compiler when they are called.

[0013] In some examples, optionally, the method further includes: determining whether the compilation of the at least two container images executed concurrently is completely completed based on a monitoring result of the progress of the compilation of the at least two container images executed concurrently.

[0014] In some examples, optionally, the software development configuration file also includes file path information, where the file path information is used to indicate a target file path where the source code file is located, and the at least two compiled files obtained by grouping and concurrently compiling the at least two files are both generated at the target file path.

[0015] In some examples, optionally, the calling of at least two of the container images includes: concurrently assigning at least two group compilation tasks to at least two of the selected physical devices; wherein the group compilation task with any one of the selected physical devices as the task assignment object includes: group information of the specified file groups in the at least two file groups that are determined to be compiled by the container image deployed on the task assignment object.

[0016] In some examples, optionally, the resource configuration information includes the number of devices of the selected physical devices and the single-device hardware resources provided by each of the selected physical devices, the multi-device hardware resources are determined by the number of devices and the single-device hardware resources, and the group compilation task with any one of the selected physical devices as the task assignment object includes the single-device hardware resources of the task assignment object to indicate the hardware resources used by the container image deployed on the task assignment object when it is called.

[0017] In some examples, optionally, at least two available compilers are encapsulated in the target container and at least two of the container images, the software development configuration file also includes compilation mode information, the compilation mode information is used to indicate a selected compiler among the at least two available compilers, and the group compilation task with any one of the selected physical devices as the task assignment object includes the compilation mode information to indicate that the container image deployed on the task assignment object enables the selected compiler when it is called.

[0018] In some examples, optionally, at least two of the selected physical devices run a proxy client; the concurrently assigning at least two group compilation tasks to the at least two selected physical devices includes: concurrently sending at least two of the group compilation tasks to the proxy clients of at least two of the selected physical devices; wherein the proxy client is configured to: based on the received group compilation task, execute a call to the container image deployed on one of the selected physical devices.

[0019] In some examples, optionally, the proxy client is further configured to: generate a compilation completion notification in response to the completion of compilation of the called container image; the method further includes: determining whether the compilation of at least two of the container images executed concurrently is all completed based on the monitoring result of the compilation completion notification; wherein, when it is successfully monitored that the proxy clients of at least two of the selected physical devices have all generated the compilation completion notification, it is determined that the compilation of at least two of the container images executed concurrently is all completed.

[0020] In another embodiment of the present application, a device for generating an executable file is provided, comprising:

[0021] A configuration acquisition module, used to acquire a software development configuration file; wherein the software development configuration file includes container configuration information and resource configuration information, the container configuration information is used to indicate the container configuration of the target container deployed on the local physical device, and the resource configuration information is used to indicate multi-device hardware resources provided by at least two selected physical devices selected from the multiple physical devices;

[0022] An image deployment module, configured to deploy at least two container images for the target container using the container configuration information based on the at least two selected physical devices indicated by the resource configuration information;

[0023] An image calling module, used to call at least two of the container images, so that at least two file groups of source code files are compiled concurrently based on the multi-device hardware resources; wherein at least two of the container images enable the same compiler when being called, so that the at least two file groups are compiled concurrently under the same compilation environment;

[0024] The local calling module is used for calling the target container to link at least two compiled files obtained by grouping and concurrently compiling the at least two files into an executable file in response to the compilation of the at least two container images being executed concurrently being completed.

[0025] In some examples, optionally, the resource configuration information includes the number of devices of the selected physical devices and the single-device hardware resources provided by each of the selected physical devices, the multi-device hardware resources are determined by the number of devices and the single-device hardware resources, and the hardware resources used by any one of the container images when being called are determined by the single-device hardware resources of the selected physical device.

[0026] In some examples, optionally, at least two available compilers are encapsulated in the target container and at least two of the container images, the software development configuration file also includes compilation mode information, the compilation mode information is used to indicate a selected compiler among the at least two available compilers, and the calls to the at least two container images are based on the compilation mode information, so that the at least two container images enable the same selected compiler when they are called.

[0027] In some examples, optionally, the local call module is further used to: determine whether the compilation of at least two concurrently executed container images is completely completed based on a monitoring result of the progress of the concurrently executed compilation of at least two container images.

[0028] In some examples, optionally, the software development configuration file also includes file path information, where the file path information is used to indicate a target file path where the source code file is located, and the at least two compiled files obtained by grouping and concurrently compiling the at least two files are both generated at the target file path.

[0029] In some examples, optionally, the image calling module is specifically configured to: concurrently assign at least two group compilation tasks to at least two of the selected physical devices; wherein the group compilation task with any one of the selected physical devices as the task assignment object includes: group information of the specified file groups in the at least two file groups that are determined to be compiled by the container image deployed on the task assignment object.

[0030] In some examples, optionally, at least two of the selected physical devices run a proxy client; the image startup module is specifically configured to: concurrently send at least two of the group compilation tasks to the proxy clients of at least two of the selected physical devices; wherein the proxy client is configured to: based on the received group compilation task, execute a call to the container image deployed on one of the selected physical devices.

[0031] In some examples, optionally, the proxy client is also configured to: generate a compilation completion notification in response to the completion of compilation of the called container image; the local call module is also used to: determine whether the compilation of at least two of the container images executed concurrently is all completed based on the monitoring result of the compilation completion notification; wherein, when it is successfully monitored that the proxy clients of at least two of the selected physical devices have all generated the compilation completion notification, it is determined that the compilation of at least two of the container images executed concurrently is all completed.

[0032] In another embodiment of the present application, a device cluster is provided, including multiple physical devices, wherein any one of the multiple physical devices is configured as a local physical device for executing the method described in the above embodiment.

[0033] In another embodiment of the present application, a non-transitory computer-readable storage medium is provided. The non-transitory computer-readable storage medium stores instructions. When the instructions are executed by a processor, the processor executes the method described in the above embodiment.

[0034] In another embodiment of the present application, a computer program product is provided, including computer executable instructions, which implement the method described in the above embodiment when executed by a processor.

[0035] Based on the above embodiments of the present application, a target container can be deployed on a local physical device, and a container image can be deployed for the target container on at least two selected physical devices other than the local physical device. The target container is used to generate an executable file, and the file generation process of the executable file includes compiling the source code file and linking the compilation result after the compilation, and the container image is used to utilize the multi-device hardware resources provided by at least two selected physical devices to replace the single-device hardware resources occupied by the target container on the local physical device to implement the compilation of the source code file. Thus, in the file generation process of the executable file: the compilation of the source code file can be executed concurrently based on the multi-device hardware resources in a consistent compilation environment by calling the container image deployed on at least two selected physical devices, so as to utilize the multi-device hardware resources to meet the hardware resource requirements of the compilation under the premise of ensuring the consistency of the compilation environment, and no longer be limited to the single-device hardware resources that the local physical device can provide, so as to help reduce the compilation time of the source code file when the hardware resource requirements of the compilation exceed the single-device hardware resources, and then, the time consumption of generating the executable file can be reduced on the basis of reducing the compilation time consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The following drawings are only used to illustrate and explain the present application, and do not limit the scope of the present application:

[0037] Figure 1 This is a schematic diagram of an exemplary structure of a device cluster in an embodiment of the present application;

[0038] Figure 2 A schematic diagram of a distributed software architecture in a device cluster in an embodiment of the present application;

[0039] Figure 3 This is a schematic diagram of an exemplary process of a method for generating an executable file in an embodiment of the present application;

[0040] Figure 4 This is a schematic diagram of an example flow of a method for generating an executable file in an embodiment of the present application;

[0041] Figure 5 This is a schematic diagram of an exemplary structure of an apparatus for generating an executable file in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and examples.

[0043] The embodiment of the present application utilizes container technology to "borrow" multi-device hardware resources to meet the hardware resource requirements for compiling source code files during the file generation process of executable files, so as to avoid the hardware resources that can be used to compile source code files being limited to single-device hardware resources. Thus, when the hardware resource requirements for compilation exceed the hardware resources of a single device, the compilation time of the source code file can be reduced. Moreover, the "borrowing" of multi-device hardware resources by the embodiment of the present application will not affect the coherence between the compilation of the source code file and the linking after the compilation. Thus, the file generation process of the executable file can be avoided from generating additional delays due to the "borrowing" of multi-device hardware resources. Furthermore, the time consumption of generating executable files can be reduced on the basis of reducing the compilation time consumption.

[0044] Container technology can virtualize applications into containers (Docker), and containerized applications virtualized into containers can be deployed on any physical device. In an embodiment of the present application, the containerized application encapsulated in the container may include a compiler (Compiler), and a linker (Linker) for linking the compiled results. Among them, the compiler included in the containerized application may be one or more than one. For example, the compiler encapsulated in the container as a containerized application may include at least one of GCC (GNU Compiler Collection, GNU compiler collection) based on the GNU project, and Clang (C Language Family Frontend for LLVM, front-end compiler for C series languages ​​for LLVM) supporting the LLVM (Low Level Virtual Machine) project. It can be understood that the embodiments of the present application are not intended to make unnecessary restrictions on the type of compiler, and the embodiments of the present application are not intended to limit the type of linker.

[0045] In an embodiment of the present application, a container encapsulating a compiler and a linker may be referred to as a target container, and the target container is used to generate an executable file based on the compilation of a source code file and the linking of the compilation results, that is, the target container may generate an executable file based on the compilation function provided by the compiler and the compilation function provided by the linker.

[0046] In an embodiment of the present application, the physical device on which the target container is deployed can be referred to as a local physical device, and the file storage path of the source code file based on which the executable file is generated can be located in the local physical device on which the target container is deployed. In this case, the multi-device hardware resources "borrowed" by the embodiment of the present application can be provided by at least two other physical devices, and, in order to facilitate "borrowing", the local physical device on which the target container is deployed can be located in a device cluster, and the at least two other physical devices providing the multi-device hardware resources can be any selected at least two physical devices in the device cluster other than the local physical device, and therefore, each of the at least two other physical devices providing the multi-device hardware resources can be referred to as a selected physical device.

[0047] Figure 1 This is an exemplary structural diagram of a device cluster in an embodiment of the present application. Figure 1 In an embodiment of the present application, a device cluster includes multiple physical devices, and the multiple physical devices can communicate with each other through a wireless network or a wired network, and any one of the multiple physical devices can be configured as a server or a computer terminal device. In an embodiment of the present application, one of the multiple physical devices included in the device cluster can be used as the local physical device 10 mentioned above, and the local physical device 10 is deployed with a target container Docker_obj. Figure 1 At least two selected physical devices 20_1~20_N are also shown, where N represents the number of selected physical devices, N is a positive integer greater than or equal to 2, and N is less than or equal to M-1, and M represents the total number of devices including multiple physical devices in the device cluster.

[0048] In an embodiment of the present application, at least two selected physical devices 20_1~20_M may be arbitrarily selected by the local physical device 10 in the device cluster, and the selection of the at least two selected physical devices 20_1~20_M may be based on the software development configuration file Conf_dv input to the local physical device 10. The software development configuration file Conf_dv may be a file in a lightweight data serialization format, such as a file in a YAML (YAML Ain't Markup Language) format; or, the software development configuration file Conf_dv may also be a file in a lightweight data exchange format, such as a file in a JSON (JavaScript Object Notation) format.

[0049] In an embodiment of the present application, the software development configuration file Conf_dv may include resource configuration information for indicating multi-device hardware resources provided by at least two selected physical devices 20_1 ˜ 20_N.

[0050] For example, the resource configuration information in the software development configuration file Conf_dv may include the device number N of the selected physical devices 20_1~20_N and the single-device hardware resources provided by each selected physical device 20_i, and the multi-device hardware resources provided by at least two selected physical devices 20_1~20_N are determined by the device number N and the single-device hardware resources provided by each selected physical device 20_i.

[0051] For example, the resource configuration information in the software development configuration file Conf_dv may also include a device identifier and a device address (such as an IP address) of each selected physical device 20_i.

[0052] Therefore, in an embodiment of the present application, the multi-device hardware resources that can be "borrowed" are configurable, that is, the resource configuration information in the software development configuration file Conf_dv can be set according to the results of the compiled hardware resource requirements, so that the local physical device 10 can select at least two selected physical devices 20_1~20_N in the device cluster based on the resource configuration information in the software development configuration file Conf_dv.

[0053] In the embodiment of the present application, "borrowing" multi-device hardware resources provided by at least two selected physical devices can be achieved by deploying container images Docker_mir_1~Docker_mir_N for the target container Docker_obj on at least two selected physical devices 20_1~20_N. That is, since the hardware resources available to the target container Docker_obj are limited to the local physical device 10, the functions of the container images Docker_mir_1~Docker_mir_N include: using the multi-device hardware resources provided by at least two selected physical devices 20_1~20_N to replace the single-device hardware resources occupied by the target container Docker_obj on the local physical device 10 to implement the compilation of the source code file File_code, so as to remove the limitation of the hardware resources available to the target container Docker_obj on the compilation.

[0054] It should be noted that in the embodiment of the present application, the process of deploying container images Docker_mir_1~Docker_mir_N for the target container Docker_obj on at least two selected physical devices 20_1~20_N can be considered as "transplanting" the target container Docker_obj deployed on the local physical device 10 to at least two selected physical devices 20_1~20_N, rather than directly creating new containers on at least two selected physical devices 20_1~20_N. In this case, there is only one target container Docker_obj visible at the application layer, rather than multiple containers visible at the application layer at the same time, and the container images Docker_mir_1~Docker_mir_N have the same configuration as the target container Docker_obj.

[0055] Exemplarily, the configuration of the container images Docker_mir_1~Docker_mir_N is the same as that of the target container Docker_obj, including but not limited to: the containerized applications encapsulated in the target container Docker_obj and the container images Docker_mir_1~Docker_mir_N are the same, that is, the target container Docker_obj and the container images Docker_mir_1~Docker_mir_N are encapsulated with the same compiler and linker, and the dependency information of the target container Docker_obj and the container images Docker_mir_1~Docker_mir_N are the same. Moreover, it can be understood that the compilation of the source code file File_code by at least two container images Docker_mir_1~Docker_mir_N instead of the target container Docker_obj means that: the compilers of at least two container images Docker_mir_1~Docker_mir_N are enabled, and the compiler of the target container Docker_obj may not be enabled, rather than the target container Docker_obj does not include a compiler. Accordingly, the linking of the compilation result is still performed by the target container Docker_obj, which means that the linker of the target container Docker_obj is enabled, and the linkers of at least two container images Docker_mir_1~Docker_mir_N may not be enabled, rather than at least two container images Docker_mir_1~Docker_mir_N not including the linker.

[0056] In an embodiment of the present application, the software development configuration file Conf_dv may also include container configuration information, and the container configuration information is used to indicate the container configuration of the target container Docker_obj deployed on the local physical device 10. Thus, based on the container configuration information and resource configuration information in the software development configuration file Conf_dv, at least two container images Docker_mir_1~Docker_mir_N of the target container Docker_obj can be deployed on at least two selected physical devices 20_1~20_N respectively.

[0057] Therefore, in the process of generating the executable file File_obj, the compilation of the source code file File_code in the embodiment of the present application can be implemented by calling at least two container images Docker_mir_1~Docker_mir_N respectively deployed on at least two selected physical devices 20_1~20_N.

[0058] In an embodiment of the present application, the source code file File_code may include at least two file groups File_grp_1~File_grp_N that are equal to the device number N of at least two selected physical devices 20_1~20_N (i.e., the image number of at least two container images Docker_mir_1~Docker_mir_N), and the division determination process of the at least two file groups File_grp_1~File_grp_N may occur before the deployment of the at least two container images Docker_mir_1~Docker_mir_N, or may occur after the deployment of the at least two container images Docker_mir_1~Docker_mir_N is completed, or may be executed concurrently with the deployment process of the at least two container images Docker_mir_1~Docker_mir_N.

[0059] In this case, the compilation implemented by the embodiment of the present application by calling at least two container images Docker_mir_1~Docker_mir_N respectively deployed on at least two selected physical devices 20_1~20_N may include the group compilation of at least two file groups File_grp_1~File_grp_N of the source code file File_code, that is, the group compilation of at least two file groups File_grp_1~File_grp_N may be shared by at least two container images Docker_mir_1~Docker_mir_N respectively, therefore, the hardware resource requirements for the group compilation of at least two file groups File_grp_1~File_grp_N may be shared on at least two selected physical devices 20_1~20_N.

[0060] In the embodiment of the present application, since at least two container images Docker_mir_1~Docker_mir_N have the same configuration, when the group compilation of at least two file groups File_grp_1~File_grp_N can be shared by at least two container images Docker_mir_1~Docker_mir_N, at least two file groups File_grp_1~File_grp_N can be group compiled under the same compilation environment. Moreover, since at least two selected physical devices 20_1~20_N where at least two container images Docker_mir_1~Docker_mir_N are located are independent of each other, the group compilation of at least two file groups File_grp_1~File_grp_N can be executed concurrently.

[0061] Exemplarily, the makefile of the source code file File_code may indicate the global file list of all files to be compiled included in the source code file File_code, and the linking rules used when linking. Therefore, in an embodiment of the present application, all files to be compiled included in the source code file File_code may be grouped based on the global file list parsed from the makefile, thereby determining at least two file groups File_grp_1 to File_grp_N. In this case, the file group list of each file group File_grp_i in the at least two file groups File_grp_1 to File_grp_N may also be obtained based on the splitting of the global file list.

[0062] Exemplarily, in an embodiment of the present application, the division of at least two file groups File_grp_1~File_grp_N of the source code file File_code may consider the load balancing of at least two container images Docker_mir_1~Docker_mir_N, or the load balancing of at least two selected physical devices 20_1~20_N.

[0063] Thus, the embodiments of the present application can concurrently execute the compilation of the source code file File_code in a consistent compilation environment by calling at least two container images Docker_mir_1~Docker_mir_N respectively deployed on at least two selected physical devices 20_1~20_N, so as to utilize the hardware resources of multiple devices to meet the hardware resource requirements of the compilation while ensuring the consistency of the compilation environment, and are no longer limited to the single device hardware resources that can be provided by the local physical device 10. This helps to reduce the compilation time of the source code file File_code when the hardware resource requirements of the compilation exceed the hardware resources of the single device, and further, can reduce the time spent on generating executable files on the basis of reducing the compilation time.

[0064] In an embodiment of the present application, the compilation result of concurrently compiling at least two file groups File_grp_1 to File_grp_N may include: at least two compiled files File_com_1 to File_com_N obtained by concurrently compiling at least two file groups File_grp_1 to File_grp_N.

[0065] Exemplarily, as described above, the makefile may also indicate compilation rules. In this case, the linking of the compilation result by the target container Docker_obj in the embodiment of the present application may be based on the compilation rules indicated by the makefile.

[0066] In an embodiment of the present application, if at least two available compilers are encapsulated in the target container Docker_obj and at least two container images Docker_mir_1~Docker_mir_N, the software development configuration file Conf_dv may further include compilation mode information, where the compilation mode information is used to indicate a selected compiler from the at least two available compilers, and the calls to the at least two container images Docker_mir_1~Docker_mir_N may be based on the compilation mode information in the software development configuration file Conf_dv, so that the at least two container images Docker_mir_1~Docker_mir_N enable the same selected compiler indicated by the compilation mode information when being called.

[0067] Figure 2 This is a schematic diagram of the distributed software architecture in the device cluster in the embodiment of this application. Figure 2In an embodiment of the present application, a server 30 may be run in a local physical device 10, and the server 30 may be a software program for obtaining and parsing a software development configuration file Conf_dv, determining at least two selected physical devices 20_1~20_N, deploying at least two container images Docker_mir_1~Docker_mir_N, initiating concurrent calls to at least two container images Docker_mir_1~Docker_mir_N, and initiating a local call to a target container Docker_obj.

[0068] In an embodiment of the present application, the server 30 may be used to:

[0069] Get the software development configuration file Conf_dv, such as Figure 2 As shown in S31 in ; wherein, the software development configuration file Conf_dv may include container configuration information and resource configuration information, the container configuration information is used to indicate the container configuration of the target container Docker_obj deployed on the local physical device 10, the target container Docker_obj is used to generate an executable file File_obj, the file generation of the executable file File_obj includes compiling the source code file File_code, and linking after the compilation, and the resource configuration information is used to indicate the multi-device hardware resources provided by at least two selected physical devices 20_1~20_N selected from the multiple physical devices;

[0070] At least two selected physical devices 20_1~20_N indicated by the resource configuration information in the software development configuration file Conf_dv are used to deploy at least two container images Docker_mir_1~Docker_mir_N for the target container Docker_obj using the container configuration information in the software development configuration file Conf_dv, such as Figure 2 As shown in S32;

[0071] At least two container images Docker_mir_1~Docker_mir_N deployed on at least two selected physical devices 20_1~20_N are called, so that at least two file groups File_grp_1~File_grp_N of the source code file File_code are compiled concurrently based on the multi-device hardware resources provided by the at least two selected physical devices 20_1~20_N. Figure 2 As shown in S33;

[0072] Monitor the progress of concurrent compilation of at least two container images Docker_mir_1~Docker_mir_N, such as Figure 2As shown in S34 in , thus, based on the monitoring result of the progress of the concurrently executed compilation of at least two container images Docker_mir_1~Docker_mir_N, it is determined whether the concurrently executed compilation of at least two container images Docker_mir_1~Docker_mir_N is completely completed;

[0073] In response to the completion of the compilation of at least two container images Docker_mir_1~Docker_mir_N executed concurrently, the target container Docker_obj is called to link at least two compiled files File_com_1~File_com_N obtained by concurrently compiling at least two file groups File_grp_1~File_grp_N into an executable file File_obj, such as Figure 2 As shown in S35.

[0074] As can be seen above, based on the device cluster of the embodiment of the present application, in the file generation process of the executable file File_obj, the server 30 of the local physical device 10 can make the compilation of the source code file File_code be executed concurrently in a consistent compilation environment based on the multi-device hardware resources provided by at least two selected physical devices 20_1~20_N by calling at least two container images Docker_mir_1~Docker_mir_N deployed on at least two selected physical devices 20_1~20_N respectively. Therefore, the hardware resource requirements of the compilation can be met by utilizing the hardware resources of multiple devices while ensuring the consistency of the compilation environment, and are no longer limited to the single-device hardware resources that the local physical device 10 can provide. This helps to reduce the compilation time of the source code file when the hardware resource requirements of the compilation exceed the hardware resources of the single device. Furthermore, the time to generate the executable file File_obj can be reduced on the basis of reducing the compilation time.

[0075] For example, assuming that the number N of devices of at least two selected physical devices 20_1~20_N is 10, and the single-device hardware resources provided by each selected physical device 20_i include 128 CPU cores, in this case, for source code files with a file volume of tens of thousands, the compilation time of the source code file File_code based on the embodiment of the present application can be reduced from no less than 3 hours based on single-device hardware resources to 30 minutes, that is, the compilation time is reduced by 83.3%, and further, the time for generating the executable file File_obj can also be reduced by nearly 83.3%.

[0076] In an embodiment of the present application, the software development configuration file Conf_dv may also include file path information, and the file path information is used to indicate the target file path of the source code file File_code based on which the executable file File_obj is generated, and the makefile mentioned above may be stored in the target file path of the source code file File_code. For example, the target file path of the source code file File_code may be located in the local physical device 10, that is, the target file path of the source code file File_code may be the local file path of the source code file File_code in the local physical device, and the target file path is in Figure 1 In the figure, it is represented as a dotted box surrounding the source code file File_code. In this case, the file access path for generating the executable file File_obj from the target container Docker_obj may be configured as the target file path of the file path information, and accordingly, the file access paths of at least two container images Docker_mir_1~Docker_mir_N having the same configuration as the target container Docker_obj may also be configured as the target file path of the file path information. Thus, at least two container images Docker_mir_1~Docker_mir_N can realize concurrent compilation of at least two file groups File_grp_1~File_grp_N through real-time access to the target file path (i.e., real-time cross-device access).

[0077] That is, in Figure 2 The software development configuration file Conf_dv obtained in S31 may also include file path information, and the target file path indicated by the file path information may be determined as the file access path of the target container Docker_obj; Figure 2In S33, at least two compiled files File_com_1~File_com_N obtained by concurrently compiling at least two file groups File_grp_1~File_grp_N are all generated in the target file path, that is, at least two compiled files File_com_1~File_com _N can be generated (for example, directly generated) in the target file path, rather than being discretely generated and stored in different file paths respectively; and, after the compilation of the source code file File_code is completed, the target container Docker_obj can continuously generate the executable file File_obj by linking the compilation results, without performing the file transfer operation from different multiple file paths to the target file path for the at least two compiled files File_com_1~File_com_N, therefore, no additional waiting time (for example, waiting time caused by the file transfer operation) is generated between the compilation and the linking in the file generation process. In this case, the compilation results obtained based on multi-device hardware resources can be directly generated in the target file path specified for the target container Docker_obj, so as to support the target container Docker_obj to continuously execute the linking of the compilation results after the compilation of the source code file is completed, without generating additional waiting time between the compilation and the linking in the file generation process, thereby being more conducive to reducing the time spent on generating the executable file File_obj on the basis of reducing the compilation time.

[0078] Exemplarily, in an embodiment of the present application, the call of at least two container images Docker_mir_1~Docker_mir_N by the server 30 of the local physical device 10 can be triggered by concurrently assigning at least two group compilation tasks to at least two selected physical devices 20_1~20_N. Among them, the group compilation task with any selected physical device 20_i as the task assignment object can include: the group information of the specified file group File_grp_i in at least two file groups File_grp_1~File_grp_N that is determined to be compiled by the container image Docker_mir_i deployed on the task assignment object (i.e., the selected physical device 20_i). Thus, the container image Docker_mir_i deployed on any selected physical device 20_i can perform the compilation of the specified file group File_grp_i based on the corresponding group compilation task, and the compiled file File_com_i is obtained. For example, the container image Docker_mir_i deployed on any selected physical device 20_i can compile the specified file group File_grp_i to generate a compiled file File_com_i obtained by compiling the specified file group File_grp_i at the target file path.

[0079] Exemplarily, in an embodiment of the present application, as described above, the resource configuration information in the software development configuration file Conf_dv may also include single-device hardware resources provided by each selected physical device 20_i. In this case, the group compilation task with any selected physical device 20_i as the task assignment object may also include: the single-device hardware resources of the selected physical device 20_i (i.e., the task assignment object) to indicate the hardware resources of the selected physical device 20_i used by the container image Docker_mir_i deployed on the selected physical device 20_i when it is called.

[0080] Exemplarily, in an embodiment of the present application, as described above, if at least two available compilers are encapsulated in the target container Docker_obj and at least two container images Docker_mir_1~Docker_mir_N, the software development configuration file Conf_dv may also include compilation mode information. In this case, the group compilation task with any selected physical device 20_i as the task assignment object may also include the compilation mode information in the software development configuration file Conf_dv to indicate that the container image Docker_mir_i deployed on the selected physical device 20_i enables the selected compiler indicated by the compilation mode information when it is called, so that at least two container images Docker_mir_1~Docker_mir_N enable the same selected compiler indicated by the compilation mode information when they are called.

[0081] For example, in the embodiment of the present application, the call of the server 30 of the local physical device 10 to at least two container images Docker_mir_1~Docker_mir_N may be a direct remote call, or may be like Figure 2 Use proxy calls as shown in . Figure 2 As shown, for the server 30 to implement the call of at least two container images Docker_mir_1~Docker_mir_N in the form of proxy call, each selected physical device 20_i of at least two selected physical devices 20_1~20_N can run the proxy client 35_i, and the proxy clients 35_1~35_N run by at least two selected physical devices 20_1~20_N can communicate with the server 30 run by the local physical device 10, and can execute the call of the container image Docker_mir_i deployed on the selected physical device 20_i and monitor the compilation progress.

[0082] Specifically, the server 30 of the local physical device 10 concurrently assigns at least two group compilation tasks to at least two selected physical devices 20_1 - 20_N, which may include: concurrently sending the at least two group compilation tasks to the proxy clients 35_1 - 35_N of the at least two selected physical devices 20_1 - 20_N.

[0083] In this case, the proxy client 35_i running on each selected physical device 20_i can be configured to: based on the received group compilation task, execute the call to the container image Docker_mir_i deployed on the selected physical device 20_i (i.e., the task allocation object). In addition, during the call to the container image Docker_mir_i, the grouping information of the specified file group File_grp_i can be submitted to the container image Docker_mir_i, so that the container image Docker_mir_i performs compilation on the specified file group File_grp_i indicated by the file grouping information in the received group compilation task. For example, the container image Docker_mir_i can perform compilation on the specified file group File_grp_i indicated by the file grouping information in the received group compilation task by real-time access to the target file path.

[0084] Exemplarily, in an embodiment of the present application, the proxy client 35_i running on each selected physical device 20_i may also be configured to: generate a compilation completion notification in response to the completion of compilation of the called container image Docker_mir_i. The compilation completion notification generated by the proxy client 35_i running on each selected physical device 20_i is used to indicate that the specified file group File_grp_i indicated by the file grouping information in the group compilation task with the selected physical device 20_i as the task assignment object has completed compilation; and the compilation completion notification generated by the proxy client 35_i running on each selected physical device 20_i may be sent to the server 30 of the local physical device 10.

[0085] In this case, the server 30 of the local physical device 10 monitors the progress of the concurrent compilation of at least two container images Docker_mir_1~Docker_mir_N, which may include: monitoring the compilation completion notification generated by the proxy clients 35_1~35_N of at least two selected physical devices 20_1~20_N. Thus, the server 30 of the local physical device 10 can determine whether the compilation of the concurrent execution of at least two container images Docker_mir_1~Docker_mir_N is completely completed based on the monitoring result of the compilation completion notification; wherein, when it is successfully monitored that the proxy clients 35_1~35_N of at least two selected physical devices 20_1~20_N have all generated the compilation completion notification, it is determined that the concurrent compilation of at least two file groups File_grp_1~File_grp_N by at least two container images Docker_mir_1~Docker_mir_N is completely completed.

[0086] Exemplarily, in an embodiment of the present application, the call of the target container Docker_obj by the server 30 of the local physical device 10 may be triggered by submitting a link task to the target container Docker_obj, and the link task may include the link rules obtained from the makefile mentioned above.

[0087] Figure 3 Schematic diagram of an exemplary process for generating an executable file in an embodiment of the present application. Figure 3 In an embodiment of the present application, a method for generating an executable file is also provided. The basic principle of the method is similar to the function of the server 30 described above, and the method may include:

[0088] S510: Obtain a software development configuration file; wherein the software development configuration file may include container configuration information and resource configuration information, the target container is used to generate an executable file, the file generation of the executable file includes compiling the source code file and linking after compilation, and the resource configuration information is used to indicate multi-device hardware resources provided by at least two selected physical devices.

[0089] S530: Deploy at least two container images for the target container using the container configuration information in the software development configuration file on at least two selected physical devices indicated by the resource configuration information in the software development configuration file.

[0090] S550: Call at least two container images respectively deployed on at least two selected physical devices, so that at least two file groups of source code files are compiled concurrently based on multi-device hardware resources provided by the at least two selected physical devices.

[0091] Exemplarily, S550 may include: concurrently allocating at least two group compilation tasks to at least two selected physical devices; wherein the group compilation task with any one of the selected physical devices as the task assignment object includes: group information of at least two file groups that are determined to be specified file groups to be compiled by a container image deployed on the task assignment object.

[0092] Exemplarily, after S550, monitoring of the progress of concurrently executing compilations of at least two container images may be started, thereby determining whether the concurrently executing compilations of at least two container images are all completed based on the monitoring result of the progress of concurrently executing compilations of at least two container images.

[0093] S570: In response to the completion of the compilation of the at least two container images executed concurrently, the target container is called to link at least two compiled files obtained by grouping and concurrently compiling the at least two files into an executable file.

[0094] Exemplarily, S570 may include: submitting a link task to the target container to trigger a call to the target container, wherein the link task may include a link rule determined based on a software development configuration file, such as a link rule obtained from the aforementioned makefile.

[0095] As can be seen above, based on the method for generating an executable file in an embodiment of the present application, in the file generation process of the executable file, by calling at least two container images deployed on at least two selected physical devices respectively, the compilation of the source code file can be executed concurrently in a consistent compilation environment based on the multi-device hardware resources provided by at least two selected physical devices. Therefore, the hardware resource requirements of the compilation can be met by utilizing the hardware resources of multiple devices while ensuring the consistency of the compilation environment, and are no longer limited to the single-device hardware resources that can be provided by the local physical device. This helps to reduce the compilation time of the source code file when the hardware resource requirements of the compilation exceed the hardware resources of the single device. Furthermore, the time spent on generating the executable file can be reduced on the basis of reducing the compilation time.

[0096] Exemplarily, in an embodiment of the present application, the software development configuration file obtained by S510 may also include file path information, and the file path information is used to indicate the target file path where the source code file is located, and the container configuration information is used to indicate the container configuration of the target container deployed on the local physical device. If the software development configuration file obtained by S510 may also include file path information, then, at S550, at least two compiled files obtained by concurrently compiling at least two file groups of the source code file can be generated (for example, directly generated) at the target file path. In this case, S570 can call the target container to link at least two compiled files generated at the target file path as executable files. Thus, the compilation result obtained based on multi-device hardware resources can be directly generated in the target file path specified for the target container to support the target container to coherently execute the linking of the compilation result after the compilation of the source code file is completed, without generating additional waiting time between the compilation and linking in the file generation process, and thus, it is more conducive to reducing the time consumption of generating executable files on the basis of reducing the compilation time consumption.

[0097] Exemplarily, in the method for generating an executable file in an embodiment of the present application, the resource configuration information in the software development configuration file acquired by S510 may include the number of devices of the selected physical devices and the single-device hardware resources provided by each selected physical device, and the multi-device hardware resources are determined by the number of devices and the single-device hardware resources, and the group compilation task with any selected physical device as the task assignment object includes the single-device hardware resources of the task assignment object to indicate the hardware resources used by the container image deployed on the task assignment object when it is called, that is, the hardware resources used by any container image when it is called are determined by the single-device hardware resources of the selected physical device.

[0098] Exemplarily, in the method for generating an executable file in an embodiment of the present application, at least two available compilers are encapsulated in the target container and at least two container images deployed by S530, and the software development configuration file obtained by S510 may also include compilation mode information, and the compilation mode information is used to indicate a selected compiler among the at least two available compilers, and the group compilation task with any selected physical device as the task assignment object may include compilation mode information to indicate that the container image deployed in the task assignment object enables the selected compiler when it is called, so that the calls to the at least two container images are based on the compilation mode information, so that the at least two container images enable the same selected compiler when they are called.

[0099] Figure 4 This is a schematic diagram of an example flow of a method for generating an executable file in an embodiment of the present application. Figure 4In an embodiment of the present application, if at least two selected physical devices both run a proxy client to support proxy calls to at least two container images, then the method for generating an executable file may specifically include:

[0100] S610: Obtain a software development configuration file; wherein the software development configuration file may include container configuration information and resource configuration information, the target container is used to generate an executable file, the file generation of the executable file includes compiling the source code file and linking after compilation, and the resource configuration information is used to indicate multi-device hardware resources provided by at least two selected physical devices.

[0101] Exemplarily, similar to S510, in an embodiment of the present application, the software development configuration file obtained by S610 may also include file path information, where the file path information is used to indicate the target file path where the source code file is located, and the container configuration information is used to indicate the container configuration of the target container deployed on the local physical device.

[0102] S630: Deploy at least two container images for the target container using the container configuration information in the software development configuration file on at least two selected physical devices indicated by the resource configuration information in the software development configuration file.

[0103] S650: By concurrently sending at least two group compilation tasks to the proxy client of at least two selected physical devices, calling at least two container images deployed on the at least two selected physical devices respectively, at least two file groups of the source code file are compiled concurrently based on the multi-device hardware resources provided by the at least two selected physical devices; wherein the group compilation task with any one of the selected physical devices as the task assignment object includes: group information of the specified file group in the at least two file groups that is determined to be compiled by the container image deployed on the task assignment object; and the proxy client is configured to: based on the received group compilation task, execute a call to the container image deployed on the one of the selected physical devices, and, in response to the completion of the compilation of the called container image, generate a compilation completion notification.

[0104] Exemplarily, similar to S550, in an embodiment of the present application, if the software development configuration file obtained by S610 can also include file path information, then, in S650, at least two compiled files obtained by concurrently compiling at least two file groups of the source code file can both be generated (for example, directly generated) in the target file path.

[0105] S655: Based on the monitoring result of the progress of the concurrent compilation of at least two container images, determine whether the compilation of the concurrent compilation of at least two container images is completely completed; that is, start monitoring the progress of the concurrent compilation of at least two container images.

[0106] S670: In response to the completion of the compilation of the at least two container images executed concurrently, submit a link task to the target container to call the target container to link the at least two compiled files obtained by the concurrent compilation of the at least two file groups into an executable file. Exemplarily, the link task may include a link rule determined based on a software development configuration file, such as a link rule obtained from the makefile mentioned above.

[0107] Exemplarily, similar to S570, if S650 concurrently compiles at least two compiled files by grouping at least two source code files and can both be generated (for example, directly generated) at the target file path, then S670 can call the target container to link the at least two compiled files generated at the target file path into an executable file.

[0108] Thus, if Figure 4 The process shown can not only produce Figure 3 The same technical effect as the process shown in the figure can also improve the remote calling efficiency of the local physical device to the container image deployed on the selected physical device through proxy calling, thereby further reducing the time consumption of generating executable files on the basis of reducing the compilation time.

[0109] Figure 5 Schematic diagram of an exemplary structure of a device for generating an executable file in an embodiment of the present application. Figure 5 , a device for generating an executable file is also provided, the device may have similar functions to the server 30 described above, and the device may include:

[0110] The configuration acquisition module 710 is used to: acquire a software development configuration file; wherein the software development configuration file may include container configuration information and resource configuration information, the container configuration information is used to indicate the container configuration of the target container deployed on the local physical device, the target container is used to generate an executable file, the file generation of the executable file includes compiling the source code file and linking after the compilation, and the resource configuration information is used to indicate the multi-device hardware resources provided by at least two selected physical devices;

[0111] The image deployment module 730 is used to: deploy at least two container images for a target container using the container configuration information in the software development configuration file on at least two selected physical devices indicated by the resource configuration information in the software development configuration file;

[0112] The image calling module 750 is used to: call at least two container images respectively deployed on at least two selected physical devices, so that at least two file groups of source code files are compiled concurrently based on multi-device hardware resources provided by the at least two selected physical devices;

[0113] Exemplarily, the image calling module 750 may be specifically configured to: concurrently assign at least two group compilation tasks to at least two selected physical devices; wherein the group compilation task with any one of the selected physical devices as the task assignment object includes: group information of the specified file group in at least two file groups that is determined to be compiled by the container image deployed on the task assignment object;

[0114] The local calling module 770 is used to: in response to the completion of the compilation of at least two container images executed concurrently, call the target container to link at least two compiled files obtained by grouping and concurrently compiling at least two files into an executable file.

[0115] Exemplarily, the local call module 770 may also be used to start monitoring the progress of concurrently executing compilations of at least two container images after the image call module 750 initiates a call to at least two container images, thereby determining whether the concurrently executing compilations of at least two container images are all completed based on the monitoring result of the progress of concurrently executing compilations of at least two container images;

[0116] Exemplarily, the local calling module 770 may call the target container by submitting a link task to the target container to trigger the call to the target container. The link task may include link rules determined based on a software development configuration file, such as link rules obtained from the makefile mentioned above.

[0117] As can be seen from the above, based on the device for generating an executable file in the embodiment of the present application, in the file generation process of the executable file, by calling at least two container images deployed on at least two selected physical devices respectively, the compilation of the source code file can be executed concurrently in a consistent compilation environment based on the multi-device hardware resources provided by at least two selected physical devices. Therefore, the hardware resource requirements of the compilation can be met by utilizing the hardware resources of multiple devices while ensuring the consistency of the compilation environment, and are no longer limited to the single-device hardware resources that can be provided by the local physical device. This helps to reduce the compilation time of the source code file when the hardware resource requirements of the compilation exceed the hardware resources of the single device. Furthermore, the time to generate the executable file can be reduced on the basis of reducing the compilation time.

[0118] Exemplarily, in an embodiment of the present application, the software development configuration file obtained by the configuration acquisition module 710 may also include file path information, and the file path information is used to indicate the target file path where the source code file is located, and the container configuration information is used to indicate the container configuration of the target container deployed on the local physical device. If the software development configuration file obtained by the configuration acquisition module 710 may also include file path information, then, based on the call of the container image by the image call module 750, at least two compiled files obtained by concurrently compiling at least two file groups of the source code file can be generated (for example, directly generated) at the target file path. In this case, the local call module 770 can call the target container to link at least two compiled files generated at the target file path as executable files. Thus, the compilation result obtained based on the hardware resources of multiple devices can be directly generated in the target file path specified for the target container to support the linking of the compilation result by the target container after the compilation of the source code file is completed, without generating additional waiting time between the compilation and linking in the file generation process, and thus, it is more conducive to reducing the time consumption of generating executable files on the basis of reducing the compilation time consumption.

[0119] Exemplarily, for the device for generating an executable file in the embodiment of the present application, the resource configuration information in the software development configuration file acquired by the configuration acquisition module 710 may include the number of devices of the selected physical device and the single-device hardware resources provided by each selected physical device, and the multi-device hardware resources are determined by the number of devices and the single-device hardware resources, and the group compilation task with any selected physical device as the task assignment object includes the single-device hardware resources of the task assignment object to indicate the hardware resources used by the container image deployed on the task assignment object when it is called, that is, the hardware resources used by any container image when it is called are determined by the single-device hardware resources of the selected physical device.

[0120] Exemplarily, for the apparatus for generating an executable file in an embodiment of the present application, at least two available compilers are encapsulated in the target container and at least two container images deployed by the image deployment module 730, and the software development configuration file acquired by the configuration acquisition module 710 may also include compilation mode information, and the compilation mode information is used to indicate a selected compiler among the at least two available compilers, and the group compilation task with any selected physical device as the task assignment object may include the compilation mode information to indicate that the container image deployed on the task assignment object enables the selected compiler when it is called, so that the calls to the at least two container images are based on the compilation mode information, so that the at least two container images enable the same selected compiler when they are called.

[0121] In an embodiment of the present application, if at least two selected physical devices are running proxy clients to support proxy calls to at least two container images, then the image call module 750 can be specifically configured as follows: by sending at least two group compilation tasks concurrently to the proxy clients of at least two selected physical devices, calling at least two container images deployed on at least two selected physical devices respectively, so that at least two file groups of the source code file are compiled concurrently based on the multi-device hardware resources provided by at least two selected physical devices; wherein the group compilation task with any selected physical device as the task assignment object includes: group information of the specified file group determined to be compiled by the container image deployed on the task assignment object in at least two file groups; at least two compiled files obtained by concurrently compiling at least two file groups of the source code file are generated in the target file path; and the proxy client is configured to: based on the received group compilation task, execute the call to the container image deployed on the selected physical device. In this case, the remote call efficiency of the local physical device to the container image deployed on the selected physical device is improved by proxy calling, and the time consumption of generating executable files can be further reduced on the basis of reducing the compilation time consumption.

[0122] In an embodiment of the present application, if the proxy client is also configured to generate a compilation completion notification in response to the completion of the compilation of the called container image, then the local call module 770 can also be used to: determine whether the compilation of at least two container images executed concurrently is completely completed based on the monitoring results of the progress of the concurrent compilation of at least two container images; that is, start monitoring the progress of the concurrent compilation of at least two container images.

[0123] In another embodiment of the present application, a device cluster is also provided, including multiple physical devices, wherein any one of the multiple physical devices can be configured as a local physical device for executing the method for generating an executable file as described in the aforementioned embodiment. For example, any one of the multiple physical devices can be configured as a local physical device for executing the method for generating an executable file as described in the aforementioned embodiment by running the server 30 described above, that is, any one of the multiple physical devices can run the server, and the server run by the physical device is used to execute the method for generating an executable file as described in the aforementioned embodiment.

[0124] In an embodiment of the present application, a non-transitory computer-readable storage medium is also provided. The non-transitory computer-readable storage medium stores instructions. When the instructions are executed by a processor, the processor executes the method for generating an executable file as described in the above embodiment.

[0125] In an embodiment of the present application, a computer program product is further provided, including computer executable instructions, which, when executed by a processor, implement the method for generating an executable file as described in the foregoing embodiment.

[0126] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for generating an executable file, characterized in that: include: Obtaining a software development configuration file; wherein the software development configuration file includes container configuration information and resource configuration information, the container configuration information is used to indicate the container configuration of the target container deployed on the local physical device, and the resource configuration information is used to indicate multi-device hardware resources provided by at least two selected physical devices selected from the multiple physical devices; Deploy at least two container images for the target container using the container configuration information on at least two of the selected physical devices indicated by the resource configuration information; Calling at least two of the container images, so that at least two file groups of source code files are compiled concurrently based on the multi-device hardware resources; wherein at least two of the container images enable the same compiler when being called, so that the at least two file groups are compiled concurrently under the same compilation environment; In response to the completion of the compilation of at least two of the container images executed concurrently, the target container is called to link at least two compiled files obtained by compiling the at least two file groups concurrently into an executable file.

2. The method according to claim 1, characterized in that The resource configuration information includes the number of devices of the selected physical devices and the single-device hardware resources provided by each of the selected physical devices, the multi-device hardware resources are determined by the number of devices and the single-device hardware resources, and the hardware resources used by any one of the container images when being called are determined by the single-device hardware resources of the selected physical device; and / or, At least two available compilers are encapsulated in the target container and at least two of the container images, the software development configuration file further includes compilation mode information, the compilation mode information is used to indicate a selected compiler among the at least two available compilers, and the calling of the at least two container images is based on the compilation mode information, so that the at least two container images enable the same selected compiler when being called; and / or, The method further includes: determining whether the compilation of at least two concurrently executed container images is completely completed based on the monitoring result of the progress of the compilation of at least two concurrently executed container images; and / or, The software development configuration file also includes file path information, which is used to indicate a target file path where the source code file is located, and the at least two compiled files obtained by grouping and concurrently compiling the at least two files are both generated at the target file path.

3. The method according to claim 1, characterized in that The calling at least two of the container images includes: concurrently assigning at least two group compilation tasks to at least two of the selected physical devices; The group compilation task with any one of the selected physical devices as the task assignment object includes: group information of a designated file group in the at least two file groups that is determined to be compiled by the container image deployed on the task assignment object.

4. The method according to claim 3, characterized in that The resource configuration information includes the number of devices of the selected physical devices and the single-device hardware resources provided by each of the selected physical devices, the multi-device hardware resources are determined by the number of devices and the single-device hardware resources, and the group compilation task with any one of the selected physical devices as the task assignment object includes the single-device hardware resources of the task assignment object to indicate the hardware resources used by the container image deployed on the task assignment object when being called; and / or, At least two available compilers are encapsulated in the target container and at least two of the container images, the software development configuration file also includes compilation mode information, the compilation mode information is used to indicate a selected compiler from the at least two available compilers, and the group compilation task with any one of the selected physical devices as a task allocation object includes the compilation mode information.

5. The method according to claim 3, characterized in that: At least two of the selected physical devices run a proxy client; The concurrently allocating at least two grouping compilation tasks to at least two of the selected physical devices comprises: sending at least two of the group compilation tasks concurrently to the proxy clients of at least two of the selected physical devices; The proxy client is configured to: based on the received group compilation task, execute a call to the container image deployed on the selected physical device.

6. The method according to claim 5, characterized in that The proxy client is further configured to: generate a compilation completion notification in response to the called container image completing compilation; The method also includes: determining whether the compilation of at least two of the container images executed concurrently is all completed based on the monitoring result of the compilation completion notification; wherein, when it is successfully monitored that the proxy clients of at least two of the selected physical devices have all generated the compilation completion notification, it is determined that the compilation of at least two of the container images executed concurrently is all completed.

7. A device for generating an executable file, characterized in that: include: A configuration acquisition module, used to acquire a software development configuration file; wherein the software development configuration file includes container configuration information and resource configuration information, the container configuration information is used to indicate the container configuration of the target container deployed on the local physical device, and the resource configuration information is used to indicate multi-device hardware resources provided by at least two selected physical devices selected from the multiple physical devices; An image deployment module, configured to deploy at least two container images for the target container using the container configuration information based on the at least two selected physical devices indicated by the resource configuration information; An image calling module, used to call at least two of the container images, so that at least two file groups of source code files are compiled concurrently based on the multi-device hardware resources; wherein at least two of the container images enable the same compiler when being called, so that the at least two file groups are compiled concurrently under the same compilation environment; The local calling module is used for calling the target container to link at least two compiled files obtained by grouping and concurrently compiling the at least two files into an executable file in response to the compilation of the at least two container images being executed concurrently being completed.

8. A device cluster, characterized in that: The method comprises a plurality of physical devices, wherein any one of the plurality of physical devices is configured as a local physical device for executing the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer executable instructions which, when executed by a processor, implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • QT application program compiling method and device based on Docker mirror image

    CN113064595A

  • Continuous integration method and device based on container and electronic equipment

    CN114816424A

  • Mirror image file compiling method, system, equipment and medium

    CN115951870A

  • Model deployment method and system, storage medium and electronic equipment

    CN116126365A

  • Method for generating an executable file containing system calls and associated library.

    FR3131032A1