A shared program generation method and device, computer equipment and storage medium

By determining the environment and version information of the target shared program, and obtaining and merging the compilation data packages of different programs, the problem of long page jump times when multiple programs are shared is solved, and the efficiency and security of shared program generation are improved.

CN115951924BActive Publication Date: 2026-05-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-10-09
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, the navigation time for sharing pages between multiple programs is too long, and generating shared programs requires obtaining permissions and different program frameworks, resulting in low generation efficiency.

Method used

By determining the environment and version information required by the target shared program, a set of compilation data packages for different programs is obtained, and the matching compilation data packages are merged to generate a target shared program that can access the interfaces of different programs.

Benefits of technology

It improves the efficiency of generating shareware, ensuring that shareware can be generated safely and efficiently even offline, and enabling real-time online generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115951924B_ABST
    Figure CN115951924B_ABST
Patent Text Reader

Abstract

The application discloses a shared program generation method and device, computer equipment and a storage medium, and is applied to the technical field of application. The method comprises the following steps: determining target environment information and target version information; obtaining a first compilation data packet set of a first shared program; obtaining a second compilation data packet set of a second shared program; determining a first target compilation data packet from the first compilation data packet set and a second target compilation data packet from the second compilation data packet set based on the target environment information and the target version information; and performing merging processing on a to-be-processed shared program based on the first target compilation data packet and the second target compilation data packet to generate a target shared program. Through the above method, the compilation data packet matched with the target environment information and the target version information of each program can be determined to generate a target shared program which can access different program interfaces, so that the efficiency of generating a shared program is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of application technology, and in particular to a method and apparatus for generating shared programs, computer equipment, and storage medium. Background Technology

[0002] There are widespread situations where pages need to be shared between multiple programs. For example, program A might have entry points for shared pages in program B and program C. If each entry point for a shared page uses redirects between different programs, it can lead to excessively long redirection times. Currently, the shared programs maintain the same repository of page code, which requires obtaining permissions and using different frameworks for each program when generating shared programs. This reduces the efficiency of generating shared programs. Therefore, how to generate shared programs more efficiently has become an urgent problem to be solved. Summary of the Invention

[0003] This application provides a method and apparatus for generating a shared program, a computer device, and a storage medium. By determining the target environment information and target version information required by the target shared program, and since the target shared program is used to access different program interfaces, the compilation data packages corresponding to different programs under different environment information and different version information are obtained. The compilation data package matching the target environment information and target version information for each program is determined. By synthesizing the compilation data packages of different programs and the shared program to be processed, a target shared program that can access different program interfaces is generated, thereby improving the efficiency of generating shared programs.

[0004] In view of this, the first aspect of this application provides a method for generating a shared program, comprising:

[0005] Determine the target environment information and target version information, wherein the target environment information is the environment information required by the target sharing program, the target version information is the version information required by the target sharing program, and the target sharing program is used to access the shared pages of the first shared program and to access the shared pages of the second shared program.

[0006] Obtain the first compilation data package set of the first shared program, wherein the first compilation data package set includes multiple first compilation data packages, and each first compilation data package includes environment information and version information;

[0007] Obtain a second set of compilation data packages for the second shared program, wherein the second set of compilation data packages includes multiple second compilation data packages, each of which includes environment information and version information;

[0008] Based on the target environment information and the target version information, a first target compilation data package is determined from the first compilation data package set, and a second target compilation data package is determined from the second compilation data package set. The environment information and version information included in the first target compilation data package match the target environment information and the target version information, and the environment information and version information included in the second target compilation data package match the target environment information and the target version information.

[0009] Based on the first target compilation data package and the second target compilation data package, they are merged with the shared program to be processed to generate the target shared program.

[0010] A second aspect of this application provides an apparatus for generating a shared program, comprising:

[0011] The determination module is used to determine the target environment information and the target version information. The target environment information is the environment information required by the target sharing program, and the target version information is the version information required by the target sharing program. The target sharing program is used to access the shared page of the first shared program and to access the shared page of the second shared program.

[0012] The acquisition module is used to acquire the first compilation data package set of the first shared program, wherein the first compilation data package set includes multiple first compilation data packages, and each first compilation data package includes environment information and version information;

[0013] The acquisition module is also used to acquire a second set of compilation data packets for the second shared program, wherein the second set of compilation data packets includes multiple second compilation data packets, and each second compilation data packet includes environment information and version information;

[0014] The determining module is further configured to determine a first target compilation data package from a first compilation data package set and a second target compilation data package from a second compilation data package set based on target environment information and target version information, wherein the environment information and version information included in the first target compilation data package match the target environment information and target version information, and the environment information and version information included in the second target compilation data package match the target environment information and target version information.

[0015] The generation module is used to merge the first target compiled data package and the second target compiled data package with the shared program to be processed to generate the target shared program.

[0016] In one possible implementation, the apparatus for generating the shared program further includes a creation module;

[0017] The determination module is specifically used to obtain the sharing requirements for the shared program to be processed. The sharing requirements include a first shared program identifier, a second shared program identifier, target environment information, and target version information. The first shared program identifier indicates the first shared program, and the second shared program identifier indicates the second shared program.

[0018] The target environment information and target version information are determined based on the sharing requirements of the shared program to be processed;

[0019] The determination module is also used to determine the first shared program and the second shared program based on the sharing requirements of the shared program to be processed;

[0020] A module is created to create a shared file list for the first shared program and a shared file list for the second shared program. The shared file list is used to merge the parsed compiled data package.

[0021] In one possible implementation, the apparatus for generating the shared program further includes a processing module;

[0022] At least one of the environment information and version information differs among multiple first-compilation data packages;

[0023] The acquisition module is also configured to acquire first compilation instructions before acquiring the first set of compilation data packages of the first shared program, wherein the first compilation instructions indicate the pages of the first shared program to be shared;

[0024] The determination module is also used to determine the page to be shared by the first shared program based on the first compilation instruction;

[0025] The processing module is also used to compile the shared pages of the first shared program based on different environment information and different version information to obtain multiple first compilation data packages. Each first compilation data package includes the access address of the shared page of the first shared program, the plugins required by the shared page of the first shared program, and the configuration information of the shared page of the first shared program.

[0026] The generation module is also used to generate a set of first compilation data packages for the first shared program based on multiple first compilation data packages.

[0027] In one possible implementation, at least one of the environment information and version information differs among the multiple second compilation data packages;

[0028] The acquisition module is also configured to acquire second compilation instructions before acquiring the second compilation data package set of the second shared program, wherein the second compilation instructions indicate the pages of the second shared program to be shared;

[0029] The determination module is also used to determine the pages shared by the second shared program based on the second compilation instructions;

[0030] The processing module is also used to compile the shared pages of the second shared program based on different environment information and different version information to obtain multiple second compiled data packages;

[0031] The generation module is also used to generate a set of second compilation data packages for a second shared program based on multiple second compilation data packages.

[0032] In one possible implementation, the determining module is specifically used to obtain a first set of compiled data packages and a second set of compiled data packages based on the sharing requirements of the shared program to be processed;

[0033] A third set of compilation data packages matching the target environment information is selected from the first set of compilation data packages, and a fourth set of compilation data packages matching the target environment information is selected from the second set of compilation data packages. The third set of compilation data packages includes at least one first set of compilation data packages, and the fourth set of compilation data packages includes at least one second set of compilation data packages.

[0034] The first target compilation package that matches the target version information is selected from the third compilation package set, and the second target compilation package that matches the target version information is selected from the fourth compilation package set.

[0035] In one possible implementation, the target environment information includes first target environment information and second target environment information, wherein the first target environment information indicates the environment information of the first shared program and the second target environment information indicates the environment information of the second shared program.

[0036] The target version information includes first target version information and second target version information. The first target version information indicates the version information of the first shared program, and the second target version information indicates the version information of the second shared program.

