Applet integration method and apparatus, electronic device, and storage medium

By automating the acquisition and merging of source code and routing information of mini-program modules, the problem of low integration efficiency of multi-module mini-programs is solved, achieving fast and accurate integration and efficient version management.

CN114356288BActive Publication Date: 2026-01-02上海瑞家信息技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111574603.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2026-01-02
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

In the current development process of mini-programs, the characteristics of multiple modules and multiple frameworks lead to low efficiency and easy errors in manual processing, making it difficult to integrate mini-programs efficiently and accurately.

Method used

By obtaining basic information about the business modules that the target mini-program depends on, the system automatically retrieves and merges source code files and page routing information from the data management platform, enabling rapid and accurate integration of multi-module mini-programs.

Benefits of technology

It enables rapid and accurate integration of mini-programs, improves development efficiency, and supports version control and update management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356288B_ABST
    Figure CN114356288B_ABST
Patent Text Reader

Abstract

An application embodiment provides a small program integration method and device, electronic equipment and a storage medium. In the application embodiment, the source code files and page routing information of a plurality of business modules required by small program integration are automatically obtained from a data management platform, the page routing information of the plurality of business modules is automatically merged into a same routing file, and the source code files and the routing file of the plurality of business modules are integrated into a same integrated directory for integrated management, thereby realizing quick and accurate integration of the small program of the plurality of modules.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a mini program integration method and device, electronic equipment and storage medium. BACKGROUND

[0002] A mini program is a lightweight application embedded in a host application without the need for downloading. Users can open the mini program by searching or scanning. Since the mini program does not need to be downloaded, registered and uninstalled, it does not occupy too much memory of the user and does not disturb the user more. It has the characteristics of being within reach and leaving immediately after use.

[0003] Currently, when developing a mini program, multiple business modules of the mini program are usually developed independently, and different business modules may be developed using different development frameworks, so that the mini program has the characteristics of multiple modules and multiple frameworks. After developing each business module of the mini program, the source code files of each business module are manually compressed and packaged and added to a release repository, and the page routing information of each business module is manually recorded in a configuration file, and the configuration file is added to the release repository; when the release time of the mini program arrives, the compressed package files and the configuration file of each business module dependent on the mini program are obtained from the release repository, and the two files are released to the host application. However, the above processing method relies heavily on manual work, is prone to errors and is low in efficiency. SUMMARY

[0004] Aspects of the present application provide a mini program integration method, device, electronic equipment and storage medium to more accurately and efficiently integrate a mini program.

[0005] The embodiment of the present application provides a mini program integration method, comprising: in response to a mini program integration instruction, obtaining basic information of multiple business modules dependent on a target mini program to be integrated and a directory identifier of the integrated target mini program; according to the basic information of the multiple business modules, obtaining the source code files and description files corresponding to the multiple business modules respectively from a data management platform, the description files including the page routing information of the corresponding business modules; extracting the page routing information of the multiple business modules from the description files corresponding to the multiple business modules respectively; adding the page routing information of the multiple business modules to a routing file under an integration directory corresponding to the target identifier, and adding the source code files of the multiple business modules to a source code file under the integration directory, to complete the integration operation of the target mini program, wherein the integration directory is used to be published to a host application dependent on the target mini program, so as to realize publishing the target mini program in the host application.

[0006] The application further provides a small program integration device, comprising: an acquisition module, configured to acquire, in response to a small program integration instruction, basic information of a plurality of business modules relied on by a target small program to be integrated and a directory identifier of the integrated target small program; the acquisition module is further configured to acquire, from a data management platform, source code files and description files corresponding to the plurality of business modules respectively according to the basic information of the plurality of business modules, wherein the description files comprise page routing information of the corresponding business modules; an extraction module, configured to extract the page routing information of the plurality of business modules from the description files corresponding to the plurality of business modules respectively; and an integration module, configured to add the page routing information of the plurality of business modules into a routing file under an integrated directory corresponding to the target identifier, and add the source code files of the plurality of business modules into source code files under the integrated directory, so as to complete an integration operation of the target small program, wherein the integrated directory is used for publishing to a host application program relied on by the target small program, so as to realize publishing of the target small program in the host application program.

[0007] The application further provides an electronic device, comprising: a memory and a processor; the memory is configured to store a computer program; and the processor is coupled to the memory and is configured to execute the computer program to perform the small program integration method.

[0008] The application further provides a computer readable storage medium storing a computer program, which causes a processor to implement the small program integration method when the computer program is executed by the processor.

