Application software packaging method and device, medium and product

By finding and replacing the application software's basic dependency files in the project management directory and using private dependency files for compilation and packaging, the problem of repeated processing of basic configuration parameters between multiple application software is solved, and the efficiency of application software packaging is improved.

CN119645486APending Publication Date: 2025-03-18KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411930057.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

During the development of application software, some similar functions or business intersections exist between multiple application software, resulting in repeated processing of basic configuration parameters or files, which reduces the efficiency of application software packaging work.

Method used

By looking for the target application's private dependency files and the basic dependency files common to multiple applications from the project management directory, replace the basic dependency files with the private dependency files, and perform compilation and packaging tasks on the replaced target application.

Benefits of technology

It realizes separate management of different configuration parameters of multiple applications and unified management of basic configuration parameters, reduces the workload of file management in the project management directory, and improves the efficiency of application software packaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645486A_ABST
    Figure CN119645486A_ABST
Patent Text Reader

Abstract

The invention provides an application software packaging method and device, a medium and a product. The method comprises the following steps: in response to a packaging request for a target application, searching a private dependent file corresponding to the target application and a basic dependent file shared by a plurality of applications from an engineering management directory; wherein the project management directory comprises a plurality of private dependent files of a plurality of applications; replacing the basic dependent file with a private dependent file; and executing compiling and packaging tasks on the target application replaced by the private dependent file. Unified management of multiple applications can be achieved through one project, in the subsequent compiling and packaging process, under the condition that the project management catalog does not need to be modified too much, the private dependent file is used for replacing the basic dependent file, the workload of managing multiple files at the same time through the project management catalog is effectively reduced, and the efficiency of managing multiple files through the project management catalog is improved. The working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an application software packaging method, device, medium and product. Background Art

[0002] In application software (Application, APP) development scenarios, different business applications are sometimes used separately to meet different business needs.

[0003] During the application software development process, engineering management software is used to manage the software development process. Since different application software are managed independently, in the subsequent software development and operation and maintenance process, each application software must be managed and maintained independently through the engineering. Sometimes, there are some similar functions or business intersections between multiple business application software, which means that some content in the application software has the same basic configuration parameters or files. For example, different application software have the same basic capability layer and public business layer, and only the application layer is different. During the development or maintenance of multiple applications, the basic configuration parameters or files need to be repeatedly processed. Therefore, a solution that can effectively improve the efficiency of application software packaging is needed. Summary of the invention

[0004] The present invention provides an application software packaging method, device, medium and product.

[0005] According to a first aspect of the present disclosure, a method for packaging application software is provided. The method includes: in response to a packaging request for a target application, searching for a private dependency file corresponding to the target application and a basic dependency file common to multiple applications from a project management directory; wherein the project management directory contains multiple private dependency files of multiple applications; replacing the basic dependency file with the private dependency file; and performing compilation and packaging tasks on the target application replaced with the private dependency file.

[0006] According to at least one embodiment of the present disclosure, private dependency files corresponding to the target application and basic dependency files common to multiple applications are found from the project management directory, including: finding a project configuration file from the project management directory, and a basic dependency file for declaring dependency relationships in the project configuration file; and finding private dependency files corresponding to the target application from a private file directory contained in the project management directory.

[0007] According to at least one embodiment of the present disclosure, replacing the basic dependency file with the private dependency file includes: generating a packaging script for packaging the target application software based on the target application identifier of the target application; before compiling, replacing the basic dependency file with the private dependency file using the packaging script.

[0008] According to at least one embodiment of the present disclosure, a method for generating a private dependency file includes: determining difference configuration parameters related to an application layer of a target application; and creating a private dependency file of the target application based on the difference configuration parameters.

[0009] According to at least one embodiment of the present disclosure, a method for generating a project management directory includes: establishing a private file directory for managing private dependency files in the project management directory; adding private dependency files of multiple applications including the private dependency files of the target application to the private file directory; wherein the project management directory contains basic dependency files of other applications having the same basic configuration parameters as the target application.

[0010] According to at least one embodiment of the present disclosure, in response to an application configuration parameter maintenance request, a maintenance type and a target configuration parameter corresponding to the configuration parameter maintenance request are determined; if the maintenance type is basic maintenance, basic dependency files of multiple applications containing the target configuration parameters are modified.