[0037] The determination module is specifically used to filter out a fifth set of compilation data packets that matches the first target environment information from the first set of compilation data packets, and to filter out a sixth set of compilation data packets that matches the second target environment information from the second set of compilation data packets, wherein the fifth set of compilation data packets includes at least one first compilation data packet, and the sixth set of compilation data packets includes at least one second compilation data packet;

[0038] Select the first target compilation data package that matches the first target version information from the fifth compilation data package set, and select the second target compilation data package that matches the second target version information from the sixth compilation data package set.

[0039] In one possible implementation, the generation module is specifically used to parse the first target compilation data packet and the second target compilation data packet;

[0040] The parsed first target compilation data package is merged into the shared file list of the first shared program;

[0041] The parsed second target compilation data package is merged into the shared file list of the second shared program;

[0042] Based on the shared file lists of the first shared program and the shared file lists of the second shared program, the files are merged with the shared program to be processed to generate the target shared program.

[0043] A third aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described in the above aspects.

[0044] A fourth aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the methods provided in the above aspects.

[0045] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0046] This application provides a method for generating a shared program. First, target environment information and target version information are determined. The target environment information refers to the environment information required by the target shared program, and the target version information refers to the version information required by the target shared program. The target shared program is used to access shared pages of a first shared program and to access shared pages of a second shared program. Based on this, a first set of compiled data packages for the first shared program is obtained. The first set of compiled data packages includes multiple first compiled data packages, each including environment information and version information. A second set of compiled data packages for the second shared program is also obtained, including multiple second compiled data packages, each including environment information and version information. Then, based on the target environment information and target version information, a first target compiled data package is determined from the first set of compiled data packages, and a second target compiled data package is determined from the second set of compiled data packages. The environment information and version information included in the first target compiled data package match the target environment information and target version information, and the environment information and version information included in the second target compiled data package also match the target environment information and target version information. Finally, based on the first and second target compiled data packages, they are merged with the shared program to be processed to generate the target shared program. By determining the target environment and version information required by the target shared program, and since the target shared program is used to access different program interfaces, the compilation data packages corresponding to different programs under different environment and version information are obtained. The compilation data package matching the target environment and version information of each program is determined. By combining the compilation data packages of different programs and the shared program to be processed, a target shared program that can access different program interfaces is generated, thereby improving the efficiency of generating shared programs. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of the architecture of the shared program generation system in the embodiments of this application;

[0048] Figure 2 A flowchart illustrating a method for generating a shared program as provided in an embodiment of this application;

[0049] Figure 3 A schematic diagram illustrating an embodiment of a method for generating a shared program provided in this application;

[0050] Figure 4 A schematic diagram of the interface of the sharing program and the shared program provided in the embodiments of this application;

[0051] Figure 5 An example diagram illustrating the use of a JSON file provided in this application;

[0052] Figure 6 A schematic diagram illustrating an embodiment of the reuse of compiled data package sets provided in this application.

[0053] Figure 7 A schematic diagram of a shared program generation apparatus provided in an embodiment of this application;

[0054] Figure 8 This is a schematic diagram of one embodiment of the server in this application;

[0055] Figure 9 This is a schematic diagram of one embodiment of the terminal device in this application. Detailed Implementation

[0056] This application provides a method and apparatus for generating a shared program, a computer device, and a storage medium. By determining the target environment information and target version information required by the target shared program, and since the target shared program is used to access different program interfaces, the compilation data packages corresponding to different programs under different environment information and different version information are obtained. The compilation data package matching the target environment information and target version information for each program is determined. By synthesizing the compilation data packages of different programs and the shared program to be processed, a target shared program that can access different program interfaces is generated, thereby improving the efficiency of generating shared programs.

[0057] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0058] There are widespread situations where pages need to be shared among multiple programs. For example, program A might have entry points for shared pages in program B and program C. If each shared page entry point uses navigation between different programs, it can lead to excessively long navigation times. Currently, shared programs and sharing programs jointly maintain page code in the same repository. This results in the need for permissions and different frameworks for each program when generating shared programs, thus reducing the efficiency of shared program generation. Therefore, how to generate shared programs more efficiently has become an urgent problem to be solved. Based on this, embodiments of this application provide a method for generating shared programs. By determining the compilation data package that matches the target environment information and target version information for each program, a target shared program that can access the interfaces of different programs can be generated, thereby improving the efficiency of generating shared programs.

[0059] The application scenarios of this application embodiment are described below. It is understood that the method for generating the shared program can be executed by a terminal device or a server. Specifically, when the method for generating the shared program is deployed on a terminal device, the terminal device can determine the target environment information and target version information based on the sharing requirements of the shared program to be processed, whether offline or online. If the terminal device locally stores a first set of compiled data packets for the first shared program and a second set of compiled data packets for the second shared program, the terminal device does not need to be connected to the network, which better protects the security of the compiled data packets of the shared program. This allows the target shared program to be generated offline using the method provided in this application embodiment, making the shared program generation process more convenient and efficient. When the method for generating the shared program is deployed on a server, the server can determine the target environment information and target version information in real time based on the sharing requirements of the shared program to be processed, and can obtain the first set of compiled data packets for the first shared program and the second set of compiled data packets for the second shared program from the cloud database. This allows the target shared program to be generated online in real time using the method provided in this application embodiment, making the shared program generation process more efficient and real-time.

[0060] The following describes the method for generating a shared program provided in this application, taking a terminal device as the execution subject as an example. The method for generating a shared program provided in this application is applicable to applications such as... Figure 1 For the shared program generation system shown, please refer to [link / reference]. Figure 1 , Figure 1 This is a schematic diagram of the architecture of the shared program generation system in the embodiments of this application, such as... Figure 1As shown, the shared program generation system includes terminal devices and a server, with communication between terminal devices facilitated by the server's scheduling. On the terminal device side, based on a first target compilation data packet and a second target compilation data packet, the system merges them with the shared program to be processed to generate a target shared program. This target shared program is then displayed on the terminal device, and after the user interacts with the operable modules of the target shared program, either the shared page of the first shared program or the shared page of the second shared program can be displayed on the terminal device.

[0061] The server involved in this application can be a standalone 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, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal device can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle terminal, smart TV, etc., but is not limited to these. Communication between the terminal device and the server can be achieved via a wireless network, wired network, or removable storage medium. The aforementioned wireless network uses standard communication technologies and / or protocols. The wireless network is typically the Internet, but can also be any network, including but not limited to Bluetooth, Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, private network, or any combination of virtual private networks. In some embodiments, customized or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies. Removable storage media can be Universal Serial Bus (USB) flash drives, portable hard drives, or other removable storage media.

[0062] Although Figure 1 Only five terminal devices and one server are shown, but it should be understood that... Figure 1 The examples provided are for understanding this solution only; the actual number of terminal devices and servers should be determined flexibly based on the specific circumstances.

[0063] For easier understanding, please refer to Figure 2 , Figure 2 Please refer to the flowchart illustrating a method for generating a shared program as provided in this application embodiment. Figure 2The process of generating a shared program includes obtaining the files to be processed for the shared program, obtaining the set of compiled data packages for the shared program, determining the target compiled data package, merging the parsed target compiled data package into the shared file list of the shared program, and generating the target shared program based on the shared file list of the shared program and the files to be processed for the shared program. The functions and processes of each part will be described below, specifically:

[0064] In step A1, the file to be processed of the shared program is obtained. The file to be processed is specifically in JSON file format and includes the relevant compiled files and attribute information of the shared program that can be accessed by the shared program.