[0009] In the embodiments of the application, in response to a small program integration instruction, basic information of a plurality of business modules relied on by a target small program to be integrated and a directory identifier of the integrated target small program are acquired; source code files and description files corresponding to the plurality of business modules respectively are acquired from a data management platform according to the basic information of the plurality of business modules; page routing information of the plurality of business modules is extracted from the description files corresponding to the plurality of business modules respectively; the page routing information of the plurality of business modules is added into a routing file under an integrated directory corresponding to the target identifier, and the source code files of the plurality of business modules are added into source code files under the integrated directory, so as to complete an integration operation of the target small program. Thus, the source code files and the page routing information of the plurality of business modules required for small program integration are automatically acquired from the data management platform, the page routing information of the plurality of business modules is automatically merged into a same routing file, and the source code files and the routing files of the plurality of business modules are integrated into a same integrated directory for integrated management, thereby realizing quick and accurate integration of the small program of the plurality of modules. BRIEF DESCRIPTION OF DRAWINGS

[0010] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and serve to explain the principles of the application. In the drawings:

[0011] Figure 1 A flowchart illustrating a method for integrating a mini-program, provided as an exemplary embodiment of this application;

[0012] Figure 2 A flowchart illustrating the business module deployment process in a practical application, provided as an exemplary embodiment of this application;

[0013] Figure 3 A flowchart illustrating a mini-program integration process in a practical application, provided as an exemplary embodiment of this application;

[0014] Figure 4 A schematic diagram of the structure of a mini-program integration device provided for an exemplary embodiment of this application;

[0015] Figure 5 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0018] Figure 1 This is a flowchart illustrating a method for integrating a mini-program, provided as an exemplary embodiment of this application. The method can be executed by a mini-program integration device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device.

[0019] See Figure 1 The integration method for this mini-program may include the following steps:

[0020] 101. Respond to the mini-program integration command and obtain the basic information of the multiple business modules that the target mini-program to be integrated depends on, as well as the directory identifier of the target mini-program to be integrated.

[0021] 102. Based on the basic information of multiple business modules, obtain the source code files and description files corresponding to each business module from the data management platform. The description files include the page routing information of the corresponding business module.

[0022] 103. Extracting page routing information of the plurality of business modules from the description files corresponding to the plurality of business modules respectively.

[0023] 104. Adding the page routing information of the plurality of business modules to a routing file under an integrated directory corresponding to the target identifier, and adding source code files of the plurality of business modules to source code files under the integrated directory, to complete the integration operation of the target applet.

[0024] In the embodiments of the present application, the target applet can be an applet providing any service, for example, a shopping applet, a car-hailing applet, a real estate applet, a financial applet, or a life service applet. The target applet includes one or more business modules, each of which is a component of the target applet and can implement a business function provided by the target applet. For example, taking a life service applet as an example, the life service applet can provide housekeeping services, vehicle buying and selling services, or housing rental services. Housekeeping services include cleaning services, nanny services, or moving services, vehicle buying and selling services include truck buying and selling services or private car buying and selling services, and housing rental services include whole rental services or shared rental services. The business module can be a housekeeping service module, a vehicle buying and selling service module, a housing rental service module, or a cleaning service module, a nanny service module, a moving service module, a truck buying and selling service module, a private car buying and selling service module, a whole rental service module, or a shared rental service module.

[0025] In the present embodiment, in the development stage of the business module, the plurality of business modules are developed independently. For example, the same development framework can be used to develop each business module independently, or different development frameworks can be used to develop each business module independently, thereby achieving mutual decoupling between the business modules. After the development of each business module is completed, all files associated with the business module can be packaged to obtain a business package file of the business module and uploaded to a data management platform for storage. The business package includes at least a source code file and a description file. The business package file can be further compressed to obtain a compressed package file, and the compressed package file can be uploaded to the data management platform for storage. The data management platform can maintain and manage the business package files or compressed package files of each independent business module. Further optionally, the data management platform can also store the correspondence between the name of the business module, the version number information, and the compressed package file name (or the business package file name), so that the corresponding compressed package file name or business package file name can be quickly obtained from the data management platform based on the name of the business module and the version number information.

