Project precompilation processing method, device, storage medium and server

By downloading custom configuration files from the project source code warehouse and downloading precompiled products from the designated server, the maintenance workload and storage space occupation problems when multiple projects share precompiled modules, the efficiency of project precompilation and storage space are achieved. optimization.

CN118860415BActive Publication Date: 2024-12-03TCL COMM TECH (CHENGDU) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411369762.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-03
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

In the prior art, when multiple projects share precompiled modules, a large number of precompiled products need to be submitted and maintained separately, resulting in large maintenance workloads and excessive storage space.

Method used

By downloading custom precompiled configuration files from the project source code warehouse, generating compilation rules files, and downloading target precompiled products from the specified server, encapsulating them into mirror files, reducing the storage requirements of the project source code warehouse.

Benefits of technology

It effectively reduces maintenance workload and storage space usage, ensures successful precompilation of the project while reducing the storage requirements of the project source code warehouse.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860415B_ABST
    Figure CN118860415B_ABST
Patent Text Reader

Abstract

The present application discloses a project pre-compilation processing method, device, storage medium and server, and relates to the field of software technology. The method comprises: in response to a project pre-compilation startup instruction, downloading files from a project source code warehouse to obtain a custom pre-compilation configuration file; generating a compilation rule file for downloading a target pre-compiled product from a designated server based on the custom pre-compilation configuration file; downloading the target pre-compiled product from the designated server based on the compilation rule file; packaging the target pre-compiled product into a mirror file, so as to use the mirror file to perform a system update on the target device. The present application can effectively reduce the maintenance workload and reduce the storage space occupied in the project source code warehouse on the basis of ensuring the successful pre-compilation of the project.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software technology, and in particular to a project pre-compilation processing method, device, storage medium and server. Background Art

[0002] When compiling an Android project, for different modules (such as WIFI modules and launcher modules, etc.), it mainly supports two types of compilation: source code module compilation and pre-compiled module compilation. Both types participate in the compilation of the entire Android project and eventually generate an Android flash image file. Among them, for source code module compilation, that is, a module is stored in the Android project in the form of a source code file (Java / C / C++, etc.) to participate in the compilation. First, the source code module is compiled into a product (such as jar / so / apk), and then the product is packaged into the Android flash image to form an image file; and for pre-compiled module compilation, a module itself is stored in the project in the form of a pre-compiled product (such as jar / so / apk), which can be directly packaged into the Android flash image to form an image file.

[0003] Currently, the precompiled products (such as jar / so / apk) required for precompiled modules are generally generated by developers through integrated compilation tools (such as Android studio) or provided by third parties, and the project developers submit the precompiled products to the project source code repository (Git repository). When compiling a project, you need to download the precompiled products from the project source code repository to the local compilation server for compilation. Under the current method, if there are multiple projects that require a certain precompiled module, then the precompiled products need to be submitted once for each project source code repository, which requires a lot of maintenance work. Moreover, as the number of projects increases, the storage space in the project source code repository will be occupied. Summary of the invention

[0004] The embodiment of the present application provides a project precompilation processing solution, which can effectively reduce the maintenance workload and reduce the storage space occupied in the project source code warehouse on the basis of ensuring the successful precompilation of the project.

[0005] The embodiments of the present application provide the following technical solutions:

[0006] According to one embodiment of the present application, a project precompilation processing method includes: in response to a project precompilation startup instruction, downloading a file from a project source code repository to obtain a custom precompilation configuration file; generating a compilation rule file for downloading a target precompiled product from a designated server based on the custom precompilation configuration file; downloading the target precompiled product from the designated server based on the compilation rule file; packaging the target precompiled product into an image file to use the image file to perform a system update on a target device.

[0007] In some embodiments of the present application, generating a compilation rule file for downloading a target precompiled product from a specified server based on the custom precompiled configuration file includes: transmitting the custom precompiled configuration file to a custom plug-in module; generating, by the custom plug-in module, compilation rules for downloading a target precompiled product from a specified server according to the custom precompiled configuration file, and storing the compilation rules in a predetermined file to obtain the compilation rule file.

