Small program integration method and device and computer program product

By establishing the relationship between the main package and the subcontract of the applet and optimizing the processing according to the configuration size of the subcontract, the problem of inefficient mini program development and maintenance involving multiple business parties is solved, and efficient mini program integration and maintain.

CN119493576APending Publication Date: 2025-02-21CHINA TELECOM NETWORK SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411545930.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In the prior art, when the development of a mini program involves multiple business parties, the development and maintenance of each business party needs to make a request to the main package, resulting in inefficient development and maintenance of the mini program.

Method used

By receiving the construction request information of the business party, the subcontract address information corresponding to the business party is determined, and the relationship between the main packet and the subcontract is established. After receiving the update request, obtain the target subcontract and compare according to its configuration size. If the configuration size is greater than the preset value, send an optimization request to reduce the configuration size; if the configuration size is less than or equal to the preset value, update the main package based on the private configuration file.

Benefits of technology

It realizes high cohesion within subcontracts and low coupling between main and subcontracts, improving the efficiency of mini-program development and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493576A_ABST
    Figure CN119493576A_ABST
Patent Text Reader

Abstract

The invention provides an applet integration method and device and a computer program product, and the method comprises the steps: determining the address information of a subpackage corresponding to a business side based on the received construction request information, and building the incidence relation between a main package and the subpackage based on the address information; after an updating request sent by a target service party is received, obtaining a target subpackage based on the determined address information according to the association relationship; comparing the configuration size of the target subpackage with a first preset configuration size; when the configuration size of the target subpackage is greater than a first preset configuration size, sending a first optimization request to the target service party; and when the configuration size of the target subpackage is smaller than or equal to the first preset configuration size, updating the main package based on the private configuration file in the target subpackage. According to the application, the main package obtains the private configuration file in the target sub-package based on the association relationship to update the main package, so that high cohesion in the sub-package and low coupling of the main package and the sub-package are realized, and the applet development and maintenance efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method and device for integrating small programs, and a computer program product. Background Art

[0002] With the development of mobile Internet technology, different applications (APPs) on mobile phones can meet users' corresponding work and life needs. In addition to the APPs that daily users install on their mobile phones, mini-programs have also been greatly developed. Mini-programs are services provided to users based on the host APP.

[0003] In the prior art, since most mini-programs are small in scale, the development and maintenance of mini-programs are directly carried out in the mini-program configuration file app.json. However, when the development of a mini-program involves multiple business parties, the business party's development and maintenance of the mini-program configuration file requires the business party to make a request to the main package of the mini-program, and the main package then develops and maintains the mini-program configuration file app.json, which results in limitations and low efficiency in the development and maintenance of large mini-programs or mini-programs with complex functions. Summary of the invention

[0004] The present invention provides a program integration method, device and computer program product to solve the problem in the prior art that when the development of a small program involves multiple business parties, each business party's development and maintenance needs to make a request to the main package, resulting in low efficiency in the development and maintenance of the small program.

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

[0006] Based on the received build request information sent by the business party, determine the address information of the sub-package corresponding to the business party, and based on the determined address information of the sub-package, establish an association relationship between the main package of the mini program to be processed and the sub-package;

[0007] After receiving the update request sent by the target business party, determine the address information of the sub-package corresponding to the target business party according to the association relationship, and obtain the target sub-package based on the determined address information;

[0008] Comparing the configuration size of the target subpackage with a first preset configuration size, wherein the configuration size of the target subpackage is the configuration size after the target subpackage is compressed;

[0009] When the configuration size of the target subpackage is larger than a first preset configuration size, a first optimization request is sent to the target business party to instruct the configuration size of the target subpackage to be reduced; when the configuration size of the target subpackage is less than or equal to the first preset configuration size, the main package is updated based on a private configuration file in the target subpackage, wherein the private configuration file is used to configure the subpackage through the target business party.

[0010] In a possible implementation manner, after obtaining the target sub-packet based on the determined address information, the method further includes:

[0011] Compressing each target sub-sub-package in the target sub-package to obtain a compressed target sub-sub-package, wherein the target sub-package includes at least one target sub-sub-package;

[0012] Determining a configuration size of the compressed target sub-packet based on an asynchronous recursive function;

[0013] The sum of the configuration sizes of each target sub-package is used as the configuration size of the target sub-package.

[0014] In a possible implementation, before taking the sum of the configuration sizes of each target sub-package as the configuration size of the target sub-package, the method further includes:

[0015] For each target sub-package, comparing the configuration size of the target sub-package with a second preset configuration size;