[0011] According to at least one embodiment of the present disclosure, in response to an application configuration parameter maintenance request, a maintenance type and a target configuration parameter corresponding to the configuration parameter maintenance request are determined; if the maintenance type is private maintenance, a private dependency file of the target application containing the target configuration parameter is modified.

[0012] According to a second aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the method of the first aspect of any embodiment of the present disclosure.

[0013] According to a third aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the method of the first aspect of any embodiment of the present disclosure is implemented.

[0014] According to a fourth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method of the first aspect of any embodiment of the present disclosure is implemented.

[0015] In the solution provided by the present disclosure, during the development and operation of the target application, if a packaging request for the target application is received, the private dependency file corresponding to the target application and the basic dependency file common to multiple applications will be found in the project management directory. The private dependency file mentioned here is a dependency file unique to each application, which contains the private configuration parameters of the application. Among them, the project management directory contains multiple private dependency files of multiple applications; the basic dependency file is replaced with the private dependency file; and the compilation and packaging tasks are performed on the target application replaced with the private dependency file. Through the above method, the private dependency files of the differential configuration parameters of multiple applications are differentially managed in the project management directory, while the basic configuration parameters are uniformly managed in the project management directory, and the private dependency files and the basic dependency files are placed in a project management directory. The unified management of multiple applications can be achieved through one project. In the subsequent compilation and packaging process, the basic dependency files can be replaced with private dependency files without making too many modifications to the project management directory, which effectively reduces the workload of managing multiple files at the same time using the project management directory and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0017] Figure 1 This is a schematic diagram of the structure of the application software packaging system proposed in the present disclosure.

[0018] Figure 2 The overall process diagram of the application software packaging method according to one embodiment of the present disclosure is shown.

[0019] Figure 3 A schematic diagram of the engineering management directory provided for the present disclosure.

[0020] Figure 4 A flowchart of an application software packaging method illustrated in the present disclosure.

[0021] Figure 5 It is a schematic block diagram of the structure of an application software packaging device according to an embodiment of the present invention.

[0022] Figure 6 It is a schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0024] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0025] In the prior art, during the development of application software, it is necessary to manage the development of application software through engineering. Generally speaking, each application software has its own management engineering, and these engineering files can be independently managed and maintained. In the scenario of application software development, a team will maintain multiple application software at the same time. There are obvious differences in the application layers of these application software, but the basic capability layer and the public business layer are the same. In other words, these application software partially rely on files, engineering configurations (for example, initialization configuration of the project, compilation configuration), version processes (for example, time points, development, testing, online, etc.), rules and specifications, etc. are the same or even shareable, and only the business content of some application layers is different. In the traditional engineering management solution, each application software is managed by a project, which will generate a lot of redundant work. Therefore, the present disclosure proposes an application software packaging solution.

[0026] Figure 1 This is a schematic diagram of the structure of the application software packaging system proposed in the present disclosure. Figure 1 As can be seen in the figure, in the packaging solution proposed in the present disclosure, multiple application software are placed in one project for management. Specifically, in the project management directory, two groups of directories about configuration parameters are maintained. The first group is the basic dependency files containing the basic configuration parameters of multiple applications, and the second group is the private dependency files containing the differentiated configuration parameters of each application.

[0027] When batch operation and maintenance of the basic configuration parameters of multiple applications is required, the operation and maintenance of multiple basic configuration files can be achieved by modifying or improving the basic configuration parameters once. There is no need to operate and maintain the dependent files of each application software separately as in traditional engineering management solutions, which can significantly improve the work efficiency of application software operation and maintenance.

[0028] When it is necessary to perform targeted operation and maintenance on differentiated configuration parameters in application software, the private dependency file of the target application can be found through the project management directory. Only the parameters in the private dependency file need to be modified. No other modifications are required, which can effectively improve the efficiency of operation and maintenance.

[0029] Based on the above disclosed solution, the above application software packaging system is used for project management, which can not only realize the unified management of dependent files, configuration parameters, processes, and rules and specifications, but also can make differentiated adaptation of dependent files for different application software, thus effectively improving the packaging efficiency of multiple application software.

[0030] Explanation of terms.