[0065] In step A2, the set of compiled data packages for the shared program is obtained. Specifically, compilation instructions are obtained, which specify the pages to be shared in the shared program. Based on these instructions, the pages to be shared are determined. Then, based on different environment and version information, the pages to be shared are compiled separately, resulting in multiple compiled data packages. Each compiled data package includes the access address of the page to be shared, the plugins required for that page, and the configuration information for that page. Finally, a set of compiled data packages for the shared program is generated from these multiple packages, and each set is stored. When target program generation is required, the required set of compiled data packages for the shared program is read from the storage address, such as... Figure 2 As shown, after generating the first set of compilation data packets for the first shared program and the second set of compilation data packets for the second shared program, if the target sharing program needs to access the first shared program and the second shared program, it can obtain the first set of compilation data packets for the first shared program and the second set of compilation data packets for the second shared program from the corresponding storage addresses.

[0066] In step A3, the target compilation data package is determined. Specifically, the target environment information and target version information need to be determined first. The target environment information refers to the environment information required by the target shared program, and the target version information refers to the version information required by the target shared program. Since each compilation data package in the set of compilation data packages for the shared program is compiled with different environment information and different version information, each compilation data package includes both environment information and version information. Therefore, the target compilation data package that meets the target environment information and target version information is determined from the set of compilation data packages, such as... Figure 2 As shown, a first target compilation data packet is determined in a first compilation data packet set of a first shared program, and a second target compilation data packet is determined in a second compilation data packet set of a second shared program.

[0067] In step A4, the parsed target compilation data package is merged into the shared file list of the shared program. Specifically, different shared programs correspond to different shared file lists, therefore, as... Figure 2 As shown, the first target compilation data packet is parsed to obtain the parsed first target compilation data packet. Similarly, the second target compilation data packet is parsed to obtain the parsed second target compilation data packet. Then, the parsed first target compilation data packet is merged into the shared file list of the first shared program, and the parsed second target compilation data packet is merged into the shared file list of the second shared program.

[0068] In step A5, a target shared program is generated based on the shared file list of the shared program and the files to be processed of the shared program to be processed. Specifically, the shared file list of the first shared program and the shared file list of the second shared program are merged with the files to be processed of the shared program to generate the target shared program.

[0069] Based on the above introduction, the following section describes the method for generating the shared program in this application, taking the terminal device as the executing entity as an example. Please refer to [link / reference needed]. Figure 3 , Figure 3 A schematic diagram illustrating an embodiment of a method for generating a shared program provided in this application is shown below. Figure 3 As shown, the methods for generating shared programs include:

[0070] 101. Determine the target environment information and target version information.

[0071] In this embodiment, when the terminal device needs to generate a target shared program, it first needs to determine the target environment information and the target version information. The target environment information is the environment information required by the target shared program, and the target version information is the version information required by the target shared program. Furthermore, it needs to be determined that the target shared program can be used to access the shared pages of the first shared program and the shared pages of the second shared program. That is, the target shared program is a shared program of the first and second shared programs, and the first and second shared programs are shared programs of the target shared program.

[0072] Specifically, the environment information in this embodiment includes development environment, testing environment, pre-release environment, and online production environment. Version information is determined based on timestamps, such as "202108210108", "202109011305", and "202109141656", etc. Specific information is not limited here. It should be understood that in practical applications, the target environment information can be the same environment information, or it can include the environment information corresponding to each shared program. Similarly, the target version information can be the same version information, or it can include the version information corresponding to each shared program. For example, if the target shared program needs to be a shared program with version information "202108210108" in the pre-release environment, then the target environment information can be determined to be the pre-release environment, and the target version information can be "202108210108", meaning that the environment information and version information of the first shared program and the second shared program are the same. Secondly, when the target environment information includes the environment information corresponding to each shared program, the target version information also includes the version information corresponding to each shared program. For example, the target environment information includes the pre-release environment of the first shared program and the test environment of the second shared program, while the target version information includes "202108210108" of the first shared program and "202109141656" of the second shared program.

[0073] For a better understanding of shared programs and shared programs, please refer to [link / reference]. Figure 4 , Figure 4 The interface diagrams of the shared program and the shared program provided in the embodiments of this application are as follows: Figure 4 As shown, Figure 4 The diagram in Figure (A) shows Mini Program A. Figure 4 The diagram in (B) shows mini-program B. Figure 4 The mini-program A shown in Figure (A) is specifically a health mini-program. Figure 4 The mini-program B shown in Figure (B) is specifically the health record mini-program. Figure 4 The health mini-program interface shown in Figure (A) includes various operation interfaces for information such as electronic certificates, health codes, inquiries, and health records. Users can operate on the corresponding operation interfaces according to their needs. These operations may include, but are not limited to, single-clicking, double-clicking, and swiping, which will not be described in detail here. Based on this, users... Figure 4 The interface shown allows users to interact with the health records. The terminal device displays the user's actions on the screen. Figure 4 The health record mini-program shown in Figure (B) is an example of this program. Figure 4 The interface of the health record mini-program shown in Figure (B) displays information from multiple health records. At this point, you can... Figure 4 The mini-program A shown in Figure (A) is defined as a shared program. Figure 4 In Figure (B), mini-program B is defined as a shared program, or described as mini-program B being a shared program of mini-program A, while mini-program A is a shared program of mini-program B. It should be understood that a shared program can access multiple shared programs. In practical applications, if a shared program also has an operation interface, then the shared program can be a shared program of other programs. Further details will not be elaborated here.

[0074] It should be understood that Figure 4 The examples and related examples mentioned above are only for understanding this solution, and no restrictions are placed on the target environment information, target version information, or specific node information of the program.

[0075] 102. Obtain the first set of compiled data packages for the first shared program.

[0076] In this embodiment, the terminal device obtains a first set of compiled data packets for the first shared program. Specifically, the first set of compiled data packets includes multiple first compiled data packets, which are obtained through... Figure 2 It can be seen that each first compilation data package in the first compilation data package set is compiled based on different environment information and different version information. Therefore, each first compilation data package includes environment information and version information, and at least one of the environment information and version information is different among multiple first compilation data packages.

[0077] 103. Obtain the second compilation data package set of the second shared program.

[0078] In this embodiment, the terminal device obtains a second set of compilation data packets for the second shared program. Specifically, the second set of compilation data packets includes multiple second compilation data packets, which are obtained through... Figure 2 It can be seen that each of the second compilation data packages in the second compilation data package set is compiled based on different environment information and different version information. Therefore, each second compilation data package includes environment information and version information, and at least one of the environment information and version information is different among multiple second compilation data packages.

[0079] 104. Based on the target environment information and target version information, determine the first target compilation data package from the first compilation data package set, and determine the second target compilation data package from the second compilation data package set.

[0080] In this embodiment, the terminal device determines a first target compilation data package from a first compilation data package set and a second target compilation data package from a second compilation data package set based on target environment information and target version information. Since the target environment information and target version information were determined in step 101, the terminal device determines the first target compilation data package from multiple first compilation data packages in the first compilation data package set, and the environment information and version information included in the first target compilation data package match the target environment information and target version information. Similarly, the terminal device can also determine the second target compilation data package from multiple second compilation data packages in the second compilation data package set, and the environment information and version information included in the second target compilation data package match the target environment information and target version information.

[0081] It should be understood that, in practical applications, the target environment information can be the same environment information, or it can include the environment information corresponding to each shared program; similarly, the target version information can be the same version information, or it can include the version information corresponding to each shared program. Therefore, if the target environment information and the target version information can both be the same, then both the first and second target compilation data packages are identical to the target environment information and the target version information. Secondly, if the target environment information includes the environment information corresponding to each shared program, and the target version information includes the version information corresponding to each shared program, then the first target compilation data package is identical to its corresponding version information and environment information, and the second target compilation data package is identical to its corresponding version information and environment information.

[0082] 105. Based on the first target compilation data package and the second target compilation data package, merge them with the shared program to be processed to generate the target shared program.

