Method, apparatus and system for constructing software package, and related device

By integrating and merging the configuration items of multiple sets of customized files to generate configuration files, the problem of complexity and low efficiency of customized software package construction in the existing technology is solved, and support for automated construction and multi-party configuration is achieved, which is suitable for multiple applications. field.

WO2024193152A1PCT designated stage expired Publication Date: 2024-09-26HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2023/141002
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-23
Filing Date
2023-12-22
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

In the existing technology, the process of building a customized software package is complex and inefficient. Users need to modify the build script, which makes the operation difficult and inefficient.

Method used

By obtaining multiple sets of customized files, configuration items written based on markup language, and integrating and merging configuration items using a fusion customization strategy to generate configuration files, users can build software packages without modifying the build script, supporting comprehensive configuration of multiple customization parties.

Benefits of technology

It reduces the difficulty and time for users to build customized software packages, improves construction efficiency, and is suitable for servers and embedded fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023141002_26092024_PF_FP
    Figure CN2023141002_26092024_PF_FP
Patent Text Reader

Abstract

A method, apparatus and system for constructing a software package and a related device, which relate to the technical field of data processing. The method comprises acquiring multiple sets of customization files written on the basis of a markup language, the multiple sets of customization files being used for configuring a software package to be constructed, and each set of customization files comprising at least one configuration item; then determining a configuration file according to a fusion customization policy and the multiple sets of customization files, the configuration file comprising at least one configuration item, the fusion customization policy being used for integrating multiple configuration items in the multiple sets of customization files, for example, associating multiple configuration items and merging multiple configuration items and the like, thereby constructing a software package according to the configuration file. Therefore, during the process of constructing the software package, a user does not need to modify a construction script of the software package, which not only effectively reduces the difficulty of the user customizing and constructing the software package, improving the user-friendliness of the customized software package, but also improves the efficiency of an automated customized package construction process.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, system and related equipment for building software package

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 23, 2023, with application number 202310320857.0 and application name “Methods, devices, systems and related equipment for constructing software packages”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of data processing technology, and in particular to a method, apparatus, system and related equipment for constructing a software package. Background Art

[0003] Currently, custom software packages have become a common requirement in the server and embedded systems sectors. For example, in the embedded system sector, custom software packages are often built for different development boards to meet the customization requirements of different development boards.

[0004] In real-world applications, users typically modify the package's build script to customize the software package to meet the customization requirements of the customizing party. This invasive approach to building packages is complex and inefficient.

[0005] Therefore, there is an urgent need for a method for building a software package to reduce the difficulty of building a customized software package for users and improve the efficiency of building a customized software package.

[0006] Summary of the Invention

[0007] This application provides a method for building a software package to reduce the difficulty of building a customized software package and improve the efficiency of building a customized software package. In addition, this application also provides a corresponding apparatus, system, computing device, computer-readable storage medium, and computer program product for building the software package.

[0008] In a first aspect, the present application provides a method for building a software package, comprising: obtaining multiple sets of customized files, which can be provided by one or more customization parties and are used to configure the software package to be built, and the multiple sets of customized files are written based on a markup language, such as YAML or XML, and each set of customized files includes at least one configuration item, such as a configuration item for the version of the software package, a configuration item for the tool file on which the software package depends on for building the software package, etc.; then, determining a configuration file based on a fusion customization strategy and the multiple sets of customized files, the configuration file including at least one configuration item, the fusion customization strategy being used to integrate multiple configuration items in the multiple sets of customized files, such as associating multiple configuration items and merging multiple configuration items, thereby building a software package according to the configuration file.

[0009] In this way, during the software package construction process, users only need to provide customized files to achieve customized software package construction, without having to modify the software package's build script. This not only effectively reduces the difficulty of customizing the software package and improves its user-friendliness, but also effectively improves the efficiency of customized software package construction through this automated construction process. Furthermore, when multiple sets of customized files are obtained from different customization parties, such as different users, the above configuration method can support the comprehensive configuration of the software package using multiple customization policies. Furthermore, this configuration method is applicable to software package construction scenarios in various fields, such as the server and embedded systems fields.

[0010] In one possible implementation, when processing multiple sets of customization files according to a fusion customization strategy, the fusion customization strategy may include performing an integration operation on multiple configuration items within the multiple sets of customization files. This integration operation includes associating or merging multiple configuration items. By associating or merging multiple configuration items, comprehensive configuration of the software package can be achieved, thereby simplifying the customization of the software package. For example, different customization parties can participate in the customization of the software package, and the same customization party can customize the software package multiple times within different time periods.

[0011] In one possible implementation, when performing an integration operation on multiple configuration items in multiple sets of customized files, the multiple configuration items in the multiple sets of customized files may be mapped to a configuration space, and then, based on the keys and values ​​of the multiple configuration items, reference relationships between different configuration items in the configuration space are established. The multiple configuration items in the multiple sets of customized files are then merged to obtain a merged result. For example, the multiple configuration items may be merged through internal references or inheritance, thereby generating a configuration file based on the reference relationships and merged results between different configuration items in the configuration space. In this way, by establishing reference relationships between different configuration items, different configuration items can be associated, and by associating and merging the configuration items, the integration of multiple configuration items can be achieved.

[0012] In one possible implementation, when merging multiple configuration items in multiple customized files, a user-provided merge operation may be obtained and the multiple configuration items in the multiple customized files may be merged according to the merge strategy. This allows users to intervene in the merging of configuration items, improving configuration flexibility.

[0013] In one possible implementation, when integrating multiple configuration items, the tool code file can be mapped to a field in the configuration space. The value of this field is the value returned by the tool code file after running. This not only enables the reference of independent program code scripts in customized files, but also allows the independent program code scripts to be debugged as independent files, reducing debugging difficulty.

[0014] In one possible implementation, before building a software package, a user-provided verification policy, such as one provided by the user through a policy configuration interface, can be obtained and the values ​​of configuration items in the configuration file can be verified based on the verification policy. This allows for the timely detection (and interception) of abnormal configuration items by verifying the values ​​of configuration items, thereby improving configuration accuracy and, in turn, enhancing software development efficiency and quality.