[0008] In some embodiments of the present application, transmitting the custom precompiled configuration file to a custom plug-in module includes: determining a file type corresponding to the custom precompiled configuration file; and transmitting the custom precompiled configuration file to a custom plug-in module corresponding to the file type.

[0009] In some embodiments of the present application, before transmitting the custom precompiled configuration file to the custom plug-in module, the method also includes: receiving transmitted plug-in data in the configuration terminal, the plug-in data being obtained by the configuration terminal according to the plug-in customization operation in the interface corresponding to the build system; generating the custom plug-in module according to the plug-in data.

[0010] In some embodiments of the present application, downloading the target precompiled product from the designated server based on the compilation rule file includes: executing the compilation rules in the compilation rule file to pass the rule parameters to a preset download tool; downloading the target precompiled product from the designated server to a designated directory according to the rule parameters through the preset download tool.

[0011] In some embodiments of the present application, executing the compilation rules in the compilation rule file includes: obtaining rule feature points in the compilation rules in the compilation rule file; performing rule verification according to the rule feature points to obtain a verification result; if the verification result is passed, executing the compilation rules in the compilation rule file.

[0012] In some embodiments of the present application, before packaging the target precompiled product as a mirror file, the method further includes: renaming the target precompiled product to obtain a renamed precompiled product; packaging the target precompiled product as a mirror file includes: packaging the renamed precompiled product to obtain the mirror file.

[0013] According to one embodiment of the present application, a project precompilation processing device includes: a configuration download unit, which is used to respond to a project precompilation startup instruction to download files from a project source code repository to obtain a custom precompilation configuration file; a rule generation unit, which is used to generate a compilation rule file for downloading a target precompiled product from a specified server based on the custom precompilation configuration file; a product download unit, which is used to download the target precompiled product from the specified server based on the compilation rule file; and a file encapsulation unit, which is used to encapsulate the target precompiled product into an image file so as to use the image file to perform a system update on a target device.

[0014] In some embodiments of the present application, the rule generation unit is used to: transfer the custom precompiled configuration file to a custom plug-in module; generate, through the custom plug-in module, compilation rules for downloading a target precompiled product from a specified server according to the custom precompiled configuration file, and store the compilation rules in a predetermined file to obtain the compilation rule file.

[0015] In some embodiments of the present application, the rule generation unit is used to: determine the file type corresponding to the custom precompiled configuration file; and transmit the custom precompiled configuration file to a custom plug-in module corresponding to the file type.

[0016] In some embodiments of the present application, before transmitting the custom precompiled configuration file to the custom plug-in module, the device also includes a plug-in customization module, which is used to: receive the transmitted plug-in data in the configuration terminal, the plug-in data is obtained by the configuration terminal according to the plug-in customization operation in the interface corresponding to the build system; generate the custom plug-in module according to the plug-in data.

[0017] In some embodiments of the present application, the product download unit is used to: execute the compilation rules in the compilation rule file to pass the rule parameters to a preset download tool; and download the target pre-compiled product from the designated server to a designated directory through the preset download tool according to the rule parameters.

[0018] In some embodiments of the present application, the product downloading unit is used to: obtain rule feature points in the compilation rules in the compilation rule file; perform rule verification according to the rule feature points to obtain a verification result; if the verification result is passed, execute the compilation rules in the compilation rule file.

[0019] In some embodiments of the present application, before encapsulating the target precompiled product into a mirror file, the device also includes a renaming module, which is used to: rename the target precompiled product to obtain a renamed precompiled product; and the file encapsulation unit is used to: encapsulate the renamed precompiled product to obtain the mirror file.

[0020] According to another embodiment of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor of a server, the server executes the method described in the embodiment of the present application.