[0026] It is worth noting that the compressed package file or the service package file of a variety of business modules is uploaded to the data management platform, so that the integration requirement of the small program providing a variety of business functions can be met. At the same time, the compressed package file or the service package file of different versions of the business module is uploaded to the data management platform, so that the version control requirement of the small program can be met. For example, after the small program is put into operation, some business modules have problems, and the rollback operation or the upgrade operation can be performed on the problem business modules. The rollback operation on the problem business module refers to rolling back the current version of the problem business module to a lower version. The upgrade operation on the problem business module refers to upgrading the current version of the problem business module to a higher version. How to perform the rollback operation or the upgrade operation on the problem business module after the small program is put into operation can be referred to the small program update operation described below. The following examples are illustrated by taking the compressed package file as an example.

[0027] In this embodiment, at least the source code file and the description file of the business module need to be packaged into the compressed package file of the business module. The source code file includes the source code for implementing the business function of the business module. The description file refers to a file including the description information of the business module, for example, the description file refers to a package.json file. In the description file, at least the basic information and the page routing information of the business module are included. The basic information of the business module includes but is not limited to the module name, the version number information, and the compressed package file name. The compressed package file name can be composed of the module name and the version number information. The page routing information is used to indicate the path information of each page provided by the page module. Of course, the description file can also include other information, such as the developer information, the open source agreement, the technology stack information, and the like of the business module.

[0028] Therefore, in an optional implementation manner, during the development stage of the business module, the electronic device also acquires, for each business module in the plurality of business modules, the source code file, the basic information, and the page routing information of the business module; generates the description file of the business module according to the basic information and the page routing information of the business module; compresses the source code file and the description file of the business module to generate the compressed package file corresponding to the business module, and uploads the compressed package file to the data management platform.

[0029] Further optionally, during the development stage of the business module, the electronic device can acquire the configuration information such as the basic information and the page routing information configured by the developer for the business module in response to the configuration operation of the developer, and record the configuration information into the configuration file. In this way, when the business module is packaged and uploaded to the data management platform, the electronic device can acquire the configuration information in the configuration file, and generate the description file according to the configuration information.

[0030] Further, to ensure the success rate of the online of the business module, when generating the description file according to the configuration information, the validity of the configuration information is checked, for example, whether the module name in the configuration information conforms to the preset module naming specification, or whether the version number information in the configuration information conforms to the preset format requirement, or whether the compressed package file name in the configuration information conforms to the preset file name naming specification, or whether the format of the page routing information conforms to the preset business routing format requirement, and the like. After the electronic device determines that the configuration information is valid, the electronic device obtains at least the basic information and the page routing information of the business module from the configuration file, and generates the description file of the business module based on at least the basic information and the page routing information of the business module.

[0031] In the present embodiment, in the applet integration stage, the technical personnel responsible for integration can determine the plurality of business modules required by the target applet to be integrated based on the business functions required to be supported by the target applet, and write the basic information of the plurality of business modules required by the target applet to be integrated into the configuration file. Generally, the technical personnel responsible for integration need to write the basic information such as the module name and version number information of the plurality of business modules required by the target applet to be integrated into the configuration file. At the same time, in order to facilitate integration management, all files of the target applet can be integrated under an integration directory. Therefore, the technical personnel responsible for integration can also configure the directory identifier of the target applet to be integrated in the configuration file.

[0032] Therefore, in the applet integration stage, the electronic device responds to the applet integration instruction, and first, can obtain the basic information of the plurality of business modules required by the target applet to be integrated and the directory identifier of the target applet to be integrated from the configuration file.

[0033] Then, the electronic device obtains the source code file and the description file corresponding to each of the plurality of business modules from the data management platform according to the basic information of the plurality of business modules.

[0034] In an optional implementation, the basic information of the service module includes the name and version number information of the service module; accordingly, when the electronic device acquires the source code files and the description files corresponding to the plurality of service modules respectively from the data management platform according to the basic information of the plurality of service modules, the electronic device can send a download request to the data management platform, the download request including the name and version number information of the service module, so that the data management platform queries the pre-established correspondence between the name, the version number information, and the compressed package file name of the service module according to the name and version number information of the service module, determines the compressed package file names of the plurality of service modules, and acquires the compressed package files of the plurality of service modules according to the compressed package file names of the plurality of service modules; the electronic device receives the compressed package files of the plurality of service modules sent by the data management platform, and decompresses the compressed package files of the plurality of service modules respectively to obtain the source code files and the description files corresponding to the plurality of service modules respectively.