[0015] In one possible implementation, if the configuration file format determined by the fusion customization strategy is a first format, such as YAML, then when building the software package, the configuration file can be converted to a second format, such as SPC, and the software package can be built based on the second format. This conversion of the configuration file can accommodate a variety of configuration file formats, thereby increasing the applicability of customized software packages.

[0016] In one possible implementation, when obtaining multiple sets of customized files, the customization files may be obtained by obtaining customization files provided by multiple users using the client, thereby obtaining multiple sets of customized files, wherein each user may provide at least one set of customized files. In this way, multiple different users can be supported to comprehensively configure the software package.

[0017] In a possible embodiment, the data structure of each customized file in each group of customized files is a hierarchical organization structure. In this way, the attribute configuration of the software package at each level can be clearly defined through the hierarchical organization structure.

[0018] In a second aspect, the present application provides an apparatus for constructing a software package, wherein the apparatus for constructing a software package includes modules for executing the method for constructing a software package in the first aspect or any possible implementation of the first aspect.

[0019] In a third aspect, the present application provides a construction system, which includes at least one client and the apparatus for building a software package as described in the second aspect, wherein a user can provide one or more sets of customized files to the construction system through the client.

[0020] In a fourth aspect, the present application provides a computing device comprising a processor, a memory, and a display. The processor and the memory communicate with each other. The processor is configured to execute instructions stored in the memory so that the computing device executes the method for constructing a software package as described in the first aspect or any one of the implementations of the first aspect. It should be noted that the memory may be integrated into the processor or may be independent of the processor. The computing device may further comprise a bus. The processor is connected to the memory via the bus. The memory may comprise a readable memory and a random access memory.

[0021] In a fifth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computing device, the computing device executes the operating steps of the method for constructing a software package described in the first aspect or any implementation of the first aspect.

[0022] In a sixth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computing device, enables the computing device to execute the operational steps of the method for constructing a software package as described in the first aspect or any one of the implementations of the first aspect.

[0023] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG1 is a schematic diagram of the structure of an exemplary construction system for constructing a software package provided by the present application;

[0025] FIG2 is a schematic diagram of a method for constructing a software package provided by the present application;

[0026] FIG3 is a schematic diagram of performing a flattening operation on a multi-layer key value;

[0027] FIG4 is a schematic diagram of determining the value of a configuration item based on the priority of the level to which the configuration file belongs;

[0028] FIG5 is a schematic diagram of an exemplary enabling configuration interface provided by the present application;

[0029] FIG6 is a schematic diagram of an exemplary policy configuration interface provided by this application;

[0030] FIG7 is a schematic diagram of an exemplary configuration interface provided by this application;

[0031] FIG8 is a schematic diagram of mapping the value of a configuration item in YAML format to the value of a configuration item in SPEC format;

[0032] FIG9 is a schematic diagram of the structure of a device for constructing a software package provided by the present application;

[0033] FIG10 is a schematic diagram of the hardware structure of a computing device provided in this application. DETAILED DESCRIPTION

[0034] In order to reduce the difficulty of users customizing and building software packages and improve the efficiency of customizing and building software packages, the present application provides a method for building software packages. Based on the hierarchical customization scenarios with different user needs, the configuration items in multiple groups of configuration files are integrated according to the fusion customization strategy (such as associating and merging different configuration items, etc.), a configuration file is generated, and a software package is built based on the configuration file. There is no need for users to modify the software package construction script, thereby reducing the difficulty of users customizing and building software packages, improving the friendliness of building software packages, and effectively improving the efficiency of customizing and building software packages.

[0035] The technical solutions in this application will be described below in conjunction with the drawings in the embodiments of this application.

[0036] Referring to Figure 1, an exemplary construction system structure diagram for building a software package provided by an embodiment of the present application. As shown in Figure 1, a construction system 10 can provide a service for building a software package for multiple users, and Figure 1 is illustratively described by taking users 101 to 103 as an example. Each user can request to build a software package on the construction system 10 through a client (such as the client 201 to the client 203 in Figure 1), and the client can be, for example, a web browser provided by the construction system 10 to the outside world. In addition, each user can configure the same software package or different software packages accordingly according to customized requirements (such as the customized requirements corresponding to the hardware environment for running the software package), so that the software package built by the construction system 10 meets the customized requirements of the user.

[0037] As shown in FIG. 1 , the construction system 10 may include an interaction device 301 , a processing device 302 , and a construction device 303 .

[0038] The interactive device 301 is used to obtain multiple sets of customized files, such as a set of customized files defined for a software package provided by user 101 to the build system 10 via client 201. The set of customized files is written in a markup language. For example, the markup language may be YAML (not a markup language) or extensible markup language (XML). In addition to receiving the set of customized files provided by user 101, the interactive device 301 also obtains at least one other set of customized files for the software package, such as a set of customized files defined based on the product to which the software package belongs, a set of customized files defined based on the chip used by the software package, and a set of customized files defined based on the operating system (OS) used by the software package, as shown in FIG1 . Alternatively, the interactive device 301 may also obtain multiple sets of customized files defined for the same software package provided by multiple users (such as user 101, user 102, and user 103). The interactive device 301 then provides the obtained multiple sets of customized files to the processing device 302.

[0039] The processing device 302 is configured to determine a configuration file based on the fusion customization policy and the multiple sets of customized files. The configuration file includes at least one configuration item. The fusion customization policy may be a policy configured in the build system 10 before building the software package. The policy is used to integrate multiple configuration items in the multiple sets of customized files. For example, the policy may be to associate the configuration items in the multiple sets of customized files, to merge the configuration items in the multiple sets of customized files, or to perform both an association operation and a merge operation on the configuration items. The processing device 302 may then provide the determined configuration file to the build device 303.

[0040] The construction device 303 is used to construct a software package based on the configuration file. In actual application, the construction device 303 can specifically compile the code according to the configuration file and the source code in the software project to obtain the software package. Among them, the construction device 303 can compile the code in the form of native compilation or cross compilation. Native compilation refers to compiling the code based on the architecture of the compilation environment required by the code (such as the X86 architecture); cross compilation refers to compiling the code based on another architecture (such as the ARM architecture) that is different from the architecture of the compilation environment required by the code. The constructed software package can be, for example, a package manager (Red Hat Package Manager, RPM).