[0083] In this embodiment, the terminal device merges the first target compilation data packet and the second target compilation data packet with the shared program to be processed to generate the target shared program. Specifically, through... Figure 2 It can be seen that parsing the first target compilation data packet yields the parsed first target compilation data packet. Similarly, parsing the second target compilation data packet yields the parsed second target compilation data packet. The parsed first target compilation data packet and the parsed second target compilation data packet are then merged with the file to be processed in the shared program to generate the target shared program.

[0084] In this embodiment of the application, a method for generating a shared program is provided. Using the above method, by determining the target environment information and target version information required by the target shared program, and since the target shared program is used to access different program interfaces, the compilation data packages corresponding to different programs under different environment information and different version information are obtained. The compilation data package that matches the target environment information and target version information for each program is determined. By synthesizing the compilation data packages of different programs and the shared program to be processed, a target shared program that can access different program interfaces is generated, thereby improving the efficiency of generating shared programs.

[0085] Optionally, in the above Figure 3 Based on the corresponding embodiments, in an optional embodiment of the shared program generation method provided in this application, determining the target environment information and target version information specifically includes:

[0086] Obtain the sharing requirements for the program to be shared, wherein the sharing requirements include a first shared program identifier, a second shared program identifier, target environment information, and target version information, the first shared program identifier indicating the first shared program, and the second shared program identifier indicating the second shared program.

[0087] The target environment information and target version information are determined based on the sharing requirements of the shared program to be processed;

[0088] Methods for generating shareware also include:

[0089] The first and second shared programs are determined based on the sharing requirements of the programs to be shared.

[0090] Create a shared file list for the first shared program and a shared file list for the second shared program, wherein the shared file list is used to merge the parsed compiled data package.

[0091] In this embodiment, when it is necessary to add the functionality to access the first shared program and the second shared program to the shared program to be processed, the program developers need to perform a requirement operation so that the terminal device can obtain the sharing requirements for the shared program to be processed. At this time, the sharing requirements include the identifier of the first shared program, the identifier of the second shared program, the target environment information, and the target version information. For example, the target environment information is "202108210108", and the target environment information is a pre-release environment. Based on this, since the sharing requirements include the target environment information and the target version information, the terminal device can determine the target environment information and the target version information based on the sharing requirements of the shared program to be processed. That is, it can determine that the shared program to be added should meet the version information requirement of "202108210108" and the environment information requirement of the pre-release environment.

[0092] Furthermore, since the sharing requirement includes a first shared program identifier and a second shared program identifier, and the first shared program identifier uniquely indicates the first shared program, and the second shared program identifier uniquely indicates the second shared program, for example, the first shared program identifier is "A" to indicate the first shared program A, and the second shared program identifier is "B" to indicate the second shared program B. Based on this, the terminal device can also determine the first shared program and the second shared program indicated by the aforementioned identifiers based on the first shared program identifier and the second shared program identifier included in the sharing requirement of the shared program to be processed, that is, determine to add interface functions for accessing the first shared program A and interface functions for accessing the second shared program B to the shared program to be processed. It should be understood that at this time, the terminal device will also create a shared file list for the first shared program and a shared file list for the second shared program, which is used to incorporate the compiled data package of the parsed shared program.

[0093] In this embodiment of the application, another method for generating a shared program is provided. By adopting the above method, the target environment information and target version information that the shared program should meet can be determined through the sharing requirements. This ensures that the target compilation data package selected subsequently meets the access requirements. Secondly, the shared program identifier can uniquely indicate a shared program, thus ensuring that the set of compilation data packages of the subsequently obtained shared program matches the requirements, thereby further improving the reliability and feasibility of program generation.

[0094] Optionally, in the above Figure 3 Based on the corresponding embodiments, in one optional embodiment of the shared program generation method provided in this application, at least one of the environment information and version information among the multiple first compilation data packages is different;

[0095] Before obtaining the first set of compiled data packages for the first shared program, the method for generating the shared program also includes:

[0096] Obtain the first compiler directive, wherein the first compiler directive indicates the page to be shared by the first shared program;

[0097] The first page to be shared by the first shared program is determined based on the first compilation instruction;

[0098] Based on different environment information and different version information, the shared page of the first shared program is compiled and processed to obtain multiple first compilation data packages. Each first compilation data package includes the access address of the shared page of the first shared program, the plugins required by the shared page of the first shared program, and the configuration information of the shared page of the first shared program.

[0099] A first compilation package set for the first shared program is generated based on multiple first compilation packages.

[0100] In this embodiment, at least one of the environment information and version information differs among the multiple first compilation data packages. For example, the environment information of first compilation data package A is a pre-release environment, while the version information is "202109011305", and the environment information of first compilation data package B is a pre-release environment, while the version information is "202109010941". It should be understood that the foregoing examples are only for understanding this solution, and the specific information included in the first compilation data packages in the first compilation data package set is not limited here. The following will describe in detail how to generate multiple first compilation data package sets.

[0101] Before obtaining the first set of compiled data packets for the first shared program, the terminal device first obtains the first compilation instructions obtained by the program developer through operation. These first compilation instructions specify the page to be shared by the first shared program, and are determined based on the display characteristics of the shared page of the first shared program. The page display characteristics refer to the display format of the first shared program within the shared program to be processed. For example, the shared page display characteristics of the first shared program in the shared program to be processed might be that the first shared program is displayed as an information pop-up window, through which the first shared program can be accessed. Alternatively, a first preset interface for the first shared program might be added to the shared program to be processed, and this first preset interface might be red, allowing access to the first shared program. It should be understood that the aforementioned examples are only for understanding this solution, and the specific page shared by the first shared program and its display characteristics within the specific page of the shared program to be processed are not limited here. Based on this, the page to be shared by the first shared program is then determined based on the first compilation instructions.

[0102] Furthermore, the terminal device further distinguishes different environmental information, such as the development environment, testing environment, pre-release environment, and online production environment described in the aforementioned embodiments. Then, using the timestamp of the first shared program under different environmental information, the timestamp is used as the version information of the first shared program. The shared pages of the first shared program are then compiled to obtain the first compiled data package. Specifically, since the generation process of the first shared program includes multiple different environmental information, and each different environmental information has at least one version information, it is necessary to compile the shared pages of the first shared program based on different environmental information and different version information in a similar manner to the aforementioned method to obtain multiple first compiled data packages. Therefore, a set of first compiled data packages of the first shared program can be generated based on multiple first compiled data packages, and at least one of the environmental information and version information is different among the multiple first compiled data packages.

[0103] Furthermore, after generating the first set of compiled data packets for the first shared program, the terminal device uploads this set to a content delivery network (CDN). The CDN stores this set of compiled data packets, facilitating the retrieval of artifacts and the tracking of artifacts in different environments and versions. Therefore, when a request to access the first shared program arises, the terminal device can directly obtain the first set of compiled data packets from the CDN. It should be understood that in practical applications, if the terminal device has sufficient storage space, it can also store the first set of compiled data packets locally; this is not a limitation here.

[0104] Specifically, each first compiled data package includes the access address of the page shared by the first shared program, the plugins required by the page shared by the first shared program, and the configuration information of the page shared by the first shared program, so as to ensure that the page shared by the first shared program can be correctly displayed in actual applications.

[0105] In this embodiment of the application, another method for generating a set of compilation data packets is provided. By using the above method, different environmental information and timestamps as version information are distinguished, and the pages of the first shared program are compiled based on different environmental information and different version information to obtain multiple first compilation data packets, thereby generating a set of first compilation data packets for the first shared program, thereby improving the reliability of this solution.

[0106] Optionally, in the above Figure 3Based on the corresponding embodiments, in one optional embodiment of the shared program generation method provided in this application, at least one of the environment information and version information among the multiple second compilation data packages is different;

[0107] Before obtaining the second set of compiled data packages for the second shared program, the method for generating the shared program also includes:

[0108] Obtain the second compiler directive, wherein the second compiler directive indicates the page to be shared by the second shared program;