[0021] According to another embodiment of the present application, a server may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the method described in the embodiment of the present application.

[0022] According to another embodiment of the present application, a computer program product or a computer program includes a computer instruction stored in a computer-readable storage medium. A processor of a server reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the server executes the method provided in various optional implementations described in the embodiments of the present application.

[0023] In an embodiment of the present application, in response to a project precompilation startup instruction, a file is downloaded from a project source code repository to obtain a custom precompilation configuration file; a compilation rule file for downloading a target precompiled product from a designated server is generated based on the custom precompilation configuration file; the target precompiled product is downloaded from the designated server based on the compilation rule file; the target precompiled product is encapsulated as an image file, so as to use the image file to perform a system update on a target device.

[0024] The beneficial effects of the present application are as follows: the compilation server downloads files from the project source code repository, and can download only the custom precompilation configuration file without including the precompilation product. Then, the compilation server generates a compilation rule file for downloading the target precompilation product from the specified server based on the custom precompilation configuration file. The project can be precompiled successfully by downloading the target precompilation product from the specified server based on the compilation rule file. Only the custom precompilation configuration file needs to be stored in the project source code repository of the project. The storage space occupancy is low, and the overall maintenance workload is also effectively reduced. Furthermore, on the basis of ensuring the successful precompilation of the project, the maintenance workload can be effectively reduced and the storage space occupancy in the project source code repository can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 A flowchart of a project pre-compilation processing method according to an embodiment of the present application is shown.

[0027] Figure 2 The figure shows an architecture diagram of a project pre-compilation processing system according to an embodiment of the present application.

[0028] Figure 3 A flowchart of project pre-compilation processing in a project pre-compilation processing system according to an embodiment of the present application is shown.

[0029] Figure 4 A block diagram of a project pre-compilation processing device according to an embodiment of the present application is shown.

[0030] Figure 5 A block diagram of a server according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0031] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present disclosure and are not intended to limit the present disclosure. In addition, the embodiments provided below are partial embodiments for implementing the present disclosure, rather than providing all embodiments for implementing the present disclosure. In the absence of conflict, the technical solutions recorded in the embodiments of the present disclosure can be implemented in any combination.

[0032] It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements in the method or apparatus including the element (such as a step in the method or a unit in the apparatus, for example, a unit may be a part of a circuit, a part of a processor, a part of a program or software, etc.).

[0033] For example, the project precompilation processing method provided by the embodiment of the present disclosure includes a series of steps, but the project precompilation processing method provided by the embodiment of the present disclosure is not limited to the recorded steps. Similarly, the project precompilation processing device provided by the embodiment of the present disclosure includes a series of units, but the device provided by the embodiment of the present disclosure is not limited to including the units explicitly recorded, and can also include units required to obtain relevant information or perform processing based on the information.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0035] It is understandable that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0036] Figure 1 The flowchart of the project pre-compilation processing method according to an embodiment of the present application is schematically shown. The execution subject of the project pre-compilation processing method can be any server with processing capabilities, that is, a compilation server, which can distribute or publish the image file obtained after compilation to the device side for system update. It should be noted that the present application scheme is based on the Android source code project (not the Android project in the Android studio tool).

[0037] Figure 2The schematic diagram shows the architecture of a project pre-compilation processing system according to an embodiment of the present application. The project pre-compilation processing system 200 may include a project source code repository 210 (e.g., a Git repository server), a designated server 220 (e.g., a Maven / ftp / http repository server), a compilation server 230, and a target device 240.

[0038] like Figure 1 As shown, the project pre-compilation processing method executed by the compilation server may include steps S110 to S140.

[0039] Step S110, in response to the project precompilation start instruction, download files from the project source code repository to obtain a custom precompilation configuration file; Step S120, based on the custom precompilation configuration file, generate a compilation rule file for downloading the target precompiled product from the designated server; Step S130, based on the compilation rule file, download the target precompiled product from the designated server; Step S140, encapsulate the target precompiled product into an image file, so as to use the image file to perform a system update on the target device.

