Application program publishing method and device, equipment, storage medium and program product

By extracting and encapsulating the functional code module from the application's engineering code module and performing layered packaging processing, the problem of excessive volume of the program installation package is solved, dynamic code distribution and silent download are realized, and user experience is improved.

CN120104176APending Publication Date: 2025-06-06BIGO TECH PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510059763.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

In the prior art, the application program installation package is too large, which affects the user's download and installation experience.

Method used

By extracting the functional code module that meets the preset extraction conditions from the original engineering code module, encapsulate it into a second engineering code module, and building a module dependency, performing layered packaging processing, obtaining the target code module that conforms to the dynamic release format, reducing the size of the program installation package.

Benefits of technology

It has achieved the reduction of the package size of the program installation package, and is suitable for application scenarios of dynamic code distribution and silent download, improving the user's program download and installation experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104176A_ABST
    Figure CN120104176A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an application program publishing method and device, equipment, a storage medium and a program product, and the method comprises the steps: obtaining a first engineering code module, and when at least one function code module meeting a preset extraction condition exists in the first engineering code module, extracting the first engineering code module from the first engineering code module; extracting the function code module from the first engineering code module and packaging the function code module to obtain a second engineering code module; constructing a module dependency relationship between the first engineering code module and the second engineering code module, performing hierarchical packaging processing on a sub-code module in the second engineering code module to obtain a target code module conforming to a preset dynamic release format, and extracting a target dependency relationship corresponding to the target code module; and integrating the first engineering code module, the module dependency relationship and the target dependency relationship to obtain a program installation package, and distributing the program installation package to the terminal equipment. According to the scheme, the size of the program installation package is reduced, dynamic code issuing is supported, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to an application publishing method, apparatus, device, storage medium, and program product. Background Art

[0002] With the continuous development of network technology and the increasing popularity of smart terminal devices, users' demand for applications is also growing to meet diverse needs such as social entertainment, shopping, learning and office. As a result, more and more applications are pouring into the market. In order to attract users and maintain competitive advantage, developers need to continuously update and iterate applications, optimize and improve the functions and user experience of existing applications.

[0003] In the related art, each time an application is released, all code modules corresponding to the application need to be packaged to obtain a program installation package, and the program installation package is distributed to the terminal device. However, with the update and iteration of the business, the program installation package becomes too large, which is not conducive to the installation conversion of the application or data retention, affecting the user's program download and installation experience. Summary of the invention

[0004] The embodiments of the present application provide an application publishing method, apparatus, device, storage medium, and program product, which solve the problem that the program installation package provided by the related technology is too large, which is not conducive to the installation and conversion of the application, or data retention, and affects the user experience. It reduces the package size of the program installation package, is suitable for application scenarios of dynamic code distribution and silent download, and improves the user's program download and installation experience.

[0005] In a first aspect, an embodiment of the present application provides a method for publishing an application program, the method comprising:

[0006] Acquire a first engineering code module, and if there is at least one function code module that meets a preset extraction condition in the first engineering code module, extract the function code module from the first engineering code module and encapsulate it to obtain a second engineering code module;

[0007] Constructing a module dependency relationship between the first engineering code module and the second engineering code module, performing layered encapsulation processing on the sub-code modules in the second engineering code module to obtain a target code module that conforms to a preset dynamic publishing format, and extracting a target dependency relationship corresponding to the target code module;

[0008] The first engineering code module, the module dependency and the target dependency are integrated to obtain a program installation package, and the program installation package is distributed to a terminal device.

[0009] In a second aspect, an embodiment of the present application further provides an application publishing device, the device comprising:

[0010] An acquisition module configured to acquire a first engineering code module;

[0011] A first encapsulation module is configured to extract and encapsulate the function code module from the first engineering code module to obtain a second engineering code module when there is at least one function code module that meets a preset extraction condition in the first engineering code module;

[0012] A second encapsulation module is configured to construct a module dependency relationship between the first engineering code module and the second engineering code module, perform hierarchical encapsulation processing on the sub-code modules in the second engineering code module to obtain a target code module that conforms to a preset dynamic publishing format, and extract a target dependency relationship corresponding to the target code module;

[0013] The program publishing module is configured to integrate the first engineering code module, the module dependency and the target dependency to obtain a program installation package, and distribute the program installation package to the terminal device.

[0014] In a third aspect, an embodiment of the present application further provides an application publishing device, the device comprising:

[0015] one or more processors;

[0016] a storage device configured to store one or more programs,

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the application publishing method described in the embodiment of the present application.

[0018] In a fourth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are configured to execute the application publishing method described in the embodiment of the present application.

[0019] In the fifth aspect, an embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device executes the application publishing method described in the embodiment of the present application.

