Compiler platform and method of compiling

By using an adaptive compilation platform and methodology to build a platform environment, the problems of complexity in building software systems and long verification times in vehicle domain controller systems have been solved, enabling rapid program acquisition and collaborative development, and breaking the limitations of software and hardware isolation.

CN117707544BActive Publication Date: 2026-05-08欧摩威软件系统开发(重庆)有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
欧摩威软件系统开发(重庆)有限公司
Filing Date
2023-12-13
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, vehicle domain controller systems suffer from problems such as complex software system setup, high network overhead, long verification time, and software/hardware isolation limitations when integrating applications.

Method used

This invention provides a platform and method for compiling programs, including an environment module, a core module, and a packaging container module. By adaptively building the platform environment, it enables the caching, retrieval, compilation, and verification of programs, supports multi-customer collaborative development, and breaks the limitations of software and hardware isolation.

Benefits of technology

It enables automatic updates and rapid switching of the platform environment, reduces network overhead, improves program acquisition speed, shortens verification time, and supports collaborative development among multiple clients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117707544B_ABST
    Figure CN117707544B_ABST
Patent Text Reader

Abstract

The present disclosure provides a platform for compiling programs and a method for compiling application programs, and relates to the technical field of computers. The specific implementation scheme is as follows: the platform for compiling programs comprises an environment module, a core module and a packaging container module; the environment module is used for setting a platform software system version and a platform compiling environment version according to a compiling instruction and first configuration information, completing platform environment building; the core module is used for caching platform programs and, in the case that the platform programs are not stored in a local cache, acquiring the platform programs from a first target server according to second configuration information, and further used for performing a compiling operation on the platform programs to obtain a first target program; and the packaging container module is used for program verification and output of the first target program. According to the scheme of the present disclosure, the corresponding version of the platform environment can be adaptively built based on the compiling instruction, the required compiling programs can be cached, the cached programs can be acquired from any server, and the compiling programs can be verified, thus breaking the physical limitation of software and hardware isolation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a platform for compiling programs and a method for compiling programs. Background Technology

[0002] To integrate more applications into the various domain controller systems of a vehicle, the domain controller system typically uses a solution combining Linux (the operating system kernel) and Adaptive AUTOSAR (Adaptive Automotive Open System Architecture) to build the software system. Projects developed using C / C++ (C++ Plus Plus, a computer programming language) build applications through compileable packages and a package management platform (package manager). Summary of the Invention

[0003] This disclosure provides a platform and method for compiling a compiler to solve or alleviate one or more technical problems in the prior art.

[0004] In one aspect, this disclosure provides a platform for compiling a program, including: an environment module, a core module, and a packaging container module;

[0005] The environment module is used to set the platform software system version and the platform compilation environment version according to the compilation instructions and the first configuration information in order to complete the platform environment setup;

[0006] The core module is used to cache the platform program and, if the platform program is not stored in the local cache, to retrieve the platform program from the first target server based on the second configuration information. It is also used to perform a compilation operation on the platform program to obtain the first target program.

[0007] The packaging container module is used to verify and output the first target program.

[0008] Secondly, this disclosure provides a method for compiling a program, applied to a program compilation platform, including:

[0009] Based on the compilation instructions and the first configuration information, set the platform software system version and the platform compilation environment version to complete the platform environment setup;

[0010] If the platform program needs to be compiled according to the compilation instructions and the platform program is not stored in the local cache, the platform program is obtained from the first target server according to the second configuration information.

[0011] The platform program is compiled to obtain the first target program; and

[0012] The first target program is verified and output.

[0013] Thirdly, an electronic device is provided, comprising:

[0014] At least one processor. And

[0015] A memory that is communicatively connected to the at least one processor. Wherein,

[0016] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods of any embodiment of the present disclosure.

[0017] Fourthly, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform a method according to any embodiment of the present disclosure.

[0018] According to the solution disclosed herein, a platform environment corresponding to the specified version can be adaptively built based on compilation instructions, the required compiled program can be cached and the cached program can be obtained from any server, and the compiled program can be verified, breaking the physical limitations of software and hardware isolation.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0020] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments provided according to this disclosure and should not be construed as limiting the scope of this disclosure.

[0021] Figure 1 This is a structural diagram of the platform for the compiler according to an embodiment of the present disclosure.

[0022] Figure 2 This is a structural diagram of the platform for the compiler according to an embodiment of the present disclosure.

[0023] Figure 3 This is a schematic diagram illustrating the application of a platform for a compiler according to an embodiment of the present disclosure.

[0024] Figure 4 This is a flowchart illustrating a method for compiling a program according to an embodiment of the present disclosure.

[0025] Figure 5 This is a block diagram of an electronic device used to implement a compiler method according to embodiments of the present disclosure. Detailed Implementation

[0026] The present disclosure will now be described in further detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0027] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0028] like Figure 1 As shown, the platform for compiling a program disclosed herein includes: an environment module, a core module, and a packaging container module.

[0029] The environment module is used to set the platform software system version and the platform compilation environment version according to the compilation instructions and the first configuration information, so as to complete the platform environment setup.

