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

Through the fusion customization strategy, multiple sets of customized files are integrated, configuration files are generated, and software packages are automatically built, which solves the problems of construction complexity and low efficiency in the existing technology, supports the configuration of multiple customizers, and is suitable for multi-domain scenarios.

CN118689494APending Publication Date: 2024-09-24HUAWEI TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202310320857.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2024-09-24

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 is difficult to operate, and it is difficult to support the comprehensive configuration of multiple customization parties.

Method used

By obtaining multiple sets of customized files, configuration items written based on markup language are integrated and merged using a fusion customization strategy to generate configuration files. Users do not need to modify the build scripts to realize automatic construction of software packages and support comprehensive configuration of multiple customization parties.

Benefits of technology

It reduces the difficulty for users to customize the software package and improves the construction efficiency. It is suitable for server and embedded fields, simplifies the customization process, and improves the friendliness and efficiency of the construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689494A
    Figure CN118689494A
Patent Text Reader

Abstract

The invention discloses a method, device and system for constructing a software package and related equipment, and relates to the technical field of data processing. Multiple sets of customized files written based on the markup language are obtained, the multiple sets of customized files are used for configuring a software package to be constructed, and each set of customized files comprises at least one configuration item; then, a configuration file is determined according to a fusion customization strategy and the multiple sets of customized files, the configuration file comprises at least one configuration item, and the fusion customization strategy is used for integrating the multiple configuration items in the multiple sets of customized files, such as associating the multiple configuration items and combining the multiple configuration items, so that the software package is constructed according to the configuration file. Therefore, in the process of constructing the software package, the user does not need to modify the construction script of the software package, so that the difficulty of customizing and constructing the software package by the user can be effectively reduced, the friendliness of customizing and constructing the software package is improved, and the efficiency of customizing and constructing the software package can also be effectively achieved through the automatic construction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] At present, customized software packages have become a common demand in the fields of servers, embedded systems, etc. For example, in the embedded system, software packages applied to different development boards are usually customized to meet the customized requirements of different development boards for software packages.

[0003] In actual application scenarios, users usually build a software package that meets the customization requirements of the customization party by modifying the software package build script. This invasive way of building software packages is complex to operate and has low customization efficiency.

[0004] 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. Summary of the invention

[0005] The present 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, the present application also provides a corresponding apparatus, system, computing device, computer-readable storage medium and computer program product for building a software package.

[0006] In a first aspect, the present application provides a method for building a software package, comprising: obtaining multiple groups 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 groups of customized files are written based on a markup language, such as YAML or XML, and each group 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 a tool file that the software package depends on for building, etc.; then, determining a configuration file based on a fusion customization strategy and the multiple groups 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 groups of customized files, such as associating multiple configuration items and merging multiple configuration items, etc., so as to build a software package according to the configuration file.

[0007] In this way, in the process of building a software package, the user only needs to provide a customized file to realize a customized construction of the software package, without the need for the user to modify the construction script of the software package, thereby effectively reducing the difficulty of the user's customized construction of the software package and improving the friendliness of the customized construction of the software package. Moreover, this automated construction process can also effectively customize the efficiency of the construction of the software package. In addition, when the multiple sets of customized files obtained come from different customization parties, such as from different users, etc., based on the above configuration method, it is possible to support multiple customization policies 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.

[0008] In a possible implementation, when processing multiple groups of customized files according to the fusion customization strategy, specifically, according to the fusion customization strategy, an integration operation is performed on multiple configuration items in the multiple groups of customized files, and the integration operation includes associating multiple configuration items or merging multiple configuration items. In this way, by associating or merging multiple configuration items, a comprehensive configuration of the software package can be achieved, thereby simplifying the customization difficulty of the software package, such as different customization parties can participate in the customization of the software package, and the same customization party can customize the software package multiple times in different time periods, etc.

[0009] In a 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 specifically mapped to a configuration space, and then a reference relationship between different configuration items in the configuration space is established based on the keys and values ​​of the multiple configuration items, and the multiple configuration items in the multiple sets of customized files are merged to obtain a merged result, such as merging multiple configuration items through internal references or inheritance, etc., thereby generating a configuration file based on the reference relationship and merged result between different configuration items in the configuration space. In this way, by establishing a reference relationship between different configuration items, it is possible to associate different configuration items, and by associating and merging configuration items, it is possible to integrate multiple configuration items.