[0016] When the configuration size of the target sub-package is larger than a second preset configuration size, a second optimization request is sent to the target business party to instruct the target sub-package to reduce its configuration size; and when the configuration size of each target sub-package is smaller than or equal to the second preset configuration size, a sum of the configuration sizes of all target sub-packages is calculated.

[0017] In a possible implementation manner, compressing each target sub-packet in the target sub-packet includes:

[0018] For each target sub-package, determining the file format of each configuration file in the target sub-package, and determining a preset compression function corresponding to each file format;

[0019] Each configuration file in the target sub-package is compressed based on a preset compression function using a preset compression tool.

[0020] In a possible implementation, determining the configuration size of the compressed target sub-packet based on the asynchronous recursive function includes:

[0021] Determining a first configuration size of each compressed configuration file based on the asynchronous recursive function;

[0022] The sum of the first configuration sizes under the target directory is used as the second configuration size of the target directory;

[0023] The sum of the second configuration sizes in the target sub-packet is used as the configuration size of the target sub-packet.

[0024] In a second aspect, an embodiment of the present application provides a mini-program integration device, the device comprising:

[0025] An association relationship establishment module, used to determine the address information of the sub-package corresponding to the business party based on the received build request information sent by the business party, and establish an association relationship between the main package of the mini program to be processed and the sub-package based on the determined address information of the sub-package;

[0026] A sub-package acquisition module, configured to, after receiving an update request sent by a target business party, determine address information of a sub-package corresponding to the target business party according to the association relationship, and acquire a target sub-package based on the determined address information;

[0027] A comparison and determination module is used to compare the configuration size of the target subpackage with a first preset configuration size, wherein the configuration size of the target subpackage is the configuration size after the target subpackage is compressed; when the configuration size of the target subpackage is larger than the first preset configuration size, a first optimization request for instructing to reduce the configuration size of the target subpackage is sent to the target business party; when the configuration size of the target subpackage is less than or equal to the first preset configuration size, the main package is updated based on a private configuration file in the target subpackage, wherein the private configuration file is used to configure the subpackage through the target business party.

[0028] In a possible implementation, the sub-packet acquisition module is further used to:

[0029] Compressing each target sub-sub-package in the target sub-package to obtain a compressed target sub-sub-package, wherein the target sub-package includes at least one target sub-sub-package;

[0030] Determining a configuration size of the compressed target sub-packet based on an asynchronous recursive function;

[0031] The sum of the configuration sizes of each target sub-package is used as the configuration size of the target sub-package.

[0032] In a possible implementation manner, the comparison and determination module is further used to:

[0033] For each target sub-package, comparing the configuration size of the target sub-package with a second preset configuration size;

[0034] When the configuration size of the target sub-package is larger than a second preset configuration size, a second optimization request is sent to the target business party to instruct the target sub-package to reduce its configuration size; and when the configuration size of each target sub-package is smaller than or equal to the second preset configuration size, a sum of the configuration sizes of all target sub-packages is calculated.

[0035] In a possible implementation, the sub-packet acquisition module is further used to:

[0036] For each target sub-package, determining the file format of each configuration file in the target sub-package, and determining a preset compression function corresponding to each file format;

[0037] Each configuration file in the target sub-package is compressed based on a preset compression function using a preset compression tool.

[0038] In a possible implementation, the sub-packet acquisition module is further used to:

[0039] Determining a first configuration size of each compressed configuration file based on the asynchronous recursive function;

[0040] The sum of the first configuration sizes under the target directory is used as the second configuration size of the target directory;

[0041] The sum of the second configuration sizes in the target sub-packet is used as the configuration size of the target sub-packet.

[0042] In a third aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, when the computer program code is run on a computer, enables the computer to execute the method as described in any one of the first aspects.

[0043] The beneficial effects of the present invention are as follows:

[0044] The present application provides a method, device and computer program product for integrating small programs, the method comprising: determining the address information of the subpackage corresponding to the business party based on the received build request information sent by the business party, and establishing the association relationship between the main package and the subpackage of the small program to be processed based on the determined address information of the subpackage; after receiving the update request sent by the target business party, determining the address information of the subpackage corresponding to the target business party according to the association relationship, and obtaining the target subpackage based on the determined address information; comparing the configuration size of the target subpackage with a first preset configuration size, wherein the configuration size of the target subpackage is the configuration size after the target subpackage is compressed; when the configuration size of the target subpackage is larger than the first preset configuration size, sending a first optimization request for indicating to reduce the configuration size of the target subpackage to the target business party; when the configuration size of the target subpackage is less than or equal to the first preset configuration size, updating the main package based on the private configuration file in the target subpackage, wherein the private configuration file is used to configure the subpackage through the target business party. This application establishes an association relationship between the main package and each sub-package, so that the business party can configure each sub-package autonomously. The main package obtains the private configuration file in the target sub-package based on the association relationship and updates the main package, thereby achieving high cohesion within the sub-package and low coupling between the main package and the sub-package, thereby improving the efficiency of mini-program development and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0046] Figure 1 An application scenario of a mini-program integration method provided in an embodiment of the present application;