[0040] In this way, see Figure 2 , the compiling server 230 can download files from the project source code warehouse 210, and can only download the custom precompiled configuration file without including the precompiled product. Then, the compiling server 230 generates a compiling rule file for downloading the target precompiled product from the designated server 220 based on the custom precompiled configuration file. The target precompiled product can be successfully precompiled into an image file by downloading the target precompiled product from the designated server 220 based on the compiling rule file. The target device 240 can be system updated using the image file. The project source code warehouse 210 of the project only needs to store the custom precompiled configuration file, and the storage space occupied is low, and the overall maintenance workload is also effectively reduced. Therefore, on the basis of ensuring the successful precompilation of the project, the maintenance workload can be effectively reduced and the storage space occupied in the project source code warehouse can be reduced.

[0041] Described below Figure 1 The steps performed when pre-compiling a project under the embodiment and further optional specific embodiments.

[0042] Step S110, in response to the project pre-compilation start instruction, download files from the project source code repository to obtain a custom pre-compilation configuration file.

[0043] For the precompiled module project, only the corresponding custom precompiled configuration file is stored in the source code repository, but the precompiled product corresponding to the precompiled module is not stored. The precompiled product corresponding to the precompiled module is stored in a specially set designated server.

[0044] In response to a project pre-compilation start instruction for a certain project, the compiling server will download files from the project source code repository and download files corresponding to various modules related to the project. Figure 3 As shown, in one example, in step S310, the compile server downloads files corresponding to various modules related to the project (such as a launcher source code module, a setting source code module, and a WIFI pre-compiled module) from the project source code repository.

[0045] For precompiled modules, the downloaded file will only include the custom precompiled configuration file corresponding to the precompiled module, and will not download the corresponding precompiled product. The custom precompiled configuration file is used to generate a compilation rule file for downloading the target precompiled product from the specified server. Figure 3 The WIFI precompiled module shown will only download the custom precompiled configuration file (Android.bp file) corresponding to the WIFI precompiled module.

[0046] For source code modules, the downloaded files will include the compilation configuration file (such as Android.bp file, which can be a file used to describe the compilation method) and source code files (such as Java / C / C++ files) corresponding to the source code module. Figure 3 The launcher source code module shown in the figure will download the compilation configuration file (Android.bp file) and source code files (src / A.java file and src / B.java file) corresponding to the launcher source code module.

[0047] Step S120: generating a compilation rule file for downloading a target precompiled product from a designated server based on the custom precompiled configuration file.

[0048] The compile server can generate a compile rule file for downloading the target precompiled product from the specified server based on the custom precompiled configuration file. When the compile rule (command executed by the command line) in the compile rule file is executed, the target precompiled product corresponding to the precompiled module will be downloaded from the specified server. For example, Figure 3 As shown, in one example, in step S320, the compile server generates a compile rule file for downloading a target precompiled product from a designated server based on a custom precompiled configuration file (Android.bp file) corresponding to the WIFI precompiled module.

[0049] In one embodiment, generating a compilation rule file for downloading a target precompiled product from a specified server based on the custom precompiled configuration file may specifically include: transmitting the custom precompiled configuration file to a custom plug-in module; generating, by the custom plug-in module, compilation rules for downloading a target precompiled product from a specified server according to the custom precompiled configuration file, and storing the compilation rules in a predetermined file to obtain the compilation rule file.

[0050] A custom plug-in module can be configured in the compilation server. The custom plug-in module can generate compilation rules for downloading target precompiled products from a specified server according to a custom precompilation configuration file, and store the compilation rules in a predetermined file (for example, a Ninja file) to obtain a compilation rule file.

[0051] A compilation rule is a command executed by the command line (such as a Linux command). For example, a compilation rule can be "downloadPrebuild –name "B" -outdir download directory -remote "server:maven groupId:xxx.xxx artifactId:ddd version:3.3.3 url:www.tcl.com".