[0109] The second compilation instruction determines the pages to be shared by the second shared program;

[0110] Based on different environment information and different version information, the shared pages of the second shared program are compiled to obtain multiple second compiled data packages;

[0111] A second set of second compiled data packages for a second shared program is generated based on multiple second compiled data packages.

[0112] In this embodiment, at least one of the environment information and version information differs among the multiple second compilation data packages. For example, the version information of second compilation data package A is "202109011305", while the environment information is a pre-release environment; the version information of second compilation data package B is "202109011305", but the environment information is a test environment. It should be understood that the foregoing examples are only for understanding this solution, and the specific information included in the second compilation data packages in the second compilation data package set is not limited here. The following will describe in detail how to generate multiple sets of second compilation data packages.

[0113] Similar to generating the first compiled data set, before obtaining the second compiled data set of the second shared program, the terminal device first obtains the second compiled instructions obtained by the program developer through operation. These second compiled instructions indicate the pages shared by the second shared program, and are determined based on the display characteristics of the shared pages of the second shared program. The page display characteristics refer to the display format of the second shared program within the shared program to be processed. For example, the shared page display characteristics of the second shared program in the shared program to be processed might be that the second shared program is displayed as an information pop-up window, through which the second shared program can be accessed. Alternatively, a second preset interface for the second shared program might be added to the shared program to be processed, and this second preset interface might be black, through which the second shared program can be accessed. It should be understood that the above examples are only for understanding this solution, and the specific pages shared by the second shared program and their display characteristics within the specific pages of the shared program to be processed are not limited here. Based on this, the pages shared by the second shared program are then determined based on the second compiled instructions.

[0114] Furthermore, the terminal device further distinguishes different environmental information, such as the development environment, testing environment, pre-release environment, and online production environment described in the aforementioned embodiments. Then, it uses the timestamp of the second shared program under different environmental information as the version information of the second shared program. The shared pages of the second shared program are then compiled to obtain the second compiled data package. Specifically, since the generation process of the second shared program includes multiple different environmental information, and each different environmental information has at least one version information, it is necessary to compile the shared pages of the second shared program based on different environmental information and different version information in a similar manner to the aforementioned method to obtain multiple second compiled data packages. Therefore, a set of second compiled data packages of the second shared program can be generated based on multiple second compiled data packages, and at least one of the environmental information and version information of the multiple second compiled data packages is different.

[0115] Furthermore, similar to storing the first set of compiled data, after generating the second set of compiled data packages for the second shared program, the terminal device can also upload the second set of compiled data packages for the second shared program to the CDN. The CDN stores the second set of compiled data packages for the second shared program, facilitating the retrieval of artifacts and the tracking of artifacts in different environments and versions. Therefore, when a request to access the second shared program needs to be added, the terminal device can directly obtain the second set of compiled data packages for the second shared program from the CDN. It should be understood that in practical applications, if the terminal device has sufficient storage space, it can also store the second set of compiled data packages for the second shared program locally; this is not specifically limited here.

[0116] Specifically, each second compilation data package includes the access address of the page shared by the second shared program, the plugins required by the page shared by the second shared program, and the configuration information of the page shared by the second shared program, so as to ensure that the page shared by the second shared program can be correctly displayed in actual applications.

[0117] In this embodiment of the application, another method for generating a set of compilation data packets is provided. By using the above method, different environment information and timestamps as version information are distinguished, and the pages of the second shared program are compiled based on different environment information and different version information to obtain multiple second compilation data packets, thereby generating a set of second compilation data packets for the second shared program, thereby improving the reliability of this solution.

[0118] Optionally, in the above Figure 3 Based on the corresponding embodiments, in an optional embodiment of the shared program generation method provided in this application, a first target compilation data package is determined from a first compilation data package set, and a second target compilation data package is determined from a second compilation data package set, based on target environment information and target version information. Specifically, this includes:

[0119] Based on the sharing requirements of the shared program to be processed, obtain the first set of compiled data packages and the second set of compiled data packages;

[0120] A third set of compilation data packages matching the target environment information is selected from the first set of compilation data packages, and a fourth set of compilation data packages matching the target environment information is selected from the second set of compilation data packages. The third set of compilation data packages includes at least one first set of compilation data packages, and the fourth set of compilation data packages includes at least one second set of compilation data packages.

[0121] The first target compilation package that matches the target version information is selected from the third compilation package set, and the second target compilation package that matches the target version information is selected from the fourth compilation package set.

[0122] This embodiment describes a method for situations where the target environment information and target version information are the same. As described in the foregoing embodiments, the sharing requirement includes a first shared program identifier and a second shared program identifier, where the first shared program identifier indicates a first shared program and the second shared program identifier indicates a second shared program. Based on this, the terminal device determines the first and second shared programs based on the sharing requirement of the program to be shared. Furthermore, as described in the foregoing embodiments, the terminal device can also store the compilation data packages of each shared program in a CDN or locally. Therefore, after determining the first and second shared programs, it can obtain the first set of compilation data packages for the first shared program and the second set of compilation data packages for the second shared program from the CDN or local storage.

[0123] Furthermore, the terminal device first filters out a third set of compiled data packets that match the target environment information from the first set of compiled data packets. This third set of compiled data packets includes at least one first compiled data packet. Similarly, it can also filter out a fourth set of compiled data packets that match the target environment information from the second set of compiled data packets. This fourth set of compiled data packets includes at least one second compiled data packet. Then, it filters out a first target compiled data packet that matches the target version information from the third set of compiled data packets, and a second target compiled data packet that matches the target version information from the fourth set of compiled data packets. It should be understood that this solution first filters compiled data packets that match the target environment information, and then determines the target compiled data packet that matches the target version information from the compiled data packets that match the target environment information. In practical applications, it is also possible to first filter compiled data packets that match the target environment information, and then determine the target compiled data packet that matches the target environment information from the compiled data packets that match the target version information. Therefore, the specific timing should not be construed as a limitation of this application.

[0124] In this embodiment of the application, another method for generating shared programs is provided. By adopting the above method, since different shared programs all correspond to the same target version information and target environment information, the target version information and target environment information can be used to perform two screenings in succession, first narrowing the matching range and then performing further matching, thereby improving the reliability and efficiency of matching.

[0125] Optionally, in the above Figure 3Based on the corresponding embodiments, in an optional embodiment of the method for generating a shared program provided in this application, the target environment information includes first target environment information and second target environment information, wherein the first target environment information indicates the environment information of the first shared program and the second target environment information indicates the environment information of the second shared program;

[0126] The target version information includes first target version information and second target version information. The first target version information indicates the version information of the first shared program, and the second target version information indicates the version information of the second shared program.

[0127] Based on target environment information and target version information, a first target compilation package is determined from a first set of compilation packages, and a second target compilation package is determined from a second set of compilation packages, specifically including:

[0128] A fifth set of compiled data packets matching the first target environment information is selected from the first set of compiled data packets, and a sixth set of compiled data packets matching the second target environment information is selected from the second set of compiled data packets. The fifth set of compiled data packets includes at least one first set of compiled data packets, and the sixth set of compiled data packets includes at least one second set of compiled data packets.

[0129] Select the first target compilation data package that matches the first target version information from the fifth compilation data package set, and select the second target compilation data package that matches the second target version information from the sixth compilation data package set.

[0130] In this embodiment, the target environment information includes the environment information corresponding to each shared program, and the target version includes the version information corresponding to each shared program. Therefore, the target environment information includes first target environment information and second target environment information. The first target environment information indicates the environment information of the first shared program, and the second target environment information indicates the environment information of the second shared program. Secondly, the target version information includes first target version information and second target version information. The first target version information indicates the version information of the first shared program, and the second target version information indicates the version information of the second shared program.