[0030] The core module is used to cache the platform program and, if the platform program is not stored in the local cache, to retrieve the platform program from the first target server based on the second configuration information. It is also used to perform a compilation operation on the platform program to obtain the first target program.

[0031] The packaging container module is used to verify and output the first target program.

[0032] According to the embodiments of this disclosure, it should be noted that:

[0033] Compiler directives can be understood as instructions issued by the platform user. Compiler directives may contain one or more of the following: type information of the compiled program, application environment information, first version information, and second version information.

[0034] The type information can be understood as whether the program to be compiled is a platform program or a customer-customized program, and the base version of the program. The application environment information can be understood as whether the platform program or customized program to be compiled is applied to a virtual machine or a target board (chip or integrated circuit board). The first version information can be understood as the platform software system version. The second version information can be understood as the software version of the environment module.

[0035] Setting the platform software system version can be understood as adjusting the operating system version, such as the base system Linux version and / or the additional operating system to which the required compiled programs are applied. Adjusting the operating system version includes upgrading or downgrading, and is not specifically limited here.

[0036] Setting the platform compilation environment version can be understood as adjusting the software versions of the platform's environment modules, core modules, and packaging container modules. Adjusting software versions includes upgrading or downgrading, and is not specifically limited here.

[0037] The first configuration information can be understood as a single-compilation environment configuration set associated with the environment module. This single-compilation environment configuration set stores multiple sets of environment entry package configuration files.

[0038] Each environment entry package configuration file contains pre-configured software versions (platform compilation environment versions) of the environment modules, core modules, and packaging container modules, as well as server addresses for downloading the software versions of the environment modules, core modules, and packaging container modules. For example, if environment entry package configuration file A contains environment module software version 1.0, then both the core module and packaging container module software versions are configured to 1.0. Similarly, if environment entry package configuration file B contains environment module software versions, regardless of the version, both the core module and packaging container module software versions are configured to the latest version. Furthermore, each environment entry package configuration file also contains pre-configured type information, application environment information, and first version information. For example, environment entry package configuration file A contains type information as "platform program," application environment information as "this platform program is applied to a virtual machine," and first version information including the platform software system version corresponding to the platform program being 1.0 and the server address for downloading this version of the platform software system. For example, the environment entry package configuration file B contains type information as "platform program", application environment information as "the platform program is applied to target board 1", and first version information as "the platform software system version corresponding to the platform program is 2.0" and "server address for downloading this version of the platform software system".

[0039] The core module has a caching function, which can cache different versions of platform programs, different versions of customized programs, and platform software system files corresponding to different platform software system versions. Different versions of platform programs can be understood as each compilation of a platform program being considered a new version of the platform program. Similarly, different versions of customized programs can be understood as each compilation of a customized program being considered a new version of the customized program.

[0040] If the platform program is not stored in the local cache, it can be understood that the local cache does not contain a platform program that implements the same functionality. Alternatively, it can be understood that the local cache does contain a platform program that implements the same functionality, but the version of the cached platform program does not match the base version of the platform program required by the compilation instructions.

[0041] The second configuration information can be understood as a list of platform programs associated with the core modules. This list of platform programs stores multiple sets of core package configuration files. Each set of core package configuration files stores the server address of the first target server corresponding to the platform program for which the target version is downloaded.

[0042] The primary target server can be understood as either a dedicated server for the platform or a private server for the target customer. When the primary target server is a private server for the target customer, the target customer needs to grant permissions before they can obtain the target version of the platform program from the private server.

[0043] The first target program can be understood as the program formed after compiling the platform program.

[0044] Verifying the first target program can be understood as deploying the first target program to a test environment for execution to verify whether the compiled first target program meets the requirements.

[0045] According to the technology of this disclosure, based on compilation instructions and first configuration information, the software versions of the environment module, core module, and packaging container module can be adjusted to meet the requirements of the compilation instructions. That is, the platform can adaptively build a platform environment corresponding to the version requirements of the compilation instructions, realizing automatic updates or adjustments to a specified version of the single-compilation (the process of compilation executed independently by the target customer) platform environment to meet different development needs. The platform has a package cache management function that caches platform programs locally, reducing network overhead and increasing the speed of obtaining platform programs. The platform does not restrict the first target server; it can be the platform's dedicated server or the customer's private server, enabling flexible storage and deployment of platform programs, allowing platform programs to be managed and stored on any server. The platform supports associating with the first configuration information, thereby enabling fast switching between different versions of the single-compilation environment. When switching between different hardware and software environments or upgrading the environment, package cache management is supported to reduce the cost of switching development environments, while also supporting forward compatibility. The platform can perform program verification, realizing a one-click deployment verification function, breaking the physical limitations of hardware and software isolation and shortening the verification time. The platform enables collaborative development among multiple clients. Each client's compiled platform program can be stored on their private server. Clients can obtain the required platform program from other clients' private servers and compile it further by gaining the necessary permissions.

[0046] In one example, the environment module is used to set the platform software system version and the platform compilation environment version according to the compilation instructions and the initial configuration information, in order to complete the platform environment setup, including:

[0047] The environment module finds the appropriate environment entry package configuration file from the first configuration information based on the second version information of the compilation instructions, and updates the environment module, core module and packaging container module to the software version that is compatible with the compilation instructions based on the server address in the environment entry package configuration file.

[0048] After updating the environment module, core module, and packaging container module to software versions compatible with the compilation instructions, the environment module compares the type information, application environment information, and first version information of the compilation instructions with the type information, application environment information, and first version information pre-configured in the target environment entry package configuration file in the first configuration information. If the type information and application environment information match but the first version information does not match, the platform software system version is set according to customer requirements based on the first version information of the target environment entry package configuration file or the first version information of the compilation instructions.

[0049] With both the platform software system version and the platform compilation environment version set, the platform environment required for the compilation instructions is confirmed to be set up.

[0050] In one example, the core module is used to obtain the platform program from the first target server based on the second configuration information, including:

[0051] The core module determines the base version of the platform program that the customer needs to compile based on the type information of the compilation instructions;

[0052] Based on the second configuration information, the core module determines the download address of the first target server for the base version of the platform program that the customer needs to compile, and obtains the platform program from the first target server.

[0053] In one implementation, the core module is further configured to perform a compilation operation on the platform program based on the platform program's compilation script and the platform program's patch, in order to obtain a first target program.

[0054] According to the embodiments of this disclosure, it should be noted that:

[0055] The core module is associated with a platform compilation script set, which stores compilation scripts for platform programs with different functions and versions.

[0056] The core module is associated with a platform application patch set, which stores patches for different functions and versions of platform programs.

[0057] According to the technology of the embodiments of this disclosure, by managing the compilation scripts and patches of the platform program, the platform can quickly obtain the compilation scripts and patches required by the platform program when compiling the platform program, thereby improving the compilation efficiency of the platform program.

[0058] In one implementation, such as Figure 2 As shown, the platform for a compiler disclosed herein also includes:

[0059] Custom modules are used to compile custom programs to obtain a second target program.

[0060] in,

[0061] The core module is also used to cache customized programs and, if the customized program is not stored in the local cache, to retrieve the customized program from the second target server based on third configuration information. The second target server can be a dedicated server for the platform or a private server for the target customer.

[0062] The packaging container module is also used for program verification and output of the second target program.

[0063] According to the embodiments of this disclosure, it should be noted that:

[0064] A custom program can be understood as a program package that implements certain functions and is compiled and generated by the customer. The compilation of a custom program is instructed by the core module to be executed by the custom module.

[0065] A platform program can be understood as a program package provided by the platform itself to implement certain functions. The compilation of a platform program is performed by the platform module itself.

[0066] The environment module can determine whether to compile a custom program or a platform program based on the compilation instructions.

[0067] The second target program can be understood as the program formed after the custom program is compiled.

[0068] The core module has a caching function that can cache different versions of the custom program. Different versions of the custom program can be understood as each time a custom program is compiled, it can be considered a new version of the custom program.

[0069] If a custom program is not stored in the local cache, it can be understood that the local cache does not contain a custom program that implements the same functionality. Alternatively, it can be understood that the local cache does contain a custom program that implements the same functionality, but the version of the cached custom program does not match the base version of the custom program required by the compilation instructions.

[0070] The third configuration information can be understood as a list of custom programs associated with the custom module. This list of custom programs stores multiple sets of custom package configuration files. Each set of custom package configuration files stores the server address of the second target server corresponding to the custom program for which the target version is downloaded.

[0071] The second target server can be understood as either a dedicated server for the platform or a private server for the target customer. When the second target server is a private server for the target customer, the target customer needs to grant permissions before they can obtain the target version of the customized program from the private server.

[0072] Verifying the second target program can be understood as deploying the second target program to a test environment for execution to verify whether the compiled second target program meets the requirements.

[0073] According to the technology of this disclosure, the platform has a package cache management function that caches customized programs locally, which can reduce network overhead and improve the speed of obtaining customized programs. The platform does not restrict the second target server; it can be the platform's dedicated server or a customer's private server, enabling flexible storage and deployment of platform programs, allowing platform programs to be managed and stored on any server. The platform can perform program verification, realizing a one-click deployment verification function, breaking the physical limitations of software and hardware isolation and shortening the verification time. The platform enables collaborative development among multiple customers; each customer's compiled customized program can be stored on their private server, and customers can obtain the required customized programs from other customers' private servers and perform further compilation by obtaining the necessary permissions.

[0074] In one example, such as Figure 2 As shown, the platform for a compiler disclosed herein includes:

[0075] The environment module is used to set the platform software system version and the platform compilation environment version according to the compilation instructions and the first configuration information, so as to complete the platform environment setup.

[0076] The core module is used to cache the platform program and, if the platform program is not stored in the local cache, to retrieve the platform program from the first target server based on the second configuration information. It also performs a compilation operation on the platform program to obtain the first target program. Furthermore, it is used to cache customized programs and, if the customized program is not stored in the local cache, to retrieve the customized program from the second target server based on the third configuration information. The second target server is either a dedicated server for the platform or a private server for the target client.

