Data processing method and related device
By obtaining information about the mini-program container and extension libraries through the console interface, the system automatically compiles and packages the mini-program container to generate an integrated installation package. This solves the problem of high difficulty in integrating mini-program containers into the host application and achieves efficient automated integration.
Patent Information
- Application Number
- CN202410512208.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2025-10-28
AI Technical Summary
In existing technologies, integrating mini-program containers into host applications requires a large amount of manual intervention and is technically challenging, resulting in low efficiency.
The system obtains information about the mini-program container and its extension libraries through the console interface, calls the corresponding code template to compile and package the code, and generates a container integration installation package to achieve automated integration of the mini-program container into the host application.
It simplifies the development process for host applications, lowers the technical threshold, improves the integration efficiency of mini-program containers, and enables efficient and automated access of mini-program containers to host applications.
Smart Images

Figure CN120848933A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular to a data processing method and related apparatus. Background Technology
[0002] With the development of the internet, the demand for integrating and running mini-programs within host applications is increasing. A host application refers to a main application that contains other applications and provides a runtime environment and resource support for those other applications. A mini-program is a lightweight application that can be integrated into and run within a host application based on a mini-program container.
[0003] To enable mini-programs to be integrated and run within a host application, a mini-program container needs to be developed. This container provides the basic environment required for the mini-program to function. Among related technologies, configuring a mini-program container for a host application is technically challenging and requires significant human resources.
[0004] Therefore, in order to improve the efficiency of integrating mini-program containers into host applications, there is an urgent need for a method that can efficiently and easily integrate mini-program containers into host applications. Summary of the Invention
[0005] To address the aforementioned technical issues, this application provides a data processing method and related apparatus that can determine the mini-program container information and extended library information in the container configuration task, and call their respective corresponding code templates to execute compilation and packaging to obtain a container integration installation package. When a host application is installed based on the container integration installation package, the mini-program container function is integrated into the host application.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] On one hand, embodiments of this application provide a data processing method, the method comprising:
[0008] The console interface retrieves the mini-program container information and the host application's extension library information for the container configuration task. The host application is the application to be integrated with the mini-program container. The mini-program container is used to provide the runtime environment for executing the mini-program. The extension library information identifies the extension library used by the mini-program container to provide mini-program functions for the mini-program.
[0009] In response to the completion operation of obtaining the container configuration task through the console interface, the container code template corresponding to the mini-program container information is invoked, and the extension library code template corresponding to the extension library information is invoked.
[0010] By compiling the container code template and the extension library code template, a container integration installation package for the container configuration task is obtained. The container integration installation package is used to install a host application that integrates the mini-program container.
[0011] On the other hand, embodiments of this application provide a data processing apparatus, the apparatus comprising: an acquisition module, a calling module, and a packaging module;
[0012] The acquisition module is used to acquire the mini-program container information and the extension library information of the host application through the console interface. The host application is the application to be integrated with the mini-program container. The mini-program container is used to provide the runtime environment for executing the mini-program. The extension library information identifies the extension library used by the mini-program container to provide mini-program functions for the mini-program.
[0013] The calling module is used to respond to the completion operation of obtaining the container configuration task through the console interface, call the container code template corresponding to the mini-program container information, and call the extension library code template corresponding to the extension library information;
[0014] The packaging module is used to compile the container code template and the extension library code template to package the container configuration task into a container integration installation package, which is used to install the host application that integrates the mini-program container.
[0015] In another aspect, embodiments of this application provide a computer device, which includes a processor and a memory:
[0016] Memory is used to store computer programs;
[0017] The processor is used to execute the methods described above according to a computer program.
[0018] On another front, embodiments of this application provide a computer-readable storage medium for storing a computer program that performs the methods described above.
[0019] In another aspect, embodiments of this application provide a computer program product including a computer program, which, when run on a computer device, causes the computer device to perform the methods described above.
[0020] As can be seen from the above technical solution, for the container configuration task of integrating a mini-program container into a host application, the mini-program container information and extension library information configured by the host application can be obtained through the console interface. When it is confirmed through the console interface that the container configuration task has been completed, a container integration installation package can be automatically compiled and packaged for installation into the host application that integrates the mini-program container. Specifically, since the obtained mini-program container information identifies the mini-program container to be integrated into the host application, and the extension library information identifies the extension libraries managed by the host application, which provide mini-program functionality for the mini-programs housed in the container, the container code templates and extension library code templates required by the container configuration task can be called based on this, and these code templates can be compiled and packaged. Therefore, the host application that needs to integrate the mini-program container only needs to configure its required mini-program container information and extension library information through the console interface. After configuration, it can obtain an automatically compiled and packaged container integration installation package. The entire process is simple and efficient, greatly reducing the development difficulty and technical threshold for the host application, and effectively improving the integration efficiency of the mini-program container. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A schematic diagram illustrating a data processing method provided in an embodiment of this application;
[0023] Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this application;
[0024] Figure 3 A relationship diagram between a mini-program container and a host application is provided in an embodiment of this application;
[0025] Figure 4 A schematic diagram illustrating an embodiment of this application for obtaining a container integration installation package;
[0026] Figure 5 A schematic diagram illustrating the launching of a mini-program, provided as an embodiment of this application;
[0027] Figure 6 This is a schematic diagram illustrating an embodiment of the present application for obtaining information corresponding to a container configuration task;
[0028] Figure 7A flowchart illustrating the addition of host extension data to a container integration installation package is provided as an embodiment of this application.
[0029] Figure 8 A schematic diagram illustrating yet another method of obtaining a container integration installation package, as provided in an embodiment of this application;
[0030] Figure 9 A schematic diagram illustrating the process of obtaining a container integration installation package involving credential addition, provided as an embodiment of this application;
[0031] Figure 10 A schematic diagram illustrating a version update provided in an embodiment of this application;
[0032] Figure 11 A flowchart illustrating how to obtain a container integration installation package is provided in this application embodiment;
[0033] Figure 12 A module diagram related to obtaining a container integration installation package is provided in an embodiment of this application;
[0034] Figure 13 A schematic diagram involving a template is provided for an embodiment of this application;
[0035] Figure 14 This application provides yet another flowchart for obtaining a container integration installation package;
[0036] Figure 15 This is a schematic diagram of a data processing apparatus provided in an embodiment of this application;
[0037] Figure 16 A structural diagram of a terminal device provided in an embodiment of this application;
[0038] Figure 17 This is a structural diagram of a server provided in an embodiment of this application. Detailed Implementation
[0039] The embodiments of this application will now be described with reference to the accompanying drawings.
[0040] With the development of the internet, to facilitate user use and improve user experience, it is desirable to provide services for other mini-programs within a host application, allowing users to run and use other mini-programs within the host application without having to download numerous other applications. Here, the host application refers to the main application that contains other applications and provides the runtime environment and resource support for them. A mini-program refers to a lightweight application that can be integrated into the host application via a mini-program container and run within the host application. In this embodiment, the host application can be understood as the application to which the mini-program container is to be integrated.
[0041] In order to provide services of other mini-programs in the host application, it is necessary to develop and build the basic environment (i.e. mini-program container) required for the mini-program to run, and integrate the mini-program container into the host application so that the host application has the runtime environment to access and execute the mini-program, enabling the mini-program to be displayed and run in the host application.
[0042] In related technologies, configuring a mini-program container for a host application requires a large amount of manual intervention and is technically challenging, making it impossible to efficiently and easily integrate the mini-program container into the host application.
[0043] Therefore, this application provides a data processing method and related apparatus, which can determine the mini-program container information and extension library information in the container configuration task, and call the code templates corresponding to the mini-program container information and extension library information respectively to compile and package to obtain a container integrated installation package. When the host application is installed based on the container integrated installation package, the mini-program container function is integrated in the host application.
[0044] The data processing method provided in this application can be implemented using computer equipment, which can be a terminal device or a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0045] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing.
[0046] Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied to the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will all require robust system support, which can only be achieved through cloud computing.
[0047] Cloud computing is a computing model that distributes computing tasks across a large pool of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" appear infinitely scalable, readily available, on-demand, and expandable, with payment based on usage.
[0048] As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.
[0049] Based on logical function, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS (Infrastructure as a Service) layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be directly deployed on top of IaaS. PaaS is a platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and bulk SMS senders. Generally speaking, SaaS and PaaS are upper layers compared to IaaS. With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the driving forces of demand for search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Unlike previous parallel distributed computing, the emergence of cloud computing will fundamentally revolutionize the entire Internet model and enterprise management model.
[0050] The solution provided in this application relates to cloud computing technology. Based on cloud computing technology, it integrates a mini-program container into a host application. This mini-program container provides various types of virtual resources to the mini-program, enabling the provision of services from other mini-programs based on the integrated mini-program container within the host application. These virtual resources may include mini-program functionalities provided by an extension library. This is illustrated in the following embodiments:
[0051] Figure 1 This is a schematic diagram of a data processing method provided in an embodiment of this application, wherein the aforementioned computer device is a server.
[0052] When integrating a mini-program container into a host application, the server first needs to obtain the mini-program container information and the host application's extension library information from the container configuration task via the console interface. For example... Figure 1 As shown, the information in the mini-program container and the extension library information of the host application includes various types of information. The mini-program container information and the extension library information obtained will differ depending on the container configuration task. For example, the mini-program container information to be obtained may include, but is not limited to, […]. Figure 1 The version selection and access extension type information shown may include, but are not limited to, the extension information of the acquired host application. Figure 1 The map extensions and live streaming extensions shown are examples of information. It should be noted that the options shown in the diagram can be considered as first-level options within the mini-program container information and the host application's extended information. Selecting one option will lead to subpages for that option. Figure 1 (Not shown in the image), one or more sub-option information are set in the options subpage.
[0053] When the container configuration task is completed via the console interface (in the example shown in the image, a pop-up window displays the message "Container configuration task completed," but in actual applications, this display format or visual representation may be omitted), the container code template corresponding to the mini-program container information and the extension library code template corresponding to the extension library information are invoked. These container code templates and extension library code templates are then compiled and packaged to obtain the container integration installation package for the container configuration task. Subsequently, by downloading and installing this container integration installation package, a host application integrating the mini-program container can be obtained.
[0054] The above process enables host application developers (i.e., those developing host applications) that need to integrate mini-program containers to simply configure the corresponding mini-program and extension library information through the console interface according to their requirements. After configuration, the corresponding container code template and extension library code template can be automatically compiled and packaged to obtain the container integration installation package. The process is simple and requires no manual intervention, enabling automated integration of mini-program containers into host applications and improving the efficiency of mini-program container integration into host applications.
[0055] Figure 2 This is a flowchart of a data processing method provided in an embodiment of this application. The method can be executed by a computer device. In this embodiment, the computer device is a server as an example for illustration.
[0056] S201: Obtain the mini-program container information and the host application's extension library information for the container configuration task through the console interface.
[0057] The console interface refers to the interface used for setting parameters and uploading information related to container configuration tasks. This console interface can be located in the front end or back end (where the front end refers to the interface visible to the user, and the back end refers to the interface responsible for handling data storage, business logic, and content interaction with the front end). The console interface includes the configuration content of the mini-program container involved in the container configuration task, as well as the configuration content of the host application's extension library information.
[0058] The container configuration task refers to the task content presented by the host application regarding the integration requirements of the mini-program container. The container configuration task specifies the integration requirements of the mini-program container, including the configuration details for both the mini-program container and the host application's extension libraries. This container configuration task allows you to set the configuration details for both the mini-program container and the host application's extension libraries through the console interface. Once these settings are complete, you can obtain the mini-program container information and the host application's extension library information from the container configuration task. For the mini-program container, the configuration details may include version information and required mini-program functions; for the host application's extension libraries, the configuration details may include the software packages corresponding to the mini-program functions required by the mini-program at runtime.
[0059] A host application is a primary application that includes other applications or components and is responsible for managing and running those other applications. In this embodiment, the host application is the application to which the mini-program container is to be integrated. The host application developer (i.e., the object developing the host application) expects to integrate and run mini-programs (lightweight applications) within the host application based on the mini-program container. In this case, the aforementioned other applications include mini-programs. Integration refers to establishing a connection between the mini-program and the host application, enabling the host application to access the code corresponding to the mini-program, thereby allowing the execution of the mini-program's code within the host application's mini-program container. Execution refers to the process of performing corresponding operations according to the instructions in the code; the execution of a mini-program refers to the process of performing corresponding operations according to the instructions in the mini-program's code.
[0060] The mini-program container is used to provide the runtime environment for executing mini-programs. The runtime environment refers to the system runtime environment that the mini-program depends on during execution. The system runtime environment refers to the combination of various software components and frameworks required for the mini-program to run.
[0061] Figure 3 A relationship diagram between a mini-program container and a host application provided in an embodiment of this application is shown below. Figure 3 As shown, the terminal device has a corresponding operating system, the host application runs under the operating system, the mini-program container is integrated into the host application, and multiple mini-programs can be accessed based on the mini-program container. As shown in the figure, mini-program A and mini-program B are accessed in the mini-program container.
[0062] The extension library information identifies the extension libraries used by the mini-program container to provide mini-program functionality. Mini-program functionality refers to the features that the mini-program itself needs to implement at runtime. For example, mini-program functionality may include, but is not limited to, the following: display functionality, sharing functionality, and location functionality. An extension library is a collection of software packages corresponding to certain basic functions provided by the mini-program. Through extension libraries, the mini-program container can provide the necessary basic functionalities for the mini-program when it runs.
[0063] Mini-program container information refers to information about the mini-program container that needs to be integrated into the host application. For example, this information may include, but is not limited to, the version information of the mini-program container and the functions that the mini-program container needs to implement.
[0064] The console interface may include configuration content for configuring the mini-program container and the host application's extension libraries. Completing the container configuration task requires configuring both the mini-program container and the host application's extension libraries, obtaining mini-program container information and host application extension library information. It should be noted that the mini-program container information and host application extension library information match the integration requirements for the mini-program container in the container configuration task. When the console interface obtains the aforementioned mini-program container information and host application extension library information, the container configuration task can be considered complete.
[0065] Furthermore, the aforementioned configurable content can be presented as options. For the mini-program container, the configurable content may include version information and required mini-program functions, among other options. For the host application's extension library, the configurable content may include options corresponding to the software packages for the mini-program functions required by the mini-program at runtime. By selecting options, the corresponding configurable content can be configured. Once the selection is complete, the container configuration task is considered finished.
[0066] S202: In response to the completion operation of obtaining the container configuration task through the console interface, call the container code template corresponding to the mini-program container information and call the extension library code template corresponding to the extension library information.
[0067] A container code template refers to a code template that is adapted to the information of a mini-program container. A code template is a pre-set code structure or framework. A container code template can include some common code snippets as well as code snippets adapted to the information of a mini-program container.
[0068] An extension library code template refers to a code template that is adapted to the extension library information. An extension library code template may include some common code snippets, as well as code snippets adapted to the extension library code information.
[0069] A call refers to a jump retrieval operation. When a call occurs, it will jump to the storage location of the called content and retrieve the called content (i.e., container code template and extension library code template).
[0070] The completion of the operation refers to the process where, when the console interface obtains the aforementioned mini-program container information and the host application's extension library information, it displays the completion of the container configuration task, performs the corresponding interface jump for compilation and packaging, or selects the compilation and packaging options, so that the server obtains the information that the container configuration task has been completed.
[0071] By setting the container code templates and extension library code templates mentioned above, the process of integrating the mini-program container into the host application can be simplified. The code templates corresponding to the mini-program container information and extension library information can be obtained directly, without the need to generate code for different mini-program container information and extension library information. This can greatly save the intermediate process of obtaining the container integration installation package and improve the integration efficiency of the mini-program container.
[0072] For example, suppose the mini-program container information indicates that the mini-program container version is 1.0. In this case, the container code template corresponding to the mini-program container version 1.0 needs to be called. In the container code template, the position related to the mini-program container version will indicate version 1.0. Suppose the extension library information indicates that the extension library providing mini-program functionality includes extension library 'a' for providing mini-program display functionality. In this case, the extension library code template corresponding to extension library 'a' needs to be called.
[0073] In this application embodiment, different extension libraries are corresponding to different mini-program functions. The extension library corresponding to the same mini-program function may include multiple extension library code templates, and different extension library code templates can be used to identify different versions of the mini-program function implementation.
[0074] As mentioned above, the extension library information is used to identify the extension libraries used by the mini-program container to provide mini-program functionality. This information can include various extension libraries, such as display extension libraries, voice extension libraries, and location extension libraries. Taking the display extension library as an example, this library provides display functionality for the mini-program. Depending on the version, this library can include multiple extension library code templates, such as version 1.0, version 2.0, and version 3.0.
[0075] S203: By compiling the container code template and the extension library code template, the container integration installation package of the container configuration task is obtained.
[0076] Compilation refers to the process of converting source code files into executable files. Source code files refer to container code templates and extension library code templates. An executable file is a file containing a computer program in machine language that can be executed directly on a computer. In short, it involves compiling container code templates and extension library code templates into executable files.
[0077] Packaging refers to the process of combining the executable file obtained above, along with other resources required by the executable file, into an installable software package. In this embodiment, "installable software package" refers to a container integration installation package. The "other resources" mentioned above may include, but are not limited to, the following: library files of the executable file and necessary resource files (such as images, configuration files, etc.). In this case, the packaging process may include obtaining the library files linked to the executable file, copying necessary resource files, and then packaging the executable file, the library files of the executable file, and the copied necessary resource files into a container integration installation package.
[0078] Integration refers to combining different software or programs to achieve specific functions or services. In this embodiment, the host application needs to be integrated with a mini-program container to enable the access and operation of mini-programs within the host application based on the mini-program container. In this embodiment, the integration process is achieved through compilation and packaging. The container code template and the extension library code template are compiled and packaged to obtain a container integration installation package. The container integration installation package connects the host application and the mini-program container, allowing them to work together and providing the foundation for mini-program access and operation. As described above, the container integration installation package is obtained by compiling and packaging the container code template and the extension library code template. Therefore, the container integration installation package includes the content of the extension library code template corresponding to the extension library information and the container code template corresponding to the mini-program container information. By compiling and packaging the container code template, the integration of the mini-program container within the host application can be achieved. Simultaneously, the container integration installation package includes the extension library code template corresponding to the extension library information, which enables the integration of extension libraries that meet the basic functions of mini-program operation into the host application. When installing the container integration installation package, you will get a host application that integrates the mini-program container.
[0079] As can be seen from the above technical solution, for the container configuration task of integrating a mini-program container into a host application, the mini-program container information and extension library information configured by the host application can be obtained through the console interface. When it is confirmed through the console interface that the container configuration task has been completed, a container integration installation package can be automatically compiled and packaged for installation into the host application that integrates the mini-program container. Specifically, since the obtained mini-program container information identifies the mini-program container to be integrated into the host application, and the extension library information identifies the extension libraries managed by the host application, which provide mini-program functionality for the mini-programs housed in the container, the container code templates and extension library code templates required by the container configuration task can be called based on this, and these code templates can be compiled and packaged. Therefore, the host application that needs to integrate the mini-program container only needs to configure its required mini-program container information and extension library information through the console interface. After configuration, it can obtain an automatically compiled and packaged container integration installation package. The entire process is simple and efficient, greatly reducing the development difficulty and technical threshold for the host application, and effectively improving the integration efficiency of the mini-program container.
[0080] In this application embodiment, the host application that integrates a mini-program container to enable mini-program access falls into two categories: an existing application and a blank application. In the first case, when the host application is an existing application, it will have a corresponding host installation package. In the second case, when the host application is not an existing application or lacks application functionality, but is a blank application set up to provide a mini-program container, it will not have a host installation package. However, after integrating the mini-program container, the host application can provide a runtime environment for the mini-program.
[0081] The aforementioned console interface refers to the interface used for parameter settings, information uploads, and other operations related to container configuration tasks. The configuration process for the mini-program container and the host application's extension library, mentioned earlier, can be considered a parameter setting process. In some implementations, information uploads are required. Taking the first scenario involving the host application as an example, when the host application has its own host installation package, integrating the mini-program container requires using that host installation package. In this case, the host application needs to upload the host installation package to the console interface to obtain the host application's host installation package; this process can be considered "information upload." S203 mentions "compiling the container code template and the extension library code template to package the container integration installation package for the container configuration task." In one possible implementation, when the host application has a host installation package, the method for obtaining the container integration installation package is: first, unpack the host installation package to obtain the host application's host installation data. Then, by compiling the host installation data, container code template, and extension library code template, the container configuration task's container integration installation package is obtained.
[0082] A host installation package refers to the installation package of a host application, which includes the host application's installation data. This host installation data includes, but is not limited to, the following: the executable file and other resources required by that executable file. These "other resources" may include configuration files, library files, etc.
[0083] Unpacking can be understood as the reverse process of "packaging," referring to obtaining the contents of the host installation package through unpacking. The purpose of unpacking is to obtain the contents of the host installation package so that subsequent adjustments can be made based on the obtained contents. The adjustment method can be: combining the container code templates and extension library code templates related to the mini-program container in the host installation data.
[0084] To integrate a mini-program container into a host application that contains a host installation package, the host installation package needs to be unpacked. Then, container code templates and extension library code templates related to the mini-program container are added to the unpacked host installation data. Finally, the host installation data, container code templates, and extension library code templates are compiled and packaged to obtain the container integration installation package for the container configuration task.
[0085] In other words, when a host application has its own host installation package, in order to integrate a mini-program container into the host application, it is necessary to add, or integrate, the relevant data required for the mini-program container to run into the host installation data of the original host application's host installation package. This relevant data includes container code templates and extension library code templates. The container code template identifies the mini-program container integrated into the host application, and the mini-program container can run based on the container code template. The extension library code template identifies the extension library managed by the host application, which provides mini-program functionality for mini-programs integrated into the host application based on the mini-program container. By compiling and packaging the host installation data together with the container code templates and extension library code templates, a container integration installation package can be obtained that simultaneously contains the original host application's host installation data and the relevant data required for the mini-program container to run.
[0086] Compiling and packaging the host installation data, container code template, and extension library code template allows the container code template and extension library code template to be embedded into or concatenated with the host installation data. When the container integration installation package of the obtained container configuration task is installed and run, the mini-program container is integrated into the host application.
[0087] Figure 4 This application provides a schematic diagram of obtaining a container integration installation package, as shown in the embodiment. Figure 4 As shown, by unpacking the obtained host installation package, the host installation data of the host application can be obtained. The host installation data, container code template, and extension library code template can be compiled and packaged together to obtain the container integration installation package of the container configuration task.
[0088] Regarding the second scenario mentioned above, where the host application is a blank application and does not have its own host installation package, there is no need to perform unpacking and then compiling and packaging as in the first scenario. Instead, the called container code template and extension library code template are directly compiled and packaged to obtain the container integration installation package for the container configuration task.
[0089] The method described above for obtaining a container integration installation package involves unpacking the host installation package to obtain host installation data, combining the host installation data, container code templates, and extension library code templates, and then compiling and packaging it to obtain a container integration installation package containing information for both the host application and the mini-program container. Installing this container integration installation package enables the operation of both the host application and the mini-program container. Because the information from both the host application and the mini-program container is compiled and packaged together, the incompatibility and poor compatibility issues between the two can be avoided to some extent, thus improving the integration effect of the mini-program container.
[0090] The preceding section described a method for obtaining a container integration installation package when a host application has a host installation package. This method requires compiling the host installation data, container code template, and extension library code template to package the container integration installation package for the container configuration task. In practical applications, when a mini-program container is integrated into the host application, the mini-program container needs to be "wake up" to enable it to start and provide the runtime environment for the connected mini-program, ensuring its smooth operation. The mini-program container needs to determine its own startup timing, which is related to the host application's state information. Therefore, the mini-program container needs to have appropriate means to obtain the host application's state information. In one possible implementation, before compiling the host installation data, container code template, and extension library code template to package the container integration installation package for the container configuration task, the following operation needs to be performed: The mini-program container's proxy module is injected into the encoding context of the host installation data.
[0091] Encoding context refers to the "background environment" in which the code corresponding to the host installation data is executed. This "background environment" can refer to the information at a specific moment during the execution of the code corresponding to the host installation data by the host application. This information can include: variable values, function call information, and execution location, etc. Encoding context can identify the resources called by the host application and its running status information during the execution of the host installation data.
[0092] Implantation can be understood as the operation of integrating an independent module into the host installation data. In this embodiment, implantation refers to integrating the proxy module of the mini-program container into the encoding context of the host installation data. The proxy module obtains the state information of the host application based on the encoding context and passes this state information to the mini-program container so that the mini-program container can be "wake up" or "sleep" in a timely manner according to changes in the state information of the host application. The "wake up" state can be understood as starting the mini-program container, and the "sleep" state can be understood as keeping the mini-program container in standby (awaiting startup) state. Starting refers to running the relevant code corresponding to the mini-program container.
[0093] State information refers to data or information about the various states of a host application at a specific moment. This data or information is typically used to track and manage the operation of the host application, and may include running status, resource utilization, request processing status, task execution status, etc.
[0094] The proxy module is used to pass the runtime state information of the host application to the mini-program container. It can be understood as an intermediary for information transmission between the host application and the mini-program container. On the one hand, it is responsible for collecting the runtime state information of the host application, and on the other hand, it is responsible for passing the collected state information to the mini-program container.
[0095] By embedding a proxy module for the mini-program container within the encoding context of the host application's installation data, the mini-program container can receive runtime state information from the host application through this proxy module. The proxy module can transmit state information to the mini-program container in real-time, periodically, or only when the host application's state changes; this is not limited here. When the mini-program container receives runtime state information from the host application, if the state information indicates that the mini-program container needs to be run, then the mini-program container will execute the corresponding running operation according to the indication of the state information.
[0096] Figure 5 This is a schematic diagram illustrating how to launch a mini-program, as provided in an embodiment of this application. Figure 5 As shown, in Figure 5 (a) illustrates a swipe-down gesture on the host application's interface. The host application's running status changes based on this gesture, assuming the swipe-down gesture in the host application instructs the mini-program container to start. When a mini-program container's proxy module is embedded in the encoding context of the host installation data, the proxy module can promptly obtain the host application's running status information. In this case, the proxy module will detect the swipe-down gesture (i.e., status information) on the host application's interface and pass this status information to the mini-program container. This status information then instructs the mini-program container to start. Figure 5(b) in the diagram represents the startup state of the mini-program container. Once the mini-program container has finished starting, the corresponding mini-program can be retrieved within it, such as... Figure 5 As shown in (c) in the example, one presentation format of a mini-program is demonstrated.
[0097] By embedding a proxy module of the mini-program container within the encoding context of the host application's installation data, the mini-program container can promptly grasp the state information of the host application and react accordingly to changes in that state information. Furthermore, this modular approach of using a proxy module facilitates embedding within the encoding context of the host application's installation data, reducing the difficulty of embedding while improving efficiency. This proxy module, acting as a state information transmission intermediary, enhances the interoperability between the mini-program container and the host application, enabling the mini-program container to respond quickly to changes in the host application's state.
[0098] In this embodiment, when obtaining the mini-program container information and the host application's extension library information for the container configuration task in the console interface, it is assumed that the mini-program container information and the host application's extension library information are displayed as options in the console interface. The configuration method for this mini-program container information and the host application's extension library information is as follows: The options corresponding to the configuration content of the mini-program container information and the configuration content of the host application's extension library information are selected according to the requirements of the container configuration task. Version information is included in the mini-program container information and the host application's extension library information. For the version information, an option subpage for the mini-program container and the extension library is displayed in the console interface. In this option subpage, multiple version options are included for the mini-program container and multiple version options are included for the extension library. In this embodiment, by providing different version options for the mini-program container and the extension library in the console interface, the need to integrate the mini-program container for different host applications can be met. Therefore, in one possible implementation, the method for obtaining the mini-program container information and the host application's extension library information is as follows: In response to the selection of a first version option among multiple version options for the mini-program container, the mini-program container information is determined to identify the version of the mini-program container corresponding to the first version option. And in response to the selection of a second version option for the target extension library among the extension libraries, the extension library information is determined to identify the version of the target extension library corresponding to the second version option.
[0099] The console interface includes options for configuring content related to the mini-program container and the host application's extension library. The options for configuring the mini-program container information may include, but are not limited to, version information and access extension type. The options for configuring the host application's extension library information may include, but are not limited to, map extensions, voice extensions, and live streaming extensions. Each option in this configuration section corresponds to one type of content to be configured.
[0100] The aforementioned mini-program container refers to the environment or platform used to host, run, and manage mini-programs, providing the necessary runtime environment and support. The extension library refers to a collection of software packages or modules used to provide mini-program functionality to the mini-program within the mini-program container. In this embodiment, both the mini-program container and the extension library can include different versions, displayed as version options in the option subpage of the console interface, with one version corresponding to one version option. Thus, the mini-program container includes multiple version options, and the extension library also includes multiple version options. The version options are set in the option subpages of the console interface for the mini-program container and the extension library. These option subpages can be understood as subpages under the option for "version information," which is the configurable content, and include multiple version options for the mini-program container and the extension library. When the version information of the mini-program container and the extension library is displayed as version options, the version of the mini-program container and the extension library is determined by selecting a version option. It should be noted that the host application's extension library information includes multiple extension libraries. Different extension libraries provide different mini-program functions, and each extension library can have multiple version options. The target extension library refers to one of the aforementioned extension libraries that is selected. For example, if the extension library information includes: live streaming extension, map extension, and voice extension, then the target extension library can be any one of the live streaming extension, display extension, and voice extension.
[0101] For example, suppose the options subpage includes version 1.0, 2.0, and 3.0 options for the mini-program container. It also includes version 1.0, 2.0, and 3.0 options for the target extension library. When retrieving the mini-program container information and the host application's extension library information from the container configuration task via the console interface, the mini-program container information includes the mini-program container's version information, and the host application's extension library information includes the target extension library's version information. The container configuration task includes the host application's integration requirements for the mini-program container, which include version requirements for both the mini-program container and the target extension library. Retrieving the mini-program container information and extension library information must meet these integration requirements.
[0102] Suppose the integration requirement is: to integrate a version 2.0 mini-program container and a version 1.0 target extension library into the host application. In this case, the version option corresponding to version 2.0 (i.e., the first version option) will be selected from the multiple version options for the mini-program container, and the version option corresponding to version 1.0 (i.e., the second version option) will be selected from the multiple version options for the target extension library. The corresponding mini-program container information is used to identify the version 2.0 mini-program container corresponding to the first version option, and the extension library information is used to identify the version 1.0 target extension library corresponding to the second version option.
[0103] Figure 6 This is a schematic diagram illustrating an embodiment of the present application for obtaining information corresponding to a container configuration task, such as... Figure 6 As shown, the container configuration task in the console interface displays information about the mini-program container and the host application's extension library. The mini-program container information includes version information and the type of extension accessed, while the host application's extension library information includes map extensions, voice extensions, and live streaming extensions. When it's necessary to determine the version information of the mini-program container and extension libraries based on the container configuration task, the version option of the target extension library in the mini-program container and extension library needs to be selected in the console interface. As shown in the figure, the target extension library selected from the host application's extension library information is the map extension. Among the multiple version options for the mini-program container, version A is selected, and for the map extension in the extension library, version A is selected. At this point, the mini-program container information is determined to be the mini-program container corresponding to version A, and the extension library information is determined to be the target extension library (i.e., the map extension) corresponding to version A.
[0104] The method described above for obtaining information about the mini-program container and the extension library of the host application provides multiple version options for the mini-program container and multiple version options for the extension library in the console interface. By selecting the version options, the version requirements for integrating the mini-program container with different host applications can be met, thereby improving the adaptability of mini-program container integration for different host applications.
[0105] As mentioned earlier, multiple version options can be available for both the mini-program container and the extension library. In practical applications, the version of the mini-program container and the extension library can be selected according to requirements to meet the integration needs of the host application. Once the versions of the mini-program container and the extension library are determined, the corresponding container code template and extension library code template need to be called. The initialization code template is a general, pre-designed code structure related to the mini-program container and the extension library. By filling the implementation code corresponding to the mini-program container or the extension library into the initialization code template, the corresponding container code template and extension library code template can be obtained. To improve the efficiency of obtaining the container code template and extension library code template, a mapping relationship between the version of the mini-program container and the version of the extension library and their respective implementation code can be established. When the version of the mini-program container or the version of the extension library is determined, the corresponding implementation code is called according to the mapping relationship. Therefore, in one possible implementation, it is necessary to establish a mapping relationship between different versions and different versions of implementation code in advance. The different versions refer to the versions of the mini-program container or extension library, and the implementation code refers to the code that implements the operation of the mini-program container or extension library.
[0106] As mentioned in S202 above, "calling the container code template corresponding to the mini-program container information," after the container configuration task is completed, the mini-program container information has been obtained, that is, the version of the mini-program container has been determined. At this time, it is necessary to call the corresponding container code template according to the mini-program container information. The method is as follows: find the mapping relationship according to the version corresponding to the first version option, and call the first implementation code indicated by the mapping relationship. Fill the first implementation code into the initialization code template to obtain the container code template.
[0107] A mapping relationship is a way to associate one object with another. In the embodiments of this application, the mapping relationship is used to establish a connection between the version of the mini-program container and the code that implements the mini-program container (i.e., the implementation code), or between the version of the extension library and the code that implements the extension library (i.e., the implementation code).
[0108] Once the version of the mini-program container corresponding to the first version option is identified, it can be determined that the version of the mini-program container is the version corresponding to the first version option. At this point, the mapping relationship is looked up based on the version corresponding to the first version option to determine the first implementation code that has a mapping relationship with the version corresponding to the first version option.
[0109] As mentioned earlier, the corresponding container code template can be obtained by filling the implementation code corresponding to the mini-program container into the initialization code template. Once the first implementation code of the mini-program container is determined, the container code template can be obtained by filling the first implementation code into the initialization code template.
[0110] As mentioned in S202 above, "call the extension library code template corresponding to the extension library information." After the container configuration task is completed, the extension library information has been obtained, that is, the version of the extension library has been determined. At this time, it is necessary to call the corresponding extension library code template according to the extension library information. The method is as follows: find the mapping relationship according to the version corresponding to the second version option, and call the second implementation code indicated by the mapping relationship. Fill the second implementation code into the initialization code template to obtain the extension library code template.
[0111] Once the version of the mini-program container corresponding to the first version option of the extended library information is identified, it can be determined that the version of the mini-program container corresponds to the version corresponding to the second version option. At this point, the mapping relationship is looked up based on the version corresponding to the second version option to determine the second implementation code that has a mapping relationship with the version corresponding to the second version option.
[0112] As mentioned earlier, the corresponding extension library code template can be obtained by filling the initialization code template with the implementation code of the extension library. Once the second implementation code of the extension library is determined, the extension library code template can be obtained by filling the initialization code template with the second implementation code.
[0113] The methods described above for obtaining container code templates and extension library code templates establish a mapping relationship between versions and implementation code. Once the version of the mini-program container or extension library is determined, the corresponding implementation code can be called based on the mapping relationship. The implementation code is then populated into initialization code templates that are relevant to the mini-program container and extension library, thus obtaining the container code template and extension library code template. This mapping relationship improves the efficiency of obtaining container code templates and extension library code templates while ensuring the relevance and accuracy between the obtained container code template and the mini-program container information, as well as between the extension library code template and the extension library information.
[0114] In a host application that integrates a mini-program container, when a mini-program is accessed and run, an extension library is needed to provide the basic functionalities that enable the mini-program to function correctly. To achieve this, a dependency relationship needs to be established between the host application and the extension library. This dependency relationship can be understood as an association between the host application and the extension library; when an association exists, the host application can call the extension library. By calling the extension library, the corresponding mini-program functionality can be provided to the mini-program. This dependency relationship can be established through an interface. The interface configuration parameters (used to call the mini-program container and extension library) enable the calling of both the mini-program container and the extension library. Therefore, in one possible implementation, to enable the host application to call the mini-program container and extension library, the obtained container integration installation package needs to contain interface configuration parameters. In other words, before compiling and packaging to obtain the container integration installation package, it is necessary to obtain the interface configuration parameters through the console interface. At this time, the implementation method of "compiling the container code template and the extension library code template to obtain the container integration installation package of the container configuration task" mentioned in S203 above is: compiling the interface configuration parameters, container code template and extension library code template to obtain the container integration installation package of the container configuration task.
[0115] As mentioned above, the interface configuration parameters are used to call the mini-program container and extension library. For example, the interface configuration parameters may include, but are not limited to, the following: API name, backend interface service address, and interface access parameters.
[0116] The API (Application Programming Interface) name refers to the identifier or name of the application interface, used to uniquely identify an API. The backend interface service address refers to the network location of the interface provided by the backend service (such as the extension library in this embodiment), used to access the functionality of that backend service. Interface access parameters refer to the information necessary to send a request to the backend interface to obtain specific data or perform a specific operation (such as the host application sending a request to the extension library in this embodiment to obtain the software package corresponding to the mini-program functionality of that extension library).
[0117] Interface configuration parameters are used to establish dependencies between the host application and extension libraries, identifying the extension libraries that the host application can call. After installing the container integration package to obtain a host application integrated with the mini-program container, if the host application wants to access and run mini-programs based on the mini-program container, it needs to provide basic mini-program functionality. This requires calling extension libraries to provide mini-program functionality, and this call operation needs to be implemented based on the interface configuration parameters.
[0118] In order to enable the host application to call the mini-program container and extension library based on the interface, it is necessary to obtain the interface configuration parameters. By compiling the interface configuration parameters, container code template and extension library code template together, and packaging them into a container integration installation package for the container configuration task, the host application can call the mini-program container and the extension library based on the interface configuration parameters after installation.
[0119] Meanwhile, the interface configuration parameters obtained from the console interface clearly define the mini-program container and extension libraries that the host application can subsequently call. For example, suppose the interface configuration parameters include parameters for calling the 1.0 version of the mini-program container, display extension library, and voice extension library. Then, by compiling the interface configuration parameters, container code template, and extension library code template, and packaging them into a container integration installation package for the container configuration task, calls to the 1.0 version of the mini-program container, display extension library, and voice extension library can be achieved.
[0120] The method described above for obtaining a container integration installation package enables the establishment of dependencies between the host application and the extension library based on the interface configuration parameters obtained from the console interface, while simultaneously completing the invocation of the integrated mini-program container. During compilation and packaging, the interface configuration parameters, container code template, and extension library code template are combined to ensure that the resulting container integration installation package has the ability to call the mini-program container and related extension libraries. This guarantees that the host application installed by the container integration installation package can access and use mini-programs based on the mini-program container.
[0121] The aforementioned console interface refers to the interface used for setting parameters and uploading information related to container configuration tasks. In other words, container configuration tasks can be completed through information uploads within the console interface. In some implementations, the host application may want to provide the mini-program connected via the mini-program container with extension libraries (i.e., host extension libraries) or extension materials (i.e., host extension materials) that differ from the basic extension libraries provided in the console interface. In this case, information uploads are required for container configuration tasks.
[0122] When the extension library information identifies an extension library that includes a basic extension library provided by the console interface and host extension data provided by the host application, the host extension data includes at least one of the host extension library or host extension materials provided by the host application. The mini-program functions provided by the host extension library differ from those provided by the basic extension library, and the host extension materials are used within the mini-program functions provided by the basic extension library.
[0123] When a host application wants to provide custom host extension data for a mini-program integrated via a mini-program container, and obtains the mini-program container information and host application extension library information from the container configuration task through the console interface, the extension library information includes not only the basic extension libraries provided by the console interface but also the host extension data uploaded by the host application via information upload. When the host extension data includes the host extension libraries provided by the host application, it means that the subsequently installed host application can provide the mini-program functionality corresponding to the host extension libraries. For example, assuming the basic extension libraries provided by the console interface include display and voice extension libraries, the host extension library can be a live streaming extension library, used to provide live streaming functionality for the integrated mini-program.
[0124] When the host extension data includes host extension materials provided by the host application provider, it means that the subsequently installed host application can provide different functional implementation materials for the mini-program on top of the mini-program functions provided by the basic extension library. For example, suppose the basic extension library includes a display extension library to provide display functions for the connected mini-program. The original display function implementation materials include normal display and rotated display. The host extension materials provide a blur display function implementation material for the mini-program. In this case, if the connected mini-program calls the display extension library, it can use the blur display function implementation material to achieve blur display.
[0125] The methods described above enable host application developers to customize host extension materials within the host extension library, enhancing their autonomy in setting up mini-program functions and related materials. This allows them to meet the personalized needs of host application developers and improve their ability to provide mini-program functions and related materials to satisfy the functional requirements of different mini-programs.
[0126] As mentioned earlier, when a host application wants to provide a custom extension library (i.e., a host extension library) or custom extension materials (i.e., host extension materials) for a mini-program integrated with a mini-program container, it needs to obtain the host extension data uploaded by the host application from the console interface before compilation and packaging. To call the host extension data, it is also necessary to obtain the parameters used to call the host extension data (i.e., host interface configuration parameters). In a host application integrated with a mini-program container, if the integrated mini-program container is to be able to call the host extension data uploaded by the host application, the interface code template corresponding to the host interface configuration parameters of the host extension data needs to be compiled when compiling and packaging the container integration installation package, so that the container integration installation package includes code that calls the host extension program. Therefore, in one possible implementation, the host interface configuration parameters need to be added to the interface code template and compiled. This method includes:
[0127] A1: Obtain the host interface configuration parameters provided by the host application through the console interface.
[0128] When a host application wants to provide a custom, personalized host extension library or host extension material for a mini-program accessed via a mini-program container, in addition to the basic extension library and the original materials provided in the basic extension library to implement mini-program functions, it needs to upload the host extension data (including at least one of the host extension library or host extension material) to the console interface. This allows the host extension data to be retrieved from the extension library information when obtaining the mini-program container information and the host application's extension library information from the container configuration task. To enable the invocation of the host extension data, the host application also needs to provide parameters (i.e., host interface configuration parameters) for invoking the host extension data.
[0129] The host interface configuration parameters are similar to the aforementioned interface configuration parameters and may include, but are not limited to, the following: API name, backend interface service address, and interface access parameters. These host interface configuration parameters are used to establish dependencies between the host application and host extension libraries or host extension assets. These dependencies identify the host extension libraries or host extension assets that the host application can call. After installing the container integration package to obtain a host application integrated with the mini-program container, if the mini-program accessed based on the mini-program container wants to run mini-program functions provided by the host extension library or host extension assets in the basic extension library, it needs to use these host interface configuration parameters to call the host extension library or host extension assets.
[0130] A2: During the process of compiling the host installation data, the container code template, and the extension library code template, an interface code template for the host interface configuration parameters is obtained.
[0131] The aforementioned process of "compiling host installation data, container code templates, and extension library code templates to package a container integration installation package for container configuration tasks" requires introducing host interface configuration parameters during compilation when calling host extension libraries or host extension materials is needed. Therefore, during the compilation of host installation data, container code templates, and extension library code templates, an interface code template for the host interface configuration parameters must be obtained. In this embodiment, this interface code template can be a bytecode file.
[0132] A3: Modify the host interface configuration parameters into the interface code template to obtain the modified interface code template.
[0133] Modifying the host interface configuration parameters to the interface code template ensures that the modified interface code template includes the corresponding information for the host interface configuration parameters. When the interface code template is a bytecode file, assuming the host interface configuration parameters include: API name, backend interface service address, interface access parameters, and result parameters, the modification method can be as follows: Use ASM (Abstract State Machines, a mathematical framework and formal method for describing and analyzing the behavior of computer systems) to find and modify the return values of the getName (API name), getAPI (backend interface service address), getQuery (interface access parameters), and getResultParam (result parameters) methods in the bytecode file; simultaneously, rename the interface code template to 'API name + Plugin'.
[0134] To ensure that the modified API code template can be found at runtime, the custom API name and bytecode file need to be added to the plugin mapping table of the mini-program container. The approach here is to use ASM to find the .class file with the class name PluginList in the template code compilation artifacts and add the newly added host interface configuration parameters to the global mapping table of PluginList.
[0135] A4: The modified interface code template is compiled during the compilation process.
[0136] During the process of compiling and packaging the host installation data, container code template, and extension library code template to obtain the container integration installation package for the container configuration task, the modified interface code template is also compiled so that the resulting container integration installation package contains the relevant information of the interface code template. This process can be regarded as repackaging the modified interface code template into the dex binary file of the mini-program container.
[0137] Figure 7 A flowchart illustrating the addition of host extended data to a container integration installation package is provided as an embodiment of this application, such as... Figure 7 As shown, this process requires obtaining the interface code template, extracting the host interface configuration parameters, modifying the interface code template based on ASM and the host interface configuration parameters, and compiling the modified interface code template. Then, based on ASM, the plugin mapping table is modified so that the content corresponding to the modified interface code template can be found when the host application runs. Finally, the modified interface code template is repackaged into the path of the mini-program container.
[0138] The method described above for obtaining a container integration installation package enables the host application to provide custom host extension libraries or host extension materials (i.e., host extension data) for mini programs accessed through the integrated mini program container. This requires setting host interface configuration parameters for calling these host extension data, modifying the interface code template based on these parameters, and compiling the modified interface code template during the compilation process. This ensures that the obtained container integration installation package has the ability to call host extension libraries or host extension materials, better meeting the functional requirements of the accessed mini programs.
[0139] As mentioned in S203 above, "by compiling the container code template and the extension library code template, a container integration installation package for the container configuration task is obtained." To ensure the legitimacy of the use of the mini-program container, it is necessary to set a corresponding credential (i.e., execution credential) for the host application to identify its legitimate use of the mini-program container. Based on this execution credential, the legitimate identity of the host application integrating the mini-program container can be determined, preventing the mini-program container from being used illegally and facilitating its operation and maintenance management. Therefore, during the compilation and packaging process to obtain the container integration installation package, the execution credential information needs to be added to the packaged content to be compiled. This is achieved by obtaining the host application's host configuration information through the console interface. The host configuration information is used to identify the execution credential for the mini-program container integration corresponding to the host application. In one possible implementation, the method for obtaining the container integration installation package is as follows: combining the host configuration information, compiling the container code template and the extension library code template, and packaging them to obtain the container integration installation package for the container configuration task.
[0140] Host configuration information refers to the parameters and settings used to configure and manage the host application. This information includes execution credentials that identify the integration of the host application with the corresponding mini-program container. An execution credential is a document or piece of information used to verify the permission or legitimacy of an entity (usually a program, user, or process; in this embodiment, it refers to the host application) for a specific operation or resource (i.e., the mini-program container). Execution credentials are typically associated with concepts such as authentication, access control, and authorization. They ensure that the mini-program container only allows legitimate host applications to perform specific operations (such as integration, invocation, and execution). In this embodiment, the execution credential may refer to a network channel key, kernel file key, live streaming component key, etc.
[0141] A network channel key is a confidential piece of information used for encrypting and decrypting data, verifying identity, and establishing secure communication, controlling access permissions to a network channel. For example, this network channel key can be generated based on a domain name, such as the host application's domain name. When the network channel key is included in the host application's configuration information, network communication between the host application and the mini-program container can be achieved.
[0142] The kernel file key refers to the key used to verify and protect the integrity of the kernel file of the mini-program container. This kernel file contains the critical code and data required for the mini-program container to start. When the kernel file key is included in the host application's host configuration information, the host application can access the kernel file of the mini-program container.
[0143] The live streaming component key refers to the security key protecting the live streaming component. This key is used to implement access control for the live streaming function. Specifically, when a mini-program needs to implement live streaming functionality, it needs to call the corresponding live streaming extension library. Only when a dependency relationship is established between the host application and this live streaming extension library (i.e., the aforementioned association between the host application and the extension library) can the host application provide the mini-program with the live streaming functionality corresponding to that extension library. This dependency relationship can be established based on the live streaming component key. When the host application possesses the live streaming component key, it can provide the mini-program with the live streaming extension library corresponding to that key, enabling the mini-program to implement live streaming functionality.
[0144] It should be noted that, in addition to the network channel key, kernel file key, and live streaming component key mentioned above, the execution credentials may also include the application package name. The application package name refers to the name of the host application's installation package.
[0145] The host application's host configuration information can be obtained from the console interface. If the host configuration information is displayed as options in the console interface, then the corresponding method of obtaining it can be achieved by selection. In one possible scenario, the host configuration information may be pre-set through negotiation between the host application provider and the mini-program container provider. In this case, the host configuration information can be directly obtained from the console interface without the need for selection.
[0146] When the host configuration information of the host application is obtained, and the container integration installation package of the container configuration task is compiled and packaged, it is necessary to combine the host configuration information with the container code template and the extension library code template to compile and package together, so that the resulting container integration installation package includes the execution certificate of the mini program container integration corresponding to the host application, the mini program container, and the relevant content of the extension library managed by the host application.
[0147] Figure 8 This is another schematic diagram of obtaining a container integration installation package provided in an embodiment of this application, such as... Figure 8 As shown, during the compilation and packaging process to obtain the container integration installation package, it is necessary to add execution credentials to the content to be compiled and packaged. Therefore, before performing compilation and packaging, it is necessary to obtain the host configuration information from the console interface. The host configuration information includes execution credentials. In the figure, the execution credentials are added in the form of uploading. The pop-up window for credential upload shows execution credentials 1 and execution credentials 2, and execution credentials 2 is selected. This means that execution credentials 2 has been added to the host configuration information. After the host configuration information is obtained, a pop-up window will display "Host configuration information obtained successfully" in the console interface. Then, by combining the obtained host configuration information, container code template, and extension library code template, compilation and packaging can be performed to obtain the container integration installation package.
[0148] The method described above for obtaining the container integration installation package involves compiling and packaging the package together with host configuration information, container code templates, and extension library code templates. The inclusion of host configuration information ensures that the resulting container integration installation package contains execution credentials that allow the host application to legally use the mini-program container. This proves that the host application subsequently installed based on this package has the legitimate identity to run the mini-program container. This enhances the security of the mini-program container itself, preventing unauthorized use and enabling the mini-program container to operate and maintain normally based on the host configuration information.
[0149] The aforementioned phrase, "combining host configuration information, compiles the container code template and extension library code template, and packages them to obtain the container integration installation package for the container configuration task," refers to the execution credentials for the host application's corresponding mini-program container integration. The integration process for the mini-program container involves two aspects: the mini-program container itself and the extension libraries that provide mini-program functionality. For both aspects, corresponding credentials (a first type of credential involving the mini-program container and a second type of credential involving the extension library) can be set to determine permissions or legitimacy. In obtaining the container integration installation package, these credentials can be added to the corresponding code template, and then compiled and packaged to obtain the container integration installation package. Therefore, in one possible implementation, the method for obtaining the container integration installation package is as follows:
[0150] The first method, when the host configuration information only includes the first type of credential, is as follows:
[0151] B1: When the host configuration information includes the first type of credential, add the first type of credential to the container code template to obtain the target container code template; compile the target container code template and the extension library code template to package the container integration installation package of the container configuration task.
[0152] It should be noted that, depending on the actual situation and application scenario, the content in the host configuration information may include only the first type of credentials involving the mini-program container or the second type of credentials involving the extension library, or it may include both the first type of credentials involving the mini-program container and the second type of credentials involving the extension library.
[0153] The first type of credential is the execution credential corresponding to the mini-program container. It is used to determine whether the host application has the permission to perform operations on the mini-program container, including integration, invocation, and execution. This first type of credential can be presented in the form of a key, such as the network channel key and kernel file key mentioned earlier. Multiple different execution credentials can be included in this first type of credential.
[0154] The aforementioned container code template refers to a code template adapted to the information of the mini-program container. The container code template includes general code snippets and code snippets adapted to the mini-program container information. For the first type of credential corresponding to the mini-program container, before compiling the container code template and extension library code template in conjunction with host configuration information to obtain the container integration installation package for the container configuration task, the location of the code snippets in the container code template that involve content related to the first type of credential can be determined, and that content can be added to that location to obtain the target container code template.
[0155] For example, suppose the first type of credential corresponding to the mini-program container includes a network channel key. To improve compilation efficiency, before compiling the container code template and extension library code template in conjunction with the host configuration information and packaging them into the container integration installation package of the container configuration task, the first type of credential needs to be added to the container code template. When the first type of credential includes a network channel key, this network channel key needs to be added to the container code template. This can be done by determining the relevant position of the network channel key in the container code template; the relevant position can be understood as the location where the network channel key is to be added. Then, the network channel key is added at that relevant position to obtain the target container code template.
[0156] Once the target container code template is obtained, it and the extension library code template are compiled and packaged to obtain the container integration installation package for the container configuration task. This container integration installation package will contain information related to the first type of credential associated with the mini-program container. When this package is subsequently downloaded and installed, a host application integrating the mini-program container will be obtained, and this host application will contain the first type of credential associated with the mini-program container, enabling the invocation of the mini-program container.
[0157] The second method, when the host configuration information only includes the second type of credential, is as follows:
[0158] B2: When the host configuration information includes the second type of credential, add the second type of credential to the extension library code template to obtain the target extension library code template; compile the container code template and the target extension library code template to package the container integration installation package of the container configuration task.
[0159] The second type of credential refers to the execution credential corresponding to the extension library. This credential is used to determine whether the host application has the permission to use the extension library to provide mini-program functionality to the mini-program container. This second type of credential can include execution credentials corresponding to various extension libraries. These execution credentials are used to determine the host application's permission to call functions in the extension library and grant them to the mini-program container. For example, these execution credentials may include execution credentials for display functions, voice functions, and location functions.
[0160] As mentioned earlier, the extension library code template is a code template adapted to the extension library information. It can include some common code snippets, as well as code snippets adapted to the extension library code information. For the second type of credential corresponding to the extension library, before compiling the container code template and the extension library code template in conjunction with the host configuration information to obtain the container integration installation package for the container configuration task, the location in the extension library code template where the code snippets involve content related to the second type of credential can be determined. This content is then added to that location to obtain the target extension library code template.
[0161] For example, suppose the second type of credentials for the extension library includes execution credentials for both display and voice functions. Before compiling the container code template and extension library code template together with the host configuration information to obtain the container integration installation package for the container configuration task, the second type of credentials need to be added to the extension library code template. The specific addition process involves determining the relevant positions of the display and voice functions within the extension library code template. These relevant positions can be understood as the implementation locations of the corresponding functions. For instance, if the implementation location of the display function is between lines 100 and 200 in the extension library code template, then the location to be added for the execution credentials of this display function needs to be determined within lines 100 to 200 and added accordingly to obtain the target extension library code template.
[0162] Once the target extension library code template is obtained, the container code template and the target extension library code template are compiled and packaged to obtain the container integration installation package for the container configuration task. At this time, the container integration installation package of the container configuration task will contain information about the second type of credentials related to the extension library. When the container integration installation package is downloaded and installed subsequently, a host application integrating the extension library can be obtained. The host application contains information about the second type of credentials related to the extension library, enabling the invocation of the mini-program functions in the extension library.
[0163] The third method, when the host configuration information includes both Type 1 and Type 2 credentials, is as follows:
[0164] Add the first type of credentials to the container code template to obtain the target container code template. Add the second type of credentials to the extension library code template to obtain the target extension library code template. Compile the target container code template and the target extension library code template to package them into a container integration installation package for the container configuration task.
[0165] After adding the first and second types of credentials as described above, the target container code template and the target extension library code template can be obtained. Compiling these templates results in the container integration installation package of the packaged container configuration task containing information related to the first type of credentials for the mini-program container and information related to the second type of credentials for the extension library. When this container integration installation package is subsequently downloaded and installed, a host application integrating the mini-program container can be obtained. This host application contains information related to the first type of credentials for the mini-program container and information related to the second type of credentials for the extension library, enabling the invocation of mini-program functions within the mini-program container and the extension library.
[0166] The aforementioned Type I and Type II credentials can both be considered static information, which refers to information that does not change during the runtime of the host application. That is, when a host application integrating a mini-program container is installed based on a compiled and packaged container integration installation package, the information related to the Type I and Type II credentials in the host application generally does not change during runtime. This is because the Type I and Type II credentials, as host configuration information, are used to identify the host application's operational permissions to the mini-program container and its usage permissions for mini-program functions in the extension library. The Type I and Type II credentials restrict and determine the scope of operation or applicability of the host application regarding the mini-program container and extension library. Adjusting this static information, such as the Type I and Type II credentials, during runtime would involve changes to usage permissions. To ensure the stability of the host application's operation, static information is generally not modified.
[0167] After the addition of the first or second type of credential is completed, when the program in the target container code template or target extension library code template is executed, upon reading the added first or second type of credential, it can be clearly determined that the host application has the usage permissions of the mini-program container corresponding to the first type of credential and the extension library corresponding to the second type of credential.
[0168] Figure 9 This application provides a schematic diagram illustrating the process of obtaining a container integration installation package involving credential addition, as shown in the embodiment. Figure 9As shown, the container configuration task displayed in the console interface involves mini-program container information and host configuration information. The host configuration information includes a first type of credential related to the mini-program container and a second type of credential related to the extension library. The image shows "First Type of Credential" and "Second Type of Credential" as options, with the second type of credential selected. This means that the second type of credential information will be involved in obtaining the container integration installation package. Once the host configuration information is set, the console interface will display the message "Host configuration information acquisition complete!". Next, the obtained second type of credential related to the extension library needs to be added to the extension library code template to obtain the target extension library code template. The target extension library code template and the container code template are then compiled and packaged to obtain the container integration installation package.
[0169] The method described above for obtaining a container integration installation package allows for the following steps: when the host configuration information involves the first type of credential for the mini-program container and / or the second type of credential for the extension library, the first type of credential is added to the container code template to obtain the target container code template before compilation and packaging to obtain the container integration installation package. Similarly, the second type of credential is added to the extension library code template to obtain the target extension library code template. This allows for the addition of both types of credentials before compilation, improving compilation and packaging efficiency. Furthermore, since both types of credentials are static information, they generally remain unchanged during the subsequent operation of the host application, thus ensuring the stability of the host application to a certain extent.
[0170] The aforementioned B1 and B2 mention "adding the first type of credential to the container code template to obtain the target container code template" and "adding the second type of credential to the extension library code template to obtain the target extension library code template." To enable the code templates to adapt to different scenarios and needs, placeholder identifiers can be set in the container code template and the extension library code template. In practical applications, the placeholder identifiers are replaced according to the actual situation (e.g., the first type of credential and the second type of credential), thereby generating the target container code template and the target extension library code template with the expected content and function. Therefore, in one possible implementation, the method for obtaining the target container code template is: obtaining the first placeholder identifier corresponding to the first type of credential from the container code template, replacing the first placeholder identifier with the first type of credential, and obtaining the target container code template.
[0171] Placeholder identifiers are used to indicate a position or value in a code template that will be determined later. They act as placeholders in the code template, marking a location that needs to be replaced or filled, and are typically replaced by a specific value, variable, expression, or object in subsequent processing. In this embodiment, the placeholder identifier will be replaced by a first type of credential and a second type of credential. There is a correspondence between the placeholder identifier and the content to be replaced.
[0172] As mentioned earlier, the first type of credential is used to determine whether the host application has the permission to perform operations on the mini-program container. It can be presented in the form of a key, such as a network channel key or a kernel file key. When the host application possesses the first type of credential corresponding to the mini-program container, it can access and invoke the integrated mini-program container. When it is necessary to add the first type of credential to the container code template, a first placeholder identifier corresponding to the first type of credential is obtained from the container code template. Then, the first placeholder identifier is replaced with the first type of credential to obtain the target container code template. For example, assuming the first type of credential refers to a network channel key, when it is necessary to add the network channel key to the container code template, the first placeholder identifier corresponding to the network channel key needs to be obtained, and then the network channel key is used to replace the first placeholder identifier to obtain the target container code template.
[0173] For example, suppose the first type of credential is a network channel key, and the container code template contains the following code: Tcmpp.getInstance().setProperties("KEY_NET_WORK").
[0174] The "KEY_NET_WORK" is a placeholder identifier (representing the network channel key). When the network channel key needs to be added to the container code template, the placeholder identifier "KEY_NET_WORK" will be replaced with the actual network channel key value. When setting the placeholder identifier, its placement in the container code template needs to be considered to ensure that the code corresponding to the placeholder identifier can still execute correctly after being replaced by different network channel keys. In other words, the position of the placeholder identifier needs to be precisely set to ensure the normal operation of the subsequent container code template.
[0175] In one possible implementation, the method for obtaining the target extension library code template is as follows: obtain the second placeholder identifier corresponding to the second type of credential from the extension library code template; replace the second placeholder identifier with the second type of credential to obtain the target extension library code template.
[0176] The aforementioned second type of credential is used to determine whether the host application has the permission to provide mini-program functionality to the mini-program container using the extension library. For example, this second type of credential may include a live streaming component key, a display component key, etc. When the host application possesses the execution credential corresponding to the mini-program functionality, it means that the host application can run the corresponding mini-program functionality package in the extension library based on this second type of credential.
[0177] When a second type of credential needs to be added to an extension library code template, a second placeholder identifier corresponding to that second type of credential is retrieved from the extension library code template. This second placeholder identifier is then replaced with the second type of credential to obtain the target extension library code template. For example, assuming the second type of credential refers to a display component key, when adding that display component key to the extension library code template, the second placeholder identifier corresponding to that display component key needs to be retrieved, and then replaced with the display component key to obtain the target extension library code template.
[0178] The method described above for obtaining the target container code template and the target extension library code template involves retrieving the first placeholder identifier corresponding to the first type of credential from the container code template and the second placeholder identifier corresponding to the second type of credential from the extension library code template. By replacing the first and second placeholder identifiers, the first type of credential is added to the container code template and the second type of credential is added to the extension library code template, resulting in the target container code template and the target extension library code template. Based on the correspondence between the first placeholder identifier and the first type of credential, and between the second placeholder identifier and the second type of credential in the code template, accurate addition of the first and second types of credentials to the container code template and the extension library template can be achieved. This improves the efficiency of obtaining the target container code template and the target extension library code template to a certain extent, thereby improving the efficiency of compiling and packaging into a container integration installation package.
[0179] The foregoing section described in detail the method for obtaining the container integration installation package, and explained that the mini-program container and its extension library can include multiple version options, with different version options corresponding to different versions. Therefore, it can be understood that in this embodiment, both the mini-program container and its extension library (i.e., the container integration component) can undergo version updates. If the version update of the mini-program container and its extension library occurs after compiling and packaging to obtain the container integration installation package, then the target code template corresponding to the updated version of the mini-program container and its extension library can be combined with the originally obtained container integration installation package for compilation and packaging to obtain a container integration installation package that has updated any one of the mini-program container or its extension library. Therefore, in one possible implementation, the method for updating the container integration component to obtain the container integration installation package is as follows:
[0180] C1: In response to a version update of the container integration component, an update notification message is generated for the host application.
[0181] The aforementioned container integration component includes at least one of the following: a mini-program container or an extension library. Specifically, the version update can be for the mini-program container, the extension library, or both. When the container integration component's version is updated, an update notification message is generated to inform the host application. This update notification message is used to inform the host application that the container integration component has been updated.
[0182] C2: In response to the confirmed update instruction returned for the update prompt information, invoke the target code template corresponding to the updated version of the container integration component.
[0183] When the host application receives the update prompt message, it can return one of two indications: a confirm update indication or a reject update indication. If the host application returns a confirm update indication, it needs to call the target code template corresponding to the updated version of the container integration component. This target code template, after compilation and packaging, can enable the execution of the corresponding updated version of the container integration component.
[0184] Figure 10 This is a schematic diagram illustrating a version update provided in an embodiment of this application, such as... Figure 10 As shown in the example, after obtaining and installing the container integration package based on the container configuration task, resulting in a host application integrated with the mini-program container, suppose the mini-program container undergoes a version update. When the container integration package was generated, the integrated mini-program container was version 1.0. Now, the mini-program container has been updated to version 2.0. At this point, an update notification message is generated for the host application. This update notification message... Figure 10 (a) is illustrated with the words "Mini Program container version 2.0 has been released, do you want to update?". Figure 10 In (b) of the code, when "Confirm Update" is selected, it indicates that the host application has returned a confirmation update instruction in response to the update prompt. At this point, the target code template corresponding to version 2.0 of the mini-program container needs to be invoked.
[0185] C3: Compile according to the target code template and package to obtain the container integration installation package that updates the container integration components.
[0186] Compiling the obtained target code template and packaging it yields a container integration installation package with the updated container integration components. Compiling and packaging the target code template is the process of packaging the updated container integration components into an installable software package. This compiled and packaged updated version of the container integration components allows for version updates of the original container integration installation package.
[0187] The version update method described above allows for the creation of a container integration installation package when a container integration component undergoes a version update and a definite update instruction is received. This means that the target code template corresponding to the updated version of the container integration component can be invoked, and the packaged installation package can be obtained by compiling and packaging the updated component. Therefore, when a version update of the container integration component exists, the pre-compiled container integration component is used in the installation package, eliminating the need to directly modify the code of the original installation package. This reduces modification costs and improves the efficiency of version updates.
[0188] Figure 11 A flowchart for obtaining a container integration installation package is provided in an embodiment of this application, such as... Figure 11 As shown, two execution objects are involved: the mini-program container platform and the user. The process of obtaining the container integration installation package takes place on the mini-program container platform; the user only needs to access the obtained container integration installation package. During the process of obtaining the container integration installation package, information about the host application needs to be configured, such as the package name and modular configuration information. Then, information about the container configuration task needs to be configured, including mini-program container information (Mini-program container SDK (Software Development Kit)) and the host application's extension library information (including version information in the mini-program container information and extension library information). When the host application has unique mini-program functions or functional implementation materials for mini-program functions, host extension data needs to be set (this can be achieved by uploading). After completing the above settings, the corresponding container code template and extension library code template can be called to compile and package the container integration installation package.
[0189] Figure 12 The module diagram for obtaining a container integration installation package provided in this application embodiment is shown in the figure. Specifically, it includes template management, main package management, SDK management, backend API management, application management, application custom interface management, application generation, and an internal compiler. These are described in detail below:
[0190] Template Management: Used for version management and association configuration of container code templates and extension library code templates.
[0191] Main package management: Used for uploading and managing the host installation package. If a host installation package exists, it will be repackaged and a new container integrated installation package will be generated when the integrated container installation package is generated. If no host installation package exists, the container integrated installation package of the integrated mini-program container will be directly exported as the artifact.
[0192] SDK Management: Manages and configures the version of the container code template and the version information of the extension library code template for the mini-program container. Different versions correspond to different code templates.
[0193] Backend API Management: By configuring the API name and API access path (i.e., interface configuration parameters), the host application can call the mini-program container and extension library.
[0194] Application Management: Configure the host application's name, package name, and dependent libraries through application management. Generate a configuration file and dependency record table for the host application, which are used when compiling and packaging the container integration installation package for the container configuration task.
[0195] Application Custom Interface Management: Used to configure the host interface configuration parameters and host extended data of the mini-program container. The host extended data requires a name and file upload; the host interface configuration parameters require the API name, as well as the corresponding backend interface (API), access parameters, and return value.
[0196] Application generation module: Through container code templates and extension library code templates, it compiles and packages container integrated installation packages based on container configuration task information: It replaces placeholders in the template code with host configuration information and uses the compiler to compile and package the container integrated installation package.
[0197] Built-in compiler: compiles and packages the containerized installation package, and handles the unpacking and repacking of the host installation package.
[0198] Figure 13 The figure shows a schematic diagram of a template provided in this application embodiment. The templates involved in this application embodiment include: initialization code template, interface code template, proxy module template, container code template, and extension library code template.
[0199] Initialization code template: The initialization code template is the source code related to the initialization of the mini-program container. It is related to the mini-program container's version information and extended libraries. When compiling and packaging the container integration installation package, the corresponding implementation code is retrieved from the pre-defined (version-implementation code) mapping relationship based on the version information in the mini-program container and extended library information. This implementation code is then filled into the initialization code template, resulting in the container code template and the extended library code template.
[0200] Interface code template: When the host application needs to upload host-extended data, it's necessary to set parameters for calling the host-extended data (i.e., host interface configuration parameters). Modifying the host interface configuration parameters to the interface code template ensures that the modified template includes the corresponding information. The host interface configuration parameters include: API name, backend interface service address, interface access parameters, and result parameters.
[0201] Extension library code templates: These templates contain code templates for mini-program capabilities (such as scanning, location services, etc.) provided for the mini-program container. The extension library code templates establish dependencies between the host application and the extension library, as well as between the host application and the mini-program container, through the setting of interface configuration parameters.
[0202] The proxy module template is for embedding the proxy module of the mini-program container into the encoding context of the host application's installation data. The proxy module is only enabled when the host application integrates the mini-program container. It is enabled by embedding the mini-program's proxy module (compiled into a binary file) into the encoding context of the host application's installation data through ASM, thereby initializing the configuration of the mini-program container.
[0203] Container code template: This is a code template adapted to the mini-program container information. The container code template can include some common code snippets, as well as code snippets adapted to the mini-program container information.
[0204] Figure 14 The present application provides another flowchart for obtaining a container integration installation package, as shown in the figure, which involves the following steps:
[0205] D1: Establishing Dependencies.
[0206] Dependencies can be established based on the interface configuration parameters. These parameters are used to call the mini-program container and extension library. Based on the corresponding dependencies, the code template of the mini-program container is matched from the pre-defined code templates. The interface configuration parameters are added to the configuration file (i.e., the interface code template) `build.gradle`. This is done by reading the `dependencies` node from the `build.gradle` file and writing the dependencies (i.e., the host interface configuration parameters) into the `dependencies` node via text.
[0207] D2: Extract the initialization code template.
[0208] Based on the obtained version information of the mini-program container, the initialization code template of the mini-program container corresponding to that version information is extracted from the code template.
[0209] D3: Obtain host configuration information.
[0210] The host configuration information includes at least one of the following: either a Type I credential related to the mini-program container or a Type II credential related to the extension library. It retrieves configuration information such as the application package name, network channel key, kernel file key, and live streaming component key.
[0211] D4: Placeholder identifier replacement.
[0212] When the first and second types of credentials are obtained from the host configuration information, the first placeholder identifier corresponding to the first type of credential is retrieved from the container code template, and the second placeholder identifier corresponding to the second type of credential is retrieved from the extension library code template. The first placeholder identifier is replaced with the first type of credential to obtain the target container code template. The second placeholder identifier is replaced with the second type of credential to obtain the target extension library code template.
[0213] D5: Compile and package.
[0214] After replacing the placeholder identifiers, the compilation of the container integration installation package begins. At this point, the container code template of the host application's mini-program container has completed initialization and parameter configuration.
[0215] D6: Add host extended data.
[0216] During compilation, the compiler modifies the bytecode file to implant extended data into the host.
[0217] D7: Implantation of the proxy module.
[0218] If a host installation package exists, it will be unpacked and the proxy module of the mini-program container will be injected into the encoding context of the host installation data, thereby realizing the modular loading of the mini-program container.
[0219] In the foregoing Figure 1-14 Based on the corresponding embodiments, Figure 15 This is a schematic diagram of a data processing apparatus provided in an embodiment of the present application. The data processing apparatus 1500 includes: an acquisition module 1501, a calling module 1502, and a packaging module 1503.
[0220] The acquisition module 1501 is used to acquire the mini-program container information and the extended library information of the host application through the console interface. The host application is the application to be integrated with the mini-program container. The mini-program container is used to provide the running environment for executing the mini-program. The extended library information identifies the extended library used by the mini-program container to provide mini-program functions for the mini-program.
[0221] The calling module 1502 is used to respond to the completion operation of obtaining the container configuration task through the console interface, call the container code template corresponding to the mini-program container information, and call the extension library code template corresponding to the extension library information;
[0222] The packaging module 1503 is used to compile the container code template and the extension library code template to package the container configuration task into a container integration installation package, which is used to install the host application that integrates the mini-program container.
[0223] In one possible implementation, the device includes an installation package acquisition module, which is used to: acquire the host installation package of the host application through the console interface;
[0224] The packaging module 1503 is used for:
[0225] The host installation package is unpacked to obtain the host installation data of the host application;
[0226] By compiling the host installation data, the container code template, and the extension library code template, a container integration installation package for the container configuration task is obtained.
[0227] In one possible implementation, the apparatus further includes an implantation module, which, before compiling and packaging the host installation data, the container code template, and the extension library code template to obtain the container integration installation package of the container configuration task, is used to:
[0228] A proxy module for the mini-program container is embedded in the encoding context of the host installation data. The encoding context is used to identify the runtime state information of the host application, and the proxy module is used to pass the state information to the mini-program container.
[0229] In one possible implementation, the device further includes a configuration information acquisition module, which is used to:
[0230] The host configuration information of the host application is obtained through the console interface. The host configuration information is used to identify the execution credentials integrated into the mini-program container corresponding to the host application.
[0231] The packaging module 1503 is used for:
[0232] Based on the host configuration information, the container code template and the extension library code template are compiled and packaged to obtain the container integration installation package of the container configuration task.
[0233] In one possible implementation, the host configuration information includes at least one of a first type of credential relating to the mini-program container or a second type of credential relating to the extension library, and the packaging module 1503 is used for:
[0234] When the host configuration information includes the first type of credential, the first type of credential is added to the container code template to obtain the target container code template;
[0235] By compiling the target container code template and the extension library code template, a container integration installation package for the container configuration task is obtained;
[0236] or,
[0237] When the host configuration information includes the second type of credential, the second type of credential is added to the extension library code template to obtain the target extension library code template;
[0238] By compiling the container code template and the target extension library code template, the container integration installation package of the container configuration task is obtained.
[0239] In one possible implementation, the packaging module 1503 is used for:
[0240] Obtain the first placeholder identifier corresponding to the first type of credential from the container code template;
[0241] Replace the first placeholder identifier with the first type of credential to obtain the target container code template;
[0242] The packaging module 1503 is used for:
[0243] Obtain the second placeholder identifier corresponding to the second type of credential from the extended library code template;
[0244] Replace the second placeholder identifier with the second type of credential to obtain the target extension library code template.
[0245] In one possible implementation, the device further includes a display module, the display module being used for:
[0246] The console interface displays option subpages for the mini-program container and the extension library. In the option subpages, there are multiple version options for the mini-program container and multiple version options for the extension library.
[0247] The acquisition module 1501 is used for:
[0248] In response to the selection of a first version option among multiple version options for the mini-program container, the mini-program container information is determined to identify the version of the mini-program container corresponding to the first version option;
[0249] In response to the selection of a second version option for the target extension library in the extension library, the extension library information is determined to identify the target extension library version corresponding to the second version option.
[0250] In one possible implementation, the apparatus further includes a mapping relationship establishment module, which is used to:
[0251] Establish a mapping relationship between different versions and implementation code of different versions. The implementation code is the code used to run the mini-program container or the extension library. The version is used to identify the version of the mini-program container or the extension library.
[0252] The calling module 1502 is used for:
[0253] The mapping relationship is found according to the version corresponding to the first version option, and the first implementation code indicated by the mapping relationship is called;
[0254] The first implementation code is filled into the initialization code template to obtain the container code template;
[0255] The calling module 1502 is used for:
[0256] The mapping relationship is found according to the version corresponding to the second version option, and the second implementation code indicated by the mapping relationship is called;
[0257] The second implementation code is filled into the initialization code template to obtain the extension library code template.
[0258] In one possible implementation, the device further includes a parameter acquisition module, the parameter acquisition module being used for:
[0259] The interface configuration parameters are obtained through the console interface. These interface configuration parameters are used to call the mini-program container and the extension library.
[0260] The packaging module 1503 is used for:
[0261] By compiling the interface configuration parameters, the container code template, and the extension library code template, a container integration installation package for the container configuration task is obtained.
[0262] In one possible implementation, when the extension library identified by the extension library information includes a basic extension library provided by the console interface and host extension data provided by the host application, the host extension data includes at least one of a host extension library or host extension materials provided by the host application. The mini-program functions provided by the host extension library are different from the mini-program functions provided by the basic extension library. The host extension materials are used in the mini-program functions provided by the basic extension library. The device further includes an upload module, which is used for:
[0263] The host extended data uploaded by the host application can be obtained through the console interface.
[0264] In one possible implementation, the apparatus further includes a compilation module, the compilation module being used for:
[0265] The host interface configuration parameters provided by the host application are obtained through the console interface. These host interface configuration parameters are used to call the host extended data.
[0266] During the process of compiling the host installation data, the container code template, and the extension library code template, an interface code template for the host interface configuration parameters is obtained.
[0267] Modify the host interface configuration parameters into the interface code template to obtain the modified interface code template;
[0268] The modified interface code template is compiled during the compilation process.
[0269] In one possible implementation, the apparatus further includes an update module, the update module being used to:
[0270] In response to a version update of the container integration component, an update prompt message is generated for the host application. The container integration component includes at least one of the mini-program container or the extension library.
[0271] In response to the confirmed update instruction returned for the update prompt information, the target code template corresponding to the updated version of the container integration component is invoked;
[0272] The target code template is compiled and packaged to obtain a container integration installation package that updates the container integration components.
[0273] As can be seen from the data processing device provided above, for the container configuration task of integrating a mini-program container into a host application, the mini-program container information and extension library information configured by the host application can be obtained through the console interface. When it is confirmed through the console interface that the container configuration task has been completed, a container integration installation package can be automatically compiled and packaged for installation into the host application that integrates the mini-program container. Specifically, since the obtained mini-program container information identifies the mini-program container to be integrated into the host application, and the extension library information identifies the extension libraries managed by the host application, which provide mini-program functionality for the mini-programs residing in the container, the container code templates and extension library code templates required by the container configuration task can be called based on this, and these code templates can be compiled and packaged. Therefore, the host application that needs to integrate the mini-program container only needs to configure its required mini-program container information and extension library information through the console interface. After configuration, it can obtain an automatically compiled and packaged container integration installation package. The entire process is simple and efficient, greatly reducing the development difficulty and technical threshold for the host application, and effectively improving the integration efficiency of the mini-program container.
[0274] This application also provides a computer device, including a terminal device or a server, in which the aforementioned data processing apparatus can be configured. The computer device will now be described in conjunction with the accompanying drawings.
[0275] If the computer device is a terminal device, please refer to Figure 16 As shown, this application provides a terminal device, taking a mobile phone as an example:
[0276] Figure 16 The diagram shown is a block diagram of a portion of the structure of a mobile phone provided in an embodiment of this application. (Reference) Figure 16 The mobile phone includes components such as a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a Wi-Fi module 1470, a processor 1480, and a power supply 1490. Those skilled in the art will understand that... Figure 16 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0277] The following is combined Figure 16 A detailed introduction to each component of a mobile phone:
[0278] The RF circuit 1410 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 1480; in addition, it transmits uplink data to the base station.
[0279] The memory 1420 can be used to store software programs and modules. The processor 1480 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 1420. The memory 1420 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 1420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0280] The input unit 1430 can be used to receive input numeric or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432.
[0281] The display unit 1440 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1440 may include a display panel 1441.
[0282] The mobile phone may also include at least one sensor 1450, such as a light sensor, a motion sensor, and other sensors.
[0283] Audio circuitry 1460, speaker 1461, and microphone 1462 provide an audio interface between the user and the mobile phone.
[0284] WiFi is a short-range wireless transmission technology. Through the WiFi module 1470, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access.
[0285] The processor 1480 is the control center of the mobile phone. It connects various parts of the mobile phone through various interfaces and lines. It performs various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1420 and calling data stored in the memory 1420.
[0286] The mobile phone also includes a power supply 1490 (such as a battery) that powers the various components.
[0287] In this embodiment, the processor 1480 included in the terminal device is also used to execute the steps in the methods of the various embodiments of this application.
[0288] If the computer device is a server, this application embodiment also provides a server; please refer to [link to relevant documentation]. Figure 17 As shown, Figure 17 This is a structural diagram of a server 1500 provided in an embodiment of this application. The server 1500 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1522 (e.g., one or more processors) and a memory 1532, and one or more storage media 1530 (e.g., one or more mass storage devices) for storing application programs 1542 or data 1544. The memory 1532 and storage media 1530 can be temporary or persistent storage. The program stored in the storage media 1530 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 1522 may be configured to communicate with the storage media 1530 and execute the series of instruction operations in the storage media 1530 on the server 1500.
[0289] Server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input / output interfaces 1558, and / or one or more operating systems 1541, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0290] The steps performed by the server in the above embodiments can be based on Figure 17 The server structure shown.
[0291] In addition, this application embodiment also provides a storage medium for storing a computer program for executing the method provided in the above embodiment.
[0292] This application also provides a computer program product including a computer program, which, when run on a computer device, causes the computer device to perform the method provided in the above embodiments.
[0293] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk or optical disk, and other media that can store computer programs.
[0294] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0295] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0296] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Moreover, based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data processing method, characterized in that, The method includes: The console interface retrieves the mini-program container information and the host application's extension library information for the container configuration task. The host application is the application to be integrated with the mini-program container. The mini-program container is used to provide the runtime environment for executing the mini-program. The extension library information identifies the extension library used by the mini-program container to provide mini-program functions for the mini-program. In response to the completion operation of obtaining the container configuration task through the console interface, the container code template corresponding to the mini-program container information is invoked, and the extension library code template corresponding to the extension library information is invoked. By compiling the container code template and the extension library code template, a container integration installation package for the container configuration task is obtained. The container integration installation package is used to install a host application that integrates the mini-program container.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the host installation package of the host application through the console interface; The process of compiling the container code template and the extension library code template to package the container configuration task into a container integration installation package includes: The host installation package is unpacked to obtain the host installation data of the host application; By compiling the host installation data, the container code template, and the extension library code template, a container integration installation package for the container configuration task is obtained.
3. The method according to claim 2, characterized in that, Before compiling and packaging the host installation data, the container code template, and the extension library code template to obtain the container integration installation package for the container configuration task, the method further includes: A proxy module for the mini-program container is embedded in the encoding context of the host installation data. The encoding context is used to identify the runtime state information of the host application, and the proxy module is used to pass the state information to the mini-program container.
4. The method according to claim 1, characterized in that, The method further includes: The host configuration information of the host application is obtained through the console interface. The host configuration information is used to identify the execution credentials integrated into the mini-program container corresponding to the host application. The process of compiling the container code template and the extension library code template to package the container configuration task into a container integration installation package includes: Based on the host configuration information, the container code template and the extension library code template are compiled and packaged to obtain the container integration installation package of the container configuration task.
5. The method according to claim 4, characterized in that, The host configuration information includes at least one of a first type of credential involving the mini-program container or a second type of credential involving the extension library. The process involves compiling the container code template and the extension library code template using the host configuration information, and packaging them to obtain the container integration installation package for the container configuration task, including: When the host configuration information includes the first type of credential, the first type of credential is added to the container code template to obtain the target container code template; By compiling the target container code template and the extension library code template, a container integration installation package for the container configuration task is obtained; or, When the host configuration information includes the second type of credential, the second type of credential is added to the extension library code template to obtain the target extension library code template; By compiling the container code template and the target extension library code template, the container integration installation package of the container configuration task is obtained.
6. The method according to claim 5, characterized in that, Adding the first type of credential to the container code template to obtain the target container code template includes: Obtain the first placeholder identifier corresponding to the first type of credential from the container code template; Replace the first placeholder identifier with the first type of credential to obtain the target container code template; Adding the second type of credential to the extension library code template to obtain the target extension library code template includes: Obtain the second placeholder identifier corresponding to the second type of credential from the extended library code template; Replace the second placeholder identifier with the second type of credential to obtain the target extension library code template.
7. The method according to claim 1, characterized in that, The method further includes: The console interface displays option subpages for the mini-program container and the extension library. In the option subpages, there are multiple version options for the mini-program container and multiple version options for the extension library. The process of obtaining the mini-program container information and the host application's extension library information through the console interface includes: In response to the selection of a first version option among multiple version options for the mini-program container, the mini-program container information is determined to identify the version of the mini-program container corresponding to the first version option; In response to the selection of a second version option for the target extension library in the extension library, the extension library information is determined to identify the target extension library version corresponding to the second version option.
8. The method according to claim 7, characterized in that, The method further includes: Establish a mapping relationship between different versions and implementation code of different versions. The implementation code is the code used to run the mini-program container or the extension library. The version is used to identify the version of the mini-program container or the extension library. The method of calling the container code template corresponding to the mini-program container information includes: The mapping relationship is found according to the version corresponding to the first version option, and the first implementation code indicated by the mapping relationship is called; The first implementation code is filled into the initialization code template to obtain the container code template; The extension library code template corresponding to the extension library information includes: The mapping relationship is found according to the version corresponding to the second version option, and the second implementation code indicated by the mapping relationship is called; The second implementation code is filled into the initialization code template to obtain the extension library code template.
9. The method according to claim 1, characterized in that, The method further includes: The interface configuration parameters are obtained through the console interface. These interface configuration parameters are used to call the mini-program container and the extension library. The process of compiling the container code template and the extension library code template to package the container configuration task into a container integration installation package includes: By compiling the interface configuration parameters, the container code template, and the extension library code template, a container integration installation package for the container configuration task is obtained.
10. The method according to any one of claims 1-9, characterized in that, When the extension library identified by the extension library information includes a basic extension library provided by the console interface and host extension data provided by the host application, the host extension data includes at least one of the host extension library or host extension material provided by the host application. The mini-program functions provided by the host extension library to the mini-program are different from the mini-program functions provided by the basic extension library to the mini-program. The host extension material is used in the mini-program functions provided by the basic extension library to the mini-program. The method further includes: The host extended data uploaded by the host application can be obtained through the console interface.
11. The method according to claim 10, characterized in that, The method further includes: The host interface configuration parameters provided by the host application are obtained through the console interface. These host interface configuration parameters are used to call the host extended data. During the process of compiling the host installation data, the container code template, and the extension library code template, an interface code template for the host interface configuration parameters is obtained. Modify the host interface configuration parameters into the interface code template to obtain the modified interface code template; The modified interface code template is compiled during the compilation process.
12. The method according to any one of claims 1-9, characterized in that, The method further includes: In response to a version update of the container integration component, an update prompt message is generated for the host application. The container integration component includes at least one of the mini-program container or the extension library. In response to the confirmed update instruction returned for the update prompt information, the target code template corresponding to the updated version of the container integration component is invoked; The target code template is compiled and packaged to obtain a container integration installation package that updates the container integration components.
13. A data processing apparatus, characterized in that, The device includes: an acquisition module, a calling module, and a packaging module; The acquisition module is used to acquire the mini-program container information and the extension library information of the host application through the console interface. The host application is the application to be integrated with the mini-program container. The mini-program container is used to provide the runtime environment for executing the mini-program. The extension library information identifies the extension library used by the mini-program container to provide mini-program functions for the mini-program. The calling module is used to respond to the completion operation of obtaining the container configuration task through the console interface, call the container code template corresponding to the mini-program container information, and call the extension library code template corresponding to the extension library information; The packaging module is used to compile the container code template and the extension library code template to package the container configuration task into a container integration installation package, which is used to install the host application that integrates the mini-program container.
14. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store computer programs; The processor is configured to perform the method according to any one of claims 1-12 according to the computer program.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when executed by a computer device, performs the method described in any one of claims 1-12.
16. A computer program product comprising a computer program, which, when run on a computer device, causes the computer device to perform the method of any one of claims 1-12.