[0020] In an embodiment of the present application, by obtaining a first engineering code module, if there is at least one functional code module that meets a preset extraction condition in the first engineering code module, the functional code module is extracted from the first engineering code module and encapsulated to obtain a second engineering code module; a module dependency relationship between the first engineering code module and the second engineering code module is constructed, and the sub-code modules in the second engineering code module are layered and encapsulated to obtain a target code module that conforms to a preset dynamic publishing format, and the target dependency relationship corresponding to the target code module is extracted; the first engineering code module, the module dependency relationship, and the target dependency relationship are integrated to obtain a program installation package, and the program installation package is distributed to the terminal device. In the above scheme, by determining the function code module that meets the preset extraction conditions, and extracting and encapsulating the function code module from the first engineering code module to obtain the second engineering code module, part of the function code module can be effectively extracted from the original first engineering code module, which is beneficial to optimizing the size of the program installation package. By encapsulating the sub-code modules in the second engineering code module in layers, a target code module that conforms to the preset dynamic publishing format is obtained, and the target dependency relationship corresponding to the target code module is extracted. The sub-code modules can be reasonably divided and layered, and encapsulated into dynamically publishable target code modules, thereby reducing the package size of the program installation package. The terminal device can subsequently download and install the target code module on demand, which is suitable for application scenarios of dynamic code distribution and silent download, and improves the user's program download and installation experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A flowchart of an application publishing method provided in an embodiment of the present application;

[0022] Figure 2 A schematic diagram of a hierarchical dependency relationship of sub-code modules in a second engineering code module provided in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of a target dependency relationship corresponding to a target code module provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of target dependency relationships corresponding to another target code module provided in an embodiment of the present application;

[0025] Figure 5 A schematic diagram of a module download queue provided in an embodiment of the present application;

[0026] Figure 6 A flowchart of an application publishing method provided in an embodiment of the present application, including a process of performing layered encapsulation processing on sub-code modules to obtain a target code module;

[0027] Figure 7A flowchart of an application publishing method including a process of determining hierarchical dependencies of sub-code modules provided in an embodiment of the present application;

[0028] Figure 8 A flowchart of an application publishing method provided in an embodiment of the present application, including a process of encapsulating sub-code modules by layers based on hierarchical dependencies to obtain a target code module;

[0029] Fig. 9 A flowchart of an application publishing method including a process of encapsulating a function code module to be accessed provided in an embodiment of the present application;

[0030] Fig.10 A structural block diagram of an application publishing device provided in an embodiment of the present application;

[0031] Fig.11 A schematic diagram of the structure of an application publishing device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0033] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0034] The application publishing method provided in the embodiment of the present application can extract some functional code modules from the original first engineering code module, and encapsulate to obtain the second engineering code module, and then perform layered encapsulation processing on the sub-code modules in the second engineering code module, and convert them into a dynamically publishable target code module, so as to reduce the package size of the program installation package, and the terminal device can subsequently download and install the target code module on demand. The application publishing method can be applied to various business scenarios that require the release of applications, such as social media, live video, video conferencing, etc. The several business scenarios listed above are only exemplary and explanatory. In actual applications, the application publishing method can also be used in the release of applications in other scenarios, and the embodiment of the present application does not limit this. The application publishing method, device, equipment, storage medium and program product provided in the embodiment of the present application are intended to solve the problem that the program installation package provided by the relevant technology is too large, which is not conducive to the installation and conversion of the application, or data retention, and affects the user experience.

[0035] In the application publishing method provided in the embodiment of the present application, the executor of each step can be a computer device, which refers to any electronic device with data calculation, processing and storage capabilities, such as mobile phones, PCs (Personal Computers), tablet computers and other terminal devices, and can also be servers and other devices, which are not limited in the embodiment of the present application.

[0036] Figure 1 A flowchart of an application publishing method provided in an embodiment of the present application. Figure 1 As shown, the application publishing method includes the following steps:

[0037] Step S101: Acquire a first engineering code module. If there is at least one function code module that meets a preset extraction condition in the first engineering code module, extract the function code module from the first engineering code module and encapsulate it to obtain a second engineering code module.

[0038] Among them, the first engineering code module can be a collection of original codes developed based on the functions required by the application program. The first engineering code module can include multiple function code modules, each of which can be obtained by aggregating the code parts that implement specific business functions. Taking social media applications as an example, the relevant business functions can be login functions, registration functions, instant messaging functions, message push functions, etc. Optionally, at least one function code module that meets the preset extraction condition includes: at least one function code module that meets the code capacity greater than the preset capacity threshold, or at least one function code module that meets the release attribute of directional distribution. In one embodiment, the code capacity of multiple function code modules in the first engineering code module can be detected respectively, and the capacity detection result corresponding to each function code module is compared with the preset capacity threshold. If the code capacity of a certain function code module is greater than the preset capacity threshold, it can be regarded as that the function code module has a greater impact on the overall capacity of the first engineering code module, and it can be considered to be extracted and used as the module content of the subsequent dynamic code distribution. Therefore, the function code module with a code capacity greater than the preset capacity threshold can be determined as a function code module that meets the preset extraction condition. In one embodiment, the publishing attributes of multiple function code modules in the first engineering code module can be checked separately. If the publishing attribute of a function code module is targeted distribution, for example, a business function is only deployed for a specific region or a specific user group, it can be considered to be extracted and used as the module content for subsequent dynamic code distribution. There is no need to retain it in the first engineering code module for unified distribution, so as to avoid causing the subsequent generated program installation package to be too large. Therefore, the function code module with the publishing attribute of targeted distribution can be determined as a function code module that meets the preset extraction conditions. In addition, by extracting the function code module from the first engineering code module and encapsulating it to obtain the second engineering code module, the function code module can be physically isolated from the first engineering code module and cannot be directly accessed, thereby achieving the purpose of decoupling between modules and facilitating the subsequent dynamic code distribution.