[0010] In a possible implementation, when merging multiple configuration items in multiple sets of customized files, a merging operation provided by a user may be obtained, and multiple configuration items in multiple sets of customized files may be merged according to the merging strategy. In this way, the user may be supported to intervene in the merging of configuration items, thereby improving the flexibility of configuration.

[0011] In a possible implementation, during the integration of multiple configuration items, the tool code file can also be 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. 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, reducing the difficulty of debugging.

[0012] In a possible implementation, before building the software package, a verification strategy provided by the user, such as the verification strategy provided by the user through the policy configuration interface, can be obtained, and the values ​​of the configuration items in the configuration file can be verified according to the verification strategy. 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.

[0013] In a possible implementation, the format of the configuration file determined by the fusion customization strategy is a first format, such as a YAML format. When building a software package, the configuration file may be converted to obtain a configuration file in a second format, such as a configuration file in an SPC format, and the software package may be built based on the configuration file in the second format. In this way, by converting the configuration file, the requirements of various configuration file formats can be met, thereby improving the applicable scenarios of customized software package construction.

[0014] In a possible implementation, when obtaining multiple sets of customized files, the customized files provided by multiple users using the client can be obtained to obtain multiple sets of customized files, wherein each user can provide at least one set of customized files. In this way, multiple different users can be supported to perform comprehensive configuration of the software package.

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

[0016] 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.

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

[0018] 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 used to execute instructions stored in the memory so that the computing device executes the method for building a software package in the first aspect or any one of the implementations of the first aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The computing device may also include a bus. The processor is connected to the memory via the bus. The memory may include a readable memory and a random access memory.

[0019] In a fifth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computing device, enables the computing device to execute the operating steps of the method for constructing a software package described in the first aspect or any one of the implementations of the first aspect.

[0020] 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 described in the first aspect or any one of the implementations of the first aspect.

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

[0022] Figure 1 A schematic diagram of the structure of an exemplary construction system for constructing a software package provided in the present application;

[0023] Figure 2 A schematic diagram of a method for constructing a software package provided in this application;

[0024] Figure 3 A schematic diagram of performing a flattening operation on a multi-layer key value;

[0025] Figure 4 A schematic diagram for determining the value of a configuration item based on the priority of the level to which the configuration file belongs;

[0026] Figure 5 A schematic diagram of an exemplary enabling configuration interface provided by the present application;

[0027] Figure 6 A schematic diagram of an exemplary policy configuration interface provided by this application;

[0028] Figure 7 A schematic diagram of an exemplary configuration interface provided by this application;

[0029] Figure 8A schematic diagram of mapping the value of a configuration item in yaml format to the value of a configuration item in spec format;

[0030] Fig. 9 A schematic diagram of the structure of a device for building a software package provided in this application;

[0031] Fig.10 A schematic diagram of the hardware structure of a computing device provided for this application. DETAILED DESCRIPTION

[0032] In order to reduce the difficulty of users' customized software package construction and improve the efficiency of customized software package construction, the present application provides a method for building a software package. 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 the software package is built based on the configuration file. There is no need for the user to modify the software package construction script, thereby reducing the difficulty of users' customized software package construction and improving the friendliness of building the software package. At the same time, it can also effectively improve the efficiency of customized software package construction.

[0033] The technical solution in the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0034] See also Figure 1 , is a schematic diagram of an exemplary construction system structure for constructing a software package provided in an embodiment of the present application. Figure 1 As shown, the construction system 10 can provide software package construction services for multiple users. Figure 1 In the example, users 101 to 103 are used as an example for illustrative description. Each user can Figure 1 The client 201 to the client 203 in the example above request to build a software package on the build system 10. The client may be, for example, a web browser provided to the outside by the build system 10. In addition, each user may configure the same software package or different software packages accordingly according to customized requirements (such as customized requirements corresponding to the hardware environment for running the software package), so that the software package built by the build system 10 meets the customized requirements of the user.

[0035] like Figure 1 As shown, the construction system 10 may include an interaction device 301 , a processing device 302 and a construction device 303 .