[0041] Thus, during the software package construction process, the build system 10 integrates multiple configuration items from multiple sets of customized files according to the fusion customization strategy, determines a configuration file, and constructs the software package based on the configuration file. This allows the user to customize the software package by simply providing the customized file to the build system 10, without having to modify the software package's build script. This not only effectively reduces the difficulty of customizing the software package and improves its user-friendliness, but also allows the automated build process to effectively customize the efficiency of the software package.

[0042] In addition, when the multiple sets of customized files obtained by the interactive device 301 come from different customization parties, such as from different users, the construction system 10 can support multiple customization policies based on the above configuration method to comprehensively configure the software package, and the above configuration method can be applied to software package construction scenarios in multiple fields such as the server field and the embedded field.

[0043] Furthermore, after building the software package, the build device 303 can also generate an operating system image based on the built one or more software packages and according to the customized operations performed by the user on the software packages. In this case, the build system 10 can specifically be an operating system build system. Alternatively, the build device 303 can generate an application based on the built one or more software packages and according to the customized operations performed by the user on the software packages. In this case, the build system 10 can specifically be an application development system, etc.

[0044] Exemplarily, the above-mentioned construction system 10 (including the interaction device 301, the processing device 302 and the construction module 303) can be implemented by software or hardware.

[0045] In a first example, when implemented by software, the construction system 10 can be implemented by, for example, at least one of a virtual machine, a container, and a computing engine.

[0046] In the second example, when implemented by hardware, the construction system 10 can be implemented by at least one physical device including a processor. The processor can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system on chip (SoC), a software-defined infrastructure (SDI) chip, an artificial intelligence (AI) chip, a data processing unit (DPU), or any combination thereof. In addition, the number of processors included in the construction system 10 can be one or more, and the type of processors included can be one or more. The number and type of processors can be set according to the business needs of the actual application, and this embodiment does not limit this.

[0047] It is worth noting that the build system 10 shown in FIG1 is only used as an exemplary illustration. In other applicable build systems, the build system can provide cloud services for building software packages for any number of users; alternatively, the client in the build system can also be an application deployed on a user-side device; alternatively, the build system can also be deployed on the user side and provide localized services to the user, so that one or more users can directly provide multiple sets of customized files on the interactive interface provided by the build system, and trigger the build system to implement customized build software packages based on the multiple sets of customized files. The specific structure of the above-mentioned build system and its applicable application scenarios are not limited in this application.

[0048] For ease of understanding, an embodiment of the method for constructing a software package provided by this application is described below with reference to the accompanying drawings.

[0049] Referring to FIG. 2 , FIG. 2 is a flow chart illustrating a method for building a software package according to an embodiment of the present application. This method can be applied to the build system 10 described in FIG. 1 , or can be applied to other applicable build systems. For ease of explanation, this embodiment is described using the build system 10 shown in FIG. 1 as an example.

[0050] The method for constructing a software package shown in FIG2 may specifically include:

[0051] S201: The interaction device 301 obtains multiple sets of customized files, which are used to configure the software package to be constructed. The multiple sets of customized files are written based on a markup language, and each set of customized files includes at least one configuration item.

[0052] Here, a markup language refers to a language used to mark information related to text (such as source code) (such as data structure, variable values, etc.). Exemplarily, the markup language can be any one or more of the following: YAML format, XML format, JavaScript object notation (JSON) format, Tom's Obvious Minimal Language (TOML) format, JSONNET format, or CD image auxiliary file (cue sheet, CUE) format, or can be other types of markup languages.

[0053] The multiple sets of customized files written in the markup language obtained by the interactive device 301 can come from different customization parties, and each customization party can provide at least one set of customized files. For example, the interactive device 301 can obtain four sets of customized files, such as a set of customized files provided by user 101 in Figure 1, a set of customized files provided by a product manufacturer based on product requirements, a set of customized files provided by a chip manufacturer based on chip requirements, and a set of customized files provided by an OS manufacturer based on OS requirements. For another example, the multiple sets of customized files obtained by the interactive device 301 can come from different users, and each user provides at least one set of customized files to the interactive device 301 through a client.

[0054] Alternatively, the multiple sets of customized files obtained by the interactive device 301 may also come from the same customization party. For example, the user 101 may provide multiple sets of customized files to the interactive device 301 , and each set of customized files may be customized files written by the user 101 for the software package in different time periods.

[0055] Each group of customization files includes at least one customization file, which may include one or more of customization files for the software package, customization files for the lib library that the software package depends on, customization files for field types in the software package, and user-defined customization files.

[0056] The customized file can be written by the user using a markup language, or can be generated based on existing customized information using corresponding tools (such as a configuration conversion tool, a configuration recognition tool, etc.) using the markup language. In this embodiment, the specific implementation method for generating the customized file is not limited.

[0057] Each customization file contains one or more configuration items, which are items included in the configuration management scope. For example, a customization file might include configuration item a and configuration item b. Configuration item a configures the tool files required for building a software package, while configuration item b configures the software package's version number or version permissions.

[0058] Furthermore, the data structure of a customized file written in a markup language can be a hierarchical organizational structure, so that the data in the customized file can be layer model data. In this case, the data of each layer in the hierarchical organizational structure can be used to configure the properties of the software package at the same level. For example, a customized file can include data with two layers of organizational structure, wherein the data of the first layer of organizational structure is used to configure the properties related to the kernel in the software package; and the data of the second layer of organizational structure is used to configure the properties related to the development board in the software package. In addition, the property configuration at each level can include one or more of the configuration for the software package, the configuration for the lib library on which the software package depends, the configuration of the field type in the software package, and the user-defined configuration.

[0059] Accordingly, a customized file written in a markup language may define a path directory for loading the customized file group, so that the interactive device 301 can subsequently load the corresponding customized file based on the path directory. For example, the user 101 may write a customized file named main_config.yaml, and define multiple layers of directories in the customized file as follows:

[0060] Each path is used to load a customized file written by the user for attributes at the same level.

[0061] Furthermore, in a customized file written in a markup language, a directory structure of multiple layers can be defined, and the customized files stored in each directory can be defined in the directory structure. For example, the layers directory structure defined by user 101 can be as follows:

[0062] In other implementations, the customized file written by the user 101 may also adopt other forms of data structures, which is not limited in this embodiment.