[0077] Custom modules are used to compile custom programs to obtain a second target program.

[0078] The packaging container module is used to verify and output the first target program. It is also used to verify and output the second target program.

[0079] It should be noted that after the environment module completes the platform environment setup, it sends instructions to the core module, instructing the core module to retrieve the target program (platform program or customized program) from the local cache or server. If the target program is a customized program, the core module sends instructions to the customized program module, instructing the customized program module to perform a compilation operation. After compiling the target program, the core module sends instructions to the packaging container module, instructing the packaging container module to verify and output the target program.

[0080] In one implementation, the customization module is used to perform a compilation operation on the customization program according to the compilation script and patch of the customization program to obtain a second target program.

[0081] According to the embodiments of this disclosure, it should be noted that:

[0082] Custom modules are associated with custom compilation script sets, which store compilation scripts for different functions and versions of custom programs.

[0083] The custom module is associated with a custom application patch set, which stores patches for different functions and versions of the custom application.

[0084] According to the technology of the embodiments of this disclosure, by managing the compilation scripts and patches of the customized program through the platform, the compilation scripts and patches required by the customized program can be quickly obtained when the platform compiles the customized program, thereby improving the compilation efficiency of the customized program.

[0085] In one implementation, the environment module is used to set the platform compilation environment version upon receiving compilation instructions, and to set the platform software system version according to the compilation instructions and the first configuration information after the platform compilation environment version is set.

[0086] The core module is also used to cache the platform software system file corresponding to the platform software system version. If the platform software system file is not stored in the local cache, it obtains the platform software system file from the third target server according to the first configuration information.

[0087] According to the embodiments of this disclosure, it should be noted that:

[0088] The core module has a caching function, which can cache platform software system files corresponding to different platform software system versions.

[0089] In one implementation, the core module is further configured to obtain the platform software system file from the third target server based on the first configuration information when the platform software system file is stored in the local cache but the platform software system version corresponding to the platform software system file is inconsistent with the platform software system version specified in the compilation instructions.

[0090] In one example, the environment module is used to set the platform software system version and the platform compilation environment version according to the compilation instructions and the initial configuration information, in order to complete the platform environment setup, including:

[0091] The environment module finds the appropriate environment entry package configuration file from the first configuration information based on the second version information of the compilation instructions, and updates the environment module, core module and packaging container module to the software version that is compatible with the compilation instructions based on the server address in the environment entry package configuration file.

[0092] After updating the environment module, core module, and packaging container module to software versions compatible with the compilation instructions, the environment module compares the type information, application environment information, and first version information of the compilation instructions with the type information, application environment information, and first version information pre-configured in the target environment entry package configuration file in the first configuration information. If the type information and application environment information match but the first version information does not match, the platform software system version is set according to customer requirements based on the first version information of the target environment entry package configuration file or the first version information of the compilation instructions.

[0093] With both the platform software system version and the platform compilation environment version set, the platform environment required for the compilation instructions is confirmed to be set up.

[0094] In one implementation, the packaging container module is further configured to generate a first application based on the first dependent program and the first target program, and to perform program verification and output of the first application, if it is determined that the first target program needs to utilize the first dependent program.

[0095] The first dependency program includes platform programs associated with the core module and / or non-platform programs.

[0096] According to the embodiments of this disclosure, it should be noted that:

[0097] The first dependency can be cached in the core module. If the core module does not have the corresponding first dependency, it will be downloaded from the appropriate server.

[0098] The first dependency program can be understood as the associated programs that the compiled first target program needs to be verified in a test environment. Only after the first dependency program and the first target program are combined to generate the first application can program verification be performed on the compiled first target program.

[0099] In the case where the first dependent program is a platform program, the platform program can be a program compiled based on the platform of the embodiments of this disclosure.

[0100] According to the technology of the embodiments of this disclosure, a dynamic packaging process based on a first dependency program and one-click deployment verification are realized, breaking the physical limitations of software and hardware isolation and shortening the verification time.

[0101] In one implementation, the packaging container module is further configured to generate a second application based on the second dependent program and the second target program, and to perform program verification and output of the second application, if it is determined that the second target program needs to utilize the second dependent program.

[0102] The second dependency program includes platform programs associated with the core module and / or non-platform programs.

[0103] According to the embodiments of this disclosure, it should be noted that:

[0104] Secondary dependencies can be cached in the core module. If the core module does not have the corresponding secondary dependency, it will be downloaded from the appropriate server.

[0105] The second dependency program can be understood as the associated programs that the compiled second target program needs to be verified in a test environment. Only after the second dependency program and the second target program are combined to generate the second application can program verification be performed on the compiled second target program.

[0106] In the case where the second dependent program is a platform program, the platform program can be a program compiled based on the platform of the embodiments of this disclosure.

[0107] According to the technology of the embodiments of this disclosure, a dynamic packaging process based on a second dependency program and one-click deployment verification are realized, breaking the physical limitations of software and hardware isolation and shortening the verification time.

[0108] In one example, such as Figure 3 As shown, the compiler platform includes an environment module (single-compilation environment entry package), a core module (single-compilation environment core package), a packaging container module (single-compilation environment packaging container package), and a customization module (single-compilation environment customer-customized package). Among these,