[0039] Step S102: construct a module dependency relationship between the first engineering code module and the second engineering code module, perform layered encapsulation processing on the sub-code modules in the second engineering code module to obtain a target code module that conforms to a preset dynamic publishing format, and extract a target dependency relationship corresponding to the target code module.

[0040] Among them, since the first engineering code module and the second engineering code module are physically isolated, it is necessary to reconstruct the module dependency relationship between the first engineering code module and the second engineering code module. Specifically, the module dependency relationship includes the first dependency relationship and the second dependency relationship. Constructing the module dependency relationship between the first engineering code module and the second engineering code module includes: generating the corresponding first module interface layer based on the first engineering code module, and constructing the first dependency relationship of the second engineering code module pointing to the first module interface layer; generating the corresponding second module interface layer based on the second engineering code module, and constructing the second dependency relationship of the first engineering code module pointing to the second module interface layer. Therefore, by abstracting the functions of the first engineering code module and the second engineering code module to obtain the corresponding module interface layer, the mutual module dependency relationship between the engineering code modules can be realized. In addition, after completing the construction of the module dependency relationship between the first engineering code module and the second engineering code module, the internal dependency relationship of the second engineering code module can be sorted out. Among them, the second engineering code module may include multiple sub-code modules. In order to facilitate the subsequent dynamic code distribution, the multiple sub-code modules can be layered according to the module functions, and according to the unidirectional dependency principle that the upper layer depends on the lower layer, the lower layer does not depend on the upper layer, and the same layers do not depend on each other, the current dependency relationship corresponding to the sub-code module is adjusted to obtain a hierarchical dependency relationship. It can be understood that the dependency relationship indicates that a sub-code module needs to use the function, data or resources of another sub-code module to complete the task. Figure 2 A schematic diagram of hierarchical dependency relationships of sub-code modules in a second engineering code module provided in an embodiment of the present application, such as Figure 2As shown, from top to bottom, it includes 4 module layers, subcode module A is located in the first module layer 101, subcode module B and subcode module C are located in the second module layer 102, subcode module D and subcode module E are located in the third module layer 103, and the third-party library and dynamic link library are located in the fourth module layer 104, wherein subcode module A depends on subcode module C, subcode module B depends on subcode module D, subcode module C depends on subcode module D and subcode module E, subcode module D depends on the third-party library, and subcode module E depends on the third-party library and the dynamic link library. According to the business function requirements and the package size requirements, different division granularities can be selected to encapsulate the target code module to meet the requirements of dynamic code distribution and silent download, for example, the capacity of the target code module is controlled within 10M to meet the requirements of silent download, and the target code module is a preset dynamic publishing format, for example, AAB (Android App Bundle, Android application bundle) format or other dynamic publishing formats that can support dynamic code distribution, which is not limited in this application. In one embodiment, after the dependency adjustment of multiple sub-code modules is completed, the sub-code modules of the same module layer can be encapsulated as a whole into a target code module, or different sub-code modules of the same module layer can be encapsulated as target code modules respectively, and then, the target dependency relationship between the target code modules can be extracted according to the original hierarchical dependency relationship. Figure 3 A schematic diagram of a target dependency relationship corresponding to a target code module provided in an embodiment of the present application, in Figure 2 On the basis of Figure 3 As shown, subcode module A is encapsulated as target code module 201, subcode module B and subcode module C are encapsulated as target code module 202, subcode module D and subcode module E are encapsulated as target code module 203, third-party library is encapsulated as target code module 204, and dynamic link library is encapsulated as target code module 205, wherein target code module 201 depends on target code module 202, target code module 202 depends on target code module 203, and target code module 203 depends on target code module 204 and target code module 205, respectively. In one embodiment, after the dependency adjustment of multiple subcode modules is completed, the subcode modules of the same module layer can be encapsulated as a target code module as a whole, or multiple subcode modules of different module layers can be encapsulated as target code modules, and then, the target dependency relationship between the target code modules can be extracted according to the original hierarchical dependency relationship. Figure 4 A schematic diagram of target dependency relationships corresponding to another target code module provided in an embodiment of the present application, in Figure 2 On the basis of Figure 4As shown, subcode module A, subcode module B and subcode module C are encapsulated as target code module 301, subcode module D and subcode module E are encapsulated as target code module 302, and third-party libraries and dynamic link libraries are encapsulated as target code module 303, wherein target code module 301 depends on target code module 302, and target code module 302 depends on target code module 303.