[0031] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the application software packaging method implemented by the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are explained as follows.

[0032] Application software (APP) refers to software programs designed, developed and installed on computers, mobile phones or other mobile devices to complete one or more specific tasks. These software usually have a graphical user interface, allowing users to easily interact with computers or mobile devices to complete various tasks.

[0033] Harmony, or Hongmeng operating system, is a distributed operating system developed by Huawei for the future and all scenarios (mobile office, sports and health, social communication, media entertainment, etc.). Harmony OS follows a layered design as a whole, which is divided into the kernel layer, system service layer, framework layer and application layer from bottom to top. Kernel layer: divided into kernel subsystem and driver subsystem, providing basic system functions and hardware driver support for Harmony OS. System service layer: provides various system services, such as event notification, phone, multimedia, etc., as well as differentiated capability-enhanced software services for different devices. Framework layer: provides multi-language user program frameworks and Ability frameworks such as Java / C / C++ / JS for Harmony OS applications, as well as multi-language framework APIs open to the outside world for various software and hardware services. Application layer: includes system applications and third-party non-system applications. Harmony OS applications are composed of one or more FA (Feature Ability) or PA (Particle Ability), of which FA has a UI interface and provides the ability to interact with users; while PA has no UI interface and provides the ability to run tasks in the background and unified data access abstraction.

[0034] Project management, in software Project, project management tools play a vital role. These tools can help project teams better plan, track and control the progress, cost and quality of projects. Every Project developed by application software can provide comprehensive project planning, progress control, cost analysis and resource allocation functions. By using Project, project teams can easily create project plans, assign tasks, make schedules, track progress and resource usage, and generate various charts and reports.

[0035] Compilation is the process of converting high-level language code into binary machine code that can be executed by a computer. It is one of the important links in the software development process. The compiler converts the source code written by the programmer into an instruction set that the computer understands. The result of compilation is the generation of target files, executable files or library files. These files are codes that can be directly executed by the computer.

[0036] Packaging refers to the process of combining the code, resources, and dependencies of an application so that it can run on other computers or server environments without further configuration. This process involves collecting all relevant data and libraries to eventually generate an executable program or installation package. The main purpose of packaging is to simplify the software deployment process and ensure the consistency and independence of the software in different systems and environments. Through packaging, all necessary files and resources of the software can be integrated together, allowing users to run the software without manual installation and configuration.

[0037] Figure 2 The overall process diagram of the application software packaging method according to one embodiment of the present disclosure is shown. Figure 2 The method shown includes steps 201 to 203. The method may be executed by an electronic device such as a server (local server or cloud server).

[0038] Specifically, Figure 2 The method shown includes: Step 201: In response to a packaging request for a target application, searching for private dependency files corresponding to the target application and basic dependency files common to multiple applications from a project management directory; wherein the project management directory contains multiple private dependency files of multiple applications.

[0039] The basic dependency files mentioned here refer to files that store basic configuration parameters common to multiple application software. These basic configuration parameters include the Compile SDK in the project configuration: the target API Version of the application / service. When compiling and building, the development tool will compile and package according to the specified Compile API version. Model: The mode supported by the application. Different versions of API may support different modes. Language: Development language. Choose the appropriate development language based on the development team's technology stack and project requirements.

[0040] The private dependency file mentioned here refers to the file that stores the basic configuration parameters related to the application layer. The application-related configuration parameters contained in the configuration file are unique and different from those of other applications. The basic configuration parameters mentioned here include: entry configuration, which specifies the entry of the application / service. A HAP file will be generated during compilation and building. Page configuration, which defines the pages included in the application / service, including the path, name, layout, etc. of the page.

[0041] In the process of application software development, it must be compiled and packaged before it can be released and run. In the disclosed solution, the relevant files of multiple application software are managed through a project management directory.

[0042] In the project management directory, manage the private dependency files of each application separately from the common basic dependency files. Figure 3 A schematic diagram of the engineering management directory provided for this disclosure. Figure 3 As can be seen in the figure, in the project management directory, the common basic dependency file oh-package.json5 of multiple application software is placed separately in the directory, and the private dependency files unique to multiple applications are placed in the same private file directory. As mentioned above, in the private dependency file, the configuration parameters related to the application layer unique to the target application are stored. Therefore, each private dependency file cannot be replaced by each other. Based on the above private dependency files and common basic dependency files, a solution for efficient operation and maintenance of multiple applications in one project can be implemented.