[0052] In one embodiment, the transmitting the custom precompiled configuration file to the custom plug-in module may include: determining a file type corresponding to the custom precompiled configuration file; and transmitting the custom precompiled configuration file to the custom plug-in module corresponding to the file type.

[0053] Custom precompiled configuration files can have many file types, and corresponding custom plug-in modules can be configured for each file type. For example, jar, so, apk and other file types can each be configured with a corresponding custom plug-in module.

[0054] The compilation server can first determine the file type corresponding to the custom precompiled configuration file, and then transmit the custom precompiled configuration file to the custom plug-in module corresponding to the file type. The custom plug-in module corresponding to the file type can further reliably generate a compilation rule file for downloading the target precompiled product from the specified server.

[0055] In one embodiment, before transmitting the custom precompiled configuration file to the custom plug-in module, the method further includes: receiving transmitted plug-in data in a configuration terminal, wherein the plug-in data is obtained by the configuration terminal according to a plug-in customization operation in an interface corresponding to a build system; and generating the custom plug-in module according to the plug-in data.

[0056] The Soong system is the native build system of Android. The Soong system is used to compile Android source code projects. The interface corresponding to the build system can be opened in the configuration terminal. Users can customize the plug-in operations in the interface corresponding to the build system. Through the plug-in customization operations, users can customize the custom plug-in module used to process the custom pre-compiled configuration files to generate compilation rule files in the "build system for compiling Android source code projects".

[0057] The compilation server can receive the plug-in data generated by the plug-in customization operation in the interface corresponding to the build system, and generate a custom plug-in module in the build system of the compilation server based on the plug-in data. Thus, in the build system, the custom plug-in module can be used to "generate compilation rules for downloading target precompiled products from a specified server based on a custom precompilation configuration file, and store the compilation rules in a predetermined file to obtain a compilation rule file."

[0058] Step S130: downloading the target pre-compiled product from the designated server based on the compilation rule file.

[0059] The target precompiled product is the precompiled product corresponding to a precompiled module that needs to be downloaded this time. The precompiled product is a precompiled product, and the compilation server does not need to compile the precompiled product again. For example, in one example, for Figure 3 For the WIFI pre-compiled module shown, in step S330, the compilation server downloads and obtains the target pre-compiled product (wifi.jar file) corresponding to the WIFI pre-compiled module.

[0060] For a source code module, the compilation server needs to compile the source code file (eg, Java / C / C++ file) corresponding to the source code module according to the compilation configuration file corresponding to the source code module to obtain a compiled product.

[0061] The product is the final file compiled by a program through the corresponding compiler, such as the jar file compiled by the Java compiler for a Java program, and the so file compiled by the C / C++ compiler for C / C++.

[0062] In one embodiment, downloading the target precompiled product from the designated server based on the compilation rule file may include: executing the compilation rules in the compilation rule file to pass the rule parameters to a preset download tool; and downloading the target precompiled product from the designated server to a designated directory according to the rule parameters through the preset download tool.

[0063] A preset download tool is configured in the compilation server, and the preset download tool is used to download precompiled products from the specified server. When the compilation server executes the compilation rules in the compilation rule file, the rule parameters in the compilation rules can be passed to the preset download tool, and the preset download tool downloads the target precompiled products from the specified server to the specified directory according to the rule parameters to participate in the compilation of the project.

[0064] For example, a compilation rule can be "downloadPrebuild –name "B" -outdir download directory -remote "server:maven groupId:xxx.xxx artifactId:ddd version:3.3.3 url:www.tcl.com". When the compilation server executes the compilation rule, it can pass parameters such as B, maven, xxx.xxx, ddd, 3.3.3, and www.tcl.com to the download tool.