[0041] Step S103: Integrate the first engineering code module, module dependency and target dependency to obtain a program installation package, and distribute the program installation package to the terminal device.

[0042] Among them, the first engineering code module, module dependency and target dependency are integrated to obtain a program installation package, so it is not necessary to package the target code module into the program installation package in advance, thereby reducing the size of the program installation package. The terminal device can subsequently download and install the target code module in sequence based on the module dependency and target dependency in the program installation package, thereby achieving the purpose of dynamic code distribution and silent download. Specifically, after the program installation package is distributed to the terminal device, the terminal device can determine at least one second engineering code module to be downloaded based on the module dependency and the set functional requirement information in the program installation package, build a module download queue according to the target dependency corresponding to the second engineering code module, and download and install the target code module corresponding to the second engineering code module in sequence based on the module download queue. Among them, the functional requirement information can be used to indicate which second engineering code modules the terminal device needs to download. Figure 5 A schematic diagram of a module download queue provided in an embodiment of the present application, in Figure 3 On the basis of Figure 5 As shown, according to the principle of downloading gradually from the bottom layer to the upper layer, the module download order is target code module 205, target code module 204, target code module 203, target code module 202 and target code module 201. The terminal device can download and install the target code module 205 first, and use its capabilities and functions. Then continue to download and install target code module 204, target code module 203, target code module 202 and target code module 201. Finally, after all the target code modules corresponding to the second engineering code modules are downloaded and installed, the complete functions of the application can be used. Optionally, the program installation package can be distributed directly by the server, or forwarded to a third-party platform for configuration distribution, which is not limited in this application.

[0043] In the above, by obtaining the first engineering code module, if there is at least one functional code module that meets the preset extraction condition in the first engineering code module, the functional code module is extracted from the first engineering code module and encapsulated to obtain the second engineering code module; the module dependency relationship between the first engineering code module and the second engineering code module is constructed, the sub-code modules in the second engineering code module are layered and encapsulated to obtain a target code module that conforms to the preset dynamic publishing format, and the target dependency relationship corresponding to the target code module is extracted; the first engineering code module, the module dependency relationship and the target dependency relationship are integrated to obtain a program installation package, and the program installation package is distributed to the terminal device. In the above scheme, by determining the function code module that meets the preset extraction conditions, and extracting and encapsulating the function code module from the first engineering code module to obtain the second engineering code module, part of the function code module can be effectively extracted from the original first engineering code module, which is beneficial to optimizing the size of the program installation package. By encapsulating the sub-code modules in the second engineering code module in layers, a target code module that conforms to the preset dynamic publishing format is obtained, and the target dependency relationship corresponding to the target code module is extracted. The sub-code modules can be reasonably divided and layered, and encapsulated into dynamically publishable target code modules, thereby reducing the package size of the program installation package. The terminal device can subsequently download and install the target code module on demand, which is suitable for application scenarios of dynamic code distribution and silent download, and improves the user's program download and installation experience.

[0044] Figure 6 A flowchart of an application publishing method provided by an embodiment of the present application, including a process of performing layered encapsulation processing on sub-code modules to obtain a target code module, such as Figure 6 As shown, the following steps are included:

[0045] Step S201: Obtain a first engineering code module. If there is at least one function code module that meets a preset extraction condition in the first engineering code module, extract the function code module from the first engineering code module and encapsulate it to obtain a second engineering code module.

[0046] Step S202, constructing a module dependency relationship between the first engineering code module and the second engineering code module, performing hierarchical dependency adjustment on the current dependency relationship corresponding to the sub-code module in the second engineering code module to obtain a hierarchical dependency relationship that satisfies the unidirectional dependency characteristic, encapsulating the sub-code module by layer based on the hierarchical dependency relationship to obtain a target code module that conforms to a preset dynamic publishing format, and extracting a target dependency relationship corresponding to the target code module.

[0047] Among them, the current dependency relationship can be the original dependency relationship between the sub-code modules, for example, a transitive dependency relationship, a bidirectional dependency relationship, etc. By layering the sub-code modules and adjusting the dependency relationship to a one-way dependency, it can be helpful to meet the needs of subsequent dynamic code issuance. According to the adjusted hierarchical dependency relationship, the sub-code modules can continue to be encapsulated layer by layer to obtain a target code module that conforms to the preset dynamic publishing format, and the target dependency relationship corresponding to the target code module can be extracted. The layer-by-layer encapsulation process can be a module merging encapsulation of the same level, it can be an independent encapsulation of different modules of the same level, or it can be a module merging encapsulation of different levels. It can be divided based on business function requirements and package size requirements, which is not limited in this application. In one embodiment, the capacity size threshold corresponding to the target code module can be pre-set, and the sub-code modules at the bottom layer can be encapsulated layer by layer, or different sub-code modules at the same layer can be encapsulated. If the code capacity corresponding to the overall encapsulation of the sub-code modules of a certain layer meets the capacity size threshold, the sub-code modules of a certain layer can be encapsulated as a whole. If the code capacity corresponding to the overall encapsulation of the sub-code modules of a certain layer meets the capacity size threshold, the sub-code modules of a certain layer can be separately encapsulated, thereby meeting the size requirements of silent download. In one embodiment, the capacity size threshold corresponding to the target code module can be pre-set, and the functional association information between the sub-code modules can be set, and multiple sub-code modules with functional associations between different levels and the overall encapsulation that meet the capacity size threshold are encapsulated to obtain the target code module.