[0043] Step 202: Replace the basic dependency file with the private dependency file.

[0044] As mentioned above, the basic dependency file refers to a file that stores basic configuration parameters common to multiple applications. This basic dependency file is the basic parameters that the original development system can provide, and contains parameters of the same type as private configuration parameters. The disclosed solution does not directly modify the configuration parameters in the basic dependency file, but adopts a solution for replacing differentiated configuration parameters.

[0045] For example, page configuration parameters are parameters that must be configured in the development of many application software. In the basic dependency file, there are page configuration related parameters for developers to configure. In order to facilitate the subsequent batch maintenance and management of configuration parameters, the configuration parameters in the basic dependency file will not be modified here, but each application software will set and modify it by itself. Before compiling, these configuration parameters are replaced in a targeted manner. This will not affect the call of other application software to the basic dependency file and configuration parameters, and can effectively simplify the difficulty of batch operation and maintenance of configuration parameters.

[0046] Step 203: Compile and package the target application replaced with the private dependency file.

[0047] In actual applications, the replacement of private dependency files is performed before compiling the target application software. Compilation is the process of converting high-level language code into binary machine code that can be executed by a computer. The binary machine code that really needs to be executed by the machine is the private configuration parameters in the private dependency file. Therefore, the replacement of dependency files must be performed before compilation.

[0048] When replacing, targeted replacement is performed based on the application identifier of the target application. No modifications are made to the original public basic dependency files, and the compilation and packaging of other applications are not affected.

[0049] Based on the above public scheme, during the development and operation of the target application, if a packaging request for the target application is received, the private dependency file corresponding to the target application and the basic dependency file common to multiple applications will be found in the project management directory. The private dependency file mentioned here is a dependency file unique to each application, which contains the private configuration parameters of the application. Among them, the project management directory contains multiple private dependency files of multiple applications; the basic dependency file is replaced with the private dependency file; and the compilation and packaging tasks are performed on the target application replaced with the private dependency file. Through the above method, the private dependency files of the differential configuration parameters of multiple applications are managed separately in the project management directory, and the basic configuration parameters are managed uniformly in the project management directory. The private dependency files and the basic dependency files are placed in a project management directory. The unified management of multiple applications can be achieved through one project. In the subsequent compilation and packaging process, the basic dependency files can be replaced with private dependency files without making too many modifications to the project management directory, which effectively reduces the workload of managing multiple files at the same time using the project management directory and improves work efficiency.

[0050] In one or more embodiments of the present disclosure, private dependency files corresponding to the target application and basic dependency files common to multiple applications are found from the project management directory, including: finding a project configuration file from the project management directory, and a basic dependency file for declaring dependency relationships in the project configuration file; and finding private dependency files corresponding to the target application from a private file directory contained in the project management directory.

[0051] like Figure 3 As shown, in order to facilitate the management of dependent files, the basic dependent files and private dependent files are managed separately in the project management directory. In other words, a private file directory and a project configuration file directory are established in the project management directory. When searching for different types of files, you can search accordingly based on the directory classification.

[0052] When you need to find a basic dependency file, search through the directory of the project configuration file. Generally speaking, in a project management directory, there is only one directory of project configuration files, and there is only one basic dependency file stored in it. The basic dependency file is a dependency file shared by multiple applications, and the configuration parameters contained in it are also basic configuration parameters. When declaring the configuration parameter dependency in the basic configuration file, it can be declared as a dependency for multiple applications, or declared as a public parameter so that multiple applications can call it as needed.

[0053] When you need to find a private dependency file, you need to search in the private file directory, more specifically, search in the private file directory according to the application identifier of the target application. In an optional solution, all application layer related parameters of the target application can be placed in the private dependency file, and other basic configuration parameters can be placed in the public basic dependency file.

[0054] Through the above content, private dependency files and basic dependency files are managed separately. Although the content of the project management directory increases, multiple applications can be centrally managed in one project management directory, which can effectively improve management efficiency.