[0036] The interactive device 301 is used to obtain multiple sets of customized files, such as obtaining a set of customized files defined for a software package provided by the user 101 to the construction system 10 through the client 201, wherein the set of customized files is written based on a markup language, and illustratively, the markup language may be YAML ain't a markup language (YAML) or extensible markup language (XML). In addition to receiving the set of customized files provided by the user 101, the interactive device 301 also obtains at least one other set of customized files for the software package, such as obtaining Figure 1 As shown in , a set of customized files defined according to the product to which the software package belongs, a set of customized files defined according to the chip used by the software package, and a set of customized files defined according to the operating system (OS) used by the software package. Alternatively, the interactive device 301 can 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). Then, the interactive device 301 provides the obtained multiple sets of customized files to the processing device 302.

[0037] The processing device 302 is used to determine a configuration file according to the fusion customization strategy and the multiple groups of customized files, and the configuration file includes at least one configuration item. The fusion customization strategy can be a strategy configured in the construction system 10 before building the software package, which is used to integrate multiple configuration items in the multiple groups of customized files, such as associating the configuration items in the multiple groups of customized files, or merging the configuration items in the multiple groups of customized files, or performing both an association operation and a merging operation on the configuration items. Then, the processing device 302 can provide the determined configuration file to the construction device 303.

[0038] The construction device 303 is used to construct a software package according to the configuration file. In actual application, the construction device 303 can 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 a native compilation or cross compilation manner. Native compilation refers to code compilation based on the architecture of the compilation environment required by the code (such as X86 architecture); cross compilation refers to code compilation based on another architecture (such as ARM architecture) 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).

[0039] Thus, in the process of building a software package, the building system 10 integrates multiple configuration items in multiple groups of customized files according to the fusion customization strategy, determines the configuration file, and builds the software package according to the configuration file, so that the user can realize the customized construction of the software package only by providing the customized file to the building system 10, without the need for the user to modify the construction script of the software package. Thus, not only can the difficulty of the user's customized construction of the software package be effectively reduced and the friendliness of the 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.

[0040] In addition, when the multiple groups 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 to comprehensively configure the software package based on the above configuration method, and the above configuration method can be applicable to software package construction scenarios in multiple fields such as server field and embedded field.

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

[0042] 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.

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

[0044] In the second example, when implemented by hardware, the construction system 10 can be implemented by at least one physical device including a processor. Among them, the processor can be a central processing unit (CPU), and 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), and any other processor 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 requirements of the actual application, and this embodiment does not limit this.

[0045] It is worth noting that the above Figure 1 The construction system 10 shown is only used as an exemplary description. In other applicable construction systems, the construction system can provide cloud services for building software packages for any number of users; or, the client in the construction system can also be an application deployed on a user-side device; or, the construction 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 construction system, and trigger the construction system to implement customized construction of the software package based on the multiple sets of customized files. The specific structure of the above-mentioned construction system and its applicable application scenarios are not limited in this application.

[0046] For ease of understanding, an embodiment of the method for constructing a software package provided by the present application is described below in conjunction with the accompanying drawings.

[0047] See also Figure 2 , Figure 2 A schematic diagram of a method for constructing a software package provided in an embodiment of the present application, which method can be applied to Figure 1The construction system 10 described above may be applied to other applicable construction systems. Figure 1 The construction system 10 shown is taken as an example for illustrative description.

[0048] in, Figure 2 The method for building a software package shown may specifically include:

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

[0050] The markup language refers to a language used to mark information (such as data structure, variable value, etc.) related to text (such as source code). Exemplarily, the markup language may be any one or more of the markup languages ​​in 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 may be other types of markup languages.

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

[0052] Alternatively, the multiple sets of customized files acquired 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 a customized file written by the user 101 for the software package in different time periods.

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

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

[0055] Each customized file includes one or more configuration items, which are items included in the configuration management scope. For example, a customized file may include configuration item a and configuration item b, where configuration item a is used to configure the tool files that the software package depends on when building, and configuration item b is used to configure the version number or version permissions of the software package.