[0047] Figure 2 A flowchart of a method for integrating small programs provided in an embodiment of the present application;

[0048] Figure 3 A flowchart of another mini-program integration method provided in an embodiment of the present application;

[0049] Figure 4 A flowchart of another mini-program integration method provided in an embodiment of the present application;

[0050] Figure 5 A flowchart of another mini-program integration method provided in an embodiment of the present application;

[0051] Figure 6A flowchart of another mini-program integration method provided in an embodiment of the present application;

[0052] Figure 7 A complete flowchart of a method for integrating small programs provided in an embodiment of the present application;

[0053] Figure 8 A schematic diagram of the structure of a mini-program integration device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] It should be noted that the terms "including" and "having" and their variations involved in the documents of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0056] The terms "first" and "second" in this document are used for descriptive purposes only and should not be understood as explicitly or implicitly indicating relative importance or implicitly indicating the number of technical features indicated. Therefore, features defined as "first" and "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0057] The word “exemplary” is used hereinafter to mean “serving as an example, example, or illustration.” Any embodiment described as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0058] With the development of mobile Internet technology, different applications (APPs) on mobile phones can meet users' corresponding work and life needs. In addition to the APPs that daily users install on their mobile phones, mini-programs have also been greatly developed. Mini-programs are services provided to users based on the host APP.

[0059] In the prior art, since most mini-programs are small in scale, the development and maintenance of mini-programs are directly carried out in the mini-program configuration file app.json. However, when the development of a mini-program involves multiple business parties, the business party's development and maintenance of the mini-program configuration file requires the business party to make a request to the main package of the mini-program, and the main package then develops and maintains the mini-program configuration file app.json, which results in limitations and low efficiency in the development and maintenance of large mini-programs or mini-programs with complex functions.

[0060] Based on the above problems, an embodiment of the present application provides a mini-program integration method, and the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0061] Figure 1 An application scenario of a mini-program integration method provided by an embodiment of the present application is shown, see Figure 1 As shown, the server 100 is communicatively connected with the business party 102 via the network 101, wherein the network 101 may be but is not limited to a local area network, a metropolitan area network or a wide area network, etc., the business party 102 may include multiple business parties, namely business party 1021, business party 1022...business party 102n, and the number of terminal devices 110 connected to the server 100 may be multiple, wherein the terminal device may be a portable device (for example: a mobile phone, a tablet computer, a smart watch, etc.), or a computer, a smart screen or a personal computer (PC, Personal Computer), etc.

[0062] The server 100 may be an application-level server storing multiple applications. The server 100 may be any device having networking function and providing data processing capability. For example, the server 100 may be a cloud server or a server set consisting of one or more servers. An embodiment of a method for integrating a small program in the present application is applied to the server 100.

[0063] It should be noted that Figure 1 The application scenario is only an example of an application scenario for implementing the embodiment of the present application. The embodiment of the present application is not limited to the above Figure 1 The application scenario described.

[0064] like Figure 2 FIG. 1 is a flow chart of a method for integrating a small program provided in an embodiment of the present application, and the steps of the method are as follows:

[0065] S201. Based on the received build request information sent by the business party, determine the address information of the sub-package corresponding to the business party, and establish an association relationship between the main package and the sub-package of the mini program to be processed based on the determined address information of the sub-package;

[0066] Specifically, based on the received build request information sent by the business party, determine the business party corresponding to the main package of the mini-program to be processed. Each business party corresponds to a sub-package, wherein the build request information includes the address information of the sub-package. In this application, the association relationship between the main package and the sub-package of the mini-program to be processed is established based on the distributed management system git submodule. The main package associates each main sub-package through the distributed management system label git tag, thereby realizing the establishment of the association relationship between the main package and the sub-package.

[0067] For example, the business party may be DDoS (Distributed Denial of Service), WAF (Web Application Firewall), MSSP (Managed Security Service Provider), CSOC (Cyber ​​Security Operations Center). It should be understood that the preferred embodiments of the business party described herein are only used to illustrate and explain the present application, and are not used to limit the present application.

[0068] It should be noted that after receiving the build request information sent by the business party and establishing the association relationship between the main package and the sub-package of the mini-program to be processed, it is necessary to send a private configuration file app.private.json to each sub-package. The private configuration file is used to configure the sub-package through the target business party.