[0109] The environment module includes:

[0110] The first configuration management submodule is used to find the appropriate environment entry package configuration file from the first configuration information (single-compilation environment configuration set) managed by the environment module, based on the second version information of the compilation instructions.

[0111] The environment detection submodule utilizes its download entry unit to retrieve the platform software system files corresponding to the platform software system version and the software required for the platform compilation environment version from the cache management unit of the core module's download management submodule. If the required platform software system files and software are not found in the cache, the submodule retrieves the software compatible with the compilation instructions for the environment module, core module, and packaging container module based on the server address in the environment entry package configuration file. It also retrieves the corresponding patches using the patch management unit of the environment detection submodule and updates the environment module, core module, and packaging container module to the software versions compatible with the compilation instructions to complete the platform environment setup.

[0112] The single-entry submodule is used to send instructions to the core module so that the core module can compile platform programs or custom programs.

[0113] The packaging entry submodule is used to send instructions to the packaging container module so that the packaging container module can perform program verification and output of the first target program or the second target program.

[0114] The core modules include:

[0115] The download management submodule includes a cache management unit and a file management unit. The cache management unit is used to cache platform programs, custom programs, platform software system files corresponding to the platform software system version, and software required by the platform compilation environment version. The file management unit is used for installing and deleting platform software system files corresponding to the platform software system version and software required by the platform compilation environment version.

[0116] The second configuration management submodule is used to obtain the platform program from the first target server and the customized program from the second target server based on the second configuration information when the platform program or customized program is not stored in the local cache.

[0117] The package management submodule is used to store information about the compilation and adjustment of platform programs or custom programs.

[0118] The compilation management submodule is used to compile platform programs through platform-specific compilation units and to compile custom programs through custom compilation modules to obtain target programs (first target program, second target program). It can also perform unified full compilation (all compilation) of all required platform programs through platform full compilation units.

[0119] The core module is associated with the platform compilation script set, the platform application patch set, and the platform program list set.

[0120] Customized modules:

[0121] The third configuration management submodule is used to obtain the customized program from the second target server based on the third configuration information when the customized program is not stored in the local cache.

[0122] A custom single-component submodule is used to compile custom programs.

[0123] The custom module is associated with a custom build script set, a custom application patch set, and a custom program list set.

[0124] Packaging container module:

[0125] The deployment management submodule is used to generate a first application from the first dependent program and the first target program, or to generate a second application from the second dependent program and the second target program, and to perform program verification.

[0126] The packaging container module is associated with dependency packages, which include a first dependency program and / or a second dependency program. The first and second applications used for program verification are container image files.

[0127] like Figure 4 As shown, this disclosure provides a method for compiling a program, applied to a program compilation platform, including:

[0128] Step S401: Based on the compilation instructions and the first configuration information, set the platform software system version and the platform compilation environment version to complete the platform environment setup.

[0129] Step S402: If it is determined from the compilation instructions that the platform program needs to be compiled and the platform program is not stored in the local cache, the platform program is obtained from the first target server according to the second configuration information.

[0130] Step S403: Compile the platform program to obtain the first target program.

[0131] Step S404: Verify and output the first target program.

[0132] According to the embodiments of this disclosure, it should be noted that:

[0133] Compiler directives can be understood as instructions issued by the platform user. Compiler directives may contain one or more of the following: type information of the compiled program, application environment information, first version information, and second version information.

[0134] The type information can be understood as whether the program to be compiled is a platform program or a customer-customized program, and the base version of the program. The application environment information can be understood as whether the platform program or customized program to be compiled is applied to a virtual machine or a target board (chip or integrated circuit board). The first version information can be understood as the platform software system version. The second version information can be understood as the software version of the environment module.

[0135] Setting the platform software system version can be understood as adjusting the operating system version, such as the base system Linux version and / or the additional operating system to which the required compiled programs are applied. Adjusting the operating system version includes upgrading or downgrading, and is not specifically limited here.

[0136] Setting the platform compilation environment version can be understood as adjusting the software versions of the platform's environment modules, core modules, and packaging container modules. Adjusting software versions includes upgrading or downgrading, and is not specifically limited here.

[0137] The first configuration information can be understood as a single-compilation environment configuration set associated with the environment module. This single-compilation environment configuration set stores multiple sets of environment entry package configuration files.

[0138] Each environment entry package configuration file contains the server address of the software version of the platform compilation environment version block. Additionally, each environment entry package configuration file also contains pre-configured type information, application environment information, and first version information. For example, environment entry package configuration file A contains the type information "platform program," the application environment information "this platform program is applied to a virtual machine," and the first version information includes the platform software system version corresponding to the platform program being 1.0 and the server address for downloading this version of the platform software system. As another example, environment entry package configuration file B contains the type information "platform program," the application environment information "this platform program is applied to target board 1," and the first version information includes the platform software system version corresponding to the platform program being 2.0 and the server address for downloading this version of the platform software system.