[0063] For example, the configuration items included in the customized file (i.e., the customized file stored in the pkgs directory) can be defined in a key-value format. For example, the following content can be defined in the customized file for the software package (pkgs):

[0064] Among them, the necessary implicit fields that need to be supported by the macro reference defined by "%%" will be replaced with the corresponding actual values ​​when they are referenced, which will not be detailed here.

[0065] In one embodiment of obtaining customized files, the interactive device 301 may obtain multiple sets of customized files uploaded by one or more users via a client. For example, the client may present an interactive interface to the user, allowing the user to upload customized files. Alternatively, after the user performs a customization operation on the software package on the interactive interface, the client generates the corresponding customized files and uploads them.

[0066] The interaction device 301 provides the acquired multiple groups of configuration files to the processing device 302 .

[0067] S202: The processing device 302 determines a configuration file according to a fusion customization strategy and multiple groups of customization files. The configuration file includes at least one configuration item. The fusion customization strategy is used to integrate multiple configuration items in the multiple groups of customization files.

[0068] In actual application scenarios, when the processing device 302 obtains multiple sets of customized files, the processing device 302 can load the multiple sets of customized files into the created configuration space (config space) according to the loading path defined in the configuration file. For example, the processing device 302 can read a customized file named main_config.yaml, and traverse the customized files for the attributes of the software package at each level according to the customized file, including customized files about the software package, customized files about the lib library that the software package depends on, customized files about field types, customized files about user definitions, etc., and load the traversed customized files into the configuration space. In this way, the mapping of customized files to the configuration space can be achieved, that is, the configuration items in the customized files are mapped to the configuration space.

[0069] After loading multiple customized files, the processing device 302 can also insert the key values ​​from the customized files into the configuration space. As an example, some key values ​​from the customized files may form multiple hierarchies. To this end, the processing device 302 can flatten the multiple key values ​​in the customized files, compressing them into a single key value. After adding a global reference path to the key value (to map it to the configuration space), the key value is inserted into the configuration space. For example, as shown in Figure 3, assume that the customized files include two key values ​​on the left side of Figure 3. The first key is "meta" and the first value is "name:bash." The second key is "name" and the second value is "bash." After flattening the multiple key values, the processing device 302 can compress them into a single key value: "meta.name:bash." In this case, the key is "meta.name" and the value is "bash." Then, the processing device 302 adds a global reference path: "pkgs.bash" to the key value, obtains the key value: "pkgs.bash.meta.name:bash" as shown on the right side of FIG. 3 , and inserts the key value into the configuration space.

[0070] Furthermore, for independent program code scripts that the configuration items rely on, such as shell scripts, python scripts, changlog scripts, etc., the processing device 302 can also map the code scripts to fields in the configuration items.

[0071] Taking the shell script as an example, suppose the shell script defines the following build function and post function:

[0072] The processing device 302 may map the build function and the posy function to the following fields respectively:

[0073] In this way, not only can the function of referencing an independent program code script in a customized file be realized, but the independent program code script can also be debugged as an independent file, thereby reducing the difficulty of debugging.

[0074] Then, the processing device 302 may perform an integration operation on different configuration items in the configuration space according to the fusion customization policy. The integration operation may, for example, associate different configuration items, or merge multiple configuration items, or may include both associating multiple associated items and merging multiple associated items. The fusion customization policy may be a policy configured by the user 101 or a technician in the construction system 10 before customizing the software package, and is used to integrate multiple configuration items.

[0075] In a specific implementation, the processing device 302 may establish a reference relationship between different configuration items in the configuration space based on the fusion customization strategy and according to the key values ​​in the configuration space, so as to associate different configuration items.

[0076] As a first example, the processing device 302 can establish a reference relationship for different configuration items in the configuration space by means of macro replacement. Macro replacement refers to replacing configuration item b with the macro defined for configuration item a. Then, the value of configuration item a is the value of the replaced configuration item b. Specifically, the processing device 302 can define macro replacement by specific identifiers, such as by using identifiers such as %%, %%%, d, and dd to define macro replacement, wherein %% and d are used to implement macro replacement in a local scope; %%% and dd are used to implement macro replacement in a global scope.

[0077] For example, assuming that the configuration item is pkgs.bash.release:"12", and the macro defined by %% is replaced with %%release, when the configuration item pkgs.bash.version:"1.3.%%release" is evaluated, the value of version is 1.3.12. During the actual evaluation process, the processing device 302 can first traverse the value of the replaced configuration item from the configuration space. If the configuration space has a specific value for the configuration item, the processing device 302 can directly read the value from the configuration space. If the configuration space does not have a specific value for the configuration item, the processing device 302 can perform corresponding calculations in the configuration space to obtain the value of the configuration item. Furthermore, the processing device 302 can also write the calculated value into the configuration space so that the value of the configuration item can be directly read from the configuration space later.

[0078] In actual application, the software project developed by user 101 may include multiple software packages, so the configuration items corresponding to each software package can constitute a local scope. In this case, macro replacement defined using %% or d can reference other configuration items corresponding to the same software package. All configuration items corresponding to multiple software packages in the same software project can constitute a global scope. In this case, macro replacement defined using %%% or dd can reference all configuration items corresponding to multiple software packages, that is, it can also reference configuration items corresponding to other software packages.

[0079] As a second example, the processing device 302 can establish an association between a configuration item and multiple other configuration items through inheritance. For example, key fields such as inherit and include can be defined in the customization file, so that batch references of configuration items can be achieved based on these key fields. Among them, the inherit field is used to inherit the properties of multiple other configuration items into one configuration item. For example, assuming that the content of the configuration item is specifically: inherit source.path, then the processing device 302 can inherit all key values ​​from the specified global path to the current configuration item path. The include field is used to reference multiple values ​​of the same type of configuration item, such as referencing multiple values ​​of the configuration item version, such as multiple version numbers.

[0080] In other embodiments, in addition to establishing reference relationships between different configuration items based on the two exemplary methods described above, reference relationships between different configuration items may be established using other methods, which are not limited herein. Furthermore, reference relationships between different configuration items may be established based solely on the first implementation example described above, or solely on the second implementation example described above.