[0069] S202: after receiving the update request sent by the target business party, determine the address information of the sub-package corresponding to the target business party according to the association relationship, and obtain the target sub-package based on the determined address information;

[0070] It should be noted that after the business party completes the development or maintenance of the subcontract, it sends an update request to the main package. After the main package receives the update request from the target business party, it obtains the target subcontract based on the association relationship between the main package and the target subcontract.

[0071] S203, comparing the configuration size of the target subpackage with a first preset configuration size, wherein the configuration size of the target subpackage is the configuration size after the target subpackage is compressed;

[0072] It should be noted that the files of the mini program when it is uploaded and published are compressed files. Therefore, this application counts the configuration size of the target sub-package so that the configuration size of each target sub-package is within the preset range, so that the mini program can be uploaded and published normally. In addition, the first preset configuration size is the preset configuration size corresponding to the target sub-package.

[0073] S204. When the configuration size of the target subpackage is larger than a first preset configuration size, a first optimization request is sent to the target business party to instruct the target subpackage to reduce its configuration size. When the configuration size of the target subpackage is smaller than or equal to the first preset configuration size, the main package is updated based on a private configuration file in the target subpackage, wherein the private configuration file is used to configure the subpackage through the target business party.

[0074] Specifically, when the configuration size of the target subpackage is larger than the first preset configuration size, a first optimization request is sent to the target business party to instruct the reduction of the configuration size of the target subpackage until the configuration size of the target subpackage is smaller than the first preset configuration size, and the main package is updated based on the private configuration file in the target subpackage.

[0075] For example, the first preset configuration size corresponding to the business party's DDos can be 5M, that is, when the configuration size of the target subpacket corresponding to the business party's DDos is less than or equal to 5M, the main package can be updated based on the private configuration file in the target subpacket. When the configuration size of the target subpacket corresponding to the business party's DDos is greater than 5M, a first optimization request is sent to the target business party to instruct to reduce the configuration size of the target subpacket until the configuration size of the target subpacket is less than 5M.

[0076] For example, the first configuration size corresponding to the target business party CSOC can be 4M, that is, when the configuration size of the target subpackage corresponding to the business party CSOC is less than or equal to 5M, the main package can be updated based on the private configuration file in the target subpackage. When the configuration size of the target subpackage corresponding to the business party CSOC is greater than 5M, a first optimization request is sent to the target business party to instruct to reduce the configuration size of the target subpackage until the configuration size of the target subpackage is less than 5M.

[0077] The present application provides a mini-program integration method, the method comprising: determining address information of a sub-package corresponding to a business party based on build request information received from a business party, and establishing an association relationship between a main package and a sub-package of a mini-program to be processed based on the determined address information of the sub-package; after receiving an update request sent by a target business party, determining address information of a sub-package corresponding to the target business party based on the association relationship, and acquiring the target sub-package based on the determined address information; comparing a configuration size of the target sub-package with a first preset configuration size, wherein the configuration size of the target sub-package is a configuration size after compression of the target sub-package; when the configuration size of the target sub-package is greater than the first preset configuration size, sending a first optimization request for indicating reduction of the configuration size of the target sub-package to the target business party; when the configuration size of the target sub-package is less than or equal to the first preset configuration size, updating the main package based on a private configuration file in the target sub-package, wherein the private configuration file is used to configure the sub-package through the target business party. This application establishes an association relationship between the main package and each sub-package, so that the business party can configure each sub-package autonomously. The main package obtains the private configuration file in the target sub-package based on the association relationship and updates the main package, thereby achieving high cohesion within the sub-package and low coupling between the main package and the sub-package, thereby improving the efficiency of mini-program development and maintenance.

[0078] It should be noted that the configuration of the sub-package by the private configuration file through the target business party includes the sub-package page configuration and the pre-loaded page configuration.

[0079] In a possible implementation, after obtaining the target sub-package based on the determined address information, since the configuration size of each target sub-package needs to be within a preset range, the present application needs to count the configuration sizes of the target sub-packages after obtaining the target sub-package based on the determined address information, so as to compare and judge the configuration sizes of the target sub-packages, such as Figure 3 FIG. 1 is a flow chart of another mini-program integration method provided in an embodiment of the present application, and the specific steps are as follows:

[0080] S301, compressing each target sub-sub-package in a target sub-package to obtain a compressed target sub-sub-package, wherein the target sub-package includes at least one target sub-sub-package;