[0065] In one embodiment, executing the compilation rules in the compilation rule file includes: obtaining rule feature points in the compilation rules in the compilation rule file; performing rule verification according to the rule feature points to obtain a verification result; if the verification result is passed, executing the compilation rules in the compilation rule file.

[0066] Rule feature points in the compilation rules, such as name, server, groupId and other feature points. Before executing the compilation rules in the compilation rule file, the compilation server obtains the rule feature points in the compilation rules in the compilation rule file, performs rule verification based on the rule feature points, and determines whether to execute the compilation rules based on the verification results, which can further improve the download reliability of the pre-compiled products.

[0067] Among them, performing rule verification according to the rule feature points to obtain the verification result may specifically include: determining whether the obtained rule feature points include a predetermined plurality of feature points; if so, determining that the verification result is passed; if not, determining that the verification result is failed.

[0068] It is understandable that in other embodiments, the compiling server may directly execute the compiling rules in the compiling rule file without performing rule verification.

[0069] Step S140: encapsulate the target precompiled product into an image file, so as to use the image file to perform a system update on the target device.

[0070] The compilation server can further encapsulate the target precompiled product into an image file, which can be published by the compilation server to the target device for system update. Figure 3 In the WIFI pre-compilation module shown, in step S340, the compilation server can further package the target pre-compilation product (wifi.jar file) into the flashing image to form an image file.

[0071] In one embodiment, before packaging the target precompiled product as a mirror file, the method further includes: renaming the target precompiled product to obtain a renamed precompiled product; packaging the target precompiled product as a mirror file includes: packaging the renamed precompiled product to obtain the mirror file.

[0072] After the compilation server downloads the target precompiled product to the specified directory, it renames the target precompiled product to obtain a renamed precompiled product that meets the requirements. For example, in an example, Figure 3 As shown, the downloaded target precompiled product is the wifi.jar file, and the wifi.jar file is renamed to obtain the renamed precompiled product javalib.jar file. Then, the compilation server can further encapsulate the renamed precompiled product to reliably obtain the image file.

[0073] In order to better implement the project precompilation processing method provided in the embodiment of the present application, the embodiment of the present application also provides a project precompilation processing device based on the above project precompilation processing method. The meanings of the terms are the same as those in the above project precompilation processing method, and the specific implementation details can refer to the description in the method embodiment. Figure 4 A block diagram of a project pre-compilation processing device according to an embodiment of the present application is shown.

[0074] like Figure 4 As shown, the project precompilation processing device 400 may include: a configuration download unit 410 may be used to download files from the project source code repository in response to a project precompilation startup instruction to obtain a custom precompilation configuration file; a rule generation unit 420 may be used to generate a compilation rule file for downloading a target precompiled product from a specified server based on the custom precompilation configuration file; a product download unit 430 may be used to download the target precompiled product from the specified server based on the compilation rule file; and a file encapsulation unit 440 may be used to encapsulate the target precompiled product into an image file so as to use the image file to perform a system update on a target device.

[0075] In some embodiments of the present application, the rule generation unit is used to: transfer the custom precompiled configuration file to a custom plug-in module; generate, through the custom plug-in module, compilation rules for downloading a target precompiled product from a specified server according to the custom precompiled configuration file, and store the compilation rules in a predetermined file to obtain the compilation rule file.

[0076] In some embodiments of the present application, the rule generation unit is used to: determine the file type corresponding to the custom precompiled configuration file; and transmit the custom precompiled configuration file to a custom plug-in module corresponding to the file type.

[0077] In some embodiments of the present application, before transmitting the custom precompiled configuration file to the custom plug-in module, the device also includes a plug-in customization module, which is used to: receive the transmitted plug-in data in the configuration terminal, the plug-in data is obtained by the configuration terminal according to the plug-in customization operation in the interface corresponding to the build system; generate the custom plug-in module according to the plug-in data.