[0081] In actual application, when associating different configuration items, the processing device 302 can adopt a lazy loading method to read (and calculate) data. That is, when the content of the configuration item is needed, the configuration item is actually read from the customized file. This can avoid the problem of long periods of unresponsiveness caused by reading a large amount of configuration item content in the initial stage. In specific implementation, when reading the value of the configuration item, the processing device 302 can first read it from the configuration space. If the value of the configuration item does not exist in the configuration space, the value of the configuration item is read (and calculated) from the file with the specified content.

[0082] After establishing reference relationships between the configuration items in multiple sets of customized files, the processing device 302 will also merge the configuration items in the multiple sets of customized files based on the fusion customization strategy and obtain the corresponding merge results. For example, in multiple sets of customized files, there may be multiple available values ​​configured for the same configuration item, such as multiple different version numbers configured for the configuration item "version". Therefore, the processing device 302 merges the values ​​of multiple configuration items of the same type to determine a unique value for the configuration item. Merging the configuration items in multiple sets of customized files is equivalent to merging the configuration items in the configuration space.

[0083] Exemplarily, when the processing device 302 merges multiple configuration items, it can specifically perform any one of concatenation (concat), appending (append), accumulation (and), and selection (or) on the values ​​of the multiple configuration items. Among them, concatenation refers to concatenating the character strings corresponding to the values ​​of multiple configuration items into one character string. Append refers to appending the value of a configuration item to the value of other configuration items. Accumulation refers to retaining multiple different values ​​of multiple configuration items. Selection refers to selecting and retaining some values ​​from the values ​​of multiple configuration items. In addition, the processing device 302 can also adopt other methods to perform merging processing, such as deduplication and other methods to deduplicate duplicate configuration items, or directly delete some configuration items that meet customized conditions.

[0084] To facilitate understanding, this embodiment provides the following implementation examples for merging multiple configuration items.

[0085] In a first implementation example, the configuration items in the customized files have a priority attribute. For multiple values ​​defined for the same configuration item in multiple sets of customized files, the processing device 302 can select the value with the highest priority attribute from the multiple values ​​based on the priority attribute of each configuration item as the final value of the configuration item, that is, retain the value with the highest priority attribute from the multiple configuration item values. The priority attribute of the configuration item can be specifically determined based on the priority of the layer to which the customized file belongs. For example, as shown in Figure 4, the configuration for the patch is: when the software version number is less than or equal to 1.3.0, select the xxxxx.patch patch; when the software version number is greater than 1.3.0, select the yyyyy.patch patch. Furthermore, the software version defined at the kernel level is version 2.1.0, while the software version defined at the user level is version 1.1.0. Since the priority of the user level is higher than the priority of the kernel level, the processing device 302 can determine that the final value of the patch is xxxxx.patch.

[0086] The priority of the layer to which a customized file belongs can be determined, for example, based on four priority determination criteria. The first level is the highest level and corresponds to the configuration layer involved in the software package update. That is, when the configuration items in the configuration layer are newly defined by the software package update, they have the highest priority. The second level is determined based on the type order of the customized files included in the configuration layer. For example, the priority of type A customized files can be specified to be higher than the priority of type B customized files. The third level is determined based on the numerical order of the configuration layers. For example, the larger the numerical value of the configuration layer, the higher the priority of the configuration layer, and accordingly, the higher the priority of the configuration item values ​​in the configuration layer. The fourth level is determined based on the lexicographic order of the configuration layers. For example, the higher the name of the configuration layer is ranked, the higher the priority of the configuration layer. Alternatively, the priority attribute of the configuration items in the customized file can also be determined based on other methods, such as the priority of the customizer can be used as the priority of each configuration item in the customized file provided by the customizer, and this is not limited to this.

[0087] In the second implementation example, the key in the configuration item may include a conditional statement, such as a when conditional statement, or other types of conditional statements. Thus, when merging multiple configuration items, the processing device 302 may merge the multiple configuration items based on the values ​​of the conditional statements included in the keys of the respective configuration items. For example, a when condition may be added to the key of the configuration item, with the following expression: key when condition:value;

[0088] The value of condition can be a fixed value. Alternatively, the value of condition can be calculated based on independent program code, such as using Python, and the reference to the Python code can be achieved through a specific tag. For example, an independent program code such as Python can be embedded using a string tag containing {{}}, or a key tag ending with "!" can be used to embed an independent program code such as Python. Alternatively, the value of condition can be calculated based on a new set of key values, etc. This embodiment does not limit this.

[0089] When the value of the condition in the expression is true (or 1), the expression is equal to key:value. When the value of the condition in the expression is false (or 0), the expression is equivalent to the row not existing. In this case, the processing device 302 can delete the configuration item.

[0090] In the third implementation example, the value in the configuration item may include a conditional statement, which may be, for example, a when conditional statement, or may be other types of conditional statements, etc. In this way, the processing device 302 may merge the multiple configuration items with the same key according to the value of the conditional statement included in the value of each configuration item. For example, assuming that the specific contents of the multiple configuration items with the same key in the configuration space are as follows (used to configure the version number, which is the value of values): pkgs.bash.version:values:[ {value:"1.2.0",fspath:"$pkg.path",when:"condition_x"}, {value:"1.3.0",fspath:"$pkg.path",when:"condition_y"}, ]

[0091] Among them, the configuration items include two values ​​of version, which are 1.2.0 and 1.3.0 respectively. When merging the multiple configuration items, the processing device 302 can specifically calculate the values ​​of condition_x and condition_y. Assuming that the value of condition_x is 1 (or true) and the value of condition_y is 0 (or false), the processing device 302 can delete the configuration item {value: "1.3.0", fspath: "$pkg.path", when: "condition_y"} and retain the other configuration item to achieve the merger of the two configuration items. At this time, the version number (values) of version is 1.2.0.

[0092] In a fourth implementation example, the processing device 302 may merge multiple configuration items based on the enable configuration of the multiple configuration items by the user 101. In a specific implementation, the processing device 302 may obtain the value of the custom item configured by the user 101, and the custom item is used to control the enablement of one or more configuration items (or it can be said to be controlling the function of turning on / off the configuration item). For example, the processing device 302 may present an enable configuration interface to the user 101 through the client 201, such as the enable configuration interface shown in FIG5 . In this way, the user 101 may configure one or more custom items for multiple configuration items on the enable configuration interface, and define the value of the one or more custom items, so that the processing device 302 may control the enablement of the configuration item on or off according to the value of f1.