[0081] It should be noted that the target sub-package includes a page configuration sub-package and a preloaded page sub-package. The page configuration sub-package is used to configure the sub-package page in the target sub-package, and the preloaded page sub-package is used to configure the preloaded page. The preloaded page is used to preload the sub-package page resources accessed when the user accesses the sub-package page through the terminal device, thereby shortening the user's waiting time and improving the user experience. In addition, in a specific embodiment, the target sub-package is not limited to the page configuration sub-package and the preloaded page sub-package, and the sub-package can also be configured according to the needs.

[0082] In a specific embodiment, Figure 4 As shown, it is a flowchart of another mini-program integration method provided in an embodiment of the present application, and each target sub-package in the target sub-package is compressed through the following steps:

[0083] S401, for each target sub-package, determining the file format of each configuration file in the target sub-package, and determining a preset compression function corresponding to each file format;

[0084] S402: compress each configuration file in the target sub-package based on a preset compression function using a preset compression tool.

[0085] For example, when it is determined that the file format of each configuration file in the target sub-package includes js, wxs, wxss, json and wxml, a preset compression function corresponding to each file format is determined, and each configuration file is compressed based on the preset compression tool and the preset compression function. Among them, the preset compression tool of the present application can be Gulp compression. That is, js files and wxs files can be compressed by the preset compression function uglify, wxss files can be compressed by the preset compression function minifyCss, json files can be compressed by the preset compression function jsonMinify, and wxml files can be compressed by the preset compression function htmlmin.

[0086] Among them, before compressing the js file through the preset compression function uglify, the js file is translated through the babel function.

[0087] S302, determining the configuration size of the compressed target sub-packet based on the asynchronous recursive function;

[0088] In a possible implementation, Figure 5 As shown, it is a flow chart of another mini-program integration method provided by an embodiment of the present application. Each configuration file in the target sub-package is compressed based on a preset compression function, and the compressed target sub-package is sent to a configuration size statistics file. In the configuration size statistics file, the configuration size of each compressed target sub-package is determined based on an asynchronous recursive function. The specific steps are as follows:

[0089] S501, determining a first configuration size of each compressed configuration file based on an asynchronous recursive function;

[0090] S502, taking the sum of the first configuration sizes under the target directory as the second configuration size of the target directory;

[0091] S503: Taking the sum of the second configuration sizes in the target sub-package as the configuration size of the target sub-package.

[0092] In a specific embodiment, the first configuration size of each configuration file is first determined through an asynchronous recursive function, the sum of the first configuration sizes under the target directory is used as the second configuration size of the target directory, and then the sum of the second configuration sizes of each target directory under the target sub-package is used as the configuration size of the target sub-package through an asynchronous recursive function.

[0093] In a possible implementation, since the configuration size of each target subpackage needs to be within a preset range, the present application needs to compare and judge the configuration size of the target subpackage. Before comparing and judging the configuration size of the target subpackage, it is also necessary to judge the configuration size of the target subpackage in each target subpackage.

[0094] like Figure 6 As shown, it is a flowchart of another mini-program integration method provided in an embodiment of the present application, and the steps are as follows:

[0095] S601: for each target sub-package, compare the configuration size of the target sub-package with a second preset configuration size;

[0096] S602. When the configuration size of the target sub-package is larger than the second preset configuration size, send a second optimization request to the target business party to instruct the target sub-package to reduce its configuration size; when the configuration size of each target sub-package is smaller than or equal to the second preset configuration size, calculate the sum of the configuration sizes of all target sub-packages.

[0097] In a specific embodiment, the second preset configuration size is a pre-set configuration size corresponding to the target sub-package. When the configuration size of the target sub-package is larger than the second preset configuration size, a second optimization request is sent to the target business party to instruct to reduce the configuration size of the target sub-package until the configuration size of the target sub-package is smaller than the second preset configuration.

[0098] For example, the target subpacket corresponding to the business party's DDoS includes two target sub-packets, namely DDoS1 and DDoS2. If the second preset configuration size corresponding to each target sub-packet is 2M, that is, by comparing the target sub-packet DDoS1 and the target sub-packet DDoS2 with 2M, when it is determined that the configuration sizes of the target sub-packet DDoS1 and the target sub-packet DDoS2 are both smaller than the second preset configuration size 2M, the sum of the target sub-packet DDoS1 and the target sub-packet DDoS2 is calculated.

[0099] S303: The sum of the configuration sizes of each target sub-package is used as the configuration size of the target sub-package.

[0100] Specifically, when the configuration size of each target sub-package is less than or equal to the second preset configuration size, the sum of the configuration sizes of all target sub-packages is calculated, and the sum is used as the configuration size of the target sub-package, so as to compare and judge the configuration size of the target sub-package.