[0078] In some embodiments of the present application, the product download unit is used to: execute the compilation rules in the compilation rule file to pass the rule parameters to a preset download tool; and download the target pre-compiled product from the designated server to a designated directory through the preset download tool according to the rule parameters.

[0079] In some embodiments of the present application, the product downloading unit is used to: obtain rule feature points in the compilation rules in the compilation rule file; perform rule verification according to the rule feature points to obtain a verification result; if the verification result is passed, execute the compilation rules in the compilation rule file.

[0080] In some embodiments of the present application, before encapsulating the target precompiled product into a mirror file, the device also includes a renaming module, which is used to: rename the target precompiled product to obtain a renamed precompiled product; and the file encapsulation unit is used to: encapsulate the renamed precompiled product to obtain the mirror file.

[0081] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0082] In addition, the present application also provides a server, such as Figure 5 As shown, Figure 5 A block diagram of a server according to an embodiment of the present application is shown, specifically:

[0083] The server may include one or more processing core processors 501, one or more computer-readable storage media memories 502, power supplies 503 and other components. Those skilled in the art will appreciate that Figure 5 The server structure shown in the figure does not constitute a limitation on the server, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0084] Specifically in this embodiment, the processor 501 in the server can load the executable files corresponding to the processes of one or more computer programs into the memory 502 according to the instructions, and the processor 501 runs the computer programs stored in the memory 502, thereby realizing various functions in the aforementioned embodiments of the present application. For example, the processor 501 can perform the following steps:

[0085] In response to a project precompilation start instruction, a file is downloaded from a project source code repository to obtain a custom precompilation configuration file; a compilation rule file for downloading a target precompilation product from a designated server is generated based on the custom precompilation configuration file; the target precompilation product is downloaded from the designated server based on the compilation rule file; the target precompilation product is packaged into an image file so as to use the image file to perform a system update on a target device.

[0086] In some embodiments of the present application, generating a compilation rule file for downloading a target precompiled product from a specified server based on the custom precompiled configuration file includes: transmitting the custom precompiled configuration file to a custom plug-in module; generating, by the custom plug-in module, compilation rules for downloading a target precompiled product from a specified server according to the custom precompiled configuration file, and storing the compilation rules in a predetermined file to obtain the compilation rule file.

[0087] In some embodiments of the present application, transmitting the custom precompiled configuration file to a custom plug-in module includes: determining a file type corresponding to the custom precompiled configuration file; and transmitting the custom precompiled configuration file to a custom plug-in module corresponding to the file type.

[0088] In some embodiments of the present application, before transmitting the custom precompiled configuration file to the custom plug-in module, the method also includes: receiving transmitted plug-in data in the configuration terminal, the plug-in data being obtained by the configuration terminal according to the plug-in customization operation in the interface corresponding to the build system; generating the custom plug-in module according to the plug-in data.

[0089] In some embodiments of the present application, downloading the target precompiled product from the designated server based on the compilation rule file includes: executing the compilation rules in the compilation rule file to pass the rule parameters to a preset download tool; downloading the target precompiled product from the designated server to a designated directory according to the rule parameters through the preset download tool.

[0090] In some embodiments of the present application, executing the compilation rules in the compilation rule file includes: obtaining rule feature points in the compilation rules in the compilation rule file; performing rule verification according to the rule feature points to obtain a verification result; if the verification result is passed, executing the compilation rules in the compilation rule file.

[0091] In some embodiments of the present application, before packaging the target precompiled product as a mirror file, the method further includes: renaming the target precompiled product to obtain a renamed precompiled product; packaging the target precompiled product as a mirror file includes: packaging the renamed precompiled product to obtain the mirror file.

[0092] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0093] To this end, an embodiment of the present application further provides a storage medium, in which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any method provided in the embodiment of the present application.

[0094] The storage medium may be a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0095] Since the computer program stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0096] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0097] It should be understood that the present application is not limited to the embodiments that have been described above and shown in the accompanying drawings, but various modifications and changes may be made without departing from the scope thereof.