[0093] For example, suppose the contents of the multiple configuration items shown below include the custom item f1:

[0094] Then, user 101 can define the value of f1 as 1 or true on the enable configuration interface, in which case processing device 302 can control the enabling of these configuration items. Alternatively, user 101 can define the value of f1 as 0 or false on the enable configuration interface, in which case processing device 302 can control the enabling of these configuration items. Accordingly, when merging multiple configuration items, processing device 302 can filter these disabled configuration items and perform the above-mentioned merging operations such as splicing, appending, accumulation, or selection on the filtered configuration items to obtain the corresponding merged results. In this way, without changing the underlying build description, user 101 can achieve complex customization and update the configuration content of the software package through simple configuration.

[0095] In other embodiments, the processing device 302 may also complete the merging of multiple configuration items based on other implementations; or, the processing device 302 may combine any of the above implementations to merge multiple configuration items, which is not limited here.

[0096] In actual application, the processing device 302 can merge the multiple configuration items according to a corresponding merging strategy, where the merging strategy is used to instruct to perform processing such as splicing, appending, accumulation, or selection on the multiple configuration items.

[0097] For example, processing device 302 may be pre-statically configured with multiple merge strategies. Thus, when multiple configuration items need to be merged, processing device 302 can select a merge strategy that matches the type of configuration item and merge the multiple configuration items using the selected merge strategy. The mapping between configuration item types and merge strategies can be pre-configured in processing device 302 by a technician. Configuration item types can be categorized based on, for example, their functional or attribute categories.

[0098] Alternatively, the processing device 302 can also support user 101 in customizing merge policies. Specifically, the processing device 302 can provide user 101 with a policy configuration interface via client 201, such as the policy configuration interface shown in FIG6 . User 101 can then specify a software package on the policy configuration interface, such as selecting the identifier of the software package to be configured from among multiple software package identifiers provided in the policy configuration interface, and define the specific content of one or more merge policies for the specified software package, such as the type of configuration item, the type of merge operation, and the merge method. This allows user 101 to intervene in the merge of configuration items, thereby increasing configuration flexibility.

[0099] Finally, the processing device 302 can generate a configuration file based on the reference relationship between different configuration items and the merging result of the configuration items. The at least one configuration item included in the configuration file is the configuration item obtained after the merger, and when the configuration file includes multiple configuration items, the multiple configuration items have the above-mentioned reference relationship.

[0100] Furthermore, in the process of generating the configuration file, the processing device 302 can also verify the values ​​of the multiple configuration items obtained after the reference and merging process. In specific implementation, the processing device 302 can obtain the verification (check) strategy corresponding to each configuration item, for example, it can be to determine the verification strategy corresponding to the configuration item according to the type of the configuration item, so that the processing device 302 can verify the value of the configuration item according to the verification strategy. For example, assuming that the verification strategy corresponding to configuration item a is: value range verification, that is, it is located in the interval of [minimum value, maximum value], then the processing device 302 can verify whether the value of configuration item a is located before the minimum value and the maximum value according to the verification strategy. If so, the processing device 302 determines that the configuration item a passes the verification; if not, the processing device 302 can make corresponding error / warning prompts for the value of the configuration item a. For another example, assuming that the verification strategy corresponding to configuration item b is: the data type of the value is a string type, then the processing device 302 can verify whether the data type of the value of configuration item b is a string type according to the verification strategy. If so, it is determined that the configuration item b has passed the verification. If not, a corresponding error / warning prompt can be made for the value of the configuration item b. When the values ​​of multiple configuration items all pass the verification, the processing device 302 can generate a configuration file based on the multiple configuration items; or, the processing device 302 can first generate a configuration file, and then use the verification strategy to verify the multiple configuration items in the configuration file. In this way, by verifying the values ​​of the configuration items, abnormal configuration items can be discovered (and intercepted) in a timely manner, thereby improving the correctness of the configuration, and further improving the efficiency and quality of software development.

[0101] The verification strategies corresponding to the configuration items may be default strategies in the processing device 302. For example, a technician may pre-configure these verification strategies in the storage device 301. Alternatively, the verification strategies corresponding to the configuration items may be defined by the user 101. For example, the processing device 302 may present a configuration interface to the user 101 via the client 201, such as the configuration interface shown in FIG7 , so that the user 101 may configure corresponding verification strategies for multiple configuration items (e.g., multiple configuration items of high importance) on the configuration interface. In this way, the processing device 302 may verify the values ​​of multiple configuration items in the configuration file according to the verification strategies provided by the user 101.

[0102] S203: The construction device 303 constructs a software package according to the configuration file.

[0103] In this embodiment, after determining the configuration file, the processing device 302 may directly output the configuration file to the construction device 303 , etc., so that the construction device 303 can construct a corresponding software package according to the configuration file.

[0104] Alternatively, in actual application scenarios, the format of the configuration file determined by the processing device 302 may not be consistent with the format of the configuration file supported by the construction device 303. For example, the format of the configuration file output by the processing device 302 may be yaml format, while the format of the configuration file recognized by the construction device 303 is spec format. Therefore, in one possible implementation, the processing device 302 may further convert the format of the configuration file determined according to the fusion customization strategy before outputting the configuration file, and then output the converted configuration file to the construction device 303.

[0105] In a specific implementation, assuming that the format of the configuration file determined by the processing device 302 is the first format and the format of the configuration file supported by the construction device 303 is the second format, the processing device 302 can traverse the values ​​of each configuration item in the configuration file according to the specification corresponding to the second format and map the value to the value of the second format. For example, as shown in Figure 8, the left side is the value of the configuration item in the yaml format, then the processing device 302 can map the value of each configuration item on the left to the value of the spec format shown on the right side according to the specification corresponding to the spec format, such as mapping Summary to meta.summary, mapping %description to meta.description, mapping Source0 to source.0[:fetcher], etc., thereby generating a configuration file in the second format based on the values ​​of the multiple configuration items obtained after mapping. In this way, after the processing device 302 outputs the configuration file in the second format, the construction device 303 can directly execute the corresponding software package construction process based on the configuration file in the second format.