[0055] In one or more embodiments of the present disclosure, replacing the basic dependency file with the private dependency file includes: generating a packaging script for packaging the target application software based on the target application identifier of the target application; before compiling, replacing the basic dependency file with the private dependency file using the packaging script.

[0056] In actual applications, when private dependency files are created for multiple applications including the target application, the basic dependency files will not be modified, ensuring that other applications in the project management directory can also call the basic dependency files normally, eliminating the workload of repeated development and maintenance.

[0057] However, the basic dependency file also contains some duplicate invalid configuration parameters. For example, the page configuration parameters are configured in the private dependency file of the target application, but the basic dependency file also contains invalid page configuration parameters. In addition, the basic dependency file also contains many other configuration parameters that are not included in the private configuration file. The other configuration parameters mentioned here are necessary in the application software compilation process. Therefore, the present disclosure proposes a solution to replace the public basic dependency file with a private dependency file.

[0058] For example, the packaging script is as follows: hvigorw assembleHap -m module -p product=link -pmodule=app@app1 -p buildMode=debug -p vn=6.31.0 -p vc=6310 -p bn=com.link.hongmeng --no-daemon.

[0059] In the packaging script, the target application identifier "app1" of the packaged target application is defined (this identifier will be dynamically changed according to the packaged application software identifier). When replacing, the private dependency file "dependencies.json5" is used to replace the "dependencies" in "oh-package.json5". The private dependency file contains private difference configuration parameters. Of course, in some cases, the private dependency file also contains relevant configuration parameters of third-party libraries, basic libraries, and public libraries. When replacing, the private dependency file is used to replace the dependencies as a whole, and there is no need to modify the configuration parameters in the basic dependency file, so as to avoid adverse effects on other applications calling the basic dependency file in the project management directory.

[0060] Based on the above content, there is no need to make tedious modifications to the original configuration files, nor to change the project management directory structure. All you need to do is add private dependency files to the directory in the project management directory for each application, and you can achieve differentiated compilation and packaging of multiple applications based on one project management. After the private dependency files of the target application are created, they are stored separately in the private file directory without modifying the basic dependency files, which can effectively improve management efficiency and simplify management workflows.

[0061] In one or more embodiments of the present disclosure, a method for generating a private dependency file includes: determining difference configuration parameters related to an application layer of a target application; and creating a private dependency file of the target application based on the difference configuration parameters.

[0062] In actual applications, most of the basic configuration parameters of multiple applications in the same project management are the same, and only the configuration parameters of individual application layers are different. Specifically, due to the different business application scenarios of each application, the application layer content presented to the user is different. For example, the page display effects of different types of application software are different. Therefore, it is necessary to set and maintain application-related configuration parameters differently. In order to reduce the amount of management tasks for dependent files in the project management directory, when generating private dependent files, the configuration parameters in the basic dependent files cannot be changed, because the configuration parameters in the basic dependent files are common to many application software.

[0063] When generating a private dependency file, you can generally add application layer related difference configuration parameters to the private dependency file.

[0064] Of course, if there are other configuration parameters in the target application that are also differential configuration parameters, they can be added to the private dependency file together. In other words, the private dependency file can be understood as a file for managing and maintaining all differential configuration parameters of the application.

[0065] After generating private dependency files using differential configuration parameters, the private dependency files of multiple applications can be further added to a newly created subdirectory (private file directory) in the project management directory for unified management.

[0066] Through the above solution, all the different configuration parameters of the target application are placed in the private dependency file, and managed uniformly with the private dependency files of other applications. During the packaging and compilation process, the private dependency file corresponding to the target application is selected to replace the basic dependency file and then compiled. There is no need to modify the original basic dependency file. In the subsequent modification process, it can effectively improve the work efficiency of project management.

[0067] In one or more embodiments of the present disclosure, a method for generating a project management directory includes: establishing a private file directory for managing private dependency files in the project management directory; adding private dependency files of multiple applications including the private dependency files of the target application to the private file directory; wherein the project management directory contains basic dependency files of other applications having the same basic configuration parameters as the target application.

[0068] It should be noted that there can be one or more private file directories in the same project management directory. This private file directory stores private dependency files of multiple different applications, but the application software corresponding to these private dependency files needs to have the same basic dependency files. In other words, the basic dependency files of multiple applications in the same private file directory have the same content. Applications with different basic dependency files cannot be placed in the same project management directory.