[0131] Based on this, as can be seen from the foregoing embodiments, the sharing requirement includes a first shared program identifier and a second shared program identifier, where the first shared program identifier indicates a first shared program and the second shared program identifier indicates a second shared program. Therefore, the terminal device determines the first and second shared programs based on the sharing requirement of the program to be processed. Secondly, as can be seen from the foregoing embodiments, the terminal device can also store the compilation data packets of each shared program in a CDN or locally. Therefore, after determining the first and second shared programs, it can obtain the first set of compilation data packets for the first shared program and the second set of compilation data packets for the second shared program from the CDN or local storage.

[0132] Furthermore, the terminal device first filters out a fifth set of compiled data packets that match the first target environment information from the first set of compiled data packets. This fifth set of compiled data packets includes at least one first compiled data packet. Similarly, it can also filter out a sixth set of compiled data packets that match the second target environment information from the second set of compiled data packets. This sixth set of compiled data packets includes at least one second compiled data packet. Then, it filters out a first target compiled data packet that matches the first target version information from the fifth set of compiled data packets, and a second target compiled data packet that matches the second target version information from the sixth set of compiled data packets. It should be understood that this solution first filters compiled data packets that match the target environment information, and then determines the target compiled data packet that matches the target version information from the compiled data packets that match the target environment information. In practical applications, it is also possible to first filter compiled data packets that match the target environment information, and then determine the target compiled data packet that matches the target environment information from the compiled data packets that match the target version information. Therefore, the specific timing should not be construed as a limitation of this application.

[0133] In this embodiment of the application, another method for generating shared programs is provided. Using the above method, since different shared programs correspond to different target version information and target environment information, different target version information and target environment information of different shared programs are used to perform two screenings in succession, first narrowing the matching range and then performing further matching. This not only improves the reliability of matching, but also enhances the flexibility of matching in this solution.

[0134] Optionally, in the above Figure 3 Based on the corresponding embodiments, in one optional embodiment of the shared program generation method provided in this application, a first target compilation data package and a second target compilation data package are merged with the shared program to be processed to generate a target shared program, specifically including:

[0135] Parse the first target compilation data package and the second target compilation data package;

[0136] The parsed first target compilation data package is merged into the shared file list of the first shared program;

[0137] The parsed second target compilation data package is merged into the shared file list of the second shared program;

[0138] Based on the shared file lists of the first shared program and the shared file lists of the second shared program, the files are merged with the shared program to be processed to generate the target shared program.

[0139] In this embodiment, when generating the target shared program, the terminal device first needs to obtain the file to be processed for the shared program. This file is specifically in JSON format and includes the relevant compiled files and attribute information of the shared program that the shared program can access. Secondly, different shared programs correspond to different lists of shared files. For example, shared program A should be located in area A of the target shared program and displayed as a grayed-out interface, while shared program B should be located in area B of the target shared program and displayed as a blacked-out interface. Therefore, different lists of shared files need to be created based on different shared programs.

[0140] Based on this, after the terminal device parses the first target compilation data packet and the second target compilation data packet using the method described in the aforementioned embodiments, it merges the parsed first target compilation data packet into the shared file list of the first shared program and merges the parsed second target compilation data packet into the shared file list of the second shared program. Then, based on the shared file lists of the first and second shared programs, it merges them with the shared program to be processed to generate the target shared program. Specifically, the shared file lists of the first and second shared programs are merged with the files to be processed (JSON files) of the shared program to generate the target shared program. In the aforementioned method, the shared pages of the shared programs are merged into the shared program through sub-packages. The shared program can be considered as the display page of the shared program. Therefore, the shared pages of the first and second shared programs can be accessed through the target shared program.

[0141] To further understand the JSON file described in this solution, please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram illustrating an embodiment of the JSON file provided in this application. Figure 5 The diagram in (A) shows the JSON file of the shared page of the shared mini-program. Figure 5 The diagram in Figure (B) shows the JSON file obtained after merging the shared file list of the first shared program and the shared file list of the second shared program with the files to be processed of the shared program.

[0142] Based on this, please refer to Figure 6 , Figure 6 This is a schematic diagram illustrating an embodiment of the compilation data package set reuse provided in this application. Figure 6 As shown, firstly, compilation instructions are generated to indicate the shared pages of the shared program. Then, different environment information and version information of the shared program are distinguished. Based on the compilation instructions, the shared pages of the shared program are determined. Then, the shared pages of the shared program are compiled separately based on different environment information and different version information to obtain a set of compiled data packages for the shared program. This set is then stored according to the method described in the previous embodiment. Based on this, when the sharing requirement includes a shared program identifier indicating the shared program, the set of compiled data packages for the shared program is obtained from the storage address where the set of compiled data packages for the shared program is stored. Even if multiple shared programs need to obtain the set of compiled data packages for the shared program at the same time, the set of compiled data packages for the shared program can be reused. The corresponding target compiled data package can be determined from it based on different environment information and version information.

[0143] For example, the sharing requirement of the shared program A to be processed carries environment information A and version information A; the sharing requirement of the shared program B to be processed carries environment information B and version information B; and the sharing requirement of the shared program C to be processed carries environment information C and version information C. When generating the corresponding target shared program, the compilation data package set of the shared program can be reused, that is, the same compilation data package set of the shared program can be obtained. Then, using the method described in the previous embodiment, the target compilation data package A that matches environment information A and version information A is determined from the compilation data package set of the shared program, thereby generating the target shared program A corresponding to the shared program A to be processed. Similarly, the target compilation data package B that matches environment information B and version information B is determined from the compilation data package set of the shared program, thereby generating the target shared program B corresponding to the shared program B to be processed. And the target compilation data package C that matches environment information C and version information C is determined from the compilation data package set of the shared program, thereby generating the target shared program C corresponding to the shared program C to be processed. Thus, the reuse of the compilation data package set is completed. It should be understood that... Figure 5 and Figure 6 The example is only for understanding this scheme, and there is no limit to the specific list of shared files or the specific files to be processed.

[0144] In this embodiment of the application, another method for generating a shared program is provided. Using the above method, when the shared program is shared by multiple shared programs at the same time, the compilation data package set of the shared program can be directly reused. Different target compilation data packages are determined through different environment information requirements and version information requirements, thereby completing the generation of the target shared program. It is not necessary to create corresponding program generation processes for different shared programs independently. The efficiency of shared program generation is improved by reusing the compilation data package set.

[0145] Figure 7 A schematic diagram of a shared program generation apparatus provided in this application embodiment is shown below. Figure 7 As shown, the sharing program generation device 700 includes:

[0146] The determination module 701 is used to determine the target environment information and the target version information, wherein the target environment information is the environment information required by the target sharing program, the target version information is the version information required by the target sharing program, and the target sharing program is used to access the shared page of the first shared program and to access the shared page of the second shared program.

[0147] The acquisition module 702 is used to acquire the first compilation data package set of the first shared program, wherein the first compilation data package set includes multiple first compilation data packages, and each first compilation data package includes environment information and version information;

[0148] The acquisition module 702 is also used to acquire a second compilation data package set of the second shared program, wherein the second compilation data package set includes multiple second compilation data packages, and each second compilation data package includes environment information and version information;

[0149] The determining module 701 is further configured to determine a first target compilation data package from a first compilation data package set and a second target compilation data package from a second compilation data package set based on target environment information and target version information, wherein the environment information and version information included in the first target compilation data package match the target environment information and target version information, and the environment information and version information included in the second target compilation data package match the target environment information and target version information.

[0150] The generation module 703 is used to merge the first target compilation data package and the second target compilation data package with the shared program to be processed to generate the target shared program.

[0151] Optionally, in the above Figure 7 Based on the corresponding embodiments, in another embodiment of the shared program generation apparatus provided in this application, the shared program generation apparatus 700 further includes a creation module 704;