[0139] If the platform program is not stored in the local cache, it can be understood that the local cache does not contain a platform program that implements the same functionality. Alternatively, it can be understood that the local cache does contain a platform program that implements the same functionality, but the version of the cached platform program does not match the base version of the platform program required by the compilation instructions.

[0140] The second configuration information can be understood as a list of platform programs associated with the core modules. This list of platform programs stores multiple sets of core package configuration files. Each set of core package configuration files stores the server address of the first target server corresponding to the platform program for which the target version is downloaded.

[0141] The primary target server can be understood as either a dedicated server for the platform or a private server for the target customer. When the primary target server is a private server for the target customer, the target customer needs to grant permissions before they can obtain the target version of the platform program from the private server.

[0142] The first target program can be understood as the program formed after compiling the platform program.

[0143] Verifying the first target program can be understood as deploying the first target program to a test environment for execution to verify whether the compiled first target program meets the requirements.

[0144] According to the technology of this disclosure, based on compilation instructions and first configuration information, the software version can be adjusted to meet the requirements of the compilation instructions. That is, the compilation method can adaptively build a platform environment corresponding to the version requirements of the compilation instructions, realizing automatic updates or adjustments to a specified version of the single-compilation (the process of compilation executed independently by the target customer) platform environment to meet different development needs. It has a package cache management function to cache platform programs locally, reducing network overhead and increasing the speed of obtaining platform programs. There are no restrictions on the first target server; it can be a dedicated server for the platform or a private server for the customer, enabling flexible storage and deployment of platform programs, allowing platform programs to be managed and stored on any server. The compilation method, based on the first configuration information associated with the platform, can achieve fast switching between different versions of the single-compilation environment. When switching between different hardware and software environments or upgrading the environment, package cache management is supported to reduce the cost of switching development environments, while also supporting forward compatibility. The compilation method can perform program verification, realizing a one-click deployment verification function, breaking the physical limitations of hardware and software isolation, and shortening the verification time. It enables collaborative development among multiple clients. Each client's compiled platform program can be stored on the client's private server. Clients can obtain the required platform program from other clients' private servers and perform further compilation by gaining the necessary permissions.

[0145] In one embodiment, the method for compiling a program provided in this disclosure includes steps S401 to S404, and further includes:

[0146] Step S405: If the compilation instructions determine that a custom program needs to be compiled and the custom program is not stored in the local cache, the custom program is obtained from the second target server according to the third configuration information. The second target server is either a dedicated server for the platform or a private server for the target customer.

[0147] Step S406: Perform a compilation operation on the customized program to obtain the second target program.

[0148] Step S407: Verify and output the second target program.

[0149] According to the embodiments of this disclosure, it should be noted that:

[0150] Custom programs can be understood as program packages that are compiled and generated by the customer to implement certain functions.

[0151] Platform programs can be understood as program packages provided by the platform itself to implement certain functions.

[0152] The compiler directives indicate whether the program is a custom application or a platform application.

[0153] The second target program can be understood as the program formed after the custom program is compiled.

[0154] If a custom program is not stored in the local cache, it can be understood that the local cache does not contain a custom program that implements the same functionality. Alternatively, it can be understood that the local cache does contain a custom program that implements the same functionality, but the version of the cached custom program does not match the base version of the custom program required by the compilation instructions.

[0155] The third configuration information can be understood as a list of custom programs associated with the custom module. This list of custom programs stores multiple sets of custom package configuration files. Each set of custom package configuration files stores the server address of the second target server corresponding to the custom program for which the target version is downloaded.

[0156] The second target server can be understood as either a dedicated server for the platform or a private server for the target customer. When the second target server is a private server for the target customer, the target customer needs to grant permissions before they can obtain the target version of the customized program from the private server.

[0157] Verifying the second target program can be understood as deploying the second target program to a test environment for execution to verify whether the compiled second target program meets the requirements.

[0158] According to the technology of this disclosure, the package caching management function, which caches customized programs locally, can reduce network overhead and improve the speed of obtaining customized programs. It does not restrict the second target server; it can be a platform-specific server or a customer's private server, enabling flexible storage and deployment of platform programs, allowing platform programs to be managed and stored on any server. It enables program verification, achieving one-click deployment verification, breaking the physical limitations of software and hardware isolation, and shortening verification time. It allows for collaborative development among multiple customers; each customer's compiled customized program can be stored on their private server, and customers can obtain the required customized programs from other customers' private servers and perform further compilation by obtaining the necessary permissions.

[0159] In one embodiment, the compilation method provided in this disclosure includes steps S401 to S404, wherein step S401: setting the platform software system version and the platform compilation environment version according to the compilation instructions and first configuration information to complete the platform environment setup, including:

[0160] When a compilation instruction is received, the platform compilation environment version is set.

[0161] Once the platform compilation environment version is set, the platform software system version is determined based on the compilation instructions and the first configuration information.

[0162] If the platform software system file corresponding to the platform software system version is not stored in the local cache, the platform software system file is obtained from the third target server according to the first configuration information.

[0163] In one embodiment, the compilation method provided in this disclosure includes steps S401 to S404, wherein step S401: setting the platform software system version and the platform compilation environment version according to the compilation instructions and first configuration information to complete the platform environment setup, including:

[0164] When a compilation instruction is received, the platform compilation environment version is set.

[0165] Once the platform compilation environment version is set, the platform software system version is determined based on the compilation instructions and the first configuration information.

[0166] If the platform software system file is stored in the local cache but the platform software system version corresponding to the platform software system file is inconsistent with the platform software system version specified in the compilation instructions, the platform software system file is obtained from the third target server according to the first configuration information.

[0167] In one embodiment, the method for compiling a program provided in this disclosure includes steps S401 to S404, wherein step S403: performing a compilation operation on the platform program to obtain a first target program includes:

[0168] Based on the platform program's compilation script and patch, the platform program is compiled to obtain the first target program.

[0169] In one embodiment, the method for compiling a program provided in this disclosure includes steps S401 to S407, wherein step S406: performing a compilation operation on a customized program to obtain a second target program includes:

[0170] Based on the compilation script and patch of the custom program, the custom program is compiled to obtain the second target program.

[0171] In one embodiment, the method for compiling a program provided in this disclosure includes steps S401 to S404, wherein step S404: performing program verification and output on the first target program, including:

[0172] If it is determined that the first target program needs to utilize the first dependent program, then obtain the first dependent program.

[0173] The first application is generated based on the first dependent program and the first target program.

[0174] Perform program verification and output for the first application.

[0175] The first dependency program includes platform programs associated with the core module and / or non-platform programs.

[0176] According to the embodiments of this disclosure, it should be noted that:

[0177] The first dependency program can be understood as the associated programs that the compiled first target program needs to be verified in a test environment. Only after the first dependency program and the first target program are combined to generate the first application can program verification be performed on the compiled first target program.

[0178] In the case where the first dependent program is a platform program, the platform program can be a program compiled based on the platform of the embodiments of this disclosure.

[0179] According to the technology of the embodiments of this disclosure, a dynamic packaging process based on a first dependency program and one-click deployment verification are realized, breaking the physical limitations of software and hardware isolation and shortening the verification time.

[0180] In one embodiment, the method for compiling a program provided in this disclosure includes steps S401 to S407, wherein step S407: performing program verification and output on the second target program, including:

[0181] If it is determined that the second target program needs to utilize the second dependent program, then obtain the second dependent program.

[0182] A second application is generated based on the second dependency program and the second target program.

[0183] Perform program verification and output for the second application.

[0184] The second dependency program includes platform programs associated with the core module and / or non-platform programs.

[0185] According to the embodiments of this disclosure, it should be noted that:

[0186] Secondary dependencies can be cached in the core module. If the core module does not have the corresponding secondary dependency, it will be downloaded from the appropriate server.

[0187] The second dependency program can be understood as the associated programs that the compiled second target program needs to be verified in a test environment. Only after the second dependency program and the second target program are combined to generate the second application can program verification be performed on the compiled second target program.

[0188] In the case where the second dependent program is a platform program, the platform program can be a program compiled based on the platform of the embodiments of this disclosure.

[0189] According to the technology of the embodiments of this disclosure, a dynamic packaging process based on a second dependency program and one-click deployment verification are realized, breaking the physical limitations of software and hardware isolation and shortening the verification time.

[0190] The descriptions of the corresponding steps in any of the method embodiments disclosed herein can be found in the descriptions of the specific functions and examples of each module and sub-module of the platform in any of the above embodiments, and will not be repeated here.

[0191] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0192] The technical solutions disclosed herein can be specifically applied to the fields of automotive electronic systems, smart cockpits, and domain controllers.

[0193] Figure 5 This is a structural block diagram of an electronic device according to an embodiment of the present disclosure. Figure 5As shown, the electronic device includes a memory 510 and a processor 520. The memory 510 stores a computer program that can run on the processor 520. The number of memories 510 and processors 520 can be one or more. The memory 510 can store one or more computer programs, which, when executed by the electronic device, cause the electronic device to perform the methods provided in the above-described method embodiments. The electronic device may also include a communication interface 530 for communicating with external devices and performing data exchange and transmission.

[0194] If the memory 510, processor 520, and communication interface 530 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0195] Optionally, in a specific implementation, if the memory 510, processor 520, and communication interface 530 are integrated on a single chip, then the memory 510, processor 520, and communication interface 530 can communicate with each other through an internal interface.

[0196] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.

[0197] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAMBUS RAM (DR RAM).

[0198] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this disclosure is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, Bluetooth, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)). It is worth noting that the computer-readable storage media mentioned in this disclosure can be non-volatile storage media; in other words, they can be non-transient storage media.

[0199] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0200] In the description of the embodiments of this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0201] In the description of the embodiments disclosed herein, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.

[0202] In the description of embodiments of this disclosure, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more.

[0203] The above description is merely an exemplary embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.

Claims