[0106] Alternatively, after determining the configuration file according to the fusion customization strategy, the processing device 302 may output the configuration file to the construction device 303. In this case, when the construction device 303 determines that the format of the received configuration file is inconsistent with the format of the configuration file used to construct the software package, the construction device 303 may first convert the format of the received configuration file from the first format to the second format, and then construct the software package based on the configuration file in the second format.

[0107] In a further possible embodiment, before constructing the software package based on the configuration file, the construction device 303 may first output the configuration file to the client 201. The client 201 then presents the configuration file to the user 101, allowing the user 101 to confirm the values ​​of the various configuration items in the configuration file. After the configuration file passes the manual verification by the user 101, the construction device 303 then constructs the corresponding software package based on the various configuration items defined in the configuration file. This further improves the accuracy of the customized software package.

[0108] In actual software development scenarios, the software project to be developed by user 101 may include multiple software packages, and each software package to be built may include at least one set of customized files. In this case, the build system 10 can use the software package building process shown in Figure 2 for each software package, perform integration operations on the customized files corresponding to each software package according to the fusion customization strategy, and build the software package based on the integrated configuration files, thereby completing the construction of each software package in the software project and completing the construction of the entire software project on the build system 10.

[0109] In this embodiment, in the process of building a software package, the construction system 10 integrates multiple configuration items in multiple groups of customized files according to the fusion customization strategy, determines the configuration file and implements the construction of the software package based on the configuration file. This allows the user to customize the construction of the software package by simply providing the customized file to the construction system 10, without the need for the user to modify the construction script of the software package. In this way, not only can the difficulty of user-customized construction of the software package be effectively reduced and the friendliness of customized construction of the software package be improved, but also, this automated construction process can effectively customize the efficiency of the construction of the software package. In addition, when the multiple groups of customized files obtained by the construction system 10 come from different customization parties, such as from different users, the construction system 10 can support multiple customization policies based on the above configuration method to comprehensively configure the software package, and the above configuration method can be applicable to software package construction scenarios in multiple fields such as the server field and the embedded field.

[0110] It is worth noting that other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of this application. Secondly, those skilled in the art should also be familiar with that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.

[0111] The above describes the method for constructing a software package provided in an embodiment of the present application in conjunction with Figures 1 to 8. Next, the functions of the device for constructing a software package provided in an embodiment of the present application and the computing device for implementing the device for constructing a software package are described in conjunction with the accompanying drawings.

[0112] 9 , which shows a schematic structural diagram of a device for building a software package. The device 900 includes:

[0113] An acquisition module 901 is configured to acquire multiple sets of customized files, where the multiple sets of customized files are used to configure the software package to be built. The multiple sets of customized files are written based on a markup language, and each set of customized files includes at least one configuration item.

[0114] A determination module 902 is configured to determine a configuration file according to a fusion customization strategy and multiple sets of customization files, wherein the configuration file includes at least one configuration item, and the fusion customization strategy is configured to integrate multiple configuration items in the multiple sets of customization files;

[0115] The construction module 903 is used to construct a software package according to the configuration file.

[0116] In a possible implementation, the determining module 902 is specifically configured to:

[0117] According to the fusion customization strategy, an integration operation is performed on multiple configuration items in multiple groups of customization files. The integration operation includes associating multiple configuration items or merging multiple configuration items.

[0118] In a possible implementation, the determining module 902 is specifically configured to:

[0119] Map multiple configuration items in multiple sets of customization files to the configuration space;

[0120] According to the keys and values ​​of multiple configuration items, a reference relationship between different configuration items in the configuration space is established;

[0121] Merge multiple configuration items in multiple groups of customized files to obtain the merged result;

[0122] Generate a configuration file based on the reference relationship and merging results between different configuration items in the configuration space.

[0123] In a possible implementation, the determining module 902 is specifically configured to:

[0124] Get the value of the custom item configured by the user;

[0125] Filter multiple configuration items in multiple customized files based on the values ​​of the customized items;

[0126] Merge the filtered configuration items in multiple sets of customized files to obtain a merged result.

[0127] In a possible implementation, the determining module 902 is specifically configured to:

[0128] Get the user-provided merge strategy;

[0129] Merge multiple configuration items in multiple groups of customized files according to the merge strategy.

[0130] In a possible implementation, the determining module 902 is further configured to:

[0131] The tool code file is mapped to a field in the configuration space, and the value of the field is the value fed back after the tool code file is run.

[0132] In a possible implementation, the construction module 903 is further configured to:

[0133] Before building the software package based on the configuration file, obtain the verification strategy provided by the user;

[0134] Verify the values ​​of configuration items in the configuration file according to the verification strategy.

[0135] In a possible implementation, the format of the configuration file is the first format, and the construction module 903 is specifically configured to:

[0136] Converting the configuration file to a second format.

[0137] Build the software package according to the configuration file in the second format.

[0138] In a possible implementation, the acquisition module 901 is specifically configured to:

[0139] Obtain customized files provided by multiple users using the client to obtain multiple groups of customized files.

[0140] In a possible implementation, the data structure of each customized file in each group of customized files is a hierarchical organizational structure.

[0141] In this way, during the software package construction process, users only need to provide customized files to the construction system 10 to achieve customized software package construction, without the need for users to modify the software package construction script. This not only effectively reduces the difficulty of user-customized software package construction and improves the user-friendliness of customized software package construction, but also this automated construction process can effectively customize the efficiency of software package construction. In addition, when multiple sets of customized files are obtained from different customization parties, such as from different users, based on the above configuration method, multiple customization policies can be supported to comprehensively configure the software package. Moreover, the above configuration method is applicable to software package construction scenarios in multiple fields such as the server field and the embedded field.

[0142] Since the apparatus for constructing a software package shown in FIG9 corresponds to the method shown in FIG2 , the specific implementation of the apparatus 900 for constructing a software package shown in FIG2 and its technical effects can be found in the relevant descriptions in the aforementioned embodiments and will not be elaborated here.

[0143] FIG10 is a schematic diagram of a computing device 1000 provided in the present application. The computing device 1000 may be, for example, the terminal 201 in the embodiment shown in FIG4 .