[0056] Furthermore, the data structure of the customized file written in the markup language can be a hierarchical organizational structure, so that the data in the customized file can be layer model data. At this time, the data of each layer in the hierarchical organizational structure can be used to configure the attributes of the software package at the same level. For example, the customized file may include data of two layers of organizational structure, wherein the data of the first layer of organizational structure is used to configure the attributes related to the kernel in the software package; and the data of the second layer of organizational structure is used to configure the attributes related to the development board in the software package. In addition, the attribute configuration at each level may 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.

[0057] Accordingly, in the customized file written based on the markup language, a path directory for loading the group of customized files can be defined, so that the subsequent interactive device 301 loads the corresponding customized files based on the path directory. For example, the user 101 can write a customized file named main_config.yaml, and the directories of multiple layers defined in the customized file are as follows:

[0058] ayers:

[0059] -path1

[0060] -path2

[0061] -path3

[0062] …

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

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

[0065] lib / module1.py #lib directory is used to store python libraries

[0066] lib / module2.py

[0067] pkgs / index.yaml#pkgs directory is used to store software package configuration

[0068] pkgs / gcc / gcc.yaml

[0069] pkgs / llvm / llvm.yaml

[0070] type / package.yaml#Type annotation, the type directory is used to set the type of each field

[0071] use / index.yaml#Global configuration information, the use directory is used to configure the user's customization items globally

[0072] use / ssl.yaml

[0073] 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.

[0074] 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 manner. For example, the following content can be defined in the customized file for the software package (pkgs):

[0075] configFilesPattern:(?<_pkgname>[-0-9a-z]+) / \1\.yaml#Customized file list (regular expression)

[0076] registerConfigSpaceForEachFile:

[0077] pkgs.%%_basename:fsPath:%%_filepath

[0078] name: %%_basename #The key is name, the value is %%_basename

[0079] includeShellFunctions:scripts.sh

[0080] docType:base#The key is docType and the value is base

[0081] :referAttrs:types.package

[0082] meta:referAttrs:types.package.meta

[0083] scripts:referAttrs:types.package.scripts

[0084] 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 elaborated here.

[0085] In an implementation of obtaining customized files, the interactive device 301 may obtain multiple sets of customized files uploaded by one or more users through a client. For example, the client may present an interactive interface to the user, so that the user can upload customized files on the interactive interface; or, after the user performs a customized operation on the software package on the interactive interface, the client generates a corresponding customized file and uploads the customized file.

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

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

[0088] 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 (configspace) 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.

[0089] After loading multiple sets of customized files, the processing device 302 can also insert the key values ​​in the multiple sets of customized files into the configuration space. As an implementation example, some key values ​​in the multiple sets of customized files may form multiple levels. To this end, the processing device 302 can flatten the multiple layers of key values ​​in the multiple sets of customized files, that is, compress the multiple layers of key values ​​into one layer of key values, and after adding a global reference path to the key value (to achieve mapping with the configuration space), insert the key value into the configuration space. For example, if Figure 3 As shown, assuming that the multi-layer key value included in the customization file is Figure 3 The two-layer key value shown on the left. Among them, the key of the first layer is "meta", and the value of the first layer is "name: bash"; the key of the second layer is "name", and the value of the second layer is "bash". Then, after the processing device 302 flattens the multi-layer key value, it can compress the multi-layer key value into a layer of key value: "meta.name: bash". At this time, the key is "meta.name" and the value is "bash". Then, the processing device 302 adds a global reference path to the key value: "pkgs.bash", and obtains the following Figure 3 The key value shown on the right: "pkgs.bash.meta.name:bash" and insert the key value into the configuration space.

[0090] 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.

[0091] Taking the shell script as an example, suppose the build function and post function are defined in the shell script as follows:

[0092]

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

[0094]

[0095] 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.

[0096] Then, the processing device 302 may perform an integration operation on different configuration items in the configuration space according to the fusion customization strategy, and the integration operation may be, for example, associating different configuration items, or merging multiple configuration items, or both associating multiple associated items and merging multiple associated items, etc. The fusion customization strategy may be a strategy 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.

[0097] In 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.

[0098] 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, and the value of configuration item a is the value of the replaced configuration item b. Specifically, the processing device 302 can define macro replacement through specific identifiers, such as defining macro replacement through identifiers such as %, %%%, d, and dd, 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.

[0099] 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 of 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 of 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.