[0101] It should be noted that when the configuration size of each target subpackage is less than or equal to the first preset configuration size, and the main package is updated based on the private configuration file in each target subpackage, the main package and subpackage of the mini program are compiled based on the pre-compilation instructions, and the mini program is uploaded to the cloud processor.

[0102] like Figure 7 As shown, it is a complete flow chart of a method for integrating small programs provided in an embodiment of the present application, and the specific steps are as follows:

[0103] S701. Based on the received build request information sent by the business party, determine the address information of the sub-package corresponding to the business party, and establish an association relationship between the main package and the sub-package of the mini program to be processed based on the determined address information of the sub-package;

[0104] S702: After receiving the update request sent by the target business party, determine the address information of the sub-package corresponding to the target business party according to the association relationship, and obtain the target sub-package based on the determined address information;

[0105] S703, compress each target sub-sub-package in the target sub-package to obtain a compressed target sub-sub-package;

[0106] S704, determining the configuration size of the compressed target sub-packet based on the asynchronous recursive function;

[0107] S705: for each target sub-package, determine whether the configuration size of each target sub-package is less than or equal to the second preset configuration size; if so, execute S706; otherwise, execute S707;

[0108] S706, calculate the sum of the configuration sizes of all target sub-packets, and execute S708;

[0109] S707: Send a second optimization request for instructing to reduce the configuration size of the target sub-package to the target business party until the configuration size of the target sub-package is less than or equal to a second preset configuration size;

[0110] S708, for each target sub-package, determine whether the configuration size of each target sub-package is smaller than the first preset configuration size, if so, execute S709, otherwise, execute S710;

[0111] S709, updating the main package based on the private configuration file in the target sub-package;

[0112] S710: Send a first optimization request for instructing to reduce the configuration size of a target sub-package to a target business party until the configuration size of the target sub-package is smaller than a first preset configuration size.

[0113] This application establishes an association relationship between the main package and each sub-package, so that after the business party configures each sub-package autonomously, the main package obtains the private configuration file in the target sub-package based on the association relationship to update the main package, thereby achieving high cohesion within the sub-package and low coupling between the main package and the sub-package, and improving the efficiency of mini-program development and maintenance. In addition, by determining that the configuration size of the target sub-package is less than or equal to the second preset configuration size, and determining that the configuration size of the target sub-package is less than or equal to the first preset configuration size, the mini-program meets the configuration size limit, so that it can be uploaded and published normally, improving efficiency.

[0114] Based on the same inventive concept, the embodiment of the present application also provides a mini-program integration device, the principle of solving the problem by the mini-program integration device is similar to that of the above-mentioned mini-program integration method. Therefore, the embodiment of the mini-program integration device can refer to the implementation of the mini-program integration method, and the repeated parts will not be repeated.

[0115] like Figure 8 The above is a schematic diagram of the structure of a mini-program integration device provided in an embodiment of the present application, and the device includes:

[0116] The association relationship establishment module 801 is used to determine the address information of the sub-package corresponding to the business party based on the received construction request information sent by the business party, and establish the association relationship between the main package and the sub-package of the mini program to be processed based on the determined address information of the sub-package;

[0117] The sub-package acquisition module 802 is used to determine the address information of the sub-package corresponding to the target business party according to the association relationship after receiving the update request sent by the target business party, and acquire the target sub-package based on the determined address information;

[0118] The comparison and determination module 803 is used to compare the configuration size of the target subpackage with a first preset configuration size, wherein the configuration size of the target subpackage is the configuration size after compression of the target subpackage; when the configuration size of the target subpackage is larger than the first preset configuration size, a first optimization request for indicating reduction of the configuration size of the target subpackage is sent to the target business party; when the configuration size of the target subpackage is less than or equal to the first preset configuration size, the main package is updated based on a private configuration file in the target subpackage, wherein the private configuration file is used to configure the subpackage through the target business party.

[0119] The present application provides a method and device for integrating small programs, the method comprising: determining the address information of the subpackage corresponding to the business party based on the received build request information sent by the business party, and establishing the association relationship between the main package and the subpackage of the small program to be processed based on the determined address information of the subpackage; after receiving the update request sent by the target business party, determining the address information of the subpackage corresponding to the target business party according to the association relationship, and obtaining the target subpackage based on the determined address information; comparing the configuration size of the target subpackage with a first preset configuration size, wherein the configuration size of the target subpackage is the configuration size after the target subpackage is compressed; when the configuration size of the target subpackage is larger than the first preset configuration size, sending a first optimization request for indicating to reduce the configuration size of the target subpackage to the target business party; when the configuration size of the target subpackage is less than or equal to the first preset configuration size, updating the main package based on the private configuration file in the target subpackage, wherein the private configuration file is used to configure the subpackage through the target business party. This application establishes an association relationship between the main package and each sub-package, so that the business party can configure each sub-package autonomously. The main package obtains the private configuration file in the target sub-package based on the association relationship and updates the main package, thereby achieving high cohesion within the sub-package and low coupling between the main package and the sub-package, thereby improving the efficiency of mini-program development and maintenance.