[0144] As shown in Figure 10, the computing device 1000 includes a processor 1001, a memory 1002, and a communication interface 1003. The processor 1001, the memory 1002, and the communication interface 1003 communicate through a bus 1004, and may also communicate through other means such as wireless transmission. The memory 1002 is used to store instructions, and the processor 1001 is used to execute the instructions stored in the memory 1002. Furthermore, the computing device 1000 may also include a memory unit 1005, and the memory unit 1005 may be connected to the processor 1001, the storage medium 1002, and the communication interface 1003 through the bus 1004. The memory 1002 stores program code, and the processor 1001 may call the program code stored in the memory 1002 to perform the following operations:

[0145] Obtaining a plurality of sets of customized files, the plurality of sets of customized files being used to configure the software package to be constructed, the plurality of sets of customized files being written based on a markup language, each set of customized files including at least one configuration item;

[0146] Determining a configuration file according to the fusion customization strategy and the multiple groups of customization files, the configuration file including at least one configuration item, the fusion customization strategy being used to integrate multiple configuration items in the multiple groups of customization files;

[0147] Build the software package according to the configuration file.

[0148] It should be understood that in the embodiment of the present application, the processor 1001 may be a CPU, or may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete device components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0149] The memory 1002 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1001. The memory 1002 may also include a non-volatile random access memory. For example, the memory 1002 may also store device type information.

[0150] The memory 1002 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0151] The communication interface 1003 is used to communicate with other devices connected to the computing device 1000. The bus 1004 may include, in addition to the data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clarity, all buses are labeled as bus 1004 in the figure.

[0152] It should be understood that the computing device 1000 according to the embodiment of the present application may correspond to the device 900 for building a software package in the embodiment of the present application, and may correspond to executing the construction system 10 in the method shown in Figure 2 according to the embodiment of the present application, and the above-mentioned and other operations and / or functions implemented by the computing device 1000 are respectively for implementing the process of the corresponding method in Figure 2. For the sake of brevity, they will not be repeated here.

[0153] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the method for building the software package.

[0154] The present application also provides a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the computer program product fully or partially generates the process or function described in the present application.

[0155] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0156] The computer program product may be a software installation package. When any of the aforementioned methods for constructing a software package is required, the computer program product may be downloaded and executed on a computing device.

[0157] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0158] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for constructing a software package, characterized in that: The method comprises: Acquire multiple sets of customized files, where the multiple sets of customized files are used to configure the software package to be built, the multiple sets of customized files are written based on a markup language, and each set of customized files in the multiple sets of customized files includes at least one configuration item; Determining a configuration file according to the fusion customization strategy and the multiple groups of customization files, the configuration file including at least one configuration item, the fusion customization strategy being used to integrate multiple configuration items in the multiple groups of customization files; Build the software package according to the configuration file.

2. The method according to claim 1, characterized in that: The processing of the plurality of groups of customized files according to the fusion customization strategy includes: According to the fusion customization strategy, an integration operation is performed on the multiple configuration items in the multiple groups of customized files, and the integration operation includes associating the multiple configuration items or merging the multiple configuration items.

3. The method according to claim 2, characterized in that The performing an integration operation on the multiple configuration items in the multiple groups of customized files according to the fusion customization strategy includes: Mapping multiple configuration items in the multiple groups of customized files to a configuration space; Establishing reference relationships between different configuration items in the configuration space according to the keys and values ​​of the multiple configuration items; Merging multiple configuration items in the multiple groups of customized files to obtain a merged result; The configuration file is generated according to the reference relationship between different configuration items in the configuration space and the merging result.

4. The method according to claim 3, characterized in that The merging of the multiple configuration items in the multiple groups of customized files to obtain a merging result includes: Get the value of the custom item configured by the user; Filtering the multiple configuration items in the multiple groups of customized files according to the values ​​of the customized items; The configuration items obtained through filtering in the plurality of groups of customized files are merged to obtain the merged result.

5. The method according to claim 3 or 4, characterized in that: The merging of the multiple configuration items in the multiple groups of customized files includes: Get the merge strategy provided by the user; According to the merging strategy, multiple configuration items in the multiple groups of customized files are merged.

6. The method according to any one of claims 3 to 5, characterized in that: The method further comprises: The tool code file is mapped to a field in the configuration space, and the value of the field is the value fed back after the tool code file is run.

7. The method according to any one of claims 1 to 6, characterized in that: Before building the software package according to the configuration file, the method further includes: Get the verification strategy provided by the user; According to the verification strategy, the values ​​of the configuration items in the configuration file are verified.

8. The method according to any one of claims 1 to 7, characterized in that: The configuration file is in a first format, and the software package is constructed according to the configuration file, including: Converting the configuration file into a second format. A software package is built according to the configuration file in the second format.

9. The method according to any one of claims 1 to 8, characterized in that: The obtaining of multiple sets of customized files includes: Customized files provided by multiple users using the client are obtained to obtain the multiple groups of customized files.

10. The method according to any one of claims 1 to 9, characterized in that: The data structure of each customized file in each group of customized files is a hierarchical organization structure.

11. A device for constructing a software package, characterized in that: The device comprises: An acquisition module, used for acquiring a plurality of groups of customized files, wherein the plurality of groups of customized files are used for configuring the software package to be constructed, the plurality of groups of customized files are written based on a markup language, and each group of customized files in the plurality of groups of customized files includes at least one configuration item; A determination module, configured to determine a configuration file according to the fusion customization strategy and the plurality of groups of customization files, wherein the configuration file includes at least one configuration item, and the fusion customization strategy is configured to integrate a plurality of configuration items in the plurality of groups of customization files; The building module is used to build a software package according to the configuration file.

12. A construction system, characterized in that: The building system comprises at least one client and the apparatus for building a software package as claimed in claim 11.

13. A computing device, characterized in that: Including processor and memory; The processor is configured to execute instructions stored in the memory so as to enable the computing device to perform the steps of the method according to any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computing device, cause the computing device to perform the steps of the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method, device and system for constructing software package and related equipment

    CN118689494A

  • Configuration item template dynamic customizing method based on XML

    CN104573053A

  • Method and device used for determining configuration file feature

    CN105446705A

  • Multi-level system configuration service design method based on preorder priority matching rule

    CN110825358A

  • Software customized installation package generator for Internet of Things communication module

    CN111427554A

Cited By

  • Software development method and related device

    WO2026102641A1