[0035] After the electronic device acquires the source code files and the description files corresponding to the plurality of service modules respectively from the data management platform, the electronic device extracts the page routing information of the plurality of service modules from the description files corresponding to the plurality of service modules respectively; adds the page routing information of the plurality of service modules to the routing file under the integration directory corresponding to the target identifier, and adds the source code files of the plurality of service modules to the source code file under the integration directory, thereby completing the integration operation of the target mini-program. In the publishing stage of the target mini-program, the entire integration directory is published to the host application program on which the target mini-program depends, and then the target mini-program is published in the host application program.

[0036] The mini-program integration method provided by the embodiments of the present application responds to a mini-program integration instruction, acquires basic information of a plurality of service modules on which a target mini-program to be integrated depends and a directory identifier of the target mini-program; acquires source code files and description files corresponding to the plurality of service modules respectively from a data management platform according to the basic information of the plurality of service modules; extracts page routing information of the plurality of service modules from the description files corresponding to the plurality of service modules respectively; adds the page routing information of the plurality of service modules to a routing file under an integration directory corresponding to the target identifier, and adds the source code files of the plurality of service modules to a source code file under the integration directory, so as to complete the integration operation of the target mini-program. In this way, the source code files and the page routing information of the plurality of service modules required for mini-program integration are automatically acquired from the data management platform, the page routing information of the plurality of service modules is automatically merged into the same routing file, and the source code files and the routing files of the plurality of service modules are integrated into the same integration directory for integration management, thereby realizing the quick and accurate integration of the multi-module mini-program.

[0037] In the embodiment, the source code files and description files of the plurality of business modules depended by the target applet to be integrated are obtained from the data management platform for integration operation, which not only facilitates quick integration of the applet, but also facilitates version control of the business modules of the applet, and improves the development efficiency of the applet.

[0038] Further optionally, the electronic device can further obtain, in a case where it is determined that the target applet needs to be updated, a target compressed package file corresponding to the business module to be updated from the data management platform according to the name of the business module to be updated and the target version number information to which the business module to be updated needs to be updated in the applet update instruction, the target compressed package file being a compressed package file corresponding to the target version number information; and update the target applet according to the target compressed package file corresponding to the business module to be updated.

[0039] It is worth noting that the update instruction can indicate upgrading the current version of the business module in the applet to a higher version, or can indicate rolling back the current version of the business module in the applet to a lower version. Thus, in the version upgrade scenario, the target version number information is the version number information after the upgrade, and the version number corresponding to the target version number information is higher than the version number corresponding to the version number information before the upgrade. In the version rollback scenario, the target version number information is the version number information after the rollback, and the version number corresponding to the target version number information is lower than the version number corresponding to the version number information before the rollback. In specific applications, the electronic device can automatically trigger the update operation or respond to the update instruction of the technician in charge of integration to update the target applet. For example, the electronic device can periodically access the data management platform to monitor whether a higher version of the business module appears on the data management platform. If a higher version of the business module appears, the electronic device starts to upgrade the business module in the target applet to update the target applet. For another example, after the target applet is published to the host application program, a problem occurs in a certain business module during online operation. At this time, version rollback can be performed only on the business module with the problem to update the target applet, instead of performing version rollback on all business modules of the target applet. Of course, version update can also be performed on the business module with the problem. For another example, a higher version of the business module is developed by the business module developer, and the related files of the business module are uploaded to the data management platform. The business module developer can notify the technician in charge of integration to trigger the electronic device to upgrade the business module in the target applet to update the target applet.

[0040] In an optional embodiment, an implementation process of updating the target applet according to the target compressed package file of the to-be-updated business module is as follows: the target compressed package file of the to-be-updated business module is decompressed to obtain the target source code file and the target description file of the to-be-updated business module, and the target page routing information of the to-be-updated business module is extracted from the target description file; an update request is sent to the host application program, the update request including the target source code file and the target page routing information of the to-be-updated business module, so that the host application program updates the current source code file of the to-be-updated business module in the integrated directory saved locally to the target source code file, and updates the current page routing information of the to-be-updated business module in the routing file to the target page routing information, thereby realizing updating of the target applet.