[0048] Step S203: Integrate the first engineering code module, module dependency and target dependency to obtain a program installation package, and distribute the program installation package to the terminal device.

[0049] As described above, by performing hierarchical dependency adjustment on the current dependencies corresponding to the sub-code modules in the second engineering code module, the dependencies between the sub-code modules can be unified into one-way dependencies, and a hierarchical dependency that meets the requirements of dynamic code distribution can be obtained. By encapsulating the sub-code modules by layer based on the hierarchical dependency, a target code module that meets the preset dynamic publishing format can be obtained, and the target dependency between the target code modules can be extracted, which is beneficial for the subsequent terminal device to build a module download queue for dynamic module download and installation.

[0050] Figure 7 A flowchart of an application publishing method including a process of determining hierarchical dependencies of sub-code modules provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the following steps are included:

[0051] Step S301: Obtain a first engineering code module. If there is at least one function code module that meets a preset extraction condition in the first engineering code module, extract the function code module from the first engineering code module and encapsulate it to obtain a second engineering code module.

[0052] Step S302: construct a module dependency relationship between the first engineering code module and the second engineering code module.

[0053] Step S303: According to the module functions corresponding to the sub-code modules in the second engineering code module, the sub-code modules are divided into at least one first module layer, and the current dependency relationships corresponding to the sub-code modules are adjusted according to preset unidirectional dependency rules to obtain hierarchical dependency relationships corresponding to at least one first module layer that satisfy the unidirectional dependency characteristics.

[0054] Among them, the first module layer can be divided according to the different module function levels corresponding to the sub-code module. For example, the second engineering code module can be to realize the user login function, then the corresponding sub-code module is layered as follows: the bottom first module layer can be a commonly used third-party library and dynamic link library, which can be used to provide general functions, such as picture download function, file download function, etc.; the upper layer can be a general interactive component, such as buttons, labels, etc., which can specifically include the predefined background, color, font, font size, etc. of the button; the upper layer can be the relevant data processing flow of the business, such as how to interact with the server and process the relevant login data; the top layer can be the relevant interface configuration and data processing flow of the interaction, such as the specific login interface, and how to process the login information entered by the user, and prompt the user for the login result. After completing the division of the first module layer, the dependency relationship of the sub-code module can be adjusted according to the preset one-way dependency rule. In one embodiment, unnecessary dependencies can be deleted or optimized according to preset unidirectional dependency rules. For example, subcode module B' depends on subcode module A', which is a transitive dependency, and subcode module C' depends on subcode module B' and subcode module A'. The dependency of subcode module C' on subcode module A' can be deleted, or the dependency of subcode module B' on subcode module A' can be adjusted to a non-transitive dependency. In one embodiment, the mutual dependencies between subcode modules can be optimized according to preset unidirectional dependency rules. For example, subcode module A" is an upper-layer business function, and subcode module B" is a lower-layer component or function library, then subcode module A" can depend on subcode module B", and accordingly, the direct dependency of subcode module B" on subcode module A" is deleted and abstracted as interface layer module C", and the interface layer module is sunk to the next layer of subcode module B", and subcode module B" depends on the interface layer module C", so as to realize the indirect dependency of subcode module B" on subcode module A".

[0055] Step S304: encapsulate the sub-code modules layer by layer based on the hierarchical dependency relationship to obtain a target code module that complies with a preset dynamic publishing format, and extract the target dependency relationship corresponding to the target code module.

[0056] Step S305: Integrate the first engineering code module, module dependency and target dependency to obtain a program installation package, and distribute the program installation package to the terminal device.

[0057] As described above, by layering the sub-code modules according to module functions and adjusting the dependencies to obtain layered dependencies, the internal dependency of the second engineering code module can be optimized to meet the one-way dependency characteristics, which is conducive to subsequent packaging processing that meets the requirements of dynamic code distribution.

[0058] Figure 8 A flowchart of an application publishing method provided in an embodiment of the present application includes a process of encapsulating sub-code modules by layers based on hierarchical dependencies to obtain target code modules, such as Figure 8 As shown, the following steps are included:

[0059] Step S401: Obtain a first engineering code module. If there is at least one function code module that meets a preset extraction condition in the first engineering code module, extract the function code module from the first engineering code module and encapsulate it to obtain a second engineering code module.