Claims

1. A project pre-compilation processing method, characterized in that: include: In response to a project pre-compilation start instruction, download files from a project source code repository to obtain a custom pre-compilation configuration file; Generate a compilation rule file for downloading a target precompiled product from a designated server based on the custom precompiled configuration file; Downloading the target precompiled product from the designated server based on the compilation rule file; Encapsulating the target precompiled product into an image file, so as to use the image file to perform a system update on the target device; The method of generating a compilation rule file for downloading a target precompiled product from a designated server based on the custom precompiled configuration file comprises: transmitting the custom precompiled configuration file to a custom plug-in module; generating a compilation rule for downloading a target precompiled product from a designated server according to the custom precompiled configuration file by the custom plug-in module, and storing the compilation rule in a predetermined file to obtain the compilation rule file; The transmitting the custom precompiled configuration file to the custom plug-in module includes: determining a file type corresponding to the custom precompiled configuration file; transmitting the custom precompiled configuration file to the custom plug-in module corresponding to the file type; The downloading of the target precompiled product from the designated server based on the compilation rule file comprises: executing the compilation rule in the compilation rule file to pass the rule parameter to a preset download tool; downloading the target precompiled product from the designated server to a designated directory according to the rule parameter by the preset download tool; The executing of the compilation rules in the compilation rule file includes: obtaining rule feature points in the compilation rules in the compilation rule file; performing rule verification according to the rule feature points to obtain a verification result; if the verification result is passed, executing the compilation rules in the compilation rule file.

2. The method according to claim 1, characterized in that Before transmitting the custom precompiled configuration file to the custom plug-in module, the method further includes: Receiving the transmitted plug-in data in the configuration terminal, wherein the plug-in data is obtained by the configuration terminal according to the plug-in customization operation in the interface corresponding to the construction system; The custom plug-in module is generated according to the plug-in data.

3. The method according to claim 1, characterized in that: Before packaging the target precompiled product into an image file, the method further includes: Rename the target precompiled product to obtain a renamed precompiled product; The step of packaging the target precompiled product into an image file includes: The renamed precompiled product is packaged to obtain the image file.

4. A project pre-compilation processing device, characterized in that: include: A configuration download unit, for responding to a project pre-compilation start instruction, downloading files from a project source code repository to obtain a custom pre-compiled configuration file; A rule generating unit, used for generating a compiling rule file for downloading a target precompiled product from a designated server based on the custom precompiled configuration file; the generating of the compiling rule file for downloading a target precompiled product from a designated server based on the custom precompiled configuration file comprises: transmitting the custom precompiled configuration file to a custom plug-in module; generating a compiling rule for downloading a target precompiled product from a designated server according to the custom precompiled configuration file by the custom plug-in module, and storing the compiling rule in a predetermined file to obtain the compiling rule file; wherein, the transmitting of the custom precompiled configuration file to the custom plug-in module comprises: determining a file type corresponding to the custom precompiled configuration file; transmitting the custom precompiled configuration file to the custom plug-in module corresponding to the file type; A product downloading unit, used for downloading the target precompiled product from the designated server based on the compilation rule file; the downloading of the target precompiled product from the designated server based on the compilation rule file comprises: executing the compilation rules in the compilation rule file to pass the rule parameters to a preset download tool; downloading the target precompiled product from the designated server to a designated directory according to the rule parameters by the preset download tool; wherein, the executing of the compilation rules in the compilation rule file comprises: obtaining rule feature points in the compilation rules in the compilation rule file; performing rule verification according to the rule feature points to obtain a verification result; if the verification result is passed, executing the compilation rules in the compilation rule file; The file encapsulation unit is used to encapsulate the target pre-compiled product into an image file so as to use the image file to perform a system update on the target device.

5. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 3.

6. A server, characterized in that: include: a memory storing a computer program; A processor reads a computer program stored in a memory to execute the method according to any one of claims 1 to 3.