[0041] For example, the online running real estate applet includes a 0.0.2 version number of a rental module and a 0.0.1 version number of a new house module. During the current online running process, the 0.0.1 version number of the rental module often has problems, at which time the rental module in the online running real estate applet can be rolled back from the 0.0.2 version number to the 0.0.1 version number, without rolling back the 0.0.1 version number of the new house module which does not have problems, thereby realizing version rollback of only the business module which has problems in online running. For another example, a developer develops a 0.0.2 version number of a new house module and uploads it to the data management platform. At this time, the source code file and the page routing information of the 0.0.2 version number of the new house module can be obtained from the data management platform, and the source code file and the page routing information of the 0.0.2 version number of the new house module are used to upgrade the new house module in the real estate applet published to the host application program from the 0.0.1 version number to the 0.0.2 version number. Of course, if the rental module also has a higher version uploaded to the data management platform, the version number of the rental module in the applet can be updated as needed.

[0042] For the convenience of understanding, a business module publishing process in an actual application is taken as an example for a brief introduction. Referring to Figure 2 , the entire business module publishing process can include the following steps:

[0043] S21, after the developer develops the business module, obtaining the related files of the business module generated during the development process, the related files at least including a source code file.

[0044] S22, obtaining the configuration file configured by the developer. The configuration file configures the module name, page routing information and version number information of the business module, etc.

[0045] For example, the configuration file is as follows:

[0046]

[0047] S23, read the configuration information from the configuration file to obtain the module name, page routing information, version number information and the like of the service module, and perform validity checking on the configuration information.

[0048] S24, in the case where the configuration information is valid, generate a description file of the corresponding service module under the corresponding directory according to the obtained configuration information. The description file is, for example, a package.json file.

[0049] S25, package the related files and the description file of the service module generated in the development process, obtain a compressed package file of the service module, and publish the compressed package file of the service module to the data management platform through an npm package management tool.

[0050] In order to facilitate understanding, a small program integration process in an actual application is taken as an example for a brief introduction. Referring to Figure 3 , the entire small program integration process can include the following steps:

[0051] S31, obtain a configuration file configured by a person responsible for integration.

[0052] The configuration file configures the module name, version number and directory identifier of the directory of the service module required by the small program integration.

[0053] The configuration file is, for example, as follows:

[0054]

[0055] S32, read the configuration information from the configuration file, and perform validity checking on the configuration information.

[0056] S33, in the case where the configuration information is valid, download the related files of the dependent service module from the data management platform to the integration directory, and extract the page routing information of each service module to the routing file in the integration directory, to complete the integration of the small program.

[0057] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can also be executed by different devices as the execution subject.

[0058] In addition, in some of the processes described in the above embodiments and accompanying drawings, a plurality of operations are included in a specific order, but it should be clear that the operations can be executed in the order in which they appear in this document or in parallel, and the serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes can include more or fewer operations, and the operations can be executed in sequence or in parallel. It should be noted that the "first", "second", etc. described herein are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence. Also, "first" and "second" are not of different types.

[0059] Figure 4 A structural schematic diagram of a small program integration device is provided for an exemplary embodiment of the present application. Referring to Figure 4 The small program integration device can include an acquisition module 41, an extraction module 42, and an integration module 43.

[0060] The acquisition module 41 is configured to, in response to a small program integration instruction, acquire basic information of a plurality of business modules on which a target small program to be integrated depends and a directory identifier of the integrated target small program.

[0061] The acquisition module 41 is further configured to acquire, from a data management platform, source code files and description files corresponding to the plurality of business modules respectively according to the basic information of the plurality of business modules, the description files including page routing information of the corresponding business modules.

[0062] The extraction module 42 is configured to extract the page routing information of the plurality of business modules from the description files corresponding to the plurality of business modules respectively.

[0063] The integration module 43 is configured to add the page routing information of the plurality of business modules to a routing file under an integrated directory corresponding to the target identifier, and add the source code files of the plurality of business modules to a source code file under the integrated directory, so as to complete an integration operation of the target small program. The integrated directory is used to be published to a host application program on which the target small program depends, so as to realize publishing of the target small program in the host application program.

[0064] Further optionally, the acquisition module 41 is further configured to, before responding to the small program integration instruction, acquire, for each of the plurality of business modules, a source code file, basic information, and page routing information of the business module.

[0065] The above device further includes:

[0066] The generation module is configured to generate a description file of the business module according to the basic information and the page routing information of the business module.

[0067] The compression module is configured to compress the source code files and the description files of the business modules, generate compressed package files corresponding to the business modules, and upload the compressed package files to the data management platform.