[0069] In order to meet the needs of managing multiple applications in the project management directory at the same time, a private file directory is added to the original project management directory. In the subsequent maintenance and operation of the application, private dependency files can be modified, added or deleted based on the private file directory. In addition, the difference configuration parameters contained in the private dependency files are a small number of configuration parameters, and the maintenance cost of private dependency files is lower.

[0070] Based on the above content, a private file directory is added when the project management directory is established. When adding private dependent files to the private file directory, it is necessary to first determine and ensure that the application software to which the private dependent files are added is an application with the same basic dependent files as other application software in the project directory. This enables unified management of multiple applications using one project management directory. On the contrary, if it is found after judgment that the application software to which the new private dependent files are added has different basic dependent files from other application software in the project directory, it cannot be managed through an engineering pipeline directory, that is, the private dependent file is not allowed to be added to the current project management directory.

[0071] In one or more embodiments of the present disclosure, in response to a configuration parameter maintenance request of an application, a maintenance type and a target configuration parameter corresponding to the configuration parameter maintenance request are determined; if the maintenance type is basic maintenance, basic dependency files of multiple applications containing the target configuration parameters are modified.

[0072] In actual applications, since the project management directory contains basic dependency files common to multiple applications, during the software operation and maintenance process, you may encounter a situation where you need to modify a basic configuration parameter. Although the common configuration parameters that need to be modified may be related to multiple applications, since the basic configuration parameters used by these multiple applications are all in the same basic dependency file, when modifying the basic configuration parameters, you only need to modify one file, and there is no need to modify multiple dependency files as in the prior art.

[0073] The maintenance types mentioned here can be understood to include: configuration parameter modification, configuration parameter deletion, configuration parameter addition, etc. The target configuration parameters mentioned here refer to the configuration parameters targeted by this operation and maintenance, and in the above public content, refer to the basic configuration parameters.

[0074] When initiating a maintenance request for configuration parameters, it is necessary to clearly specify in the request which target configuration parameter and what type of maintenance operation is being performed. This includes determining whether it is for private configuration parameters or basic configuration parameters, and deciding which basic dependency file or private dependency file to search for in the directory. If the maintenance type is modification, targeted modifications are made directly based on the original basic dependency file; if the maintenance type is addition, target configuration parameters are added based on the original basic dependency file; if the maintenance type is deletion, the target configuration parameters in the original basic dependency file are directly deleted.

[0075] Based on the above content, it can be seen that using a project management directory can achieve efficient operation and maintenance management of multiple applications, and can achieve efficient operation and maintenance of application software without modifying the basic configuration parameters of each application.

[0076] In one or more embodiments of the present disclosure, in response to a configuration parameter maintenance request of an application, a maintenance type and a target configuration parameter corresponding to the configuration parameter maintenance request are determined; if the maintenance type is private maintenance, a private dependency file of the target application containing the target configuration parameter is modified.

[0077] In actual applications, the project management directory contains private dependency files of multiple applications, and the private dependency files are configured with the application's private differential configuration parameters. In other words, each application in the project management directory has its own private dependency file. When there is a need to modify a private dependency file, you only need to modify the private dependency file for the target application, and there is no need to modify other private dependency files.

[0078] Specifically, when a configuration parameter maintenance request is received, first determine whether it is a modification of a private configuration parameter or a basic configuration parameter. If the target configuration parameter is a private configuration parameter, then search for the private configuration parameter in the project management directory. Further determine the maintenance type for the private configuration parameter. If the maintenance type is modification, then make targeted modifications directly based on the original private dependency file; if the maintenance type is addition, then add the target configuration parameter based on the original private dependency file; if the maintenance type is deletion, then directly delete the target configuration parameter in the original private dependency file.

[0079] Based on the above content, it can be seen that using an engineering management directory can achieve efficient operation and maintenance management of multiple applications, and can make targeted modifications to the different configuration parameters of each application. There is no need to modify a large number of configuration parameters of many applications, and efficient operation and maintenance of application software can be achieved.