[0152] The determination module 701 is specifically used to obtain the sharing requirements for the shared program to be processed. The sharing requirements include a first shared program identifier, a second shared program identifier, target environment information, and target version information. The first shared program identifier indicates the first shared program, and the second shared program identifier indicates the second shared program.

[0153] The target environment information and target version information are determined based on the sharing requirements of the shared program to be processed;

[0154] The determination module 701 is also used to determine the first shared program and the second shared program based on the sharing requirements of the shared program to be processed;

[0155] Module 704 is created to create a shared file list for the first shared program and a shared file list for the second shared program. The shared file list is used to merge the parsed compiled data package.

[0156] Optionally, in the above Figure 7 Based on the corresponding embodiments, in another embodiment of the shared program generation apparatus provided in this application, the shared program generation apparatus 700 further includes a processing module 705;

[0157] At least one of the environment information and version information differs among multiple first-compilation data packages;

[0158] The acquisition module 702 is further configured to acquire a first compilation instruction before acquiring the first compilation data package set of the first shared program, wherein the first compilation instruction indicates the page of the first shared program to be shared;

[0159] The determination module 701 is also used to determine the page to be shared by the first shared program based on the first compilation instruction;

[0160] The processing module 705 is also used to compile the shared pages of the first shared program based on different environment information and different version information to obtain multiple first compilation data packages. Each first compilation data package includes the access address of the shared page of the first shared program, the plugins required by the shared page of the first shared program, and the configuration information of the shared page of the first shared program.

[0161] The generation module 703 is also used to generate a set of first compilation data packages for the first shared program based on multiple first compilation data packages.

[0162] Optionally, in the above Figure 7Based on the corresponding embodiments, in another embodiment of the shared program generation apparatus provided in this application, at least one of the environment information and version information among the multiple second compilation data packets is different;

[0163] The acquisition module 702 is further configured to acquire second compilation instructions before acquiring the second compilation data package set of the second shared program, wherein the second compilation instructions indicate the pages of the second shared program to be shared;

[0164] The determination module 701 is also used to determine the page to be shared by the second shared program based on the second compilation instructions;

[0165] The processing module 705 is also used to compile the shared pages of the second shared program based on different environment information and different version information to obtain multiple second compilation data packages;

[0166] The generation module 703 is also used to generate a set of second compilation data packages for the second shared program based on multiple second compilation data packages.

[0167] Optionally, in the above Figure 7 Based on the corresponding embodiments, in another embodiment of the shared program generation device provided in this application, the determining module 701 is specifically used to obtain a first set of compiled data packets and a second set of compiled data packets based on the sharing requirements of the shared program to be processed;

[0168] A third set of compilation data packages matching the target environment information is selected from the first set of compilation data packages, and a fourth set of compilation data packages matching the target environment information is selected from the second set of compilation data packages. The third set of compilation data packages includes at least one first set of compilation data packages, and the fourth set of compilation data packages includes at least one second set of compilation data packages.

[0169] The first target compilation package that matches the target version information is selected from the third compilation package set, and the second target compilation package that matches the target version information is selected from the fourth compilation package set.

[0170] Optionally, in the above Figure 7 Based on the corresponding embodiments, in another embodiment of the shared program generation apparatus provided in this application, the target environment information includes first target environment information and second target environment information, the first target environment information indicates the environment information of the first shared program, and the second target environment information indicates the environment information of the second shared program;

[0171] The target version information includes first target version information and second target version information. The first target version information indicates the version information of the first shared program, and the second target version information indicates the version information of the second shared program.

[0172] The determination module 701 is specifically used to filter out a fifth set of compilation data packets that matches the first target environment information from the first set of compilation data packets, and to filter out a sixth set of compilation data packets that matches the second target environment information from the second set of compilation data packets, wherein the fifth set of compilation data packets includes at least one first compilation data packet, and the sixth set of compilation data packets includes at least one second compilation data packet;

[0173] Select the first target compilation data package that matches the first target version information from the fifth compilation data package set, and select the second target compilation data package that matches the second target version information from the sixth compilation data package set.

[0174] Optionally, in the above Figure 7 Based on the corresponding embodiments, in another embodiment of the shared program generation device provided in this application, the generation module 703 is specifically used to parse the first target compilation data packet and the second target compilation data packet;

[0175] The parsed first target compilation data package is merged into the shared file list of the first shared program;

[0176] The parsed second target compilation data package is merged into the shared file list of the second shared program;

[0177] Based on the shared file lists of the first shared program and the shared file lists of the second shared program, the files are merged with the shared program to be processed to generate the target shared program.

[0178] This application also provides another apparatus for generating shared programs. These apparatuses can be deployed on servers or on terminal devices. This application uses a server-based apparatus as an example for illustration. Please refer to [link to relevant documentation]. Figure 8 , Figure 8This is a schematic diagram of one embodiment of the server in this application. As shown in the figure, the server 1000 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1022 (e.g., one or more processors) and memory 1032, and one or more storage media 1030 (e.g., one or more mass storage devices) for storing application programs 1042 or data 1044. The memory 1032 and storage media 1030 can be temporary or persistent storage. The program stored in the storage media 1030 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the server. Furthermore, the CPU 1022 may be configured to communicate with the storage media 1030 and execute the series of instruction operations in the storage media 1030 on the server 1000.

[0179] Server 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input / output interfaces 1058, and / or one or more operating systems 1041, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.

[0180] The steps performed by the server in the above embodiments can be based on this Figure 8 The server structure shown.

[0181] The server includes 1022 CPUs used for performing tasks such as... Figure 3 The illustrated embodiments and Figure 3 The corresponding embodiments.

[0182] This application also provides a terminal device, such as Figure 8 As shown, for ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. The following explanation uses a mobile phone as an example of a terminal device:

[0183] Figure 9 This is a block diagram illustrating a portion of the structure of a mobile phone related to the terminal provided in the embodiments of this application. (Reference) Figure 9The mobile phone includes components such as a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, a processor 1180, and a power supply 1190. Those skilled in the art will understand that... Figure 9 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.

[0184] The following is combined Figure 9 A detailed introduction to each component of a mobile phone:

[0185] RF circuit 1110 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 1180; additionally, it transmits uplink data to the base station. Typically, RF circuit 1110 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 1110 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0186] The memory 1120 can be used to store software programs and modules. The processor 1180 executes various functions and data processing of the mobile phone by running the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one 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 1120 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.

[0187] The input unit 1130 can be used to receive input numerical or character information, and to generate key signal inputs related to the object settings and function control of the mobile phone. Specifically, the input unit 1130 may include a touch panel 1131 and other input devices 1132. The touch panel 1131, also known as a touch screen, can collect touch operations on or near the object (such as operations performed by the object using a finger, stylus, or any suitable object or accessory on or near the touch panel 1131), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1131 may include two parts: a touch detection device and a touch controller. The touch detection device detects the touch position of the object and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1180, and can also receive and execute commands sent by the processor 1180. In addition, the touch panel 1131 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1131, the input unit 1130 may also include other input devices 1132. Specifically, other input devices 1132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0188] Display unit 1140 can be used to display information input by an object or information provided to an object, as well as various menus of the mobile phone. Display unit 1140 may include display panel 1141, optionally configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 1141. Further, touch panel 1131 may cover display panel 1141. When touch panel 1131 detects a touch operation on or near it, it transmits the information to processor 1180 to determine the type of touch event. Subsequently, processor 1180 provides corresponding visual output on display panel 1141 based on the type of touch event. Although in Figure 9 In this embodiment, the touch panel 1131 and the display panel 1141 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 1131 and the display panel 1141 can be integrated to realize the input and output functions of the mobile phone.

[0189] The mobile phone may also include at least one sensor 1150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1141 according to the ambient light level, and the proximity sensor can turn off the display panel 1141 and / or the backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, are not described in detail here.