[0068] Further, the basic information of the business module includes a name and a version number of the business module. Accordingly, when the obtaining module 41 obtains the source code files and the description files corresponding to the plurality of business modules from the data management platform according to the basic information of the plurality of business modules, the obtaining module 41 is specifically configured to: send a download request to the data management platform, the download request including the name and the version number of the business module, so that the data management platform queries the correspondence between the name, the version number and the compressed package file name of the business module according to the name and the version number of the business module, determines the compressed package file names of the plurality of business modules, and obtains the compressed package files of the plurality of business modules according to the compressed package file names of the plurality of business modules; and receive the compressed package files of the plurality of business modules sent by the data management platform, and decompress the compressed package files of the plurality of business modules respectively to obtain the source code files and the description files corresponding to the plurality of business modules.

[0069] Further, the apparatus further includes an updating module configured to, when it is determined that the applet needs to be updated, obtain a target compressed package file corresponding to the business module to be updated from the data management platform according to the name of the business module to be updated and the target version number information to which the business module to be updated needs to be updated in the applet update instruction, the target compressed package file being a compressed package file corresponding to the target version number information; and update the target applet according to the target compressed package file corresponding to the business module to be updated.

[0070] Further, when the updating module updates the target applet according to the target compressed package file corresponding to the business module to be updated, the updating module is specifically configured to: decompress the target compressed package file of the business module to be updated to obtain a target source code file and a target description file of the business module to be updated, and extract target page routing information of the business module to be updated from the target description file; send an update request to the host application, the update request including the target source code file and the target page routing information of the business module to be updated, so that the host application updates the current source code file of the business module to be updated in the integrated directory saved locally to the target source code file, and updates the current page routing information of the business module to be updated in the routing file to the target page routing information, thereby updating the target applet.

[0071] Regarding Figure 4 The specific implementation of the applet integration apparatus shown in the above applet integration method has been described in detail in the embodiments of the applet integration method, and will not be described in detail here.

[0072] Figure 5A structural schematic diagram of an electronic device is provided for an exemplary embodiment of the present application. As shown in the figure, the electronic device includes a memory 51 and a processor 52. Figure 5

[0073] The memory 51 is configured to store computer programs and can be configured to store other various data to support operations on the computing platform. Examples of these data include instructions of any application program or method for operating on the computing platform, contact data, phonebook data, messages, pictures, videos, etc.

[0074] The memory 51 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0075] The processor 52 is coupled to the memory 51 and is configured to execute the computer programs in the memory 51 for: in response to a small program integration instruction, obtaining basic information of a plurality of business modules relied on by a target small program to be integrated and a directory identifier of the integrated target small program; according to the basic information of the plurality of business modules, obtaining a source code file and a description file corresponding to each of the plurality of business modules from a data management platform, the description file including page routing information of the corresponding business module; extracting the page routing information of the plurality of business modules from the description file corresponding to each of the plurality of business modules; adding the page routing information of the plurality of business modules to a routing file under an integrated directory corresponding to the target identifier, and adding the source code file of the plurality of business modules to a source code file under the integrated directory, to complete an integration operation of the target small program, wherein the integrated directory is used to be published to a host application program relied on by the target small program, to realize publishing the target small program in the host application program.

[0076] Further optionally, the processor 52, before responding to the small program integration instruction, is further configured to: for each of the plurality of business modules, obtain a source code file, basic information and page routing information of the business module; according to the basic information and the page routing information of the business module, generate a description file of the business module; compress the source code file and the description file of the business module to generate a compressed package file corresponding to the business module, and upload to the data management platform.

[0077] ​Optionally, the basic information of the business modules includes the name and version number of the business modules. Accordingly, when the processor 52 obtains the source code files and description files corresponding to each of the multiple business modules from the data management platform based on the basic information of the multiple business modules, it specifically performs the following: sends a download request to the data management platform, the download request including the name and version number of the business modules, so that the data management platform can query the pre-established correspondence between the name, version number, and compressed package file name of the business modules based on the name and version number information of the business modules, determine the compressed package file names of the multiple business modules, and obtain the compressed package files of the multiple business modules based on the compressed package file names of the multiple business modules; receives the compressed package files of the multiple business modules sent by the data management platform, and decompresses the compressed package files of the multiple business modules respectively to obtain the source code files and description files corresponding to each of the multiple business modules.

[0078] Optionally, the processor 52 is further configured to: when it is determined that the target mini-program needs to be updated, obtain the target compressed package file corresponding to the business module to be updated from the data management platform according to the name of the business module to be updated and the target version number information to which the business module to be updated needs to be updated in the mini-program update instruction, wherein the target compressed package file is a compressed package file corresponding to the target version number information; and update the target mini-program according to the target compressed package file corresponding to the business module to be updated.