1. An apparatus for compiling a compiler, comprising: Environment module, core module, packaging container module, and custom module; The customization module is used to perform a compilation operation on the customized program to obtain the second target program; The environment module includes: The first configuration management submodule is used to find the appropriate environment entry package configuration file from the first configuration information according to the second version information of the compilation instructions. The first configuration information is a single-compilation environment configuration set associated with the environment module. The single-compilation environment configuration set stores multiple sets of environment entry package configuration files. The environment detection submodule is used to obtain the platform software system files corresponding to the platform software system version and the software required for the platform compilation environment version from the cache management unit of the download management submodule of the core module using its own download entry unit. If the required platform software system files corresponding to the platform software system version and the software required for the platform compilation environment version are not found in the cache, the environment module, the core module and the packaging container module are obtained according to the server address in the environment entry package configuration file, and the software that is compatible with the compilation instructions is obtained. In addition, the corresponding patches are obtained in combination with its own patch management unit. Based on the patches and software, the environment module, the core module and the packaging container module are updated to the software version compatible with the compilation instructions to complete the platform environment setup. The core module includes: The download management submodule includes a cache management unit and a file management unit. The cache management unit is used to cache the platform program, the customized program, the platform software system files corresponding to the platform software system version, and the software required by the platform compilation environment version. The file management unit is used to install and delete the platform software system files corresponding to the platform software system version and the software required by the platform compilation environment version. The second configuration management submodule is used to obtain the platform program from the first target server according to the second configuration information when the platform program is not stored in the local cache or the cached platform program is inconsistent with the base version of the platform program to be written in the compilation instructions; wherein, the first target server is a dedicated server of the platform or a private server of the target customer, and the second target server is a dedicated server of the platform or a private server of the target customer. The compilation management submodule is used to compile the platform program through the platform single-compilation unit to obtain the first target program, and to compile the customized program through the customized single-compilation module of the customized module to obtain the second target program; The core module is further configured to cache the customized program and, if the customized program is not stored in the local cache, obtain the customized program from the second target server based on third configuration information; and The packaging container module is used to perform program verification and output for the first target program and the second target program.

2. The apparatus according to claim 1, wherein, The packaging container module is also used to generate a first application based on the first dependent program and the first target program when it is determined that the first target program needs to utilize the first dependent program, and to perform program verification and output of the first application. The first dependent program includes platform programs associated with the core module and / or non-platform programs.

3. The apparatus according to claim 1, wherein, The packaging container module is also used to generate a second application based on the second dependent program and the second target program when it is determined that the second target program needs to utilize the second dependent program, and to perform program verification and output of the second application. The second dependent program includes platform programs associated with the core module and / or non-platform programs.

4. A method for compiling a program, and an apparatus for compiling a program, comprising: The custom module performs a compilation operation on the custom program to obtain the second target program; The environment module, based on the second version information of the compilation instructions, finds the appropriate environment entry package configuration file from the first configuration information; using its own download entry unit, it obtains the platform software system file corresponding to the platform software system version and the software required for the platform compilation environment version from the cache management unit of the download management submodule of the core module; if the required platform software system file corresponding to the platform software system version and the software required for the platform compilation environment version are not found in the cache, it obtains the software adapted to the compilation instructions for the environment module, the core module, and the packaging container module according to the server address in the environment entry package configuration file, and obtains the corresponding patches in conjunction with its own patch management unit, and updates the environment module, the core module, and the packaging container module to the software version adapted to the compilation instructions based on the patches and the software, thereby completing the platform environment setup; wherein, the first configuration information is a single-compilation environment configuration set associated with the environment module, and the single-compilation environment configuration set stores multiple sets of environment entry package configuration files. The core module determines that the platform program needs to be compiled according to the compilation instructions. If the platform program is not stored in the local cache or the cached platform program is inconsistent with the base version of the platform program required by the compilation instructions, it obtains the platform program from the first target server according to the second configuration information. If the customized program is not stored in the local cache, it obtains the customized program from the second target server according to the third configuration information. The core module then compiles the platform program using the platform single-compilation unit to obtain the first target program, and compiles the customized program using the customized single-compilation module of the customization module to obtain the second target program. The first target server is either a dedicated server for the platform or a private server for the target customer, and the second target server is either a dedicated server for the platform or a private server for the target customer. The packaging container module performs program verification and outputs the first target program and the second target program.

5. The method according to claim 4, wherein, The first target program is verified and output, including: If it is determined that the first target program needs to utilize the first dependent program, then obtain the first dependent program; Based on the first dependent program and the first target program, generate the first application program; Perform program verification and output on the first application; The first dependent program includes platform programs associated with the core module and / or non-platform programs.

6. The method according to claim 4, wherein, The second target program is verified and output, including: If it is determined that the second target program needs to utilize the second dependent program, then obtain the second dependent program; Based on the second dependent program and the second target program, generate the second application; Perform program verification and output for the second application; The second dependent program includes platform programs associated with the core module and / or non-platform programs.

7. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 4 to 6.

8. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 4 to 6.

Citation Information

Patent Citations

  • Hadoop compiling method and device and computer readable storage medium

    CN112181422A

  • Compiling integration method and device

    CN112835587A

  • Code processing method and device, electronic equipment and readable medium

    CN114546819A

  • Continuous integration job processing method and device, equipment and storage medium

    CN116302543A