[0120] In a possible implementation, the sub-packet acquisition module 802 is further configured to:

[0121] Compressing each target sub-sub-package in the target sub-package to obtain a compressed target sub-sub-package, wherein the target sub-package includes at least one target sub-sub-package;

[0122] Determining a configuration size of the compressed target sub-packet based on an asynchronous recursive function;

[0123] The sum of the configuration sizes of each target sub-package is used as the configuration size of the target sub-package.

[0124] In a possible implementation, the comparison and determination module 803 is further configured to:

[0125] For each target sub-package, comparing the configuration size of the target sub-package with a second preset configuration size;

[0126] When the configuration size of the target sub-package is larger than a second preset configuration size, a second optimization request is sent to the target business party to instruct the target sub-package to reduce its configuration size; and when the configuration size of each target sub-package is smaller than or equal to the second preset configuration size, a sum of the configuration sizes of all target sub-packages is calculated.

[0127] In a possible implementation, the sub-packet acquisition module 802 is further configured to:

[0128] For each target sub-package, determining the file format of each configuration file in the target sub-package, and determining a preset compression function corresponding to each file format;

[0129] Each configuration file in the target sub-package is compressed based on a preset compression function using a preset compression tool.

[0130] In a possible implementation, the sub-packet acquisition module 802 is further configured to:

[0131] Determining a first configuration size of each compressed configuration file based on the asynchronous recursive function;

[0132] The sum of the first configuration sizes under the target directory is used as the second configuration size of the target directory;

[0133] The sum of the second configuration sizes in the target sub-packet is used as the configuration size of the target sub-packet.

[0134] Based on the same inventive concept, an embodiment of the present application provides a computer program product. The principle of solving the problem by the computer program product is similar to that of the above-mentioned mini-program integration method and device. Therefore, the computer program product can solve the problem by referring to the implementation of the mini-program integration method and device, and the repeated parts will not be repeated.

[0135] The computer program product includes: a computer program code, which, when executed on a computer, enables the computer to execute any one of the methods described above for integrating small programs.

[0136] The present application provides a method, device and computer program product for integrating small programs, the method comprising: determining the address information of the subpackage corresponding to the business party based on the received build request information sent by the business party, and establishing the association relationship between the main package and the subpackage of the small program to be processed based on the determined address information of the subpackage; after receiving the update request sent by the target business party, determining the address information of the subpackage corresponding to the target business party according to the association relationship, and obtaining the target subpackage based on the determined address information; comparing the configuration size of the target subpackage with a first preset configuration size, wherein the configuration size of the target subpackage is the configuration size after the target subpackage is compressed; when the configuration size of the target subpackage is larger than the first preset configuration size, sending a first optimization request for indicating to reduce the configuration size of the target subpackage to the target business party; when the configuration size of the target subpackage is less than or equal to the first preset configuration size, updating the main package based on the private configuration file in the target subpackage, wherein the private configuration file is used to configure the subpackage through the target business party. This application establishes an association relationship between the main package and each sub-package, so that the business party can configure each sub-package autonomously. The main package obtains the private configuration file in the target sub-package based on the association relationship and updates the main package, thereby achieving high cohesion within the sub-package and low coupling between the main package and the sub-package, thereby improving the efficiency of mini-program development and maintenance.

[0137] The present application is described above with reference to the block diagrams and / or flow charts showing the methods, devices (systems) and / or computer program products according to the embodiments of the present application. It should be understood that a block of the block diagram and / or flow chart diagram and a combination of blocks of the block diagram and / or flow chart diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer and / or other programmable data processing device to produce a machine, so that the instructions executed by the computer processor and / or other programmable data processing device create a method for implementing the functions / actions specified in the block diagram and / or flow chart block.