[0080] For ease of understanding, the implementation scheme of the application software packaging method will be described below through specific embodiments. Figure 4 A flowchart of the application software packaging method illustrated in the present disclosure. It is assumed here that the application software packaging is implemented based on Harmony. In Harmony, the original basic dependency file is oh-package.json5. The oh-package.json5 file is used to define and manage various configuration information of the HarmonyOS project, including dependency management, script configuration, project information, etc. It is an indispensable configuration file in the HarmonyOS project. By providing rich configuration options, it helps developers to efficiently manage project dependencies, automate development processes, define project information and build configurations. Among them, the oh-package.json5 file usually contains the following fields: name: The name of the application, usually refers to the entry module or component of the application. version: The version number of the application, in the format of major version number.minor version number.revision number. description: The description information of the application, which is used to briefly describe the function or purpose of the application. main: The entry file or module of the application, but in some cases, this field may not be required because the HarmonyOS application can have multiple entry points (such as pages), which may be specified by other means. author: The author or developer information of the application. license: The license type of the application, which is used to specify the open source agreement or copyright information of the project. dependencies: The application's dependencies, which lists the npm packages or other HarmonyOS modules required by the project.

[0081] The oh-package.json5 file uses the .json5 extension, which means it follows the JSON5 format instead of the strict JSON format. JSON5 is a superset of JSON that allows some additional syntax, such as trailing commas, comments, etc., which makes the file more readable and easier to maintain.

[0082] In the oh-package.json5 file, the dependencies section is used to declare the dependencies of the project. These dependencies can be npm packages, other HarmonyOS modules, or other types of libraries. By declaring dependencies, developers can ensure that the project can find and load these necessary resources when building or running. The dependencies section is usually an object whose key is the name of the dependency and whose value is the version number or version range of the dependency.

[0083] like Figure 4As shown, in the project management directory, on the basis of retaining the original basic dependency files in the original Harmony system, a private file directory dedicated to managing the private dependency files of each application is established as step 401, and there is no need to modify the basic dependency files. As in step 402, when a compilation or packaging request for the application software is received, the private dependency file is used to replace the configuration parameters specified in the basic dependency question, and the target application that has completed the replacement is used to perform the compilation and labeling tasks as in step 403. A unified management of multiple applications is achieved through an engineering management directory, and the difference configuration parameters are uniformly placed in the private file directory. When a certain application software is to be compiled, the corresponding private dependency file is selected to replace the relevant configuration parameters in the basic dependency file. Without making any modifications to the original basic configuration parameters, rapid compilation and packaging can be achieved, which can effectively improve the operation and management efficiency of multiple applications.

[0084] The above content disclosure solution is based on the compilation process of Harmony application software. Through a script, different dependencies of different application software are dynamically replaced before code compilation to achieve the function of different APP dependencies. In this way, the management capability of multiple APPs with the same shell is realized in the Hamrony APP project.

[0085] Based on any of the above implementations, the present disclosure also provides an application software packaging device.

[0086] Figure 5 It is a schematic block diagram of the structure of an application software packaging device according to an embodiment of the present invention.

[0087] like Figure 5 As shown, the application software packaging device includes: a search module 51, which is used to respond to a packaging request for a target application, and find the private dependency files corresponding to the target application and the basic dependency files common to multiple applications from the project management directory; wherein the project management directory contains multiple private dependency files of multiple applications. A replacement module 52 is used to replace the basic dependency files with private dependency files. A packaging module 53 is used to perform compilation and packaging tasks on the target application replaced with the private dependency files.

[0088] The search module 51 is used to search for the project configuration file and the basic dependency file used to declare the dependency relationship in the project configuration file from the project management directory; and search for the private dependency file corresponding to the target application from the private file directory included in the project management directory.

[0089] The replacement module 52 is used to generate a packaging script for packaging the target application software based on the target application identifier of the target application; before compiling, the basic dependency file is replaced with the private dependency file using the packaging script.

[0090] Optionally, the device further comprises a generating module 54, which is used to determine difference configuration parameters related to the application layer of the target application; and to create a private dependency file of the target application based on the difference configuration parameters.

[0091] Optionally, the generation module 54 is also used to establish a private file directory for managing private dependency files in the project management directory; add private dependency files of multiple applications including the private dependency files of the target application to the private file directory; wherein the project management directory contains basic dependency files of other applications having the same basic configuration parameters as the target application.