[0190] Audio circuit 1160, speaker 1161, and microphone 1162 provide an audio interface between the device and the mobile phone. Audio circuit 1160 converts received audio data into electrical signals and transmits them to speaker 1161, where speaker 1161 converts them into sound signals for output. On the other hand, microphone 1162 converts collected sound signals into electrical signals, which are received by audio circuit 1160, converted into audio data, and then processed by processor 1180 before being transmitted via RF circuit 1110 to, for example, another mobile phone, or the audio data can be output to memory 1120 for further processing.

[0191] WiFi is a short-range wireless transmission technology. A mobile phone using the WiFi module 1170 can help users send and receive emails, browse web pages, and access streaming media, providing them with wireless broadband internet access. Although Figure 9 WiFi module 1170 is shown, but it is understood that it is not an essential component of a mobile phone.

[0192] The processor 1180 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 1120, and calls data stored in the memory 1120 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1180.

[0193] The mobile phone also includes a power supply 1190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 1180 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0194] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be elaborated here.

[0195] In this embodiment of the application, the processor 1180 included in the terminal is used to perform, for example... Figure 3 The illustrated embodiments and Figure 3 The corresponding embodiments.

[0196] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the aforementioned actions. Figure 3 The steps performed by the terminal device in the method described in the illustrated embodiment.

[0197] This application also provides a computer program product including a program, which, when run on a computer, causes the computer to perform the aforementioned actions. Figure 3 The steps performed by the terminal device in the method described in the illustrated embodiment.

[0198] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0199] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, at least two units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0200] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across at least two network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0201] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0202] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0203] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for generating a shared program, characterized in that, include: Determine the target environment information and target version information, wherein the target environment information is the environment information required by the target sharing program, the target version information is the version information required by the target sharing program, and the target sharing program is used to access the shared page of the first shared program and to access the shared page of the second shared program. Obtain the first compilation data package set of the first shared program, wherein the first compilation data package set includes multiple first compilation data packages, and each first compilation data package includes environment information and version information; Obtain the second compilation data package set of the second shared program, wherein the second compilation data package set includes multiple second compilation data packages, and each second compilation data package includes environment information and version information; Based on the target environment information and the target version information, a first target compilation data package is determined from the first compilation data package set, and a second target compilation data package is determined from the second compilation data package set, wherein the environment information and version information included in the first target compilation data package match the target environment information and the target version information, and the environment information and version information included in the second target compilation data package match the target environment information and the target version information; Based on the first target compilation data package and the second target compilation data package, they are merged with the shared program to be processed to generate the target shared program.

2. The method according to claim 1, characterized in that, The determination of the target environment information and target version information includes: Obtain the sharing requirements for the program to be shared, wherein the sharing requirements include a first shared program identifier, a second shared program identifier, target environment information, and target version information, wherein the first shared program identifier indicates the first shared program, and the second shared program identifier indicates the second shared program; The target environment information and the target version information are determined based on the sharing requirements of the shared program to be processed; The method further includes: The first shared program and the second shared program are determined based on the sharing requirements of the shared program to be processed; Create a shared file list for the first shared program and a shared file list for the second shared program, wherein the shared file list is used to incorporate the parsed compiled data package.

3. The method according to claim 1, characterized in that, At least one of the environment information and the version information differs among the multiple first compilation data packages; Before obtaining the first set of compiled data packages for the first shared program, the method further includes: Obtain the first compilation instruction, wherein the first compilation instruction indicates the page to be shared by the first shared program; The page to be shared by the first shared program is determined based on the first compilation instruction; Based on different environment information and different version information, the shared pages of the first shared program are compiled to obtain the multiple first compilation data packages. Each first compilation data package includes the access address of the shared page of the first shared program, the plugins required by the shared page of the first shared program, and the configuration information of the shared page of the first shared program. The first compilation data package set of the first shared program is generated based on the plurality of first compilation data packages.

4. The method according to claim 1, characterized in that, At least one of the environment information and the version information differs between the multiple second compilation data packages; Before obtaining the second set of compiled data packages for the second shared program, the method further includes: Obtain a second compilation instruction, wherein the second compilation instruction indicates the page to be shared by the second shared program; The pages to be shared by the second shared program are determined based on the second compilation instructions; Based on different environment information and different version information, the shared pages of the second shared program are compiled to obtain the multiple second compiled data packages; The second compilation data package set of the second shared program is generated based on the plurality of second compilation data packages.

5. The method according to claim 2, characterized in that, The step of determining a first target compilation data package from the first compilation data package set and a second target compilation data package from the second compilation data package set based on the target environment information and the target version information includes: The first set of compiled data packages and the second set of compiled data packages are obtained based on the sharing requirements of the shared program to be processed; A third set of compilation data packages matching the target environment information is selected from the first set of compilation data packages, and a fourth set of compilation data packages matching the target environment information is selected from the second set of compilation data packages, wherein the third set of compilation data packages includes at least one first compilation data package, and the fourth set of compilation data packages includes at least one second compilation data package; The first target compilation data package that matches the target version information is selected from the third compilation data package set, and the second target compilation data package that matches the target version information is selected from the fourth compilation data package set.

6. The method according to claim 2, characterized in that, The target environment information includes first target environment information and second target environment information, wherein the first target environment information indicates the environment information of the first shared program, and the second target environment information indicates the environment information of the second shared program. The target version information includes first target version information and second target version information, wherein the first target version information indicates the version information of the first shared program, and the second target version information indicates the version information of the second shared program. The step of determining a first target compilation data package from the first compilation data package set and a second target compilation data package from the second compilation data package set based on the target environment information and the target version information includes: A fifth set of compilation data packets matching the first target environment information is selected from the first set of compilation data packets, and a sixth set of compilation data packets matching the second target environment information is selected from the second set of compilation data packets, wherein the fifth set of compilation data packets includes at least one first compilation data packet, and the sixth set of compilation data packets includes at least one second compilation data packet; The first target compilation data package that matches the first target version information is selected from the fifth compilation data package set, and the second target compilation data package that matches the second target version information is selected from the sixth compilation data package set.

7. The method according to claim 2, characterized in that, The step of merging the first target compilation data package and the second target compilation data package with the shared program to be processed to generate the target shared program includes: Parse the first target compilation data packet and the second target compilation data packet; The parsed first target compilation data package is merged into the shared file list of the first shared program; The parsed second target compilation data package is merged into the shared file list of the second shared program; Based on the shared file list of the first shared program and the shared file list of the second shared program, the program to be processed is merged with the program to be processed to generate the target shared program.

8. A device for generating a shared program, characterized in that, The apparatus for generating the shared program includes: A determination module is used to determine target environment information and target version information, wherein the target environment information is the environment information required by the target sharing program, the target version information is the version information required by the target sharing program, and the target sharing program is used to access the shared page of the first shared program and to access the shared page of the second shared program. The acquisition module is used to acquire the first compilation data package set of the first shared program, wherein the first compilation data package set includes multiple first compilation data packages, and each first compilation data package includes environment information and version information; The acquisition module is further configured to acquire a second set of compilation data packets for the second shared program, wherein the second set of compilation data packets includes multiple second compilation data packets, and each second compilation data packet includes environment information and version information; The determining module is further configured to determine a first target compilation data package from the first compilation data package set and a second target compilation data package from the second compilation data package set based on the target environment information and the target version information, wherein the environment information and version information included in the first target compilation data package match the target environment information and the target version information, and the environment information and version information included in the second target compilation data package match the target environment information and the target version information; The generation module is used to merge the first target compilation data package and the second target compilation data package with the shared program to be processed to generate the target shared program.

9. A computer device, characterized in that, include: Memory, transceiver, processor, and bus system; The memory is used to store programs; The processor is used to execute the program in the memory to implement the method of any one of claims 1 to 7; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.

10. A computer-readable storage medium comprising instructions, when executed on a computer, causing the computer to perform the method as claimed in any one of claims 1 to 7.