[0138] Accordingly, the present application may also be implemented with hardware and / or software (including firmware, resident software, microcode, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium, which has a computer-usable or computer-readable program code implemented in the medium, for use by an instruction execution system or in conjunction with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium may be any medium that may contain, store, communicate, transmit, or convey a program for use by an instruction execution system, device, or apparatus, or in conjunction with an instruction execution system, device, or apparatus.

[0139] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for integrating small programs, characterized in that: The method comprises: Based on the received build request information sent by the business party, determine the address information of the sub-package corresponding to the business party, and based on the determined address information of the sub-package, establish an association relationship between the main package of the mini program to be processed and the sub-package; After receiving the update request sent by the target business party, determining the address information of the sub-package corresponding to the target business party according to the association relationship, and acquiring the target sub-package based on the determined address information; Comparing the configuration size of the target subpackage with a first preset configuration size, wherein the configuration size of the target subpackage is the configuration size after the target subpackage is compressed; When the configuration size of the target subpackage is larger than a first preset configuration size, a first optimization request is sent to the target business party to instruct the configuration size of the target subpackage to be reduced; when the configuration size of the target subpackage is less than or equal to the first preset configuration size, the main package is updated based on a private configuration file in the target subpackage, wherein the private configuration file is used to configure the subpackage through the target business party.

2. The method according to claim 1, characterized in that After obtaining the target sub-packet based on the determined address information, the method further includes: Compressing each target sub-sub-package in the target sub-package to obtain a compressed target sub-sub-package, wherein the target sub-package includes at least one target sub-sub-package; Determining a configuration size of the compressed target sub-packet based on an asynchronous recursive function; The sum of the configuration sizes of each target sub-package is used as the configuration size of the target sub-package.

3. The method according to claim 2, characterized in that Before taking the sum of the configuration sizes of each target sub-package as the configuration size of the target sub-package, the method further includes: For each target sub-package, comparing the configuration size of the target sub-package with a second preset configuration size; When the configuration size of the target sub-package is larger than the second preset configuration size, a second optimization request is sent to the target business party to instruct the reduction of the configuration size of the target sub-package; when the configuration size of each of the target sub-packages is less than or equal to the second preset configuration size, the sum of the configuration sizes of all target sub-packages is calculated.

4. The method according to claim 2, characterized in that The compressing each target sub-packet in the target sub-packet includes: For each target sub-package, determining the file format of each configuration file in the target sub-package, and determining a preset compression function corresponding to each file format; Each configuration file in the target sub-package is compressed based on a preset compression function using a preset compression tool.

5. The method according to claim 4, characterized in that The determining the configuration size of the compressed target sub-packet based on the asynchronous recursive function includes: Determining a first configuration size of each compressed configuration file based on the asynchronous recursive function; The sum of the first configuration sizes under the target directory is used as the second configuration size of the target directory; The sum of the second configuration sizes in the target sub-packet is used as the configuration size of the target sub-packet.

6. A small program integration device, characterized in that: The device comprises: An association relationship establishment module, used to determine the address information of the sub-package corresponding to the business party based on the received build request information sent by the business party, and establish an association relationship between the main package of the mini program to be processed and the sub-package based on the determined address information of the sub-package; A sub-package acquisition module, configured to, after receiving an update request sent by a target business party, determine address information of a sub-package corresponding to the target business party according to the association relationship, and acquire a target sub-package based on the determined address information; A comparison and determination module is used to compare the configuration size of the target subpackage with a first preset configuration size, wherein the configuration size of the target subpackage is the configuration size after the target subpackage is compressed; when the configuration size of the target subpackage is larger than the first preset configuration size, a first optimization request for instructing to reduce the configuration size of the target subpackage is sent to the target business party; when the configuration size of the target subpackage is less than or equal to the first preset configuration size, the main package is updated based on a private configuration file in the target subpackage, wherein the private configuration file is used to configure the subpackage through the target business party.

7. The device according to claim 6, characterized in that The sub-package acquisition module is also used for: Compressing each target sub-sub-package in the target sub-package to obtain a compressed target sub-sub-package, wherein the target sub-package includes at least one target sub-sub-package; Determining a configuration size of the compressed target sub-packet based on an asynchronous recursive function; The sum of the configuration sizes of each target sub-package is used as the configuration size of the target sub-package.

8. The device according to claim 7, characterized in that The comparison and determination module is also used for: For each target sub-package, comparing the configuration size of the target sub-package with a second preset configuration size; When the configuration size of the target sub-package is larger than the second preset configuration size, a second optimization request is sent to the target business party to instruct the reduction of the configuration size of the target sub-package; when the configuration size of each of the target sub-packages is less than or equal to the second preset configuration size, the sum of the configuration sizes of all target sub-packages is calculated.

9. The device according to claim 7, characterized in that The sub-package acquisition module is also used for: For each target sub-package, determining the file format of each configuration file in the target sub-package, and determining a preset compression function corresponding to each file format; Each configuration file in the target sub-package is compressed based on a preset compression function using a preset compression tool.

10. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 5.