[0060] Step S402: construct a module dependency relationship between the first engineering code module and the second engineering code module, and perform hierarchical dependency adjustment on the current dependency relationship corresponding to the sub-code modules in the second engineering code module to obtain a hierarchical dependency relationship that satisfies the unidirectional dependency characteristic.

[0061] Step S403: divide the sub-code module into at least one second module layer based on the hierarchical dependency and the set module encapsulation rules, perform preset encapsulation processing on the sub-code modules corresponding to each second module layer, obtain the target code module that conforms to the preset dynamic publishing format, and extract the target dependency corresponding to the target code module.

[0062] Among them, the module encapsulation rule can be based on the module function association and the module capacity size limit, and on the basis of the hierarchical result of the sub-code module in step S402, different module layers are merged to obtain the corresponding second module layer. For example, a module layer includes sub-code module A'', and its adjacent module layer includes sub-code module B'' and sub-code module C''. If the functions of sub-code module A'', sub-code module B'' and sub-code module C'' are associated, and the capacity of the target code module obtained by the overall encapsulation of the three sub-code modules is less than the preset capacity size limit, then sub-code module B'' and sub-code module C'' can be encapsulated by the preset process, and the target code module that conforms to the preset dynamic publishing format can be obtained. If the capacity of the target code module obtained by the overall encapsulation of sub-code module A'', sub-code module B'' and sub-code module C'' is greater than the preset capacity size limit, it can be considered to perform the preset encapsulation process on the sub-code modules of the same level or each sub-code module independently. Finally, after all the sub-code modules in the second engineering code module are encapsulated as target code modules, the target dependency of the target code module can be extracted. The preset packaging process may be to package the sub-code module into a code module in a dynamic publishing format.

[0063] Step S404: Integrate the first engineering code module, module dependency and target dependency to obtain a program installation package, and distribute the program installation package to the terminal device.

[0064] As described above, by dividing the sub-code module into at least one second module layer, and performing preset packaging processing on the sub-code module corresponding to the second module layer, a target code module that conforms to a preset dynamic publishing format is obtained, and the target dependency relationship corresponding to the target code module is extracted, so that the code module can be dynamically distributed, and it is beneficial to control the capacity of the code module and realize silent download of the code module.

[0065] Fig. 9 A flowchart of an application publishing method including a process of encapsulating a function code module to be accessed is provided in an embodiment of the present application, such as Fig. 9 As shown, the following steps are included:

[0066] Step S501: Acquire a first engineering code module. If there is at least one function code module that meets a preset extraction condition in the first engineering code module, extract the function code module from the first engineering code module and encapsulate it to obtain a second engineering code module.

[0067] Step S502: obtaining at least one to-be-connected function code module corresponding to the first engineering code module, and encapsulating the to-be-connected function code module to obtain a corresponding second engineering code module.

[0068] Among them, the newly connected functional code module can be directly encapsulated as the second engineering code module to achieve physical isolation from the first engineering code module, and continue to participate in the layered encapsulation processing of subsequent internal modules.

[0069] Step S503: construct a module dependency relationship between the first engineering code module and the second engineering code module, perform layered encapsulation processing on the sub-code modules in the second engineering code module to obtain a target code module that conforms to a preset dynamic publishing format, and extract the target dependency relationship corresponding to the target code module.

[0070] Step S504: Integrate the first engineering code module, module dependency and target dependency to obtain a program installation package, and distribute the program installation package to the terminal device.

[0071] As mentioned above, by encapsulating the functional code module to be connected into a second engineering code module and participating in the subsequent internal module layered encapsulation processing that conforms to the preset dynamic release format, it can be helpful to avoid the expansion of the capacity of the original first engineering code module, reduce the size of the program installation package, and optimize the user's download and installation experience.

[0072] Fig.10 This is a structural block diagram of an application publishing device provided in an embodiment of the present application. The device is configured to execute the application publishing method provided in the above embodiment and has the corresponding functional modules and beneficial effects of the execution method. Fig.10 As shown, the device comprises:

[0073] An acquisition module 401 is configured to acquire a first engineering code module;

[0074] The first encapsulation module 402 is configured to extract the function code module from the first engineering code module and encapsulate it to obtain a second engineering code module when there is at least one function code module that meets a preset extraction condition in the first engineering code module;

[0075] The second encapsulation module 403 is configured to construct a module dependency relationship between the first engineering code module and the second engineering code module, perform hierarchical encapsulation processing on the sub-code modules in the second engineering code module to obtain a target code module that conforms to a preset dynamic publishing format, and extract a target dependency relationship corresponding to the target code module;

[0076] The program publishing module 404 is configured to integrate the first engineering code module, the module dependency and the target dependency to obtain a program installation package, and distribute the program installation package to the terminal device.

