Method, system and computer device for engineering construction of multiple products
By simulating the construction and parsing the output information to generate description files, the problem of chaotic construction management in multi-product engineering is solved, and an efficient and reliable construction process and consistent final product generation are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-26
AI Technical Summary
In multi-product engineering construction scenarios, engineering construction management can easily become chaotic and complex, leading to reduced reliability, and existing technologies lack effective solutions.
By simulating the construction of the target project, parsing the generated output information, generating a description file, recording the relationship between input resources, construction actions and construction artifacts, and converting it into a description file for the second construction end to execute construction actions, thereby decoupling the construction logic from the execution environment.
This improves the reliability and reproducibility of the engineering build results, ensuring that the second build end generates a final executable product consistent with that in the cloud.
Smart Images

Figure CN121807373B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software engineering, and in particular to engineering construction methods, engineering construction systems and computer devices for multiple products. Background Technology
[0002] With the rapid development of IoT (Internet of Things) and smart devices, embedded systems require reliable firmware update mechanisms to support feature iterations, security patches, and system optimizations. In traditional development processes, software and hardware are tightly coupled, so during product release or maintenance, the operating system, drivers, applications, and configuration files must be integrated into a unified programmable or upgradeable package.
[0003] As device complexity continues to increase, application packages need to support incremental upgrades, rollback mechanisms, and differential updates, driving the development of complex packaging and verification strategies. Simultaneously, in actual product development, there are static configuration differences, product-neutral differences, and differences between domestic and overseas versions among application packages, requiring a single base project to generate numerous different application packages. Therefore, in project build scenarios involving multiple application packages, project build management can easily become chaotic and complex, leading to reduced reliability of the project build results.
[0004] There is currently no effective solution to the problem of insufficient reliability in the engineering construction of multiple products in related technologies. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, system, and computer device for engineering construction of multiple products that can solve the problem of insufficient reliability in engineering construction of multiple products, in order to address the above-mentioned technical problems.
[0006] Firstly, this embodiment provides a multi-product engineering construction method applied to a first construction end, the method comprising:
[0007] Simulate and construct the target project;
[0008] The output information generated during the simulation construction process is analyzed to obtain the correlation between the input resources, construction actions and construction products when the target project is constructed.
[0009] The aforementioned relationships are then converted into a description file for constructing the target project;
[0010] The description file is transmitted to the second build terminal so that the second build terminal can build the target project based on the description file.
[0011] In some of these embodiments, the output information generated during the simulation construction process is parsed, including:
[0012] Add corresponding action tags to the output information during the simulated construction process of the target project, and extract the construction actions during the simulated construction process based on the action tags;
[0013] The dependencies of input resources during the simulation construction process are identified based on the output information.
[0014] In some embodiments, the output information generated during the simulated construction process is parsed to obtain the correlation between input resources, construction actions, and construction products during the construction of the target project, including:
[0015] Based on the output information, the dependencies between the construction action and the input resources are parsed out.
[0016] Based on the target construction product of the target project, the construction action and the input resources are integrated to obtain the association relationship.
[0017] In some embodiments, the association is converted into a description file for constructing the target project, including:
[0018] Using the target construction product of the target project as the root node, aggregate the input resources required to output the target construction product to obtain the resource aggregation tree of the target construction product;
[0019] Based on the resource aggregation tree and the construction actions corresponding to the edges of the resource aggregation tree, the description file of the target project is obtained.
[0020] Secondly, this embodiment provides a multi-product engineering construction method applied to a second construction end, the method comprising:
[0021] The first construction end receives a description file transmitted by the first construction end. The description file is obtained by the first construction end simulating the construction of the target project and parsing the output information generated during the simulation construction process to obtain the correlation between the input resources, construction actions and construction products when the target project is constructed. The description file is then converted according to the correlation.
[0022] The corresponding build action is performed on the input resource according to the description file.
[0023] In some embodiments, the corresponding build action is performed on the input resource according to the description file, including:
[0024] Expand the build object based on the target build artifact in the description file;
[0025] In the constructed object, identify the constructed artifacts whose input resources are the same as the constructed action;
[0026] Merge and label the build processes corresponding to the same build artifacts;
[0027] The corresponding build actions are performed on the input resources according to the description file, and the build artifacts generated based on the tagged build process are copied.
[0028] In some embodiments, merging and labeling the build processes corresponding to the same build artifacts includes:
[0029] Based on the description file, a resource aggregation tree corresponding to the target build product of the target project is obtained. The resource aggregation tree is used to indicate the topological structure between the input resources required to build the target build product.
[0030] Based on the resource aggregation tree, determine the construction product that has the same input resources and construction action;
[0031] Merge the sub-resource tree nodes in the resource aggregation tree that correspond to the construction products with the same construction action as the input resource, and mark the merged sub-resource tree nodes.
[0032] In some embodiments, before parsing the output information generated during the simulated construction process, the first construction end adds action tags corresponding to the construction actions to the output information during the target project's simulated construction process, so that the description file contains the action tags; and performs corresponding construction actions on the input resources according to the description file, including:
[0033] Based on the action tags in the description file, the corresponding build actions are performed on the input resources.
[0034] Thirdly, this embodiment provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the multi-product engineering construction method described in the first or second aspect above.
[0035] The aforementioned multi-product engineering construction method, engineering construction system, and computer equipment involve a first construction end simulating the construction of the target project. Based on the output information generated during the simulation construction process, the correlation between the input resources, construction actions, and construction products during the construction of the target project is obtained. Based on this correlation, a description file that accurately describes the construction of the target project is generated, providing accurate guidance for the construction of the project. This allows the second construction end to directly generate a final executable product consistent with that in the cloud based on the description file, thereby improving the reliability of the construction results. Attached Figure Description
[0036] Figure 1 This is an application environment diagram of a multi-product engineering construction method in one embodiment;
[0037] Figure 2 This is a flowchart illustrating a method for engineering the construction of multiple products in one embodiment;
[0038] Figure 3 This is a schematic diagram of the structure of a resource aggregation tree in one embodiment;
[0039] Figure 4 This is a flowchart illustrating a multi-product engineering construction method in another embodiment;
[0040] Figure 5 This is one embodiment of a cloud-based engineering construction method based on a distributed construction system;
[0041] Figure 6 This is an example of an edge-based project construction method based on a distributed construction system;
[0042] Figure 7 This is a structural block diagram of the engineering construction system in one embodiment;
[0043] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0045] Embedded package creation originated from the early development process of embedded Linux, automating the conversion from source code to executable images through system building. The process of integrating the operating system, drivers, applications, and configuration files into a unified, programmable, or upgradeable package relies on underlying technologies such as cross-compilation, image generation, and firmware signing to ensure the program runs correctly on specific hardware platforms and possesses tamper-proof capabilities. As device complexity continues to increase, the creation of corresponding embedded packages for those devices becomes increasingly complex.
[0046] In actual product development, a basic project needs to generate a large number of different packages to meet the requirement of generating hundreds of packages in parallel within the same project. This is mainly due to the following three types of static configuration differences: differences in static configuration within the program, product-neutralization differences, and differences between domestic and overseas versions. Static configuration differences within the program include: different customers or deployment environments require the program to enable or disable specific functional modules during compilation, such as log levels, debugging interfaces, protocol support (e.g., MQTT, HTTP), encryption strength, etc. These configurations are statically bound through compile-time macro definitions or configuration files, resulting in differences in the output binary. Product-neutralization differences refer to brand-neutralization requirements, such as white-label requirements, where the same codebase needs to support customization for multiple brands. Product-neutralization differences include: brand name, UI (User Interface) resources, default theme, manufacturer ID, device model string, etc. For product-neutralization differences, all resources are statically embedded during the build process, requiring an independent build process to generate dedicated packages. Differences between domestic and overseas versions refer to the distinction between domestic and overseas market versions due to compliance, network environment, language, and other requirements. Common differences between domestic and overseas versions include different language support (Simplified Chinese / English / multilingual), different default time zones and regional settings, different encryption algorithms, different third-party service addresses (such as OTA, log reporting, authentication servers), and different privacy policies and data reporting strategies.
[0047] Traditional project builds often rely on manually written description files for a single program. In multi-product project build scenarios, there are complex and numerous embedded package build requirements. Manually defining the entire project's build logic, including multiple products, multiple platforms, and complex dependencies, often results in description files that are incomplete and have long writing cycles. This makes project build management chaotic and complex, ultimately leading to reduced reliability of multi-product project builds.
[0048] The multi-product engineering construction method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the second construction terminal 102 communicates with the first construction terminal 104 via a network. A data storage system can store the data that the first construction terminal 104 needs to process. The data storage system can be integrated onto the first construction terminal 104 or placed on other network servers. One or more second construction terminals 102 can be configured. The second construction terminal 102 can be, but is not limited to, various embedded devices, personal computers, laptops, smartphones, tablets, IoT devices, etc. The first construction terminal 104 can be implemented using a standalone server or a server cluster consisting of multiple servers, and can be an application virtualization technology platform.
[0049] In one embodiment, such as Figure 2 As shown, a multi-product engineering construction method is provided, which can be applied to... Figure 1 Taking the first build terminal 104 as an example, the following steps are included:
[0050] Step 202: Simulate the construction of the target project.
[0051] The target project needs to generate one or more packages. Optionally, the first build end can use a preset build mechanism to build the packages covered by the target project, thereby simulating the complete compilation process of the target project. The preset build mechanism includes the compilation order and rules for all files in the packages, such as the compilation format of source files, the library files to be created for the target project, and their generation order. The specific build mechanism can be set and modified according to different target projects, and is not limited here. Optionally, the build mechanism can be defined by a standard Makefile. Methods for defining build rules and parsing Makefiles to implement the build process can be found in relevant technical documentation, and will not be elaborated here.
[0052] Step 204: Analyze the output information generated during the simulation construction process to obtain the correlation between the input resources, construction actions and construction products when constructing the target project.
[0053] The output information during the simulated build process is a raw record of the build process, including the input resources and build actions involved in building the target project, as well as the intermediate and target build artifacts generated during the simulated build process. Input resources include, but are not limited to, source code, libraries, and configurations. Build actions include, but are not limited to, converting source code into target object files, linking multiple target files and libraries into an executable program, migrating file paths during the build process, encrypting sensitive resources or artifacts, combining multiple resources to generate new resources, and digitally signing artifacts to ensure trustworthiness and integrity. Build artifacts include, but are not limited to, executable files, library files, packaged files, and intermediate compiled files.
[0054] Optionally, during the simulation construction of the target project at the first construction end, all output information is collected, and the dependency relationship between input resources in the construction process is extracted based on the output information. At the same time, the topological structure of how input resources converge to obtain each construction product through various construction actions is obtained, thereby forming the association relationship between input resources, construction actions and construction products.
[0055] Step 206: Convert the association into a description file for building the target project.
[0056] The association records the build actions performed on the input resources and the corresponding build artifacts, and converts the association into a standardized description file. The description file describes the operations (build actions), dependencies (input items that must be included in the package), and resource paths of each resource in the package required to build the target project, and can provide build guidance for the second build end.
[0057] Optionally, a pre-built transformation rule template is provided. This template converts the input resources, build actions, and build artifacts recorded in the association into description text in a specified format. For example, the transformation rule template can convert the build action "cp" (copy operation) into the description text "CopyAction," and "encrypt" (encryption operation) into the description text "EncryptedAction." The transformation rule template can also convert input resources and build artifacts, which will not be elaborated here. The correspondence between input resources, build actions, build artifacts, and description texts in the transformation rule template can be configured according to actual needs. Based on the transformation rule template, the process of converting the association into a description file can be implemented by compiling Python code; it should be understood that it can also be implemented by other computer languages.
[0058] Step 208: The description file is transmitted to the second build end so that the second build end can build the target project based on the description file.
[0059] The first build terminal can proactively send the description file to the second build terminal, or it can send the description file to the second build terminal in response to a request. The second build terminal does not require the original build script or a complete development environment; it can complete the build of the target project solely based on the description file sent by the first build terminal.
[0060] The above-mentioned multi-product engineering construction method involves the first construction end simulating the construction of the target project. Based on the historical simulation construction results, a description file is generated that accurately describes the operations, dependencies, and resource paths required for the construction of the target project, providing accurate guidance for the construction of the project. Thus, with "description as product" as the core idea, the construction logic is decoupled from the execution environment, enabling the second construction end to achieve an efficient and reproducible construction process and improve the reliability of the construction results.
[0061] In one embodiment, parsing the output information generated during the simulated construction process to obtain the association between input resources, construction actions, and construction products during the construction of the target project includes: adding corresponding action tags to the output information during the simulated construction process of the target project; extracting the construction actions in the simulated construction process based on the action tags; and identifying the dependencies of input resources during the simulated construction process based on the output information.
[0062] Action tags are used to record build actions during the build process. Action tags include one or more of the following: compile, link, move, encrypt, synthesize, and sign. Other action tags can be set according to build requirements; there are no restrictions here. Resource dependencies are the set of external conditions or inputs necessary for the project build.
[0063] Optionally, during the build process, all output information is automatically collected, including compilation commands, dependency paths, generated files, linking order, encryption and signing actions, etc. The correspondence between the build actions covered by the output information and the action tags can be set according to requirements. For example, converting source code into target object files corresponds to the action tag "compile"; the path migration of files recorded in the dependency paths during the build process corresponds to the action tag "move"; generating files, such as combining multiple resources to generate a new resource, corresponds to the action tag "compose"; the linking order, such as linking multiple target files and libraries into an executable program, corresponds to the action tag "link"; encryption actions correspond to the action tag "encrypt"; and the signing action of digitally signing the artifact corresponds to the action tag "sign".
[0064] Optionally, all input information during the build process is aggregated into a structured build log, and the build log is standardized to make all log content accessible. Build actions are extracted from the build log and integrated into a structured model. Based on this structured model, the dependencies between build actions and input resources at each build stage are identified. Optionally, various input information during the build process is expanded to obtain the structured log; the specific implementation methods for parameter expansion can be found in relevant technical documentation and will not be elaborated here. Further standardization of the structured log includes operations such as field alignment and standardizing time formats.
[0065] Optionally, extracting build actions from the build log includes: inputting the build log into a pre-trained LLM (Large Language Model), which extracts and outputs key build actions. Key build actions can be cp (copy operation), encrypt (encryption operation), mv (move operation), etc., without limitation. The pre-training method for the LLM can be found in relevant technical documentation and is not limited here. Subsequently, the key build actions output by the LLM can be directly used as the aforementioned build actions to integrate them into a structured model. Alternatively, the LLM output can be used as annotations to add corresponding action labels to the output information during the target project's simulated build process. Extraction rules can then be derived based on these annotations, such as regular expressions or pattern matching. After extracting the build actions according to these rules, the build actions are integrated to obtain a structured model.
[0066] Optionally, the construction actions are integrated into a structured representation with dependencies and temporal relationships to obtain a structured model. The structured model can be a directed graph model, a tree model, etc. The construction methods and principles of the structured model can be found in the relevant technical records, which will not be elaborated here. Based on the structured model, the construction stages are divided according to one or more elements in the type of construction action, resource flow, and temporal information, and the dependencies between construction actions and input resources in each construction stage are extracted.
[0067] In this embodiment, by adding corresponding action tags to the output information during the target project simulation construction process, a unified expression of construction actions in the description file is achieved, thereby accurately extracting the construction actions and resource dependencies. Simultaneously, action tags allow for precise control of the construction behavior executed by the second construction end during project construction, enabling the second construction end to accurately recreate the construction process.
[0068] In one embodiment, the output information generated during the simulated construction process is parsed to obtain the relationship between the input resources, construction actions, and construction products when the target project is constructed. This includes: parsing the dependency relationship between construction actions and input resources based on the output information; and integrating the construction actions and input resources based on the target construction product of the target project to obtain the relationship.
[0069] The target build product of the target project is the final product obtained by building the target project, such as a program package. Optionally, the topological relationship between the input resources of the final build product is built in reverse, with the final build product as the root node, as well as the build actions performed on the input resources and the intermediate products obtained based on the input resources.
[0070] Furthermore, in one embodiment, the association relationship is converted into a description file for constructing the target project, including: taking the target construction product of the target project as the root node, aggregating the input resources required to output the target construction product to obtain a resource aggregation tree of the target construction product; and converting the description file of the target project according to the resource aggregation tree and the construction actions corresponding to the edges of the resource aggregation tree.
[0071] The resource aggregation tree is used to describe the process of aggregating input resources to obtain the target build product. Optionally, the resource aggregation tree can be constructed in reverse with the final build product as the root node. The resource aggregation tree describes how input resources (source code, libraries, configurations, etc.) are aggregated into the final product, reflecting the build topology.
[0072] Each child node of the resource aggregation tree generates its parent node through a corresponding construction action; the edges of the resource aggregation tree correspond to different construction actions.
[0073] For ease of understanding, Figure 3 A schematic diagram of a resource aggregation tree structure is provided in this embodiment, such as... Figure 3 As shown, the original resources generate process products 1.1.1 and 2.1.1 based on the build action "copy". The build action "encrypt" is then performed on process products 1.1.1 and 2.1.1 respectively to obtain process products 1.1 and 2.1. Process products 1.1, 1.2, etc., are compressed through the build action to obtain product 1, and process products 2.1, 2.2, etc., are compressed through the build action to obtain product 2. Product 1 and product 2 are the target build products in the above embodiments, i.e., the program package. The resource aggregation tree structure can effectively identify the intermediate reuse processes and resources in the build process of product 1 and product 2.
[0074] In this embodiment, guided by the target construction product of the target project, the topological relationship between input resources and construction products is integrated, thereby obtaining the association between input resources, construction actions and construction products when the target project is constructed. Based on the construction product, the description file is converted, the construction logic is decoupled from the execution environment, and accurate construction guidance is provided for the second construction end.
[0075] In one embodiment, such as Figure 4 As shown, another multi-product engineering construction method is provided, which can be applied to... Figure 1 Taking the second construction terminal 102 as an example, the following steps are included:
[0076] Step 402: Receive the description file transmitted by the first construction end. The description file is obtained by the first construction end through simulating the construction of the target project and parsing the output information generated during the simulation construction process. After obtaining the correlation between the input resources, construction actions and construction products when the target project is constructed, the description file is converted according to the correlation.
[0077] Step 404: Perform the corresponding build action on the input resources according to the description file.
[0078] Optionally, the second build endpoint loads the description file via a build executor, thereby parsing the build instructions and resource structure within the description file. The build instructions describe the resources required for the build, the actions to be performed, etc., while the resource structure includes the dependencies between build resources, build actions, and build artifacts. Based on the resource structure indicated in the description file, the build executor of the second build endpoint, in response to the build instructions, performs the corresponding build actions on the input resources.
[0079] In this embodiment, the second build end does not require the original build script or a complete development environment. It can complete the build based solely on the description file distributed from the cloud and obtain the final executable product that is consistent with the cloud. The build result has high reproducibility and high reliability.
[0080] In one embodiment, performing a corresponding build action on the input resource according to the description file includes: expanding the build object according to the target build artifact in the description file; determining the build artifacts in the build object that are the same as the input resource and the build action, merging and marking the build processes corresponding to the same build artifacts; performing the corresponding build action on the input resource according to the description file, and copying the build artifacts generated based on the marked build processes.
[0081] Here, the build object refers to the build target of the project. Optionally, the executor parses the description file and expands one or more target build artifacts declared in it into specific executable tasks, thus obtaining the build object. Optionally, when the description file is obtained based on the resource aggregation tree and the corresponding build action, multiple target build artifacts can be obtained based on the root node of the resource aggregation tree, thereby determining the build object.
[0082] Optionally, after merging build processes corresponding to identical build artifacts, the build artifacts are marked based on the number of merged processes to ensure that the number of build artifacts generated by the copied marked build processes is consistent with the number of merged build processes. For example, merging and marking three identical build processes means that after obtaining the build artifact, the build artifact is copied twice and allocated to the corresponding build space.
[0083] Further, in one embodiment, the build process of merging and marking the same build products includes: obtaining a resource aggregation tree corresponding to the target build product of the target project according to the description file, wherein the resource aggregation tree is used to indicate the topology between the input resources required to build the target build product; determining the build products with the same input resources and build actions according to the resource aggregation tree; merging the sub-resource tree nodes corresponding to the build products with the same input resources and build actions in the resource aggregation tree, and marking the merged sub-resource tree nodes.
[0084] The sub-resource tree nodes describe the process of aggregating input resources into architectural artifacts that share the same construction action. Optionally, you can refer to... Figure 3 A schematic diagram of the resource tree structure in the image, such as... Figure 3 As shown, during the construction of Products 1 and 2, Process Products 1.1 and 2.2 are identical, belonging to the same input resources and construction actions. The sub-resource tree nodes corresponding to Process Products 1.1 and 2.2 are merged and marked. This construction process is executed only once when constructing Process Products 1.1 and 2.2. After generating the process product, it is copied and distributed to the construction spaces of Products 1 and 2.
[0085] In this embodiment, when the input resources and the corresponding construction actions are exactly the same, the corresponding construction products are also the same. By merging the construction processes that generate the construction products, the performance consumption of the construction equipment can be effectively reduced. By copying the construction products, the integrity of dependencies can be ensured.
[0086] In one embodiment, before parsing the output information generated during the simulated construction process, the first construction end adds action tags corresponding to the construction actions to the output information during the simulated construction process of the target project, so that the description file contains action tags; and performs corresponding construction actions on the input resources according to the description file, including: performing corresponding construction actions on the input resources according to the action tags in the description file.
[0087] In the first construction end, after adding action tags to the output information, the construction action still has a corresponding action tag in the association relationship between the input resources, construction actions and construction products obtained based on the output information parsing. The description file converted based on this association relationship contains the above action tags.
[0088] Optionally, after the second build end loads the description file, it executes the build action corresponding to the action tag in the description file, including but not limited to one or more of the following: compile, link, move, encrypt, synthesize, and sign.
[0089] In this embodiment, based on the action tags in the description file, the construction actions required for the project construction can be executed precisely, the construction process can be accurately reproduced, and the construction accuracy can be improved.
[0090] In one embodiment, the first build end is the cloud and the second build end is the edge. Through the division of labor and cooperation between the edge and the cloud, an efficient and reproducible build process is achieved.
[0091] In the cloud, Figure 5 A cloud-based engineering construction method based on a distributed construction system is provided, including:
[0092] Step 501, program build begins.
[0093] Alternatively, a standard makefile can be used to perform a regular build of the project, simulating the complete compilation process.
[0094] Step 502: Capture the output information of the build process.
[0095] During the build process, the cloud system automatically collects all output information, including compilation commands, dependency paths, generated files, linking order, encryption and signing actions, etc. This build information serves as the basis for analyzing the relationships between subsequent input resources, build actions, and build artifacts. Optionally, the project can be built and output information captured remotely, or the program can be built on a terminal other than the cloud, with the cloud collecting all output information.
[0096] Step 503: Generate the log analysis model.
[0097] The output information is integrated to obtain and parse the build logs. Using an intelligent log analysis model, corresponding action tags are assigned to the build actions in the build logs, and a structured model of the build behavior is extracted to further identify the build actions and input resource dependencies at each build stage.
[0098] Optionally, throughout the build process, the log analysis model identifies and records the following key build actions for precise control of build behavior: compilation (converting source code into target object files); linking (linking multiple target files and libraries into an executable program); migration (path migration of files during the build process); encryption (encrypting sensitive resources or artifacts); synthesis (combining multiple resources to generate new resources, such as firmware packaging); and signing (digitally signing artifacts to ensure trustworthiness and integrity). These build actions are abstracted into tags and uniformly expressed in the description file, enabling the edge to accurately reconstruct the build process.
[0099] Step 504: Construct the resource aggregation tree.
[0100] Using the final build artifact as the root node, a resource aggregation tree is constructed in reverse. The resource aggregation tree is used to clearly express the process of all input resources (source code, libraries, configurations, etc.) converging into the final artifact, reflecting the project build topology, that is, the relationship between input resources, build actions and build artifacts is shown through the resource aggregation tree.
[0101] Step 505: Generate the description file.
[0102] The resource aggregation tree and its corresponding build actions are converted into a description file, which fully defines the operations, dependencies, and resource paths required for the build, achieving "build as configuration". Optionally, the resource aggregation tree and build actions can be converted into a standardized XML description file.
[0103] Step 506: The description file is sent to the edge.
[0104] Optionally, the generated XML description file can be transmitted to an edge device to provide guidance for building offline or restricted environments.
[0105] At the edge, no original build script or complete development environment is needed; the build is completed solely based on the description files distributed from the cloud. Figure 6 An edge-based project building method based on a distributed building system is provided, including:
[0106] Step 601: Receive and input the description file into the build executor.
[0107] Optionally, the edge build executor loads the description file and parses it to obtain the build instructions and resource structure for the project. The build instructions describe the resources required for the build, the build actions to be performed, and other related behaviors; the resource structure includes the relationships between build resources, build actions, and build artifacts.
[0108] Step 602: Expand the construction object, merge and mark the sub-resource trees of the construction artifacts that have the same input resources and construction actions.
[0109] Optionally, the executor expands the build object. For example, the executor expands multiple packages according to the root node of the resource aggregation tree. It merges at least two sub-resource trees corresponding to the build artifacts with the same input resources and build actions, and marks the nodes that need resource copying.
[0110] Step 603: Execute the build task and replicate resources to the merge node.
[0111] According to the action tags in the description file, perform operations such as compiling, linking, moving, encrypting, synthesizing, and signing, and perform resource replication on merged nodes to ensure dependency integrity.
[0112] Step 604: Generate the final product.
[0113] Once the build process is complete, the output is a final executable artifact consistent with that in the cloud, ensuring the reproducibility of the build results.
[0114] In this embodiment, the cloud generates a description file based on historical construction data; when the edge performs multi-target construction based on the description file, the construction process is automatically merged, effectively reducing the performance consumption of the construction device. Figure 5 and Figure 6 The corresponding process is based on the core idea of "description as product", decoupling the build logic from the execution environment and supporting cross-platform and cross-network build and deployment.
[0115] Specifically, during the engineering construction based on the distributed construction system, all constructions are based on the same description file, ensuring consistency and reproducibility; through parameterized configuration, it supports the on-demand generation of hundreds of packages, achieving scalable support; sensitive construction steps can be executed in an isolated environment, with only the description file being distributed, making the engineering construction safe and controllable; it is suitable for high-frequency variant scenarios such as production line burning, overseas deployment, and customer customization, and has the advantages of efficient delivery, improving the reliability of engineering construction for multiple products.
[0116] Based on the same inventive concept, this application also provides an engineering construction system for implementing the above-described multi-product engineering construction method. The solution provided by this engineering construction system is similar to the solution described in the above method; therefore, the specific limitations in one or more engineering construction system embodiments provided below can be found in the limitations of the multi-product engineering construction method described above, and will not be repeated here.
[0117] In one embodiment, such as Figure 7 As shown, an engineering construction system is provided, including: a first construction end and a second construction end.
[0118] The first construction end is used to simulate the construction of the target project; it parses the output information generated during the simulation construction process to obtain the correlation between the input resources, construction actions and construction products when the target project is constructed; it converts the correlation into a description file for constructing the target project; and it transmits the description file to the second construction end.
[0119] The second build terminal is used to receive the description file transmitted by the first build terminal; and to perform corresponding build actions on the input resources according to the description file.
[0120] The first and second build endpoints can communicate over a network. The first build endpoint can be implemented using a standalone server or a server cluster consisting of multiple servers, and can be an application virtualization technology platform. Multiple second build endpoints can be configured as needed, located close to the data source or the end user's local computing node; these can be embedded devices, user terminals, or other similar devices.
[0121] In one embodiment, the first construction end parses the output information generated during the simulated construction process, including: adding corresponding action tags to the output information during the simulated construction process of the target project, extracting the construction actions during the simulated construction process based on the action tags, and identifying the dependencies of input resources during the simulated construction process based on the output information.
[0122] Optionally, the first construction end parses the output information generated during the simulated construction process to obtain the correlation between input resources, construction actions and construction products when constructing the target project, including: parsing the dependency relationship between construction actions and input resources based on the output information; and integrating construction actions and input resources based on the target construction product of the target project to obtain the correlation relationship.
[0123] Optionally, the first construction end converts the association into a description file for the construction target project, including: taking the target construction product of the target project as the root node, aggregating the input resources required to output the target construction product, and obtaining a resource aggregation tree of the target construction product; and converting the description file of the target project according to the resource aggregation tree and the construction actions corresponding to the edges in the resource aggregation tree.
[0124] In one embodiment, the second build end performs corresponding build actions on the input resources according to the description file, including: expanding the build object according to the target build artifact in the description file; determining the build artifacts in the build object whose input resources are the same as the build actions; merging and marking the build processes corresponding to the same build artifacts; performing corresponding build actions on the input resources according to the description file, and copying the build artifacts generated based on the marked build processes. Optionally, merging and marking the build processes corresponding to the same build artifacts includes: obtaining a resource aggregation tree corresponding to the target build artifact of the target project according to the description file, the resource aggregation tree being used to indicate the topology between the input resources required to build the target build artifact; determining the build artifacts whose input resources are the same as the build actions according to the resource aggregation tree; merging the sub-resource tree nodes in the resource aggregation tree corresponding to the build artifacts whose input resources are the same as the build actions, and marking the merged sub-resource tree nodes.
[0125] Optionally, before parsing the output information generated during the simulated construction process, the first construction end adds action tags corresponding to the construction actions to the output information during the simulated construction process of the target project, so that the description file contains action tags; the second construction end performs the corresponding construction actions on the input resources according to the description file, including: performing the corresponding construction actions on the input resources according to the action tags in the description file.
[0126] Each module in the aforementioned engineering construction system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0127] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores historical build data obtained from routine engineering builds. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a multi-product engineering build method.
[0128] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0129] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps applied to the first or second construction end in the above method embodiments.
[0130] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps applied to a first or second build end in the above method embodiments.
[0131] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps applied to a first or second build end in the above method embodiments.
[0132] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0133] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0134] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for engineering the construction of multiple products, characterized in that, Applied to the first construction end, the method includes: Simulate and construct the target project; The output information generated during the simulation construction process is analyzed to obtain the correlation between the input resources, construction actions and construction products when the target project is constructed. The aforementioned relationships are then converted into a description file for constructing the target project; The description file is transmitted to the second build terminal so that the second build terminal can build the target project based on the description file; The process of converting the association into a description file for constructing the target project includes: taking the target construction product of the target project as the root node, aggregating the input resources required to output the target construction product to obtain a resource aggregation tree of the target construction product; and converting the description file of the target project according to the resource aggregation tree and the construction actions corresponding to the edges of the resource aggregation tree; wherein the resource aggregation tree represents the association between the input resources, the construction actions and the construction product.
2. The method according to claim 1, characterized in that, The output information generated during the simulation construction process is parsed, including: Add corresponding action tags to the output information during the simulated construction process of the target project, and extract the construction actions during the simulated construction process based on the action tags; The dependencies of input resources during the simulation construction process are identified based on the output information.
3. The method according to claim 1, characterized in that, The output information generated during the simulation construction process is analyzed to obtain the correlation between the input resources, construction actions, and construction artifacts during the construction of the target project, including: Based on the output information, the dependencies between the construction action and the input resources are parsed out. Based on the target construction product of the target project, the construction action and the input resources are integrated to obtain the association relationship.
4. A method for engineering the construction of multiple products, characterized in that, Applied to the second construction end, the method includes: The system receives a description file transmitted by a first construction terminal. This description file is generated by the first construction terminal through simulated construction of a target project and parsing the output information generated during the simulated construction process. The description file is obtained by converting the input resources, construction actions, and construction products during the construction of the target project, based on these relationships. The conversion of the description file based on these relationships includes: using the target construction product of the target project as the root node, aggregating the input resources required to output the target construction product to obtain a resource aggregation tree for the target construction product; and converting the description file of the target project based on the resource aggregation tree and the construction actions corresponding to the edges of the resource aggregation tree. The resource aggregation tree represents the relationships between the input resources, the construction actions, and the construction products. The corresponding build action is performed on the input resource according to the description file.
5. The method according to claim 4, characterized in that, Perform corresponding build actions on the input resources according to the description file, including: Expand the build object based on the target build artifact in the description file; In the constructed object, identify the constructed artifacts whose input resources are the same as the constructed action; Merge and label the build processes corresponding to the same build artifacts; The corresponding build actions are performed on the input resources according to the description file, and the build artifacts generated based on the tagged build process are copied. Specifically, expanding the build object based on the target build artifacts in the description file includes: parsing the description file and expanding one or more target build artifacts declared in the description file into executable tasks to obtain the build object.
6. The method according to claim 5, characterized in that, Merging and tagging the build processes corresponding to the same build artifacts includes: Based on the description file, a resource aggregation tree corresponding to the target build product of the target project is obtained. The resource aggregation tree is used to indicate the topological structure between the input resources required to build the target build product. Based on the resource aggregation tree, determine the construction product that has the same input resources and construction action; Merge the sub-resource tree nodes in the resource aggregation tree that correspond to the construction products with the same construction action as the input resource, and mark the merged sub-resource tree nodes.
7. The method according to claim 4, characterized in that, Before parsing the output information generated during the simulated construction process, the first construction end adds action tags corresponding to the construction actions to the output information during the simulated construction process of the target project, so that the description file contains the action tags; Perform corresponding build actions on the input resources according to the description file, including: Based on the action tags in the description file, the corresponding build actions are performed on the input resources.
8. An engineering construction system, characterized in that, The system includes: a first construction terminal and a second construction terminal; The first construction end is used to simulate the construction of the target project; parse the output information generated during the simulated construction process to obtain the association relationship between the input resources, construction actions, and construction products when constructing the target project; convert the association relationship to obtain a description file for constructing the target project; and transmit the description file to the second construction end; wherein, converting the association relationship into a description file for constructing the target project includes: taking the target construction product of the target project as the root node, aggregating the input resources required to output the target construction product to obtain a resource aggregation tree of the target construction product; converting the resource aggregation tree and the construction actions corresponding to the edges of the resource aggregation tree to obtain a description file of the target project; the resource aggregation tree represents the association relationship between the input resources, the construction actions, and the construction products; The second build terminal is used to receive the description file transmitted by the first build terminal; and to perform corresponding build actions on the input resources according to the description file.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the engineering construction method of multiple products according to any one of claims 1 to 3, or implements the engineering construction method of multiple products according to any one of claims 4 to 7.