[0092] Optionally, a maintenance module 55 is also included, which is used to respond to the configuration parameter maintenance request of the application, determine the maintenance type and target configuration parameters corresponding to the configuration parameter maintenance request; if the maintenance type is basic maintenance, modify the basic dependency files of multiple applications containing the target configuration parameters.

[0093] Optionally, the maintenance module 55 is further used to respond to the configuration parameter maintenance request of the application, determine the maintenance type and target configuration parameters corresponding to the configuration parameter maintenance request; if the maintenance type is private maintenance, modify the private dependency file of the target application containing the target configuration parameters.

[0094] Based on the above public content, in the process of developing and operating the target application, if a packaging request for the target application is received, the private dependency file corresponding to the target application and the basic dependency file common to multiple applications will be found in the project management directory. The private dependency file mentioned here is a dependency file unique to each application, which contains the private configuration parameters of the application. Among them, the project management directory contains multiple private dependency files of multiple applications; the basic dependency file is replaced with the private dependency file; and the compilation and packaging tasks are performed on the target application replaced with the private dependency file. Through the above method, the private dependency files of the differential configuration parameters of multiple applications are managed separately in the project management directory, and the basic configuration parameters are managed uniformly in the project management directory. The private dependency files and the basic dependency files are placed in a project management directory. The unified management of multiple applications can be achieved through one project. In the subsequent compilation and packaging process, the basic dependency files can be replaced with private dependency files without making too many modifications to the project management directory, which effectively reduces the workload of managing multiple files at the same time using the project management directory and improves work efficiency.

[0095] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0096] The executor of the application software packaging method in the specific implementation manner of the present disclosure may be an electronic device such as a server (including a local server or a cloud server).

[0097] Therefore, based on any one of the above embodiments, the present disclosure further provides an electronic device, which can execute the application software packaging method of any one of the embodiments described above in the present disclosure.

[0098] Figure 6 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure.

[0099] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.

[0100] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.

[0101] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0102] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it 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 programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.

[0103] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0104] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0105] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0106] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0108] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.

[0109] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0110] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A method for packaging application software, characterized in that: The method comprises: In response to a packaging request for a target application, a private dependency file corresponding to the target application and a basic dependency file common to multiple applications are searched from a project management directory; wherein the project management directory contains multiple private dependency files of multiple applications; Replace the basic dependency file with the private dependency file; Compiling and packaging tasks are performed on the target application replaced with the private dependency file.

2. The method according to claim 1, characterized in that: The private dependency files corresponding to the target application and the basic dependency files common to multiple applications are found in the project management directory, including: Find the project configuration file and the basic dependency file for declaring the dependency relationship in the project configuration file from the project management directory; The private dependency file corresponding to the target application is searched from the private file directory contained in the project management directory.

3. The method according to claim 1, characterized in that The step of replacing the basic dependency file with the private dependency file includes: Generating a packaging script for packaging the target application software based on the target application identifier of the target application; Before compiling, the basic dependency file is replaced with the private dependency file using the packaging script.

4. The method according to claim 1, characterized in that: The method for generating the private dependency file includes: Determine the application layer-related differential configuration parameters of the target application; Based on the difference configuration parameters, a private dependency file of the target application is created.

5. The method according to claim 4, characterized in that The generation method of the engineering management directory includes: In the project management directory, a private file directory for managing the private dependent files is established; adding the private dependency files of the plurality of applications including the private dependency files of the target application to the private file directory; The project management directory contains basic dependency files of other applications that have the same basic configuration parameters as the target application.

6. The method according to claim 1, characterized in that Also includes: In response to a configuration parameter maintenance request of an application, determining a maintenance type and a target configuration parameter corresponding to the configuration parameter maintenance request; If the maintenance type is basic maintenance, the basic dependency files of the multiple applications including the target configuration parameters are modified.

7. The method according to claim 1, characterized in that Also includes: In response to a configuration parameter maintenance request of an application, determining a maintenance type and a target configuration parameter corresponding to the configuration parameter maintenance request; If the maintenance type is private maintenance, the private dependency file of the target application including the target configuration parameters is modified.

8. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 7.

9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.