[0079] Optionally, when the processor 52 updates the target mini-program based on the target compressed package file corresponding to the business module to be updated, it specifically performs the following steps: decompresses the target compressed package file of the business module to be updated to obtain the target source code file and target description file of the business module to be updated, and extracts the target page routing information of the business module to be updated from the target description file; sends an update request to the host application, the update request including the target source code file and target page routing information of the business module to be updated, so that the host application updates the current source code file of the business module to be updated in the locally stored integration directory to the target source code file, and updates the current page routing information of the business module to be updated in the routing file to the target page routing information, thereby updating the target mini-program.

[0080] Furthermore, such as Figure 5 As shown, the electronic device also includes other components such as a communication component 53, a display 54, a power supply component 55, and an audio component 56. Figure 5 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 5 The components shown. Additionally... Figure 5The components in the dashed box are optional components, not mandatory components, and can be determined according to the product form of the electronic device. The electronic device in the embodiment can be implemented as a terminal device such as a desktop computer, a notebook computer, a smart phone, or an IOT device, or can be implemented as a server device such as a general server, a cloud server, or a server array. If the electronic device in the embodiment is implemented as a terminal device such as a desktop computer, a notebook computer, or a smart phone, the electronic device can include Figure 5 components in the dashed box; if the electronic device in the embodiment is implemented as a server device such as a general server, a cloud server, or a server array, the electronic device can not include Figure 5 components in the dashed box.

[0081] Accordingly, the embodiment of the present application also provides a computer readable storage medium storing a computer program, which can implement each step that can be executed by the electronic device when the computer program is executed.

[0082] The communication component is configured to facilitate communication between the device where the communication component is located and other devices in a wired or wireless manner. The device where the communication component is located can access a wireless network based on a communication standard, such as a WiFi, a 2G, 3G, 4G / LTE, 5G, or the like mobile communication network, or a combination thereof. In an example embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0083] The display includes a screen, which can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touch or a slide action, but also detect a duration and a pressure associated with the touch or slide operation.

[0084] The power supply component provides power for various components of the device where the power supply component is located. The power supply component can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device where the power supply component is located.

[0085] The audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) that is configured to receive an external audio signal when the device in which the audio component is included is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in a memory or transmitted via the communication component. In some embodiments, the audio component further includes a speaker for outputting audio signals.

[0086] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, apparatus, or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0087] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.

[0088] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.

[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.

[0090] In one typical arrangement, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0091] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) having a common memory space employing many flash memory devices. The memory is an example of computer readable media.

[0092] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0093] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements in the list, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that includes the recited element.

[0094] The above description is merely illustrative of the application, and not restrictive. Various modifications and changes can become apparent to those skilled in the art. The disclosure is intended to embrace all such modifications and changes that fall within the scope of the application, particularly considering the scope of the appended claims and their equivalents.

Claims

1. An applet integration method, characterized by, A method for integrating small programs presented as multi-module multi-framework, the method comprising: In the development stage of the business module, the following operations are performed: Developing multiple business modules independently using different development frameworks, and uploading the business package files of each business module to a data management platform to maintain and manage the business package files of each business module through the data management platform, the business package files including source code files and description files of the business module; In the small program integration stage, the following operations are performed: In response to a small program integration instruction, obtaining the basic information of multiple business modules relied on by a target small program to be integrated and a directory identifier for integrating the target small program; the multiple business modules relied on by the target small program are determined based on the business functions supported by the target small program; According to the basic information of the multiple business modules, obtaining the source code files and description files corresponding to the multiple business modules respectively from the data management platform, the description files including the page routing information of the corresponding business module; Extracting the page routing information of the multiple business modules from the description files corresponding to the multiple business modules respectively; Adding the page routing information of the multiple business modules to the routing file under the integration directory corresponding to the directory identifier, and adding the source code files of the multiple business modules to the source code file under the integration directory, to complete the integration operation of the target small program, wherein the integration directory is used to be published to a host application program relied on by the target small program, to realize publishing the target small program in the host application program.

2. The method of claim 1, wherein, Before responding to the small program integration instruction, the following operations are further included: For each business module in the multiple business modules, obtaining the source code file, basic information and page routing information of the business module; According to the basic information and page routing information of the business module, generating a description file of the business module; Compressing the source code file and the description file of the business module to generate a compressed package file corresponding to the business module, and uploading to the data management platform.