[0077] In the above, by obtaining the first engineering code module, if there is at least one functional code module that meets the preset extraction condition in the first engineering code module, the functional code module is extracted from the first engineering code module and encapsulated to obtain the second engineering code module; the module dependency relationship between the first engineering code module and the second engineering code module is constructed, the sub-code modules in the second engineering code module are layered and encapsulated to obtain a target code module that conforms to the preset dynamic publishing format, and the target dependency relationship corresponding to the target code module is extracted; the first engineering code module, the module dependency relationship and the target dependency relationship are integrated to obtain a program installation package, and the program installation package is distributed to the terminal device. In the above scheme, by determining the function code module that meets the preset extraction conditions, and extracting and encapsulating the function code module from the first engineering code module to obtain the second engineering code module, part of the function code module can be effectively extracted from the original first engineering code module, which is beneficial to optimizing the size of the program installation package. By encapsulating the sub-code modules in the second engineering code module in layers, a target code module that conforms to the preset dynamic publishing format is obtained, and the target dependency relationship corresponding to the target code module is extracted. The sub-code modules can be reasonably divided and layered, and encapsulated into dynamically publishable target code modules, thereby reducing the package size of the program installation package. The terminal device can subsequently download and install the target code module on demand, which is suitable for application scenarios of dynamic code distribution and silent download, and improves the user's program download and installation experience.

[0078] In a possible embodiment, the second encapsulation module 403 is further configured as:

[0079] Performing hierarchical dependency adjustment on the current dependency relationship corresponding to the sub-code module in the second engineering code module to obtain a hierarchical dependency relationship that satisfies a unidirectional dependency characteristic;

[0080] Based on the hierarchical dependency relationship, the sub-code modules are encapsulated layer by layer to obtain a target code module that conforms to the preset dynamic publishing format.

[0081] In a possible embodiment, the second encapsulation module 403 is further configured as:

[0082] According to the module functions corresponding to the sub-code modules in the second engineering code module, the sub-code modules are divided into at least one first module layer;

[0083] The current dependency relationship corresponding to the sub-code module is adjusted according to the preset unidirectional dependency rule to obtain a hierarchical dependency relationship corresponding to at least one first module layer that satisfies the unidirectional dependency characteristic.

[0084] In a possible embodiment, the second encapsulation module 403 is further configured as:

[0085] Dividing the sub-code module into at least one second module layer based on the hierarchical dependency relationship and the set module encapsulation rule;

[0086] The sub-code modules corresponding to each second module layer are respectively subjected to preset encapsulation processing to obtain target code modules conforming to a preset dynamic publishing format.

[0087] In a possible embodiment, the second encapsulation module 403 is further configured as:

[0088] Generate a corresponding first module interface layer based on the first engineering code module, and construct a first dependency relationship pointing from the second engineering code module to the first module interface layer;

[0089] A corresponding second module interface layer is generated based on the second engineering code module, and a second dependency relationship pointing from the first engineering code module to the second module interface layer is constructed.

[0090] In a possible embodiment, a third encapsulation module is further included, configured as follows:

[0091] Obtain at least one function code module to be connected corresponding to the first engineering code module;

[0092] The function code module to be connected is encapsulated to obtain the corresponding second engineering code module.

[0093] In a possible embodiment, at least one functional code module that meets a preset extraction condition includes:

[0094] At least one functional code module that satisfies the code capacity greater than a preset capacity threshold,

[0095] Or at least one functional code module that meets the publishing attribute of targeted release.

[0096] In a possible embodiment, it also includes a module dynamic loading module configured as follows:

[0097] Based on the module dependencies in the program installation package and the set functional requirement information, the terminal device determines at least one second engineering code module to be downloaded, builds a module download queue according to the target dependencies corresponding to the second engineering code module, and sequentially downloads and installs the target code modules corresponding to the second engineering code module based on the module download queue.

[0098] Fig.11 A schematic diagram of the structure of an application publishing device provided in an embodiment of the present application, such as Fig.11 As shown, the device includes a processor 501, a memory 502, an input device 503 and an output device 504; the number of processors 501 in the device can be one or more. Fig.11A processor 501 is taken as an example; the processor 501, the memory 502, the input device 503 and the output device 504 in the device can be connected by a bus or other means. Fig.11 The example of connecting via a bus is taken. The memory 502, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the application publishing method in the embodiment of the present application. The processor 501 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 502, that is, implements the above-mentioned application publishing method. The input device 503 can be configured to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 504 may include a display device such as a display screen.

[0099] An embodiment of the present application also provides a non-volatile storage medium containing computer executable instructions, which, when executed by a computer processor, is configured to execute an application publishing method described in the above embodiment, which includes: obtaining a first engineering code module, and if there is at least one functional code module that meets a preset extraction condition in the first engineering code module, extracting the functional code module from the first engineering code module and encapsulating it to obtain a second engineering code module; constructing a module dependency relationship between the first engineering code module and the second engineering code module, performing layered encapsulation processing on the sub-code modules in the second engineering code module to obtain a target code module that conforms to a preset dynamic publishing format, and extracting a target dependency relationship corresponding to the target code module; integrating the first engineering code module, the module dependency relationship, and the target dependency relationship to obtain a program installation package, and distributing the program installation package to a terminal device.