[0100] In actual application, the software project developed by user 101 may include multiple software packages, so that the configuration items corresponding to each software package can constitute a local scope. At this time, the macro replacement defined by %% 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 construct a global scope. At this time, the macro replacement defined by %%% or dd can reference all configuration items corresponding to multiple software packages, that is, configuration items corresponding to other software packages can also be referenced.

[0101] As a second example, the processing device 302 can establish an association between a configuration item and multiple other configuration items by 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 configuration item content is specifically: inheritsource.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 items, such as referencing multiple values ​​of the configuration item version, such as multiple version numbers.

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

[0103] In actual application, in the process of associating different configuration items, the processing device 302 can read (and calculate) data in a lazy loading manner, that is, when the content of the configuration item is needed, the configuration item will be actually read from the customized file, so as to avoid the problem of long-term non-response caused by reading a large amount of configuration item content in the initial stage. In specific implementation, when reading the value in the configuration item, the processing device 302 can first read it from the configuration space, and when 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.

[0104] After establishing a reference relationship between the configuration items in the 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 merged results. For example, in the multiple sets of customized files, there may be multiple available values ​​configured for the same configuration item, such as configuring multiple different version numbers for the configuration item version. Therefore, the processing device 302 merges the values ​​of multiple configuration items of the same type to determine the unique value of the configuration item. Among them, merging the configuration items in the multiple sets of customized files is to merge the configuration items in the configuration space.