3. The method of claim 2, wherein, The basic information of the business module includes the name and version number information of the business module; accordingly, according to the basic information of the multiple business modules, the source code files and description files corresponding to the multiple business modules are obtained from the data management platform, including: Sending a download request to the data management platform, the download request including the name and version number information of the business module, so that the data management platform queries the pre-established correspondence between the name, version number information and compressed package file name of the business module according to the name and version number information of the business module, determines the compressed package file name of the multiple business modules, and obtains the compressed package files of the multiple business modules according to the compressed package file name of the multiple business modules; Receiving the compressed package files of the multiple business modules sent by the data management platform, and decompressing the compressed package files of the multiple business modules respectively to obtain the source code files and description files corresponding to the multiple business modules respectively.

4. The method of claim 2, wherein, Further comprising: In a case where it is determined that the target applet needs to be updated, according to a name of a to-be-updated business module in the applet update instruction and target version number information to which the to-be-updated business module needs to be updated, a target compressed package file corresponding to the to-be-updated business module is obtained from the data management platform, the target compressed package file being a compressed package file corresponding to the target version number information; The target applet is updated according to the target compressed package file corresponding to the to-be-updated business module.

5. The method of claim 4, wherein, The target applet is updated according to the target compressed package file corresponding to the to-be-updated business module, including: The target compressed package file of the to-be-updated business module is decompressed to obtain a target source code file and a target description file of the to-be-updated business module, and target page routing information of the to-be-updated business module is extracted from the target description file; An update request is sent to the host application program, the update request including the target source code file and the target page routing information of the to-be-updated business module, so that the host application program updates a current source code file of the to-be-updated business module in the integrated directory saved locally to the target source code file, and updates current page routing information of the to-be-updated business module in the routing file to the target page routing information, thereby updating the target applet.

6. An applet integration apparatus characterized by comprising: For integrating an applet presented as a multi-module multi-framework, including: A development module is configured to perform the following operations in a development stage of a business module: A plurality of business modules are independently developed by using different development frameworks, and a business package file of each business module is uploaded to a data management platform, so that the data management platform maintains and manages the business package file of each business module, the business package file including a source code file and a description file of the business module; In an applet integration stage, the following operations are performed: A obtaining module is configured to, in response to an applet integration instruction, obtain basic information of a plurality of business modules on which a target applet to be integrated depends and a directory identifier for integrating the target applet, the plurality of business modules being determined based on a business function that the target applet needs to support; The obtaining module is further configured to, according to the basic information of the plurality of business modules, obtain, from a data management platform, a source code file and a description file corresponding to each of the plurality of business modules, the description file including page routing information of the corresponding business module; An extracting module is configured to extract, from the description file corresponding to each of the plurality of business modules, the page routing information of the plurality of business modules; An integrating module is configured to add the page routing information of the plurality of business modules to a routing file under an integrated directory corresponding to the directory identifier, and add the source code file of the plurality of business modules to a source code file under the integrated directory, so as to complete integration of the target applet, wherein the integrated directory is used to be published to a host application program on which the target applet depends, so as to implement publishing of the target applet by the host application program.

7. The apparatus of claim 6, wherein, The acquisition module is further configured to, before responding to the applet integration instruction, acquire, for each of the plurality of business modules, a source code file, basic information, and page routing information of the business module; The apparatus further includes: A generation module configured to generate a description file of the business module according to the basic information and the page routing information of the business module; A compression module configured to compress the source code file and the description file of the business module to generate a compressed package file corresponding to the business module, and upload the compressed package file to the data management platform.

8. The apparatus of claim 7, wherein, Further includes: An update module configured to, when it is determined that the applet needs to be updated, acquire, according to a name of a to-be-updated business module in an applet update instruction and target version number information to which the to-be-updated business module needs to be updated, a target compressed package file corresponding to the to-be-updated business module from the data management platform, the target compressed package file being a compressed package file corresponding to the target version number information; and update the target applet according to the target compressed package file corresponding to the to-be-updated business module.

9. An electronic device, comprising: Includes: A memory and a processor; The memory is configured to store a computer program; The processor is coupled to the memory and is configured to execute the computer program to perform the steps in the method of any one of claims 1-5.

10. A computer readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the processor is caused to implement the steps in the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Small program generation method, device, equipment and computer readable storage medium

    CN110532029A

  • Applet template merging method and device, equipment and storage medium

    CN112363719A