[0100] It is worth noting that in the embodiment of the above-mentioned application publishing device, the various units and modules included are divided only according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not configured to limit the scope of protection of the embodiments of the present application.

[0101] In some possible implementations, various aspects of the method provided in this application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is configured to enable the computer device to execute the steps of the method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the application publishing method recorded in the embodiment of this application. The program product may be implemented in any combination of one or more readable media.

Claims

1. A method for publishing an application, characterized in that: include: Acquire a first engineering code module, and if there is at least one function code module that meets a preset extraction condition in the first engineering code module, extract the function code module from the first engineering code module and encapsulate it to obtain a second engineering code module; Constructing a module dependency relationship between the first engineering code module and the second engineering code module, performing layered encapsulation processing on the sub-code modules in the second engineering code module to obtain a target code module that conforms to a preset dynamic publishing format, and extracting a target dependency relationship corresponding to the target code module; The first engineering code module, the module dependency and the target dependency are integrated to obtain a program installation package, and the program installation package is distributed to a terminal device.

2. The application publishing method according to claim 1, characterized in that: The step of performing layered encapsulation processing on the sub-code modules in the second engineering code module to obtain a target code module conforming to a preset dynamic publishing format includes: Performing hierarchical dependency adjustment on the current dependency relationship corresponding to the sub-code modules in the second engineering code module to obtain a hierarchical dependency relationship that satisfies a unidirectional dependency characteristic; The sub-code modules are packaged layer by layer based on the hierarchical dependency relationship to obtain a target code module that complies with a preset dynamic publishing format.

3. The application publishing method according to claim 2, characterized in that: The step of performing hierarchical dependency adjustment on the current dependency relationship corresponding to the sub-code modules in the second engineering code module to obtain a hierarchical dependency relationship that satisfies the unidirectional dependency characteristic includes: According to the module functions corresponding to the sub-code modules in the second engineering code module, the sub-code modules are divided into at least one first module layer; The current dependency relationship corresponding to the sub-code module is adjusted according to a preset unidirectional dependency rule to obtain a hierarchical dependency relationship corresponding to the at least one first module layer that satisfies the unidirectional dependency characteristic.

4. The application publishing method according to claim 2, characterized in that: The sub-code modules are encapsulated layer by layer based on the hierarchical dependency relationship to obtain a target code module that conforms to a preset dynamic publishing format, including: Dividing the sub-code module into at least one second module layer based on the hierarchical dependency relationship and the set module encapsulation rule; The sub-code modules corresponding to each of the second module layers are respectively subjected to preset encapsulation processing to obtain target code modules that conform to a preset dynamic publishing format.

5. The application publishing method according to claim 1, characterized in that: The module dependency relationship includes a first dependency relationship and a second dependency relationship, and the module dependency relationship of the first engineering code module and the second engineering code module is constructed, including: Generate a corresponding first module interface layer based on the first engineering code module, and construct a first dependency relationship pointing from the second engineering code module to the first module interface layer; A corresponding second module interface layer is generated based on the second engineering code module, and a second dependency relationship pointing from the first engineering code module to the second module interface layer is constructed.

6. The application publishing method according to claim 1, characterized in that: After obtaining the first engineering code module, the method further includes: Acquire at least one function code module to be connected corresponding to the first engineering code module; The function code module to be accessed is encapsulated to obtain a corresponding second engineering code module.

7. The application publishing method according to claim 1, characterized in that: The at least one functional code module that meets the preset extraction condition includes: At least one functional code module that satisfies the code capacity greater than a preset capacity threshold, Or at least one functional code module that meets the publishing attribute of targeted release.

8. The application publishing method according to any one of claims 1 to 7, characterized in that: After distributing the program installation package to the terminal device, the method further includes: The terminal device determines at least one second engineering code module to be downloaded based on the module dependencies and the set functional requirement information in the program installation package, builds a module download queue according to the target dependencies corresponding to the second engineering code module, and sequentially downloads and installs the target code modules corresponding to the second engineering code module based on the module download queue.

9. An application publishing device, characterized in that: include: An acquisition module configured to acquire a first engineering code module; A first encapsulation module is configured to extract and encapsulate the function code module from the first engineering code module to obtain a second engineering code module when there is at least one function code module that meets a preset extraction condition in the first engineering code module; A second encapsulation module is configured to construct a module dependency relationship between the first engineering code module and the second engineering code module, perform hierarchical encapsulation processing on the sub-code modules in the second engineering code module to obtain a target code module that conforms to a preset dynamic publishing format, and extract a target dependency relationship corresponding to the target code module; The program publishing module is configured to integrate the first engineering code module, the module dependency and the target dependency to obtain a program installation package, and distribute the program installation package to the terminal device.

10. An application publishing device, comprising: one or more processors; A storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the application publishing method described in any one of claims 1-8.

11. A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the application publishing method according to any one of claims 1 to 8 when executed by a computer processor.

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