[0105] Exemplarily, when merging multiple configuration items, the processing device 302 may specifically perform any one of concatenation (concat), appendion (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 may also use other methods to perform the merging process, such as using deduplication methods to deduplicate duplicate configuration items, or directly deleting some configuration items that meet the customized conditions.

[0106] For ease of understanding, this embodiment provides the following implementation examples for merging multiple configuration items.

[0107] In the first implementation example, the configuration items in the customized file 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 ​​according to 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 determined based on the priority of the level to which the customized file belongs. For example, Figure 4As shown, the configuration of 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. In addition, the software version defined by the kernel level is version 2.1.0, and the software version defined by 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.

[0108] The priority of the layer to which the customized file belongs can be determined, for example, according to four priority judgment conditions. Among them, the first level is the highest level, corresponding to the configuration layer involved in the software package update, that is, when the configuration items in the configuration layer are newly defined configuration items for the software package update, their priority is the highest; the second level is determined according to the type order of the customized files included in the configuration layer, such as the priority of customized files of type A can be specified to be higher than the priority of customized files of type B; the third level is determined according to the numerical order of the configuration layer, such as 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 according to the dictionary order of the configuration layer, such as 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 item 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, etc., and this is not limited.

[0109] In the second implementation example, the key 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. Thus, in the process of merging multiple configuration items, the processing device 302 may merge multiple configuration items according to the value of the conditional statement included in the key of each configuration item. For example, a when condition is added to the key of the configuration item, and its expression is as follows:

[0110] key when condition:value;

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

[0112] When the value of condition in the expression is true (or 1), the expression is equal to key:value. When the value of condition in the expression is false (or 0), the expression is equivalent to that the row does not exist. At this time, the processing device 302 can delete the configuration item.

[0113] 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 values ​​of the conditional statements included in the values ​​of each configuration item, with respect to the values ​​of the multiple configuration items with the same key. For example, assuming that the specific contents of the multiple configuration items with the same key in the configuration space are as follows (used for configuring the version number, which is the value of values):

[0114] pkgs.bash.version:values:[

[0115] {value:“1.2.0”,fspath:“$pkg.path”,when:“condition_x”},

[0116] {value:“1.3.0”,fspath:“$pkg.path”,when:“condition_y”}, ]

[0118] Among them, the configuration items include two values ​​of version, which are 1.2.0 and 1.3.0. 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.

[0119] In the fourth implementation example, the processing device 302 may merge multiple configuration items according to the enabling configuration of the multiple configuration items by the user 101. In 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 enabling of one or more configuration items (or control the function of turning on / off the configuration item). For example, the processing device 302 may present the enabling configuration interface to the user 101 through the client 201, for example, Figure 5 Thus, the user 101 can configure one or more customized items for multiple configuration items on the enabling configuration interface and define the values ​​of the one or more customized items, so that the processing device 302 can control the enabling of the configuration items according to the values ​​of f1.

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

[0121]

[0122] Then, user 101 can define the value of f1 as 1 or true on the enable configuration interface, and at this time, processing device 302 can control the enablement of these configuration items. Alternatively, user 101 can define the value of f1 as 0 or false on the enable configuration interface, and at this time, processing device 302 can control the enablement of these configuration items. Correspondingly, in the process of merging multiple configuration items, processing device 302 can filter these enabled configuration items, and perform the above-mentioned splicing, appending, accumulation, or selection and other merging operations on the filtered configuration items to obtain the corresponding merging results. In this way, without changing the underlying construction description, user 101 can achieve complex customization through simple configuration, and update the configuration content of the software package.

[0123] 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.

[0124] In actual application, the processing device 302 may merge the multiple configuration items according to a corresponding merging strategy, where the merging strategy is used to instruct to perform concatenation, appending, accumulation, or selection on the multiple configuration items.

[0125] Exemplarily, multiple merging strategies may be pre-statically configured in the processing device 302. Thus, when multiple configuration items need to be merged, the processing device 302 may select a merging strategy that matches the type of configuration item according to the type of configuration item, and merge the multiple configuration items using the selected merging strategy. The mapping relationship between the type of configuration item and the merging strategy may be pre-configured in the processing device 302 by a technician, and the type of the configuration item may be divided based on the function category or attribute category of the configuration item.

[0126] Alternatively, the processing device 302 may also support the user 101 to customize the merge strategy. In specific implementation, the processing device 302 may provide the user 101 with a strategy configuration interface through the client 201, for example, Figure 6 The policy configuration interface shown in the figure, etc., so that the user 101 can specify the software package on the policy configuration interface, such as selecting the identifier of the software package to be configured from the identifiers of multiple software packages provided in the policy configuration interface, and define the specific content of one or more merge policies for the specified software package, such as defining the type of configuration item, the type of merge operation, the merge method, etc. In this way, the user 101 can be supported to intervene in the merge configuration item, thereby improving the flexibility of configuration.

[0127] 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. 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.

[0128] 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 the specific implementation, the processing device 302 can obtain the verification (check) strategy corresponding to each configuration item, for example, it can be determined according to the type of the configuration item The corresponding verification strategy 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 the configuration item a is: value range verification, that is, in the interval of [minimum value, maximum value], the processing device 302 can verify whether the value of the 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 a corresponding error / warning prompt 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.

[0129] The verification strategy corresponding to the configuration item may be a default strategy in the processing device 302, such as a technician may pre-configure these verification strategies in the storage device 301. Alternatively, the verification strategy corresponding to the configuration item may also be defined by the user 101. For example, the processing device 302 may present a configuration interface to the user 101 through the client 201, such as presenting Figure 7 The configuration interface shown in FIG. 1 is used to configure the configuration interface so that the user 101 can configure corresponding verification strategies for multiple configuration items (for example, multiple configuration items with higher importance) on the configuration interface. In this way, the processing device 302 can verify the values ​​of multiple configuration items in the configuration file according to the verification strategy provided by the user 101.

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

[0131] In this embodiment, after determining the configuration file, the processing device 302 can 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.

[0132] Alternatively, in an actual application scenario, 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 in yaml format, while the format of the configuration file recognized by the construction device 303 is in spec format. Therefore, in a possible implementation, the processing device 302 may also perform format conversion on 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.

[0133] In 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, then the processing device 302 can traverse the value 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. Figure 8 As shown, the left side is the value of the configuration item in yaml format, then the processing device 302 can map the values ​​of each configuration item on the left side to the values ​​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., so as to generate a configuration file in the second format based on the values ​​of 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.

[0134] 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. At this time, 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.

[0135] In a further possible implementation, before the construction device 303 constructs the software package based on the configuration file, the configuration file may be output to the client 201, and the client 201 may present the configuration file to the user 101 so that the user 101 can confirm the value of each configuration item in the configuration file. After the configuration file passes the manual verification of the user 101, the construction device 303 then constructs the corresponding software package according to each configuration item defined in the configuration file. This further improves the accuracy of the customized construction of the software package.

[0136] In an actual software development scenario, the software project to be developed by the user 101 may include multiple software packages, and each software package to be built may include at least one set of customized files. Figure 2 The process of building a software package shown in the figure performs an integration operation on the customized files corresponding to each software package according to the fusion customization strategy, and builds the software package based on the integrated configuration file, so as to realize the construction of each software package in the software project, thereby completing the construction of the entire software project on the construction system 10.

[0137] In the present 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 according to the configuration file, so that the user can only provide the customized file to the construction system 10 to realize the customized construction of the software package, without the need for the user to modify the construction script of the software package. In this way, not only can the difficulty of the user's customized construction of the software package be effectively reduced, and the friendliness of the 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 the software package construction scenarios in multiple fields such as the server field and the embedded field.

[0138] 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 the fact that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.

[0139] Combination of the above Figures 1 to 8 The method for constructing a software package provided in an embodiment of the present application is introduced. 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 introduced in conjunction with the accompanying drawings.

[0140] See also Fig. 9 , showing a schematic diagram of the structure of a device for building a software package, the device 900 includes:

[0141] An acquisition module 901 is used 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 in the multiple sets of customized files includes at least one configuration item;

[0142] A determination module 902 is used to determine a configuration file according to the fusion customization strategy and the multiple groups of customization files, where the configuration file includes at least one configuration item, and the fusion customization strategy is used to integrate multiple configuration items in the multiple groups of customization files;

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

[0144] In a possible implementation, the determination module 902 is specifically configured to:

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

[0146] In a possible implementation, the determination module 902 is specifically configured to:

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

[0148] According to the keys and values ​​of multiple configuration items, establish reference relationships between different configuration items in the configuration space;

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

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

[0151] In a possible implementation, the determination module 902 is specifically configured to:

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

[0153] Filter multiple configuration items in multiple groups of customized files according to the values ​​of the customized items;

[0154] The configuration items obtained after filtering in multiple groups of customized files are merged to obtain a merged result.

[0155] In a possible implementation, the determination module 902 is specifically configured to:

[0156] Get the merge strategy provided by the user;

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

[0158] In a possible implementation, the determination module 902 is further configured to:

[0159] 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.

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

[0161] Before building the software package according to the configuration file, obtain the verification strategy provided by the user;

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

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

[0164] Converting the configuration file into a second format.

[0165] Build a software package based on the configuration file in the second format.

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

[0167] Obtain customized files provided by multiple users using the client, and obtain multiple groups of customized files.

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

[0169] In this way, in the process of building a software package, the user can only provide the customized file to the construction system 10 to realize the customized construction of the software package, without the need for the user to modify the construction script of the software package, thereby effectively reducing the difficulty of the user's customized construction of the software package and improving the friendliness of the customized construction of the software package, and this automated construction process can also effectively customize the efficiency of the construction of the software package. In addition, when the multiple sets of customized files obtained come from different customization parties, such as from different users, etc., based on the above configuration method, multiple customization policies are supported 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.

[0170] because Fig. 9The devices shown for building the software packages correspond to Figure 2 The method shown, therefore Figure 2 The specific implementation method of the device 900 for building a software package and its technical effects can be found in the relevant descriptions of the aforementioned embodiments, and will not be described in detail here.

[0171] Fig.10 A schematic diagram of a computing device 1000 provided in the present application, the computing device 1000 may be, for example, the above-mentioned Figure 4 The terminal 201 etc. in the illustrated embodiment.

[0172] like Fig.10 As shown, 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 via a bus 1004, and may also communicate via other means such as wireless transmission. The memory 1002 is used to store instructions, and the processor 1001 is used to execute 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 via 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:

[0173] 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;

[0174] 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;

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

[0176] It should be understood that in the embodiment of the present application, the processor 1001 may be a CPU, and the processor 1001 may also 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.

[0177] The memory 1002 may include a read-only memory and a random access memory, and provide 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 information about the device type.

[0178] The memory 1002 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (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 dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

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

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

[0181] The embodiment of 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 containing one or more available media. 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 (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned method for building a software package.

[0182] The embodiment of 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 process or function described in the embodiment of the present application is generated in whole or in part.

[0183] 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.

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

[0185] 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 a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. 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 hard disk.

[0186] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope 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

Cited By

  • Security configuration synchronization method for gateway equipment and client

    CN121333932A

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

    EP4645069A1

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

    WO2024193152A1