WO2021197140A1 - Generation of applet file package - Google Patents

Generation of applet file package Download PDF

Info

Publication number
WO2021197140A1
WO2021197140A1 PCT/CN2021/082396 CN2021082396W WO2021197140A1 WO 2021197140 A1 WO2021197140 A1 WO 2021197140A1 CN 2021082396 W CN2021082396 W CN 2021082396W WO 2021197140 A1 WO2021197140 A1 WO 2021197140A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
host application
page resource
applet
program
Prior art date
Application number
PCT/CN2021/082396
Other languages
French (fr)
Chinese (zh)
Inventor
林杰
常艺耀
王金生
Original Assignee
支付宝(杭州)信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021197140A1 publication Critical patent/WO2021197140A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • One or more embodiments of this specification relate to the field of computer technology, and in particular to the generation of small program file packages.
  • An applet is an application that can be used without installation. The user can start and call the applet in the host application. This applet is available at any time, but does not need to be installed or uninstalled, which is more convenient to use. Since the page of the applet usually contains part of the page information that changes with the change of the host application, when the host application is different, the page information that the applet needs to display is usually not completely consistent. In order to ensure that the applets launched at each host application can display the page information corresponding to each host application, currently, the file package of the applet is usually made to contain the applet page resource files of each host application, so that the applet The storage space occupied by the file package and the traffic consumed in the download process are both large.
  • one or more embodiments of this specification provide a method, device, and equipment for generating a small program file package, which are used to generate a small program file package with a smaller amount of data.
  • the method for generating a small program file package includes: obtaining preset storage path information of a page resource file related to a host application in the small program to be generated; generating according to the preset storage path information The program file of the applet, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set corresponding to the designated host application is obtained, and the The page resource file set includes the page resource file related to the designated host application in the applet; according to the program file and the page resource file set, the applet file package at the designated host application is generated.
  • a method for generating a small program file package includes: obtaining a user instruction, where the user instruction is used to instruct to generate a file package of a small program at a designated host application; in response to the user instruction, obtaining all the files
  • the program file of the small program the program file is generated according to the preset storage path information of the page resource file related to the host application in the small program, so that the program file is stored according to the preset when the program file is running Path information, displaying the page information corresponding to the page resource file; from the page resource file collection of the applet, determine the page resource file subset corresponding to the specified host application, and the page resource file subset Contains page resource files related to the designated host application in the mini program; generating a file package of the mini program at the designated host application according to the program file and the page resource file subset.
  • An embodiment of the present specification provides a method for starting an applet, including: obtaining a user's start instruction for an applet in a designated host application; in response to the start instruction, acquiring the applet corresponding to the designated host application
  • the file package contains the program files of the applet and the set of page resource files corresponding to the specified host application; the program files of the applet are based on the applet related to the host application
  • the page resource file’s preset storage path information is generated so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; in the page resource file collection Contains the page resource file related to the designated host application in the mini program; and starts the mini program in the designated host application according to the file package.
  • An apparatus for generating a small program file package includes: a first acquisition module for obtaining preset storage path information of page resource files related to the host application in the small program to be generated; program file generation The module is configured to generate a program file of the applet according to the preset storage path information, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; The second obtaining module is used to obtain a set of page resource files corresponding to a designated host application, and the set of page resource files includes page resource files related to the designated host application in the applet; the file package generation module uses According to the program file and the set of page resource files, a small program file package at the designated host application is generated.
  • An apparatus for generating a small program file package includes: a first obtaining module for obtaining a user instruction, the user instruction being used to instruct to generate a file package of a small program at a designated host application; second The obtaining module is configured to obtain the program file of the applet in response to the user instruction, the program file being generated according to the preset storage path information of the page resource file related to the host application in the applet, So that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; The page resource file sub-collection corresponding to the designated host application, the page resource file sub-collection contains the page resource files related to the specified host application in the applet; the file package generation module is used to generate the file package according to the program files and The page resource file subset generates a file package of the applet at the designated host application.
  • the device for launching an applet includes: a first acquisition module for acquiring a user's start instruction for the applet in a designated host application; a second acquisition module for responding to the start instruction , Obtain a file package of the applet corresponding to the designated host application, the file package containing the program file of the applet and a set of page resource files corresponding to the designated host application;
  • the program file is generated according to the preset storage path information of the page resource file related to the host application in the mini program, so that when the program file is running, the page is displayed according to the preset storage path information
  • the page information corresponding to the resource file; the page resource file set includes the page resource file related to the designated host application in the applet; the startup module is used to set the page resource file in the designated host application according to the file package Start the applet.
  • the device for generating a small program file package includes: at least one processor; and a memory communicatively connected with the at least one processor; An instruction executed by the processor, the instruction being executed by the at least one processor, so that the at least one processor can: obtain the preset storage path information of the page resource file related to the host application in the applet to be generated; According to the preset storage path information, the program file of the applet is generated, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; The page resource file set corresponding to the application, the page resource file set includes the page resource file related to the designated host application in the applet; the designated page resource file is generated according to the program file and the page resource file set The small program file package at the host application.
  • the device for generating a small program file package includes: at least one processor; and a memory communicatively connected with the at least one processor; An instruction executed by the processor, the instruction being executed by the at least one processor, so that the at least one processor can: obtain a user instruction, the user instruction being used to instruct to generate a file package of a small program at a designated host application
  • obtain the program file of the small program the program file is generated according to the preset storage path information of the page resource file related to the host application in the small program, so as to facilitate the
  • the program file is running, according to the preset storage path information, the page information corresponding to the page resource file is displayed; from the page resource file set of the applet, the page resource file corresponding to the designated host application is determined Collection, the page resource file sub-collection includes the page resource files related to the designated host application in the applet; according to the program file and the page resource file sub-collection, the page resource file at the designated host application is generated
  • the file package includes: at least one processor; and
  • the device for starting a small program includes: at least one processor; and a memory communicatively connected with the at least one processor; Executed instructions, the instructions are executed by the at least one processor, so that the at least one processor can: obtain the user's start instruction for the applet in the specified host application; in response to the start instruction, obtain the The file package of the small program corresponding to the specified host application, the file package contains the program file of the small program and the set of page resource files corresponding to the specified host application; the program file of the small program is based on Generated from the preset storage path information of the page resource file related to the host application in the applet, so that when the program file is running, according to the preset storage path information, the corresponding page resource file is displayed Page information; the page resource file collection includes page resource files in the applet related to the designated host application; according to the file package, the applet is started in the designated host application.
  • An embodiment of the present specification achieves the following beneficial effects: when the program file of the applet is running, the page information corresponding to the page resource file related to the host application in the applet can be displayed according to the preset storage path information. Therefore, the small program file package of the specified host application can be generated according to the program files of the applet and the sub-set of page resource files corresponding to the specified host application determined from the set of page resource files of the applet. Since the applet file package at the designated host application does not need to include the page resource files of other host applications of the applet, the amount of data in the generated applet file package can be reduced, thereby helping to reduce the storage occupied by the applet file package Space and data traffic consumed in the download process.
  • FIG. 1 is a schematic flowchart of a method for generating a small program file package provided by an embodiment of this specification
  • FIG. 2 is a schematic flowchart of another method for generating a small program file package provided by an embodiment of the specification
  • FIG. 3 is a schematic diagram of an application scenario of a method for generating a small program file package provided by an embodiment of this specification
  • FIG. 4 is a schematic flowchart of a method for starting a small program provided by an embodiment of this specification
  • FIG. 5 is a schematic structural diagram of an apparatus for generating a small program file package corresponding to FIG. 1 provided by an embodiment of the specification;
  • FIG. 6 is a schematic structural diagram of an apparatus for generating a small program file package corresponding to FIG. 2 provided by an embodiment of the specification;
  • FIG. 7 is a schematic structural diagram of a device for launching a small program corresponding to FIG. 3 provided by an embodiment of this specification.
  • the applet file package usually contains multiple preset page resource files of the host application, and the page resource file contains page information related to the host application in the applet.
  • the program files in the small program file package are usually hard-coded into the identification of multiple preset host applications, so that when the program file of the small program is running, the identification of multiple preset host applications can be selected first.
  • To determine the identity of the current host application furthermore, it is possible to filter out the page resource files of the current host application from the page resource files of multiple preset host applications contained in the applet file package, so as to display the current host application in the applet. Page information related to the host application.
  • the applet file package contains multiple page resource files of preset host applications, the storage space occupied by the applet file package and the traffic consumed during the download process are both large.
  • the program files of the applet need to be modified to make The program file of the applet is adapted to the newly added host application. It can be seen that the existing method for generating the applet file package has poor applicability and is inconvenient to maintain.
  • FIG. 1 is a schematic flowchart of a method for generating a small program file package provided by an embodiment of this specification.
  • the execution subject of the process can be the device of the applet developer or the program loaded on the device of the applet developer. As shown in Figure 1, the process can include the following steps:
  • Step 102 Obtain the preset storage path information of the page resource file related to the host application in the mini program to be generated.
  • the applet developer usually needs to pre-design the page information to be included in each applet page, so that the page information related to the host application in the applet page can be determined.
  • the page information related to the host application may include the page information of the applet that changes with the change of the host application where the applet is located.
  • the page resource files related to the host application in the applet can be used to store such page information related to the host application.
  • the page information related to the host application may be information in image form, text form information, or audio form information, etc., which is not specifically limited.
  • the page information related to the host application may specifically include at least one of host application icon information, copywriting information related to the host application in the applet, and user protocol information related to the host application in the applet.
  • the copywriting information related to the host application in the applet may be: when the user makes a purchase at the applet launched in the current host application, he can enjoy the information corresponding to the current host application discount information.
  • the preferential information corresponding to different host applications may be different.
  • the copywriting information related to the host application in the mini program may also be: advertising slogans of the host application, etc.
  • the user agreement information related to the host application in the mini program may include: the network service agreement, privacy agreement, etc. that the user needs to sign when the mini program is launched in the host application.
  • the applet developer can pre-designate the preset storage path of the page resource file related to the host application, and generate the program file and page resource file set of the applet based on the preset storage path.
  • the preset storage path information of the page resource file may refer to the file and/or folder line that the user has gone through when searching for the page resource file on the disk.
  • the preset storage path information is "ABC"
  • Step 104 Generate a program file of the applet according to the preset storage path information, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information.
  • the program file of the applet can be either the source program of the applet or the executable program (EXE File) of the applet.
  • the program code of the applet can call the page resource file indicated by the preset storage path information to generate the page information corresponding to the page resource file (that is, the page resource file corresponding to the page resource file in the applet Host application related page information) of the applet page, and display the applet page.
  • Step 106 Obtain a set of page resource files corresponding to a designated host application, where the set of page resource files includes page resource files related to the designated host application in the applet.
  • a set of page resource files corresponding to the host application may be generated for each host application according to the preset storage path information. That is, the set of page resource files corresponding to different host applications may be different. And in the page resource file collections of different host applications, the storage path information for the same type of page resource file should be the same as the preset storage path information of the page resource file.
  • the page resource file set corresponding to the designated host application only needs to include the page resource files related to the designated host application in the applet, and does not need to include pages related to other host applications in the applet.
  • Resource files making the page resource file collection small in size, which is beneficial to save storage space.
  • Step 108 Generate a small program file package at the designated host application according to the program file and the set of page resource files.
  • the user can start and run the applet in the specified host application based on the applet file package at the specified host application. For example, when a user launches an applet in a designated host application, the device where the designated host application is located can download the applet file package at the designated host application by running the program file in the applet file package at the designated host application , To display the mini program page information corresponding to the page resource file related to the specified host application in the mini program file package.
  • the page information corresponding to the page resource file related to the host application in the applet can be displayed according to the preset storage path information, so that the page information of the applet can be displayed according to the Program files and a collection of page resource files corresponding to the designated host application generated according to the preset storage path information to generate a small program file package at the designated host application. Since the applet file package at the designated host application does not need to include the page resource files of other host applications of the applet, the amount of data in the generated applet file package can be reduced, thereby helping to reduce the storage occupied by the applet file package Space and data traffic consumed in the download process.
  • the program files of a set of small programs can be used to generate small program file packages at multiple host applications, it can be seen that the program files of the small program are universal.
  • a new host application is added, it is only necessary to generate a set of page resource files corresponding to the new host application according to the preset storage path information, which can be based on the program files of the applet and the page resources corresponding to the new host application File collection to generate the small program file package of the newly added host application without modifying the program code in the program file of the small program.
  • the method for generating the small program file package has good applicability and is easy to maintain.
  • step 108 generating a small program file package at the designated host application according to the program file and the page resource file collection, which may specifically include: sending the program file and the page resource file collection to The SaaS platform, so that the SaaS platform responds to user instructions to generate a small program file package at the designated host application according to the program file and the set of page resource files.
  • the SaaS platform (English: Software-as-a-Service, software as a service) is a platform for operating SaaS software.
  • the SaaS platform can provide enterprises with the network infrastructure, Software and hardware operating platforms, and enterprises can obtain the services provided by the SaaS platform through the Internet, thus bringing convenience to enterprises.
  • the applet developer can generate the applet file package at the designated host application by himself, and upload the applet file package to the applet’s server or SaaS platform, so that the user equipment can download from the applet’s server or The SaaS platform downloads the small program file package of the designated host application.
  • the applet developer can also generate a collection of the applet’s program files and the page resource files corresponding to the specified host application to the SaaS platform, so that the SaaS platform can check the applet’s program files and page resources corresponding to the specified host application. After the file collection is tested for security, a small program file package at the designated host application with higher security is generated. Correspondingly, the user can download the small program file package of the designated host application from the SaaS platform.
  • the small program file package usually needs to contain the executable code of the small program (Executable Code). Therefore, when the program file of the small program uploaded to the SaaS platform by the small program developer is the source program file, the SaaS platform also The program file of the applet can be compiled to obtain the executable code of the applet, and the applet file package is generated based on the executable code of the applet.
  • sending the set of page resource files to the SaaS platform may specifically include: sending a set of multiple page resource files including a set of page resource files corresponding to a specified host application to the SaaS platform, and the multiple page resources Each page resource file set in the file set corresponds to a different host application.
  • the identifier of the page resource file set corresponding to the designated host application is set to the identifier of the designated host application, so that the SaaS platform responds to the user instruction and uses the identifier of the designated host application to retrieve the data from the
  • the set of page resource files corresponding to the designated host application is determined from the set of page resource files.
  • the storage path information of the page resource files in the multiple page resource file sets should be consistent with the preset storage path information, that is, the information of the page resource files of the same type in the multiple page resource file sets should be consistent.
  • the storage path may be the same as the preset storage path of the page resource file of this type. Therefore, when the program file of the applet is running in each host application, it is convenient to display the page information related to the current host application in the applet according to the preset storage path information.
  • the identification of each page resource file collection can be set according to the identification information of each host application, so as to distinguish multiple page resource file collections uploaded by the applet developer.
  • the identifier of the designated host application can be set to the name of the page resource folder corresponding to the designated host application.
  • the SaaS platform can determine the page resource file set corresponding to the specified host application from the multiple page resource file sets.
  • step 106: obtaining a set of page resource files corresponding to a designated host application may specifically include: obtaining a page resource file related to the designated host application in the applet.
  • the page resource file related to the designated host application in the applet is stored to obtain the page resource folder corresponding to the designated host application.
  • the applet developer may first generate the corresponding page resource files according to the information of each page in the applet related to the designated host application. For example, for a piece of copywriting information related to the designated host application in the applet, a page resource file containing the copywriting information can be generated; or, the image of the application icon of the designated host application can be used as a page resource file, etc.
  • the storing the page resource file related to the designated host application in the applet according to the preset storage path information specifically includes: setting the target page resource file according to the preset storage path information
  • the file name is the end path node information in the preset storage path information corresponding to the target page resource file.
  • the target page resource file is the page resource file related to the designated host application in the applet; and the target page resource The file is stored at the storage location.
  • the preset storage path information corresponding to the page resource file is "first folder-second folder-host application icon"
  • the file name of the application icon image of the designated host application is set to "host application icon”
  • a folder named "second folder” is created in the folder named "first folder” to specify
  • the application icon image of the host application is stored in the folder named "second folder”.
  • the identification information of the page resource file set corresponding to the specified host application can be set according to the identification information of the specified host application
  • the identification of the page resource file set corresponding to the specified host application can be set according to the preset storage path information. After the related page resource files are stored, multiple files and folders obtained after storage can be moved to a folder named as the identifier of the designated host application, which is the folder named as the identifier of the designated host application. It is a collection of page resource files related to the specified host application.
  • the preset storage path information does not include the path node of the folder named as the identifier of the designated host application, which can avoid writing multiple host application identifiers in the program file of the applet, so as to improve the applet The convenience of maintenance of the program files.
  • the identity of the current host application can be determined by calling the interface, and the folder with the identity of the current host application can be identified from the applet file package, according to the preset storage path information , Call the page resource file related to the host application from the folder with the current host application identifier, and then display the page information corresponding to the current host application in the applet.
  • FIG. 2 is a schematic flowchart of another method for generating a small program file package provided by the embodiment of this specification.
  • the execution subject of the process can be the SaaS platform. As shown in Figure 2, the process can include the following steps:
  • Step 202 Obtain a user instruction, where the user instruction is used to instruct to generate a file package of a small program at a designated host application.
  • the file package of the applet at the designated host application may include the files required to start the applet at the designated host application.
  • the user can input the user instruction in the SaaS platform to instruct the SaaS platform to generate the small program file package at the designated host application.
  • the designated host application indicated by the user instruction may be one application or multiple applications.
  • the platform interface of the SaaS platform can display multiple host application selection items, and the user can click on a host application selection item to enter the user instruction.
  • the user instruction is used to instruct to generate a designated host application.
  • Small program file package In actual applications, the user can also click the OK button to input user instructions after selecting the options of multiple host applications.
  • the user instructions are used to instruct to generate multiple small program file packages at multiple designated host applications. .
  • the user instruction is used to instruct the generation of a small program file package at the designated host application as an example for description.
  • Step 204 Acquire the program file of the applet in response to the user instruction, the program file is generated according to the preset storage path information of the page resource file related to the host application in the applet, so as to facilitate all When the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information.
  • the program file of the applet may be a program file generated by the applet developer according to the preset storage path information of the page resource file related to the host application in the applet.
  • the program file of the small program in step 204 and the program file of the small program generated in step 104 may be the same.
  • the page resource file related to the host application in the applet can be called according to the preset storage path information to generate the page information corresponding to the page resource file (that is, Application-related page information) of the applet page.
  • the page information related to the host application in the applet may refer to the page information of the applet that changes with the change of the host application where the applet is located.
  • the page information related to the host application in the applet may include at least one of host application icon information, copywriting information related to the host application in the applet, and user protocol information related to the host application in the applet.
  • Step 206 Determine a page resource file subset corresponding to the specified host application from the page resource file set of the applet, and the page resource file subset includes the applet and the specified host. Application-related page resource files.
  • the SaaS platform may pre-store the page resource file collection of the applet, and each page resource file sub-collection in the page resource file set contains all the pages in the applet related to a host application. resource. That is, the page resource file sub-collection in the page resource file collection of the applet corresponds to the host application of the applet in a one-to-one correspondence.
  • the sub-set of page resource files corresponding to the designated host application determined in step 206 may be the same as the set of page resource files corresponding to the designated host application obtained in step 106, which will not be repeated here.
  • Step 208 Generate a file package of the applet at the designated host application according to the program file and the page resource file subset.
  • the method in FIG. 2 generates the small program file package at the specified host application by using the program file of the applet and the sub-set of page resource files corresponding to the specified host application. Since the applet file package at the designated host application does not need to include the page resource files of other host applications of the applet, the amount of data in the generated applet file package can be reduced, thereby helping to reduce the storage space occupied by the applet file package And the data traffic consumed in the download process.
  • the program files of a set of small programs can be used to generate small program file packages at multiple host applications, it can be seen that the program files of the small program are universal.
  • a new host application is added, it is only necessary to generate a page resource file set corresponding to the new host application according to the preset storage path information, which can be based on the program files of the applet and the page corresponding to the new host application
  • the program code of the applet on the SaaS platform and the page resource file collection of the applet may be sent to the SaaS platform by the applet developer in advance.
  • step 204 before obtaining the program file of the applet, it may further include: receiving the source program file and page resource file set of the applet sent by the applet developer; compiling the source program file to obtain The program file of the applet. It can be seen that the program file of the applet may contain the executable code of the applet.
  • the determining the page resource file subset corresponding to the designated host application from the page resource file set of the applet may specifically include: determining the page resource file according to the user instruction Specify the identifier of the host application; determine the page resource folder carrying the identifier from the set of page resource files of the applet, and the page resource folder is based on the preset storage path information for the A folder obtained by storing page resource files related to the designated host application in the applet.
  • the SaaS platform when it is necessary to generate the applet file package at the designated host application, can automatically identify the page resource file sub-set carrying the identification of the designated host application from the page resource file collection of the applet. As a sub-collection of page resource files corresponding to the specified host application, it is convenient and quick.
  • step 208 after generating the file package of the applet at the designated host application, it may further include: responding to the information sent by the terminal device for the applet at the designated host application.
  • the file package acquisition request, and the generated file package is sent to the terminal device.
  • Fig. 3 is a schematic diagram of an application scenario of a method for generating a small program file package provided by an embodiment of the specification.
  • the applet developer can send the program file and page resource file collection of the applet to the SaaS platform 302 through the device 301.
  • a user at the SaaS platform can input an instruction to generate a small program file package at the designated host application at the SaaS platform 302 to generate a small program file package at the designated host application.
  • the terminal device 303 can download the applet file package from the SaaS platform 302, so that the applet can be started based on the downloaded applet file package.
  • FIG. 4 is a schematic flowchart of a method for starting an applet provided by an embodiment of this specification.
  • the execution subject of the process can be a user's terminal device or a program of a designated host application carried in the user's terminal device.
  • the process can include the following steps:
  • Step 402 Obtain the user's start instruction for the applet in the designated host application.
  • the user can click on the applet icon at the designated host application carried in the terminal device to input the startup instruction.
  • Step 404 In response to the start instruction, obtain a file package of the applet corresponding to the designated host application, the file package containing the program file of the applet and a page corresponding to the designated host application Resource file collection; the program file of the small program is generated according to the preset storage path information of the page resource file related to the host application in the small program, so that when the program file is running, the program file is generated according to the preset Path information is stored to display page information corresponding to the page resource file; the page resource file set includes the page resource file related to the designated host application in the applet.
  • the server of the applet or from the SaaS platform in response to the startup instruction, when it is determined that the file package of the applet is not stored in the user terminal device, download the applet corresponding to the designated host application from the server of the applet or from the SaaS platform.
  • the file package corresponding to the designated host application can be generated using the method for generating the small program file package in FIG. 1 or FIG. 2. The generation process of the file package of the small program will not be repeated.
  • the page resource file set corresponding to the designated host application may be obtained by storing the page resource files related to the designated host application in the applet according to the preset storage path information Folder
  • the name of the folder can be the identification information of the specified host application. Therefore, when the applet is launched in the designated host application, the program file of the applet can first determine the identity of the current host application (that is, the designated host application) during the running process, and determine that the designated host application is included in the applet file package.
  • the folder identified by is a folder that stores page resource files corresponding to the specified host application. Further, according to the preset storage path information, the required page resource file can be called from the folder where the page resource file corresponding to the specified host application is stored, so as to display the page containing the applet related to the specified host application Mini program page for information.
  • Step 406 According to the file package, start the applet in the designated host application.
  • the applet file package at the designated host application downloaded by the user terminal device contains the page resource file corresponding to the designated host application, there is no need to include page resource files at other host applications of the applet, thereby The data volume of the small program file package can be reduced, thereby helping to reduce the storage space occupied by the small program file package and the data traffic consumed in the downloading process.
  • FIG. 5 is a schematic structural diagram of an apparatus for generating a small program file package corresponding to FIG. 1 provided by an embodiment of the specification. As shown in Figure 5, the device may include:
  • the first obtaining module 502 is configured to obtain preset storage path information of page resource files related to the host application in the mini program to be generated.
  • the program file generation module 504 is configured to generate a program file of the applet according to the preset storage path information, so that when the program file is running, according to the preset storage path information, display the corresponding page resource file Page information.
  • the second obtaining module 506 is configured to obtain a set of page resource files corresponding to a designated host application, and the set of page resource files includes page resource files related to the designated host application in the applet.
  • the file package generating module 508 is configured to generate a small program file package at the designated host application according to the program file and the page resource file set.
  • the second obtaining module 506 is specifically configured to: obtain page resource files related to the designated host application in the applet; The page resource file related to the designated host application is stored, and the page resource folder corresponding to the designated host application is obtained.
  • storing the page resource file related to the designated host application in the applet according to the preset storage path information may specifically include: determining the target page resource according to the preset storage path information The storage location of the file; the target page resource file is a page resource file related to the designated host application in the applet; the target page resource file is stored in the storage location. And, according to the preset storage path information, the file name of the target page resource file is set, where the file name is the end path node information in the preset storage path information corresponding to the target page resource file.
  • the file package generation module 508 can be specifically used to: send the program file and the page resource file collection to the SaaS platform, so that the SaaS platform can respond to the user's instruction according to the program file and the page. A collection of resource files to generate a small program file package for the designated host application.
  • sending the set of page resource files to the SaaS platform may specifically include: sending a set of multiple page resource files including the set of page resource files corresponding to the specified host application to the SaaS platform, and the multiple sets of page resource files are sent to the SaaS platform.
  • Each page resource file set in the page resource file set corresponds to a different host application; the identification of the page resource file set corresponding to the specified host application is set to the identification of the specified host application, so that the SaaS platform can respond
  • the page resource file set corresponding to the designated host application is determined from the plurality of page resource file sets according to the identifier of the designated host application.
  • Fig. 6 is a schematic structural diagram of an apparatus for generating a small program file package corresponding to Fig. 2 provided by an embodiment of the manual. As shown in Figure 6, the device may include:
  • the first obtaining module 602 is configured to obtain a user instruction, and the user instruction is used to instruct to generate a file package of an applet in a designated host application.
  • the second obtaining module 604 is configured to obtain a program file of the applet in response to the user instruction, the program file being based on the preset storage path information of the page resource file related to the host application in the applet It is generated so that the page information corresponding to the page resource file can be displayed according to the preset storage path information when the program file is running.
  • the determining module 606 is configured to determine a page resource file sub-collection corresponding to the designated host application from the page resource file collection of the applet, and the page resource file sub-collection includes all files and files in the applet. Describes page resource files related to the specified host application.
  • the file package generating module 608 is configured to generate a file package of the applet in the designated host application according to the program file and the page resource file subset.
  • the determining module 606 may be specifically configured to: determine the identifier of the designated host application according to the user instruction; determine from the set of page resource files of the applet that carries the identifier A page resource folder, where the page resource folder is a folder obtained by storing page resource files related to the designated host application in the applet according to the preset storage path information.
  • the apparatus in FIG. 6 may further include: a receiving module configured to receive the source program file of the applet sent by the applet developer.
  • the compiling module is used to compile the source program file to obtain the program file of the small program.
  • the apparatus in FIG. 6 may further include: a sending module, configured to send the generated file package in response to a request for obtaining the file package of the applet at the designated host application sent by the terminal device To the terminal device.
  • a sending module configured to send the generated file package in response to a request for obtaining the file package of the applet at the designated host application sent by the terminal device To the terminal device.
  • FIG. 7 is a schematic structural diagram of a device for launching a small program corresponding to FIG. 3 provided by an embodiment of this specification. As shown in Figure 7, the device may include:
  • the obtaining module 702 is used to obtain the user's start instruction for the applet in the designated host application.
  • the obtaining module 704 is configured to obtain a file package of the applet corresponding to the designated host application in response to the start instruction, the file package including the program file of the applet and the file package of the applet and the designated host application Corresponding page resource file collection; the program file of the applet is generated according to the preset storage path information of the page resource file related to the host application in the applet, so that when the program file is running, it is based on all The preset storage path information is used to display the page information corresponding to the page resource file; the page resource file set includes the page resource file related to the designated host application in the applet; wherein, the page resource The file collection is a folder obtained by storing page resource files related to the designated host application in the applet according to the preset storage path information.
  • the starting module 706 is configured to start the small program in the designated host application according to the file package.
  • the embodiment of this specification also provides a device for generating a small program file package corresponding to the method in FIG. 1.
  • the device may include: at least one processor; Memory; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can: obtain the small program to be generated The preset storage path information of the page resource file related to the host application.
  • a program file of the applet is generated, so that the page information corresponding to the page resource file is displayed according to the preset storage path information when the program file is running.
  • the embodiment of this specification also provides a device for generating a small program file package corresponding to the method in FIG. 2.
  • the device may include: at least one processor; Memory; wherein the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, so that the at least one processor can: acquire user instructions, the user The instruction is used to instruct to generate the file package of the small program at the designated host application.
  • the program file of the applet In response to the user instruction, obtain the program file of the applet, the program file is generated according to the preset storage path information of the page resource file related to the host application in the applet, so as to facilitate the program
  • the page information corresponding to the page resource file is displayed according to the preset storage path information.
  • a file package of the applet in the designated host application is generated.
  • the embodiment of this specification also provides a small program startup device corresponding to the method in FIG. 3, the device may include: at least one processor; and a memory communicatively connected with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can: Start instruction.
  • the page resource file set includes the page resource file related to the designated host application in the applet.
  • the small program is started in the designated host application.
  • the improvement of a technology can be clearly distinguished between hardware improvements (for example, improvements in circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements in method flow).
  • hardware improvements for example, improvements in circuit structures such as diodes, transistors, switches, etc.
  • software improvements improvements in method flow.
  • the improvement of many methods and processes of today can be regarded as a direct improvement of the hardware circuit structure.
  • Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by the hardware entity module.
  • a programmable logic device for example, a Field Programmable Gate Array (Field Programmable Gate Array, FPGA)
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • ABEL Advanced Boolean Expression Language
  • AHDL Altera Hardware Description Language
  • HDCal JHDL
  • Lava Lava
  • Lola MyHDL
  • PALASM RHDL
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • the controller can be implemented in any suitable manner.
  • the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) executable by the (micro)processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as part of the memory control logic.
  • controllers in addition to implementing the controller in a purely computer-readable program code manner, it is completely possible to program the method steps to make the controller use logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded logic.
  • the same function can be realized in the form of a microcontroller or the like. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as a structure within the hardware component. Or even, a device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
  • a typical implementation device is a computer.
  • the computer can be, for example, a personal computer, a laptop computer, a cell phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Any combination of these devices.
  • one or more embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, one or more embodiments of this specification may adopt the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may adopt computer programs implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The form of the product.
  • These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are used to generate It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media includes permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • One or more embodiments of this specification can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

Abstract

Disclosed are a method, apparatus and device for generating an applet file package. The method for generating an applet file package comprises: in response to a user instruction, acquiring a program file of an applet, wherein the program file is generated according to preset storage path information of a page resource file, which is related to a host application, in the applet, so that page information corresponding to the page resource file can be displayed according to the preset storage path information when the program file runs; determining a page resource file subset corresponding to the designated host application from a page resource file set of the applet; and generating an applet file package at the designated host application according to the program file and the page resource file subset corresponding to the designated host application.

Description

小程序文件包的生成Mini program file package generation 技术领域Technical field
本说明书一个或多个实施例涉及计算机技术领域,尤其涉及小程序文件包的生成。One or more embodiments of this specification relate to the field of computer technology, and in particular to the generation of small program file packages.
背景技术Background technique
小程序是一种不需要安装即可使用的应用,用户可以在宿主应用中去启动并调用小程序,这种小程序随时可用,但又无需安装卸载,使用便捷性较好。由于小程序的页面中通常会包含部分随着宿主应用的变化而变化的页面信息,当宿主应用不同时,小程序需要展示的页面信息通常并不完全一致。为保证在各个宿主应用处启动的小程序均能展示与各个宿主应用相对应的页面信息,目前,通常会令小程序的文件包中包含各个宿主应用处的小程序页面资源文件,使得小程序的文件包占用的存储空间及下载过程中耗费的流量均较大。An applet is an application that can be used without installation. The user can start and call the applet in the host application. This applet is available at any time, but does not need to be installed or uninstalled, which is more convenient to use. Since the page of the applet usually contains part of the page information that changes with the change of the host application, when the host application is different, the page information that the applet needs to display is usually not completely consistent. In order to ensure that the applets launched at each host application can display the page information corresponding to each host application, currently, the file package of the applet is usually made to contain the applet page resource files of each host application, so that the applet The storage space occupied by the file package and the traffic consumed in the download process are both large.
综上所述,如何令生成的小程序文件包的数据量更少,已成为亟待解决的技术问题。In summary, how to reduce the amount of data in the generated small program file package has become an urgent technical problem to be solved.
发明内容Summary of the invention
有鉴于此,本说明书一个或多个实施例提供了一种小程序文件包的生成方法、装置及设备,用于生成数据量更少的小程序文件包。In view of this, one or more embodiments of this specification provide a method, device, and equipment for generating a small program file package, which are used to generate a small program file package with a smaller amount of data.
为解决上述技术问题,本说明书实施例是这样实现的。In order to solve the above technical problems, the embodiments of this specification are implemented in this way.
本说明书实施例提供的一种小程序文件包的生成方法,包括:获取待生成的小程序中与宿主应用相关的页面资源文件的预设存储路径信息;根据所述预设存储路径信息,生成所述小程序的程序文件,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;获取与指定宿主应用对应的页面资源文件集合,所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。The method for generating a small program file package provided by an embodiment of this specification includes: obtaining preset storage path information of a page resource file related to a host application in the small program to be generated; generating according to the preset storage path information The program file of the applet, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set corresponding to the designated host application is obtained, and the The page resource file set includes the page resource file related to the designated host application in the applet; according to the program file and the page resource file set, the applet file package at the designated host application is generated.
本说明书实施例提供的一种小程序文件包的生成方法,包括:获取用户指令,所述用户指令用于指示生成指定宿主应用处的小程序的文件包;响应于所述用户指令,获取所述小程序的程序文件,所述程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时根据所述预设存储路径 信息,展示所述页面资源文件对应的页面信息;从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,所述页面资源文件子集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;根据所述程序文件及所述页面资源文件子集合,生成所述指定宿主应用处的所述小程序的文件包。A method for generating a small program file package provided by an embodiment of this specification includes: obtaining a user instruction, where the user instruction is used to instruct to generate a file package of a small program at a designated host application; in response to the user instruction, obtaining all the files The program file of the small program, the program file is generated according to the preset storage path information of the page resource file related to the host application in the small program, so that the program file is stored according to the preset when the program file is running Path information, displaying the page information corresponding to the page resource file; from the page resource file collection of the applet, determine the page resource file subset corresponding to the specified host application, and the page resource file subset Contains page resource files related to the designated host application in the mini program; generating a file package of the mini program at the designated host application according to the program file and the page resource file subset.
本说明书实施例提供的一种小程序的启动方法,包括:获取用户针对指定宿主应用中的小程序的启动指令;响应于所述启动指令,获取与所述指定宿主应用对应的所述小程序的文件包,所述文件包中包含所述小程序的程序文件及与所述指定宿主应用对应的页面资源文件集合;所述小程序的程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时,根据所述预设存储路径信息,去展示所述页面资源文件对应的页面信息;所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;根据所述文件包,在所述指定宿主应用中启动所述小程序。An embodiment of the present specification provides a method for starting an applet, including: obtaining a user's start instruction for an applet in a designated host application; in response to the start instruction, acquiring the applet corresponding to the designated host application The file package contains the program files of the applet and the set of page resource files corresponding to the specified host application; the program files of the applet are based on the applet related to the host application The page resource file’s preset storage path information is generated so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; in the page resource file collection Contains the page resource file related to the designated host application in the mini program; and starts the mini program in the designated host application according to the file package.
本说明书实施例提供的一种小程序文件包的生成装置,包括:第一获取模块,用于获取待生成的小程序中与宿主应用相关的页面资源文件的预设存储路径信息;程序文件生成模块,用于根据所述预设存储路径信息,生成所述小程序的程序文件,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;第二获取模块,用于获取与指定宿主应用对应的页面资源文件集合,所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;文件包生成模块,用于根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。An apparatus for generating a small program file package provided by an embodiment of this specification includes: a first acquisition module for obtaining preset storage path information of page resource files related to the host application in the small program to be generated; program file generation The module is configured to generate a program file of the applet according to the preset storage path information, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; The second obtaining module is used to obtain a set of page resource files corresponding to a designated host application, and the set of page resource files includes page resource files related to the designated host application in the applet; the file package generation module uses According to the program file and the set of page resource files, a small program file package at the designated host application is generated.
本说明书实施例提供的一种小程序文件包的生成装置,包括:第一获取模块,用于获取用户指令,所述用户指令用于指示生成指定宿主应用处的小程序的文件包;第二获取模块,用于响应于所述用户指令,获取所述小程序的程序文件,所述程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;确定模块,用于从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,所述页面资源文件子集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;文件包生成模块,用于根据所述程序文件及所述页面资源文件子集合,生成所述指定宿主应用处的所述小程序的文件包。An apparatus for generating a small program file package provided by an embodiment of this specification includes: a first obtaining module for obtaining a user instruction, the user instruction being used to instruct to generate a file package of a small program at a designated host application; second The obtaining module is configured to obtain the program file of the applet in response to the user instruction, the program file being generated according to the preset storage path information of the page resource file related to the host application in the applet, So that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; The page resource file sub-collection corresponding to the designated host application, the page resource file sub-collection contains the page resource files related to the specified host application in the applet; the file package generation module is used to generate the file package according to the program files and The page resource file subset generates a file package of the applet at the designated host application.
本说明书实施例提供的一种小程序的启动装置,包括:第一获取模块,用于获取用 户针对指定宿主应用中的小程序的启动指令;第二获取模块,用于响应于所述启动指令,获取与所述指定宿主应用对应的所述小程序的文件包,所述文件包中包含所述小程序的程序文件及与所述指定宿主应用对应的页面资源文件集合;所述小程序的程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时,根据所述预设存储路径信息,去展示所述页面资源文件对应的页面信息;所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;启动模块,用于根据所述文件包,在所述指定宿主应用中启动所述小程序。The device for launching an applet provided by an embodiment of this specification includes: a first acquisition module for acquiring a user's start instruction for the applet in a designated host application; a second acquisition module for responding to the start instruction , Obtain a file package of the applet corresponding to the designated host application, the file package containing the program file of the applet and a set of page resource files corresponding to the designated host application; The program file is generated according to the preset storage path information of the page resource file related to the host application in the mini program, so that when the program file is running, the page is displayed according to the preset storage path information The page information corresponding to the resource file; the page resource file set includes the page resource file related to the designated host application in the applet; the startup module is used to set the page resource file in the designated host application according to the file package Start the applet.
本说明书实施例提供的一种小程序文件包的生成设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:获取待生成的小程序中与宿主应用相关的页面资源文件的预设存储路径信息;根据所述预设存储路径信息,生成所述小程序的程序文件,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;获取与指定宿主应用对应的页面资源文件集合,所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。The device for generating a small program file package provided by an embodiment of this specification includes: at least one processor; and a memory communicatively connected with the at least one processor; An instruction executed by the processor, the instruction being executed by the at least one processor, so that the at least one processor can: obtain the preset storage path information of the page resource file related to the host application in the applet to be generated; According to the preset storage path information, the program file of the applet is generated, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information; The page resource file set corresponding to the application, the page resource file set includes the page resource file related to the designated host application in the applet; the designated page resource file is generated according to the program file and the page resource file set The small program file package at the host application.
本说明书实施例提供的一种小程序文件包的生成设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:获取用户指令,所述用户指令用于指示生成指定宿主应用处的小程序的文件包;响应于所述用户指令,获取所述小程序的程序文件,所述程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,所述页面资源文件子集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;根据所述程序文件及所述页面资源文件子集合,生成所述指定宿主应用处的所述小程序的文件包。The device for generating a small program file package provided by an embodiment of this specification includes: at least one processor; and a memory communicatively connected with the at least one processor; An instruction executed by the processor, the instruction being executed by the at least one processor, so that the at least one processor can: obtain a user instruction, the user instruction being used to instruct to generate a file package of a small program at a designated host application In response to the user instruction, obtain the program file of the small program, the program file is generated according to the preset storage path information of the page resource file related to the host application in the small program, so as to facilitate the When the program file is running, according to the preset storage path information, the page information corresponding to the page resource file is displayed; from the page resource file set of the applet, the page resource file corresponding to the designated host application is determined Collection, the page resource file sub-collection includes the page resource files related to the designated host application in the applet; according to the program file and the page resource file sub-collection, the page resource file at the designated host application is generated The file package of the applet.
本说明书实施例提供的一种小程序的启动设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够: 获取用户针对指定宿主应用中的小程序的启动指令;响应于所述启动指令,获取与所述指定宿主应用对应的所述小程序的文件包,所述文件包中包含所述小程序的程序文件及与所述指定宿主应用对应的页面资源文件集合;所述小程序的程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时,根据所述预设存储路径信息,去展示所述页面资源文件对应的页面信息;所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;根据所述文件包,在所述指定宿主应用中启动所述小程序。The device for starting a small program provided in an embodiment of this specification includes: at least one processor; and a memory communicatively connected with the at least one processor; Executed instructions, the instructions are executed by the at least one processor, so that the at least one processor can: obtain the user's start instruction for the applet in the specified host application; in response to the start instruction, obtain the The file package of the small program corresponding to the specified host application, the file package contains the program file of the small program and the set of page resource files corresponding to the specified host application; the program file of the small program is based on Generated from the preset storage path information of the page resource file related to the host application in the applet, so that when the program file is running, according to the preset storage path information, the corresponding page resource file is displayed Page information; the page resource file collection includes page resource files in the applet related to the designated host application; according to the file package, the applet is started in the designated host application.
本说明书一个实施例实现了能够达到以下有益效果:通过令小程序的程序文件运行时,可以根据预设存储路径信息,去展示小程序中与宿主应用相关的页面资源文件所对应的页面信息,从而可以根据小程序的程序文件,以及从小程序的页面资源文件集合中确定出的与指定宿主应用对应的页面资源文件子集合,生成指定宿主应用处的小程序文件包。由于该指定宿主应用处的小程序文件包中无需包含小程序的其他宿主应用处的页面资源文件,从而可以减少生成的小程序文件包的数据量,进而有利于减少小程序文件包占用的存储空间及下载过程中耗费的数据流量。An embodiment of the present specification achieves the following beneficial effects: when the program file of the applet is running, the page information corresponding to the page resource file related to the host application in the applet can be displayed according to the preset storage path information. Therefore, the small program file package of the specified host application can be generated according to the program files of the applet and the sub-set of page resource files corresponding to the specified host application determined from the set of page resource files of the applet. Since the applet file package at the designated host application does not need to include the page resource files of other host applications of the applet, the amount of data in the generated applet file package can be reduced, thereby helping to reduce the storage occupied by the applet file package Space and data traffic consumed in the download process.
附图说明Description of the drawings
此处所说明的附图用来提供对本说明书一个或多个实施例的进一步理解,构成本说明书一个或多个实施例的一部分,本说明书的示意性实施例及其说明用于解释本说明书一个或多个实施例,并不构成对本说明书一个或多个实施例的不当限定。在附图中:The drawings described here are used to provide a further understanding of one or more embodiments of this specification, and constitute a part of one or more embodiments of this specification. The exemplary embodiments of this specification and their descriptions are used to explain one or more embodiments of this specification. The multiple embodiments do not constitute an improper limitation of one or more embodiments in this specification. In the attached picture:
图1为本说明书实施例提供的一种小程序文件包的生成方法的流程示意图;FIG. 1 is a schematic flowchart of a method for generating a small program file package provided by an embodiment of this specification;
图2为本说明书实施例提供的另一种小程序文件包的生成方法的流程示意图;2 is a schematic flowchart of another method for generating a small program file package provided by an embodiment of the specification;
图3为本说明书实施例提供的一种小程序文件包的生成方法的应用场景示意图;FIG. 3 is a schematic diagram of an application scenario of a method for generating a small program file package provided by an embodiment of this specification;
图4为本说明书实施例提供的一种小程序的启动方法的流程示意图;4 is a schematic flowchart of a method for starting a small program provided by an embodiment of this specification;
图5为本说明书实施例提供的对应于图1的一种小程序文件包的生成装置的结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for generating a small program file package corresponding to FIG. 1 provided by an embodiment of the specification;
图6为本说明书实施例提供的对应于图2的一种小程序文件包的生成装置的结构示意图;FIG. 6 is a schematic structural diagram of an apparatus for generating a small program file package corresponding to FIG. 2 provided by an embodiment of the specification;
图7为本说明书实施例提供的对应于图3的一种小程序的启动装置的结构示意图。FIG. 7 is a schematic structural diagram of a device for launching a small program corresponding to FIG. 3 provided by an embodiment of this specification.
具体实施方式Detailed ways
为使本说明书一个或多个实施例的目的、技术方案和优点更加清楚,下面将结合本说明书具体实施例及相应的附图对本说明书一个或多个实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本说明书一个或多个实施例保护的范围。In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with specific embodiments of this specification and the corresponding drawings. . Obviously, the described embodiments are only a part of the embodiments in this specification, rather than all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of one or more embodiments of this specification.
以下结合附图,详细说明本说明书各实施例提供的技术方案。The technical solutions provided by the embodiments of this specification will be described in detail below with reference to the accompanying drawings.
现有技术中,小程序文件包中通常会包含多个预设宿主应用处的页面资源文件,该页面资源文件中包含小程序中的与宿主应用相关的页面信息。该小程序文件包中的程序文件中通常会以硬编码的方式写入多个预设宿主应用的标识,从而在小程序的程序文件运行时,可以先从多个预设宿主应用的标识中,确定出当前宿主应用的标识;进而可以从小程序文件包中包含的多个预设宿主应用处的页面资源文件中,筛选出当前宿主应用处的页面资源文件,以展示小程序中与该当前宿主应用相关的页面信息。In the prior art, the applet file package usually contains multiple preset page resource files of the host application, and the page resource file contains page information related to the host application in the applet. The program files in the small program file package are usually hard-coded into the identification of multiple preset host applications, so that when the program file of the small program is running, the identification of multiple preset host applications can be selected first. , To determine the identity of the current host application; furthermore, it is possible to filter out the page resource files of the current host application from the page resource files of multiple preset host applications contained in the applet file package, so as to display the current host application in the applet. Page information related to the host application.
由于小程序文件包中包含了多个预设宿主应用处的页面资源文件,使得小程序文件包占用的存储空间及下载过程中耗费的流量均较大。同时,由于目前会将多个预设宿主应用的标识以硬编码的方式写入小程序的程序文件中,当后续有新增宿主应用时,需对该小程序的程序文件进行修改,才能令小程序的程序文件适配于该新增宿主应用,可见,现有的小程序文件包的生成方法适用性较差,且维护不便。Since the applet file package contains multiple page resource files of preset host applications, the storage space occupied by the applet file package and the traffic consumed during the download process are both large. At the same time, since the identities of multiple preset host applications are currently hard-coded into the program files of the applet, when there are new host applications in the future, the program files of the applet need to be modified to make The program file of the applet is adapted to the newly added host application. It can be seen that the existing method for generating the applet file package has poor applicability and is inconvenient to maintain.
为了解决现有技术中的缺陷,本方案给出了以下实施例:In order to solve the defects in the prior art, this solution provides the following embodiments:
图1为本说明书实施例提供的一种小程序文件包的生成方法的流程示意图。从程序角度而言,流程的执行主体可以为小程序开发者的设备或搭载于小程序开发者的设备中的程序。如图1所示,该流程可以包括以下步骤:FIG. 1 is a schematic flowchart of a method for generating a small program file package provided by an embodiment of this specification. From a program perspective, the execution subject of the process can be the device of the applet developer or the program loaded on the device of the applet developer. As shown in Figure 1, the process can include the following steps:
步骤102:获取待生成的小程序中与宿主应用相关的页面资源文件的预设存储路径信息。Step 102: Obtain the preset storage path information of the page resource file related to the host application in the mini program to be generated.
在本说明书实施例中,小程序开发者通常需要预先设计各个小程序页面中所需包含的页面信息,从而可以确定出小程序页面中的与宿主应用相关的页面信息。其中,与宿主应用相关的页面信息可以包括随着小程序所在宿主应用的变化而变化的小程序页面信息。而小程序中与宿主应用相关的页面资源文件则可以用于存储这类与宿主应用相关的页面信息。In the embodiments of this specification, the applet developer usually needs to pre-design the page information to be included in each applet page, so that the page information related to the host application in the applet page can be determined. Wherein, the page information related to the host application may include the page information of the applet that changes with the change of the host application where the applet is located. The page resource files related to the host application in the applet can be used to store such page information related to the host application.
在实际应用中,所述与宿主应用相关的页面信息既可以为图像形式的信息,也可以为文本形式的信息,或者,也可以为音频形式的信息等,对此不再具体限定。所述与宿主应用相关的页面信息具体可以包括:宿主应用图标信息、所述小程序中与宿主应用相关的文案信息以及所述小程序中与宿主应用相关的用户协议信息中的至少一种。In actual applications, the page information related to the host application may be information in image form, text form information, or audio form information, etc., which is not specifically limited. The page information related to the host application may specifically include at least one of host application icon information, copywriting information related to the host application in the applet, and user protocol information related to the host application in the applet.
例如,当小程序为购物软件时,所述小程序中与宿主应用相关的文案信息可以为:用户在当前宿主应用中启动的小程序处进行购物时,可以享受的与该当前宿主应用对应的优惠信息。在实际应用中,不同宿主应用对应的优惠信息可以是不同的。或者,所述小程序中与宿主应用相关的文案信息也可以为:该宿主应用的广告语等。所述小程序中与宿主应用相关的用户协议信息可以包括:用户在宿主应用中启动小程序时,所需签订的网络服务协议、隐私协议等。For example, when the applet is shopping software, the copywriting information related to the host application in the applet may be: when the user makes a purchase at the applet launched in the current host application, he can enjoy the information corresponding to the current host application discount information. In actual applications, the preferential information corresponding to different host applications may be different. Alternatively, the copywriting information related to the host application in the mini program may also be: advertising slogans of the host application, etc. The user agreement information related to the host application in the mini program may include: the network service agreement, privacy agreement, etc. that the user needs to sign when the mini program is launched in the host application.
在本说明书实施例中,小程序开发者可预先指定与宿主应用相关的页面资源文件的预设存储路径,与便基于该预设存储路径去生成小程序的程序文件及页面资源文件集合。In the embodiment of this specification, the applet developer can pre-designate the preset storage path of the page resource file related to the host application, and generate the program file and page resource file set of the applet based on the preset storage path.
其中,所述页面资源文件的预设存储路径信息,可以指用户在磁盘上寻找该页面资源文件时所历经的文件和/或文件夹线路。例如,当预设存储路径信息为“A-B-C”时,可以表示该页面资源文件存储在文件夹A中的子文件夹B内的文件夹C中;或者,也可以表示该页面资源文件为存储在文件夹A中的子文件夹B内文件名称为C的文件。对此不做具体限定。Wherein, the preset storage path information of the page resource file may refer to the file and/or folder line that the user has gone through when searching for the page resource file on the disk. For example, when the preset storage path information is "ABC", it can mean that the page resource file is stored in folder C in subfolder B of folder A; or it can also mean that the page resource file is stored in The file named C in the subfolder B in the folder A. There is no specific restriction on this.
步骤104:根据所述预设存储路径信息,生成所述小程序的程序文件,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息。Step 104: Generate a program file of the applet according to the preset storage path information, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information.
在本说明书实施例中,小程序的程序文件既可以是小程序的源程序,也可以是小程序的可执行程序(executable program,EXE File)。所述小程序的程序文件运行时,可以通过该小程序的程序代码去调用该预设存储路径信息所指示的页面资源文件,以生成包含该页面资源文件对应的页面信息(即小程序中与宿主应用相关的页面信息)的小程序页面,并展示该小程序页面。In the embodiments of this specification, the program file of the applet can be either the source program of the applet or the executable program (EXE File) of the applet. When the program file of the applet is running, the program code of the applet can call the page resource file indicated by the preset storage path information to generate the page information corresponding to the page resource file (that is, the page resource file corresponding to the page resource file in the applet Host application related page information) of the applet page, and display the applet page.
步骤106:获取与指定宿主应用对应的页面资源文件集合,所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件。Step 106: Obtain a set of page resource files corresponding to a designated host application, where the set of page resource files includes page resource files related to the designated host application in the applet.
在本说明书实施例中,可以根据预设存储路径信息,去针对每个宿主应用,分别生成一个与该宿主应用相对应的页面资源文件集合。即不同宿主应用对应的页面资源文件集合可以是不同的。且在不同宿主应用的页面资源文件集合内,针对同一种页面资源文 件的存储路径信息与该页面资源文件的预设存储路径信息应该是相同的。In the embodiment of this specification, a set of page resource files corresponding to the host application may be generated for each host application according to the preset storage path information. That is, the set of page resource files corresponding to different host applications may be different. And in the page resource file collections of different host applications, the storage path information for the same type of page resource file should be the same as the preset storage path information of the page resource file.
在本说明书实施例中,与指定宿主应用对应的页面资源文件集合中只需包含小程序中与该指定宿主应用相关的页面资源文件即可,而无需包含小程序中与其他宿主应用相关的页面资源文件,使得该页面资源文件集合的体积较小,有利于节省存储空间。In the embodiment of this specification, the page resource file set corresponding to the designated host application only needs to include the page resource files related to the designated host application in the applet, and does not need to include pages related to other host applications in the applet. Resource files, making the page resource file collection small in size, which is beneficial to save storage space.
步骤108:根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。Step 108: Generate a small program file package at the designated host application according to the program file and the set of page resource files.
在本说明书实施例中,用户可以基于指定宿主应用处的小程序文件包,在指定宿主应用中去启动、运行小程序。例如,当用户在指定宿主应用中去启动小程序时,指定宿主应用所在设备可以去下载该指定宿主应用处的小程序文件包,通过运行该指定宿主应用处的小程序文件包中的程序文件,以展示小程序文件包中的与该指定宿主应用相关的页面资源文件所对应的小程序页面信息。In the embodiment of this specification, the user can start and run the applet in the specified host application based on the applet file package at the specified host application. For example, when a user launches an applet in a designated host application, the device where the designated host application is located can download the applet file package at the designated host application by running the program file in the applet file package at the designated host application , To display the mini program page information corresponding to the page resource file related to the specified host application in the mini program file package.
应当理解,本说明书一个或多个实施例所述的方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。It should be understood that the order of some of the steps of the method described in one or more embodiments of this specification can be exchanged according to actual needs, or some of the steps can also be omitted or deleted.
图1中的方法,通过令小程序的程序文件运行时,可根据预设存储路径信息,去展示小程序中与宿主应用相关的页面资源文件所对应的页面信息,从而可以根据该小程序的程序文件,以及根据预设存储路径信息生成的与指定宿主应用对应的页面资源文件集合,去生成指定宿主应用处的小程序文件包。由于该指定宿主应用处的小程序文件包中无需包括小程序的其他宿主应用处的页面资源文件,从而可以减少生成的小程序文件包的数据量,进而有利于减少小程序文件包占用的存储空间及下载过程中耗费的数据流量。In the method in Figure 1, when the program file of the applet is running, the page information corresponding to the page resource file related to the host application in the applet can be displayed according to the preset storage path information, so that the page information of the applet can be displayed according to the Program files and a collection of page resource files corresponding to the designated host application generated according to the preset storage path information to generate a small program file package at the designated host application. Since the applet file package at the designated host application does not need to include the page resource files of other host applications of the applet, the amount of data in the generated applet file package can be reduced, thereby helping to reduce the storage occupied by the applet file package Space and data traffic consumed in the download process.
且由于可以利用一套小程序的程序文件,去生成多个宿主应用处的小程序文件包,可见,该小程序的程序文件具有通用性。当新增宿主应用时,只需根据预设存储路径信息,去生成与该新增宿主应用对应的页面资源文件集合,即可基于小程序的程序文件及与该新增宿主应用对应的页面资源文件集合,去生成该新增宿主应用处的小程序文件包,而无需修改小程序的程序文件中的程序代码。可见,该小程序文件包的生成方法的适用性较好,且维护方便。And since the program files of a set of small programs can be used to generate small program file packages at multiple host applications, it can be seen that the program files of the small program are universal. When a new host application is added, it is only necessary to generate a set of page resource files corresponding to the new host application according to the preset storage path information, which can be based on the program files of the applet and the page resources corresponding to the new host application File collection to generate the small program file package of the newly added host application without modifying the program code in the program file of the small program. It can be seen that the method for generating the small program file package has good applicability and is easy to maintain.
基于图1的方法,本说明书实施例还提供了该方法的一些具体实施方案,下面进行说明。Based on the method in FIG. 1, the examples of this specification also provide some specific implementations of the method, which are described below.
可选的,步骤108:根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包,具体可以包括:发送所述程序文件及所述页面资源文件集合 至SaaS平台,以便于所述SaaS平台响应于用户指令,去根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。Optionally, step 108: generating a small program file package at the designated host application according to the program file and the page resource file collection, which may specifically include: sending the program file and the page resource file collection to The SaaS platform, so that the SaaS platform responds to user instructions to generate a small program file package at the designated host application according to the program file and the set of page resource files.
在本说明书实施例中,SaaS平台(英文:Software-as-a-Service,软件即服务)是一种运营SaaS软件的平台,SaaS平台可以向企业提供搭建信息化系统所需要的网络基础设施、软件及硬件运作平台,而企业则可以通过互联网获得SaaS平台所提供的服务,从而为企业带来便利。In the embodiments of this specification, the SaaS platform (English: Software-as-a-Service, software as a service) is a platform for operating SaaS software. The SaaS platform can provide enterprises with the network infrastructure, Software and hardware operating platforms, and enterprises can obtain the services provided by the SaaS platform through the Internet, thus bringing convenience to enterprises.
在本说明书实施例中,小程序开发者可以自行生成指定宿主应用处的小程序文件包,并将小程序文件包上传至小程序的服务器或者SaaS平台,以便于用户设备从小程序的服务器处或者SaaS平台处下载指定宿主应用处的小程序文件包。In the embodiment of this specification, the applet developer can generate the applet file package at the designated host application by himself, and upload the applet file package to the applet’s server or SaaS platform, so that the user equipment can download from the applet’s server or The SaaS platform downloads the small program file package of the designated host application.
或者,小程序开发者也可将小程序的程序文件以及与指定宿主应用对应的页面资源文件集合发生至SaaS平台,以便于SaaS平台在对小程序的程序文件以及与指定宿主应用对应的页面资源文件集合进行安全性检测后,去生成安全性更高的指定宿主应用处的小程序文件包。对应的,用户则可从SaaS平台处下载指定宿主应用处的小程序文件包。Alternatively, the applet developer can also generate a collection of the applet’s program files and the page resource files corresponding to the specified host application to the SaaS platform, so that the SaaS platform can check the applet’s program files and page resources corresponding to the specified host application. After the file collection is tested for security, a small program file package at the designated host application with higher security is generated. Correspondingly, the user can download the small program file package of the designated host application from the SaaS platform.
在实际应用中,小程序文件包中通常需包含小程序的可执行代码(Executable Code),因此,当小程序开发者上传至SaaS平台的小程序的程序文件为源程序文件时,SaaS平台还可以对小程序的程序文件进行编译,以得到小程序的可执行代码,并基于该小程序的可执行代码去生成小程序文件包。In practical applications, the small program file package usually needs to contain the executable code of the small program (Executable Code). Therefore, when the program file of the small program uploaded to the SaaS platform by the small program developer is the source program file, the SaaS platform also The program file of the applet can be compiled to obtain the executable code of the applet, and the applet file package is generated based on the executable code of the applet.
在本说明书实施例中,当小程序的宿主应用有多个时,可以将各个宿主应用的页面资源文件集合均发送至SaaS平台,以便于后续生成各个宿主应用处的小程序文件包。因此,所述发送所述页面资源文件集合至SaaS平台,具体可以包括:发送包含与指定宿主应用对应的页面资源文件集合在内的多个页面资源文件集合至SaaS平台,所述多个页面资源文件集合中每个页面资源文件集合对应的宿主应用均不同。In the embodiment of this specification, when there are multiple host applications of the applet, the set of page resource files of each host application can be sent to the SaaS platform to facilitate subsequent generation of the applet file package at each host application. Therefore, sending the set of page resource files to the SaaS platform may specifically include: sending a set of multiple page resource files including a set of page resource files corresponding to a specified host application to the SaaS platform, and the multiple page resources Each page resource file set in the file set corresponds to a different host application.
将所述与指定宿主应用对应的页面资源文件集合的标识设置为所述指定宿主应用的标识,以便于所述SaaS平台响应于用户指令,根据所述指定宿主应用的标识,去从所述多个页面资源文件集合中确定出所述与指定宿主应用对应的页面资源文件集合。The identifier of the page resource file set corresponding to the designated host application is set to the identifier of the designated host application, so that the SaaS platform responds to the user instruction and uses the identifier of the designated host application to retrieve the data from the The set of page resource files corresponding to the designated host application is determined from the set of page resource files.
在本说明书实施例中,所述多个页面资源文件集合中的页面资源文件的存储路径信息与预设存储路径信息应保持一致,即多个页面资源文件集合中的同一种类的页面资源文件的存储路径与该种类的页面资源文件的预设存储路径可以是相同的。从而便于小程序的程序文件在各个宿主应用中运行时,去根据预设存储路径信息,展示小程序中与当 前宿主应用相关的页面信息。In the embodiment of this specification, the storage path information of the page resource files in the multiple page resource file sets should be consistent with the preset storage path information, that is, the information of the page resource files of the same type in the multiple page resource file sets should be consistent. The storage path may be the same as the preset storage path of the page resource file of this type. Therefore, when the program file of the applet is running in each host application, it is convenient to display the page information related to the current host application in the applet according to the preset storage path information.
在本说明书实施例中,可以根据各个宿主应用的标识信息,去设置各个页面资源文件集合的标识,以对小程序开发者上传的多个页面资源文件集合进行区分。例如,当页面资源文件集合为文件夹时,可以将指定宿主应用的标识设置为与指定宿主应用对应的页面资源文件夹的名称。从而令SaaS平台可以从多个页面资源文件集合中确定出与指定宿主应用对应的页面资源文件集合。In the embodiment of this specification, the identification of each page resource file collection can be set according to the identification information of each host application, so as to distinguish multiple page resource file collections uploaded by the applet developer. For example, when the page resource file collection is a folder, the identifier of the designated host application can be set to the name of the page resource folder corresponding to the designated host application. Thus, the SaaS platform can determine the page resource file set corresponding to the specified host application from the multiple page resource file sets.
在本说明书实施例中,步骤106:获取与指定宿主应用对应的页面资源文件集合,具体可以包括:获取所述小程序中与所述指定宿主应用相关的页面资源文件。In the embodiment of this specification, step 106: obtaining a set of page resource files corresponding to a designated host application may specifically include: obtaining a page resource file related to the designated host application in the applet.
根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储,得到与所述指定宿主应用对应的页面资源文件夹。According to the preset storage path information, the page resource file related to the designated host application in the applet is stored to obtain the page resource folder corresponding to the designated host application.
在本说明书实施例中,小程序开发者可以先根据小程序中的与指定宿主应用相关的各个页面信息,生成对应的各个页面资源文件。例如,针对小程序中与指定宿主应用相关的一条文案信息,可以去生成一个包含该文案信息的页面资源文件;或者,可以将指定宿主应用的应用图标的图像作为一个页面资源文件等。In the embodiment of this specification, the applet developer may first generate the corresponding page resource files according to the information of each page in the applet related to the designated host application. For example, for a piece of copywriting information related to the designated host application in the applet, a page resource file containing the copywriting information can be generated; or, the image of the application icon of the designated host application can be used as a page resource file, etc.
所述根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储,具体包括:根据所述预设存储路径信息,设置所述目标页面资源文件的文件名称,所述文件名称为与所述目标页面资源文件对应的预设存储路径信息中的末端路径节点信息。The storing the page resource file related to the designated host application in the applet according to the preset storage path information specifically includes: setting the target page resource file according to the preset storage path information The file name is the end path node information in the preset storage path information corresponding to the target page resource file.
以及,根据所述预设存储路径信息,确定目标页面资源文件的存储位置;所述目标页面资源文件为所述小程序中与所述指定宿主应用相关的页面资源文件;将所述目标页面资源文件存储至所述存储位置处。And, determining the storage location of the target page resource file according to the preset storage path information; the target page resource file is the page resource file related to the designated host application in the applet; and the target page resource The file is stored at the storage location.
例如,假定针对指定宿主应用的应用图标的图像这一页面资源文件,与该页面资源文件对应的预设存储路径信息为“第一文件夹-第二文件夹-宿主应用图标”,则可以将该指定宿主应用的应用图标图像的文件名称设置为“宿主应用图标”,并在名称为“第一文件夹”的文件夹中建立名称为“第二文件夹”的文件夹,以将该指定宿主应用的应用图标图像存储至该名称为“第二文件夹”的文件夹中。For example, assuming that for a page resource file, an image of an application icon of a specified host application, the preset storage path information corresponding to the page resource file is "first folder-second folder-host application icon", you can change The file name of the application icon image of the designated host application is set to "host application icon", and a folder named "second folder" is created in the folder named "first folder" to specify The application icon image of the host application is stored in the folder named "second folder".
在本说明书实施例中,由于可以根据指定宿主应用的标识信息,去设置与指定宿主应用对应的页面资源文件集合的标识,因此,在根据预设存储路径信息,对小程序中与指定宿主应用相关的页面资源文件进行存储后,还可以将存储后得到的多个文件及文件 夹共同移动至一个名称为指定宿主应用的标识的文件夹中,该名称为指定宿主应用的标识的文件夹即为与指定宿主应用相关的页面资源文件集合。可见,预设存储路径信息中并不包含名称为指定宿主应用的标识的文件夹这一路径节点,从而可以避免在小程序的程序文件中写入多个宿主应用的标识,以提升该小程序的程序文件的维护便利性。In the embodiments of this specification, since the identification information of the page resource file set corresponding to the specified host application can be set according to the identification information of the specified host application, the identification of the page resource file set corresponding to the specified host application can be set according to the preset storage path information. After the related page resource files are stored, multiple files and folders obtained after storage can be moved to a folder named as the identifier of the designated host application, which is the folder named as the identifier of the designated host application. It is a collection of page resource files related to the specified host application. It can be seen that the preset storage path information does not include the path node of the folder named as the identifier of the designated host application, which can avoid writing multiple host application identifiers in the program file of the applet, so as to improve the applet The convenience of maintenance of the program files.
在实际应用中,小程序的程序文件在运行时,可以通过调用接口去确定当前宿主应用的标识,并从小程序文件包中识别处具有当前宿主应用标识的文件夹,以根据预设存储路径信息,从该具有当前宿主应用标识的文件夹中调用与宿主应用相关的页面资源文件,进而展示小程序中与当前宿主应用对应的页面信息。In actual applications, when the program file of the applet is running, the identity of the current host application can be determined by calling the interface, and the folder with the identity of the current host application can be identified from the applet file package, according to the preset storage path information , Call the page resource file related to the host application from the folder with the current host application identifier, and then display the page information corresponding to the current host application in the applet.
基于同样的思路,本说明书实施例中还提供了另一种小程序文件包的生成方法,图2为本说明书实施例提供的另一种小程序文件包的生成方法的流程示意图。从程序角度而言,流程的执行主体可以为SaaS平台。如图2所示,该流程可以包括以下步骤:Based on the same idea, another method for generating a small program file package is also provided in the embodiment of this specification. FIG. 2 is a schematic flowchart of another method for generating a small program file package provided by the embodiment of this specification. From a program point of view, the execution subject of the process can be the SaaS platform. As shown in Figure 2, the process can include the following steps:
步骤202:获取用户指令,所述用户指令用于指示生成指定宿主应用处的小程序的文件包。Step 202: Obtain a user instruction, where the user instruction is used to instruct to generate a file package of a small program at a designated host application.
在本说明书实施例中,指定宿主应用处的小程序的文件包中可以包括在该指定宿主应用处启动所述小程序所需的文件。用户可以在SaaS平台中输入该用户指令,以指示SaaS平台去生成该指定宿主应用处的小程序文件包。In the embodiment of the present specification, the file package of the applet at the designated host application may include the files required to start the applet at the designated host application. The user can input the user instruction in the SaaS platform to instruct the SaaS platform to generate the small program file package at the designated host application.
在实际应用中,该用户指令所指示的指定宿主应用既可以为一个应用也可以为多个应用。例如,SaaS平台的平台界面上可以显示多个宿主应用的选择项,用户通过点击某个宿主应用的选择项以输入该用户指令,此时,该用户指令用于指示生成一个指定宿主应用处的小程序文件包。在实际应用中,用户还以在选中多个宿主应用的选择项后,点击确认按钮以输入用户指令,此时,该用户指令用于指示生成多个指定宿主应用处的多个小程序文件包。后续,以该用户指令用于指示生成一个指定宿主应用处的小程序文件包为例,进行说明。In actual applications, the designated host application indicated by the user instruction may be one application or multiple applications. For example, the platform interface of the SaaS platform can display multiple host application selection items, and the user can click on a host application selection item to enter the user instruction. At this time, the user instruction is used to instruct to generate a designated host application. Small program file package. In actual applications, the user can also click the OK button to input user instructions after selecting the options of multiple host applications. At this time, the user instructions are used to instruct to generate multiple small program file packages at multiple designated host applications. . In the following, the user instruction is used to instruct the generation of a small program file package at the designated host application as an example for description.
步骤204:响应于所述用户指令获取所述小程序的程序文件,所述程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息。Step 204: Acquire the program file of the applet in response to the user instruction, the program file is generated according to the preset storage path information of the page resource file related to the host application in the applet, so as to facilitate all When the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information.
在本说明书实施例中,所述小程序的程序文件可以是小程序开发者根据小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的程序文件。步骤204中的小程序的程序文件与步骤104中生成的小程序的程序文件可以是相同的。In the embodiment of this specification, the program file of the applet may be a program file generated by the applet developer according to the preset storage path information of the page resource file related to the host application in the applet. The program file of the small program in step 204 and the program file of the small program generated in step 104 may be the same.
当该小程序的程序文件运行时,可以按照预设存储路径信息,去调用小程序中与宿主应用相关的页面资源文件,以生成包含该页面资源文件对应的页面信息(即小程序中与宿主应用相关的页面信息)的小程序页面。其中,小程序中与宿主应用相关的页面信息可以指随着小程序所在宿主应用的变化而变化的小程序页面信息。小程序中与宿主应用相关的页面信息可以包括:宿主应用图标信息、所述小程序中与宿主应用相关的文案信息以及所述小程序中与宿主应用相关的用户协议信息中的至少一种。When the program file of the applet is running, the page resource file related to the host application in the applet can be called according to the preset storage path information to generate the page information corresponding to the page resource file (that is, Application-related page information) of the applet page. Wherein, the page information related to the host application in the applet may refer to the page information of the applet that changes with the change of the host application where the applet is located. The page information related to the host application in the applet may include at least one of host application icon information, copywriting information related to the host application in the applet, and user protocol information related to the host application in the applet.
步骤206:从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,所述页面资源文件子集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件。Step 206: Determine a page resource file subset corresponding to the specified host application from the page resource file set of the applet, and the page resource file subset includes the applet and the specified host. Application-related page resource files.
在本说明书实施例中,SaaS平台处可预存有小程序的页面资源文件集合,该页面资源文件集合中的每个页面资源文件子集合中均包含小程序中的与一个宿主应用相关的全部页面资源文件。即小程序的页面资源文件集合中的页面资源文件子集合与小程序的宿主应用一一对应。步骤206中确定出的与指定宿主应用对应的页面资源文件子集合,同步骤106中获取的与指定宿主应用对应的页面资源文件集合可相同,对此不再赘述。In the embodiment of this specification, the SaaS platform may pre-store the page resource file collection of the applet, and each page resource file sub-collection in the page resource file set contains all the pages in the applet related to a host application. resource. That is, the page resource file sub-collection in the page resource file collection of the applet corresponds to the host application of the applet in a one-to-one correspondence. The sub-set of page resource files corresponding to the designated host application determined in step 206 may be the same as the set of page resource files corresponding to the designated host application obtained in step 106, which will not be repeated here.
步骤208:根据所述程序文件及所述页面资源文件子集合,生成所述指定宿主应用处的所述小程序的文件包。Step 208: Generate a file package of the applet at the designated host application according to the program file and the page resource file subset.
应当理解,本说明书一个或多个实施例所述的方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。It should be understood that the order of some of the steps of the method described in one or more embodiments of this specification can be exchanged according to actual needs, or some of the steps can also be omitted or deleted.
图2中的方法,通过根据小程序的程序文件及与指定宿主应用对应的页面资源文件子集合,去生成指定宿主应用处的小程序文件包。由于该指定宿主应用处的小程序文件包无需包括小程序的其他宿主应用处的页面资源文件,从而可减少生成的小程序文件包的数据量,进而有利于减少小程序文件包占用的存储空间及下载过程中耗费的数据流量。The method in FIG. 2 generates the small program file package at the specified host application by using the program file of the applet and the sub-set of page resource files corresponding to the specified host application. Since the applet file package at the designated host application does not need to include the page resource files of other host applications of the applet, the amount of data in the generated applet file package can be reduced, thereby helping to reduce the storage space occupied by the applet file package And the data traffic consumed in the download process.
且由于可以利用一套小程序的程序文件,去生成多个宿主应用处的小程序文件包,可见,该小程序的程序文件具有通用性。当新增宿主应用时,只需根据预设存储路径信息,去生成与该新增宿主应用对应的页面资源文件集合,即可基于该小程序的程序文件及与该新增宿主应用对应的页面资源文件集合,去生成该新增宿主应用处的小程序文件包,而无需修改小程序的程序文件中的程序代码。可见,该小程序文件包的生成方法的适用性较好。And since the program files of a set of small programs can be used to generate small program file packages at multiple host applications, it can be seen that the program files of the small program are universal. When a new host application is added, it is only necessary to generate a page resource file set corresponding to the new host application according to the preset storage path information, which can be based on the program files of the applet and the page corresponding to the new host application A collection of resource files to generate the small program file package of the newly added host application without modifying the program code in the program file of the small program. It can be seen that the applicability of the method for generating the small program file package is better.
在本说明书实施例中,SaaS平台处的小程序的程序代码及小程序的页面资源文件集 合,可以是小程序开发者预先发送SaaS平台的。In the embodiment of this specification, the program code of the applet on the SaaS platform and the page resource file collection of the applet may be sent to the SaaS platform by the applet developer in advance.
因此,步骤204:获取所述小程序的程序文件之前,还可包括:接收小程序开发者发送的所述小程序的源程序文件及页面资源文件集合;对所述源程序文件进行编译,得到所述小程序的程序文件。可见,所述小程序的程序文件中可包含小程序的可执行代码。Therefore, step 204: before obtaining the program file of the applet, it may further include: receiving the source program file and page resource file set of the applet sent by the applet developer; compiling the source program file to obtain The program file of the applet. It can be seen that the program file of the applet may contain the executable code of the applet.
在本说明书实施例中,所述从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,具体可以包括:根据所述用户指令,确定所述指定宿主应用的标识;从所述小程序的页面资源文件集合中,确定出携带有所述标识的页面资源文件夹,所述页面资源文件夹是根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储而得到的文件夹。In the embodiment of this specification, the determining the page resource file subset corresponding to the designated host application from the page resource file set of the applet may specifically include: determining the page resource file according to the user instruction Specify the identifier of the host application; determine the page resource folder carrying the identifier from the set of page resource files of the applet, and the page resource folder is based on the preset storage path information for the A folder obtained by storing page resource files related to the designated host application in the applet.
在本说明书实施例中,当需要生成指定宿主应用处的小程序文件包时,SaaS平台可以从小程序的页面资源文件集合中,自动识别出携带有该指定宿主应用标识的页面资源文件子集合,以作为与指定宿主应用对应的页面资源文件子集合,方便快捷。In the embodiment of this specification, when it is necessary to generate the applet file package at the designated host application, the SaaS platform can automatically identify the page resource file sub-set carrying the identification of the designated host application from the page resource file collection of the applet. As a sub-collection of page resource files corresponding to the specified host application, it is convenient and quick.
在本说明书实施例中,步骤208:生成所述指定宿主应用处的所述小程序的文件包之后,还可以包括:响应于终端设备发送的针对所述指定宿主应用处的所述小程序的文件包的获取请求,发送生成的所述文件包至所述终端设备。In the embodiment of this specification, step 208: after generating the file package of the applet at the designated host application, it may further include: responding to the information sent by the terminal device for the applet at the designated host application. The file package acquisition request, and the generated file package is sent to the terminal device.
图3为本说明书实施例提供的一种小程序文件包的生成方法的应用场景示意图。如图3所示,小程序开发者可以通过设备301将小程序的程序文件及页面资源文件集合发送至SaaS平台302处。SaaS平台处的用户可以在SaaS平台302处输入指示生成指定宿主应用处的小程序文件包的指令,以生成指定宿主应用处的小程序文件包。当用户基于终端设备303中的指定宿主应用去启动小程序时,终端设备303则可以从SaaS平台302处下载小程序的文件包,从而可以基于下载的小程序文件包去启动小程序。Fig. 3 is a schematic diagram of an application scenario of a method for generating a small program file package provided by an embodiment of the specification. As shown in FIG. 3, the applet developer can send the program file and page resource file collection of the applet to the SaaS platform 302 through the device 301. A user at the SaaS platform can input an instruction to generate a small program file package at the designated host application at the SaaS platform 302 to generate a small program file package at the designated host application. When the user starts the applet based on the designated host application in the terminal device 303, the terminal device 303 can download the applet file package from the SaaS platform 302, so that the applet can be started based on the downloaded applet file package.
基于同样的思路,本说明书实施例中还提供了一种小程序的启动方法,图4为本说明书实施例提供的一种小程序的启动方法的流程示意图。从程序角度而言,流程的执行主体可以为用户的终端设备或者用户的终端设备中搭载的指定宿主应用的程序。Based on the same idea, an embodiment of this specification also provides a method for starting an applet. FIG. 4 is a schematic flowchart of a method for starting an applet provided by an embodiment of this specification. From a program perspective, the execution subject of the process can be a user's terminal device or a program of a designated host application carried in the user's terminal device.
如图4所示,该流程可以包括以下步骤:As shown in Figure 4, the process can include the following steps:
步骤402:获取用户针对指定宿主应用中的小程序的启动指令。Step 402: Obtain the user's start instruction for the applet in the designated host application.
在本说明书实施例中,用户可以针对终端设备中搭载的指定宿主应用处的小程序图标进行点击,以输入该启动指令。In the embodiment of this specification, the user can click on the applet icon at the designated host application carried in the terminal device to input the startup instruction.
步骤404:响应于所述启动指令,获取与所述指定宿主应用对应的所述小程序的文件包,所述文件包中包含所述小程序的程序文件及与所述指定宿主应用对应的页面资源文件集合;所述小程序的程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时,根据所述预设存储路径信息,去展示所述页面资源文件对应的页面信息;所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件。Step 404: In response to the start instruction, obtain a file package of the applet corresponding to the designated host application, the file package containing the program file of the applet and a page corresponding to the designated host application Resource file collection; the program file of the small program is generated according to the preset storage path information of the page resource file related to the host application in the small program, so that when the program file is running, the program file is generated according to the preset Path information is stored to display page information corresponding to the page resource file; the page resource file set includes the page resource file related to the designated host application in the applet.
在本说明书实施例中,响应于所述启动指令,当确定用户终端设备中未存储有小程序的文件包时,则从小程序的服务器或者从SaaS平台处下载与指定宿主应用对应的小程序的文件包。该与指定宿主应用对应的文件包可以采用图1或图2中的小程序文件包的生成方法而生成的,对于该小程序的文件包的生成过程,不再赘述。In the embodiment of this specification, in response to the startup instruction, when it is determined that the file package of the applet is not stored in the user terminal device, download the applet corresponding to the designated host application from the server of the applet or from the SaaS platform. File package. The file package corresponding to the designated host application can be generated using the method for generating the small program file package in FIG. 1 or FIG. 2. The generation process of the file package of the small program will not be repeated.
在本说明书实施例中,与指定宿主应用对应的页面资源文件集合可以是根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储而得到的文件夹,该文件夹的名称可以为指定宿主应用的标识信息。从而在指定宿主应用中启动小程序时,可以使小程序的程序文件在运行过程中,先确定当前宿主应用(即指定宿主应用)的标识,并确定小程序文件包中的具有该指定宿主应用的标识的文件夹为存储有与指定宿主应用对应的页面资源文件的文件夹。进而可以根据预设存储路径信息,从该存储有与指定宿主应用对应的页面资源文件的文件夹中去调用所需的页面资源文件,以展示包含有小程序中与该指定宿主应用相关的页面信息的小程序页面。In the embodiment of this specification, the page resource file set corresponding to the designated host application may be obtained by storing the page resource files related to the designated host application in the applet according to the preset storage path information Folder, the name of the folder can be the identification information of the specified host application. Therefore, when the applet is launched in the designated host application, the program file of the applet can first determine the identity of the current host application (that is, the designated host application) during the running process, and determine that the designated host application is included in the applet file package. The folder identified by is a folder that stores page resource files corresponding to the specified host application. Further, according to the preset storage path information, the required page resource file can be called from the folder where the page resource file corresponding to the specified host application is stored, so as to display the page containing the applet related to the specified host application Mini program page for information.
步骤406:根据所述文件包,在所述指定宿主应用中启动所述小程序。Step 406: According to the file package, start the applet in the designated host application.
应当理解,本说明书一个或多个实施例所述的方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。It should be understood that the order of some of the steps of the method described in one or more embodiments of this specification can be exchanged according to actual needs, or some of the steps can also be omitted or deleted.
图4中的方法,由于用户终端设备下载的指定宿主应用处的小程序文件包中包含与该指定宿主应用对应的页面资源文件,而无需包含小程序的其他宿主应用处的页面资源文件,从而可以减少该小程序文件包的数据量,进而有利于减少小程序文件包占用的存储空间及下载过程中耗费的数据流量。In the method in FIG. 4, since the applet file package at the designated host application downloaded by the user terminal device contains the page resource file corresponding to the designated host application, there is no need to include page resource files at other host applications of the applet, thereby The data volume of the small program file package can be reduced, thereby helping to reduce the storage space occupied by the small program file package and the data traffic consumed in the downloading process.
基于同样的思路,本说明书实施例还提供了上述方法对应的装置。图5为本说明书实施例提供的对应于图1的一种小程序文件包的生成装置的结构示意图。如图5所示,该装置可以包括:Based on the same idea, the embodiment of this specification also provides a device corresponding to the above method. FIG. 5 is a schematic structural diagram of an apparatus for generating a small program file package corresponding to FIG. 1 provided by an embodiment of the specification. As shown in Figure 5, the device may include:
第一获取模块502,用于获取待生成的小程序中与宿主应用相关的页面资源文件的 预设存储路径信息。The first obtaining module 502 is configured to obtain preset storage path information of page resource files related to the host application in the mini program to be generated.
程序文件生成模块504,用于根据所述预设存储路径信息,生成所述小程序的程序文件,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息。The program file generation module 504 is configured to generate a program file of the applet according to the preset storage path information, so that when the program file is running, according to the preset storage path information, display the corresponding page resource file Page information.
第二获取模块506,用于获取与指定宿主应用对应的页面资源文件集合,所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件。The second obtaining module 506 is configured to obtain a set of page resource files corresponding to a designated host application, and the set of page resource files includes page resource files related to the designated host application in the applet.
文件包生成模块508,用于根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。The file package generating module 508 is configured to generate a small program file package at the designated host application according to the program file and the page resource file set.
基于图5的装置,本说明书实施例还提供了该方法的一些具体实施方案,下面进行说明。Based on the device in FIG. 5, the examples of this specification also provide some specific implementations of the method, which are described below.
可选的,所述第二获取模块506具体用于:获取所述小程序中与所述指定宿主应用相关的页面资源文件;根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储,得到与所述指定宿主应用对应的页面资源文件夹。Optionally, the second obtaining module 506 is specifically configured to: obtain page resource files related to the designated host application in the applet; The page resource file related to the designated host application is stored, and the page resource folder corresponding to the designated host application is obtained.
其中,所述根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储,具体可以包括:根据所述预设存储路径信息,确定目标页面资源文件的存储位置;所述目标页面资源文件为所述小程序中与所述指定宿主应用相关的页面资源文件;将所述目标页面资源文件存储至所述存储位置处。以及,根据所述预设存储路径信息,设置所述目标页面资源文件的文件名称,所述文件名称为与所述目标页面资源文件对应的预设存储路径信息中的末端路径节点信息。Wherein, storing the page resource file related to the designated host application in the applet according to the preset storage path information may specifically include: determining the target page resource according to the preset storage path information The storage location of the file; the target page resource file is a page resource file related to the designated host application in the applet; the target page resource file is stored in the storage location. And, according to the preset storage path information, the file name of the target page resource file is set, where the file name is the end path node information in the preset storage path information corresponding to the target page resource file.
所述,文件包生成模块508具体可以用于:发送所述程序文件及所述页面资源文件集合至SaaS平台,以便于所述SaaS平台响应于用户指令,去根据所述程序文件及所述页面资源文件集合,生成指定宿主应用处的小程序文件包。The file package generation module 508 can be specifically used to: send the program file and the page resource file collection to the SaaS platform, so that the SaaS platform can respond to the user's instruction according to the program file and the page. A collection of resource files to generate a small program file package for the designated host application.
其中,所述发送所述页面资源文件集合至SaaS平台,具体可以包括:发送包含所述与指定宿主应用对应的页面资源文件集合在内的多个页面资源文件集合至SaaS平台,所述多个页面资源文件集合中的每个页面资源文件集合对应的宿主应用均不同;将所述与指定宿主应用对应的页面资源文件集合的标识设置为所述指定宿主应用的标识,以便所述SaaS平台响应于用户指令,根据所述指定宿主应用的标识从所述多个页面资源文件集合中确定出所述与指定宿主应用对应的页面资源文件集合。Wherein, sending the set of page resource files to the SaaS platform may specifically include: sending a set of multiple page resource files including the set of page resource files corresponding to the specified host application to the SaaS platform, and the multiple sets of page resource files are sent to the SaaS platform. Each page resource file set in the page resource file set corresponds to a different host application; the identification of the page resource file set corresponding to the specified host application is set to the identification of the specified host application, so that the SaaS platform can respond According to a user instruction, the page resource file set corresponding to the designated host application is determined from the plurality of page resource file sets according to the identifier of the designated host application.
基于同样的思路,本说明书实施例还提供了上述方法对应的装置。图6为本说 明书实施例提供的对应于图2的一种小程序文件包的生成装置的结构示意图。如图6所示,该装置可以包括:Based on the same idea, the embodiment of this specification also provides a device corresponding to the above method. Fig. 6 is a schematic structural diagram of an apparatus for generating a small program file package corresponding to Fig. 2 provided by an embodiment of the manual. As shown in Figure 6, the device may include:
第一获取模块602,用于获取用户指令,所述用户指令用于指示生成指定宿主应用处的小程序的文件包。The first obtaining module 602 is configured to obtain a user instruction, and the user instruction is used to instruct to generate a file package of an applet in a designated host application.
第二获取模块604,用于响应于所述用户指令,获取所述小程序的程序文件,所述程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息。The second obtaining module 604 is configured to obtain a program file of the applet in response to the user instruction, the program file being based on the preset storage path information of the page resource file related to the host application in the applet It is generated so that the page information corresponding to the page resource file can be displayed according to the preset storage path information when the program file is running.
确定模块606,用于从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,所述页面资源文件子集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件。The determining module 606 is configured to determine a page resource file sub-collection corresponding to the designated host application from the page resource file collection of the applet, and the page resource file sub-collection includes all files and files in the applet. Describes page resource files related to the specified host application.
文件包生成模块608,用于根据所述程序文件及所述页面资源文件子集合,生成所述指定宿主应用处的所述小程序的文件包。The file package generating module 608 is configured to generate a file package of the applet in the designated host application according to the program file and the page resource file subset.
可选的,所述确定模块606,具体可以用于:根据所述用户指令,确定所述指定宿主应用的标识;从所述小程序的页面资源文件集合中,确定出携带有所述标识的页面资源文件夹,所述页面资源文件夹是根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储而得到的文件夹。Optionally, the determining module 606 may be specifically configured to: determine the identifier of the designated host application according to the user instruction; determine from the set of page resource files of the applet that carries the identifier A page resource folder, where the page resource folder is a folder obtained by storing page resource files related to the designated host application in the applet according to the preset storage path information.
可选的,图6中的装置还可以包括:接收模块,用于接收小程序开发者发送的所述小程序的源程序文件。编译模块,用于对所述源程序文件进行编译,得到所述小程序的程序文件。Optionally, the apparatus in FIG. 6 may further include: a receiving module configured to receive the source program file of the applet sent by the applet developer. The compiling module is used to compile the source program file to obtain the program file of the small program.
可选的,图6中的装置还可以包括:发送模块,用于响应于终端设备发送的针对所述指定宿主应用处的所述小程序的文件包的获取请求,发送生成的所述文件包至所述终端设备。Optionally, the apparatus in FIG. 6 may further include: a sending module, configured to send the generated file package in response to a request for obtaining the file package of the applet at the designated host application sent by the terminal device To the terminal device.
基于同样的思路,本说明书实施例还提供了上述方法对应的装置。图7为本说明书实施例提供的对应于图3的一种小程序的启动装置的结构示意图。如图7所示,该装置可以包括:Based on the same idea, the embodiment of this specification also provides a device corresponding to the above method. FIG. 7 is a schematic structural diagram of a device for launching a small program corresponding to FIG. 3 provided by an embodiment of this specification. As shown in Figure 7, the device may include:
获取模块702,用于获取用户针对指定宿主应用中的小程序的启动指令。The obtaining module 702 is used to obtain the user's start instruction for the applet in the designated host application.
获取模块704,用于响应于所述启动指令,获取与所述指定宿主应用对应的所述 小程序的文件包,所述文件包中包含所述小程序的程序文件及与所述指定宿主应用对应的页面资源文件集合;所述小程序的程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时,根据所述预设存储路径信息,去展示所述页面资源文件对应的页面信息;所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;其中,所述页面资源文件集合是根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储而得到的文件夹。The obtaining module 704 is configured to obtain a file package of the applet corresponding to the designated host application in response to the start instruction, the file package including the program file of the applet and the file package of the applet and the designated host application Corresponding page resource file collection; the program file of the applet is generated according to the preset storage path information of the page resource file related to the host application in the applet, so that when the program file is running, it is based on all The preset storage path information is used to display the page information corresponding to the page resource file; the page resource file set includes the page resource file related to the designated host application in the applet; wherein, the page resource The file collection is a folder obtained by storing page resource files related to the designated host application in the applet according to the preset storage path information.
启动模块706,用于根据所述文件包,在所述指定宿主应用中启动所述小程序。The starting module 706 is configured to start the small program in the designated host application according to the file package.
基于同样的思路,本说明书实施例还提供了图1中方法对应的一种小程序文件包的生成设备,该设备可以包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:获取待生成的小程序中与宿主应用相关的页面资源文件的预设存储路径信息。Based on the same idea, the embodiment of this specification also provides a device for generating a small program file package corresponding to the method in FIG. 1. The device may include: at least one processor; Memory; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can: obtain the small program to be generated The preset storage path information of the page resource file related to the host application.
根据所述预设存储路径信息,生成所述小程序的程序文件,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息。According to the preset storage path information, a program file of the applet is generated, so that the page information corresponding to the page resource file is displayed according to the preset storage path information when the program file is running.
获取与指定宿主应用对应的页面资源文件集合,所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件。Obtain a set of page resource files corresponding to a designated host application, where the set of page resource files includes page resource files related to the designated host application in the applet.
根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。According to the program file and the page resource file set, a small program file package at the designated host application is generated.
基于同样的思路,本说明书实施例还提供了图2中方法对应的一种小程序文件包的生成设备,该设备可以包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:获取用户指令,所述用户指令用于指示生成指定宿主应用处的小程序的文件包。Based on the same idea, the embodiment of this specification also provides a device for generating a small program file package corresponding to the method in FIG. 2. The device may include: at least one processor; Memory; wherein the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, so that the at least one processor can: acquire user instructions, the user The instruction is used to instruct to generate the file package of the small program at the designated host application.
响应于所述用户指令,获取所述小程序的程序文件,所述程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息。In response to the user instruction, obtain the program file of the applet, the program file is generated according to the preset storage path information of the page resource file related to the host application in the applet, so as to facilitate the program When the file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information.
从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,所述页面资源文件子集合中包含所述小程序中与所述指定宿主应用相 关的页面资源文件。From the set of page resource files of the applet, determine the page resource file sub-set corresponding to the specified host application, and the page resource file sub-set contains the information related to the specified host application in the applet Page resource file.
根据所述程序文件及所述页面资源文件子集合,生成所述指定宿主应用处的所述小程序的文件包。According to the program file and the page resource file subset, a file package of the applet in the designated host application is generated.
基于同样的思路,本说明书实施例还提供了图3中方法对应的一种小程序启动设备,该设备可以包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:获取用户针对指定宿主应用中的小程序的启动指令。Based on the same idea, the embodiment of this specification also provides a small program startup device corresponding to the method in FIG. 3, the device may include: at least one processor; and a memory communicatively connected with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can: Start instruction.
响应于所述启动指令,获取与所述指定宿主应用对应的所述小程序的文件包,所述文件包中包含所述小程序的程序文件及与所述指定宿主应用对应的页面资源文件集合;所述小程序的程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时,根据所述预设存储路径信息,去展示所述页面资源文件对应的页面信息;所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件。In response to the start instruction, obtain a file package of the applet corresponding to the designated host application, the file package containing the program file of the applet and a set of page resource files corresponding to the designated host application The program file of the small program is generated according to the preset storage path information of the page resource file related to the host application in the small program, so that when the program file is running, it is generated according to the preset storage path information , To display the page information corresponding to the page resource file; the page resource file set includes the page resource file related to the designated host application in the applet.
根据所述文件包,在所述指定宿主应用中启动所述小程序。According to the file package, the small program is started in the designated host application.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than in the embodiments and still achieve desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown in order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电 路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, the improvement of a technology can be clearly distinguished between hardware improvements (for example, improvements in circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements in method flow). However, with the development of technology, the improvement of many methods and processes of today can be regarded as a direct improvement of the hardware circuit structure. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by the hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (for example, a Field Programmable Gate Array (Field Programmable Gate Array, FPGA)) is such an integrated circuit whose logic function is determined by the user's programming of the device. It is programmed by the designer to "integrate" a digital system on a piece of PLD, without requiring chip manufacturers to design and manufacture dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly realized with "logic compiler" software, which is similar to the software compiler used in program development and writing, but before compilation The original code must also be written in a specific programming language, which is called Hardware Description Language (HDL), and there is not only one type of HDL, but many types, such as ABEL (Advanced Boolean Expression Language) , AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description), etc., currently most commonly used It is VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be clear to those skilled in the art that just a little bit of logic programming of the method flow in the above-mentioned hardware description languages and programming into an integrated circuit can easily obtain the hardware circuit that implements the logic method flow.
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可是实现方法的软件模块又可是硬件部件内的结构。The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) executable by the (micro)processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as part of the memory control logic. Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code manner, it is completely possible to program the method steps to make the controller use logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded logic. The same function can be realized in the form of a microcontroller or the like. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as a structure within the hardware component. Or even, a device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。The systems, devices, modules, or units illustrated in the above embodiments may be specifically implemented by computer chips or entities, or implemented by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cell phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Any combination of these devices.
为了描述方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书一个或多个实施例时可把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above device, the functions are divided into various units and described separately. Of course, when implementing one or more embodiments of this specification, the functions of each unit may be implemented in the same one or more software and/or hardware.
本领域内的技术人员应明白,本说明书一个或多个实施例可提供为方法、系统、或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软 件实施例、或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that one or more embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, one or more embodiments of this specification may adopt the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may adopt computer programs implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The form of the product.
本说明书一个或多个实施例是参照根据本说明书一个或多个实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。One or more embodiments of this specification are described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to one or more embodiments of this specification. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are used to generate It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带, 磁带式磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or equipment including a series of elements includes not only those elements, but also Other elements that are not explicitly listed, or also include elements inherent to such processes, methods, commodities, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element.
本说明书一个或多个实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书一个或多个实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
以上所述仅为本说明书的实施例而已,并不用于限制本说明书一个或多个实施例。对于本领域技术人员来说,本说明书一个或多个实施例可以有各种更改和变化。凡在本说明书一个或多个实施例的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例的权利要求范围之内。The above descriptions are only the embodiments of this specification, and are not used to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification should be included in the scope of the claims of one or more embodiments of this specification.

Claims (23)

  1. 一种小程序文件包的生成方法,包括:A method for generating small program file packages, including:
    获取待生成的小程序中与宿主应用相关的页面资源文件的预设存储路径信息;Obtain the preset storage path information of the page resource file related to the host application in the mini program to be generated;
    根据所述预设存储路径信息,生成所述小程序的程序文件,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;Generating the program file of the applet according to the preset storage path information, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information;
    获取与指定宿主应用对应的页面资源文件集合,所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;Acquiring a page resource file collection corresponding to a designated host application, where the page resource file collection includes page resource files related to the designated host application in the applet;
    根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。According to the program file and the page resource file set, a small program file package at the designated host application is generated.
  2. 如权利要求1所述的方法,所述获取与指定宿主应用对应的页面资源文件集合,具体包括:5. The method according to claim 1, wherein said obtaining a set of page resource files corresponding to a specified host application specifically comprises:
    获取所述小程序中与所述指定宿主应用相关的页面资源文件;Obtaining page resource files related to the designated host application in the applet;
    根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储,得到与所述指定宿主应用对应的页面资源文件夹。According to the preset storage path information, the page resource file related to the designated host application in the applet is stored to obtain the page resource folder corresponding to the designated host application.
  3. 如权利要求2所述的方法,所述根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储,具体包括:The method according to claim 2, wherein the storing page resource files related to the designated host application in the applet according to the preset storage path information specifically includes:
    根据所述预设存储路径信息,确定目标页面资源文件的存储位置;所述目标页面资源文件为所述小程序中与所述指定宿主应用相关的页面资源文件;Determine the storage location of the target page resource file according to the preset storage path information; the target page resource file is a page resource file related to the designated host application in the applet;
    将所述目标页面资源文件存储至所述存储位置处。The target page resource file is stored in the storage location.
  4. 如权利要求3所述的方法,所述根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储,还包括:The method according to claim 3, wherein the storing page resource files related to the designated host application in the applet according to the preset storage path information further comprises:
    根据所述预设存储路径信息,设置所述目标页面资源文件的文件名称,所述文件名称为与所述目标页面资源文件对应的预设存储路径信息中的末端路径节点信息。According to the preset storage path information, the file name of the target page resource file is set, and the file name is the end path node information in the preset storage path information corresponding to the target page resource file.
  5. 如权利要求1所述的方法,所述根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包,具体包括:5. The method according to claim 1, wherein said generating a small program file package at said designated host application according to said program file and said page resource file set specifically includes:
    发送所述程序文件及所述页面资源文件集合至SaaS平台,以便于所述SaaS平台响应于用户指令,去根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。Send the program file and the set of page resource files to the SaaS platform, so that the SaaS platform responds to user instructions to generate a small file at the designated host application based on the program file and the set of page resource files Program file package.
  6. 如权利要求5所述的方法,所述发送所述页面资源文件集合至SaaS平台,具体包括:The method according to claim 5, wherein the sending the set of page resource files to the SaaS platform specifically includes:
    发送包含所述与指定宿主应用对应的页面资源文件集合在内的多个页面资源文件集合至SaaS平台,所述多个页面资源文件集合中的每个页面资源文件集合对应的宿主应用均不同;Sending multiple page resource file sets including the page resource file set corresponding to the specified host application to the SaaS platform, and each page resource file set in the multiple page resource file sets corresponds to a different host application;
    将所述与指定宿主应用对应的页面资源文件集合的标识设置为所述指定宿主应用的标识,以便于所述SaaS平台响应于用户指令,根据所述指定宿主应用的标识,去从所述多个页面资源文件集合中确定出所述与指定宿主应用对应的页面资源文件集合。The identifier of the page resource file set corresponding to the designated host application is set to the identifier of the designated host application, so that the SaaS platform responds to the user instruction and uses the identifier of the designated host application to retrieve the data from the The set of page resource files corresponding to the designated host application is determined from the set of page resource files.
  7. 如权利要求1-6中任意一项所述的方法,所述页面信息包括:宿主应用图标信息、所述小程序中与宿主应用相关的文案信息以及所述小程序中与宿主应用相关的用户协议信息中的至少一种。The method according to any one of claims 1 to 6, wherein the page information includes: host application icon information, copy information related to the host application in the applet, and users related to the host application in the applet At least one of the protocol information.
  8. 一种小程序文件包的生成方法,包括:A method for generating small program file packages, including:
    获取用户指令,所述用户指令用于指示生成指定宿主应用处的小程序的文件包;Acquiring a user instruction, the user instruction being used to instruct to generate a file package of a small program at a designated host application;
    响应于所述用户指令,获取所述小程序的程序文件,所述程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;In response to the user instruction, obtain the program file of the applet, the program file is generated according to the preset storage path information of the page resource file related to the host application in the applet, so as to facilitate the program When the file is running, display the page information corresponding to the page resource file according to the preset storage path information;
    从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,所述页面资源文件子集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;From the page resource file set of the applet, determine the page resource file sub-set corresponding to the specified host application, and the page resource file sub-set contains the applet related to the specified host application Page resource file;
    根据所述程序文件及所述页面资源文件子集合,生成所述指定宿主应用处的所述小程序的文件包。According to the program file and the page resource file subset, a file package of the applet in the designated host application is generated.
  9. 如权利要求8所述的方法,所述获取所述小程序的程序文件之前,还包括:The method according to claim 8, before said obtaining the program file of the applet, further comprising:
    接收小程序开发者发送的所述小程序的源程序文件;Receiving the source program file of the mini program sent by the mini program developer;
    对所述源程序文件进行编译,得到所述小程序的程序文件。Compiling the source program file to obtain the program file of the small program.
  10. 如权利要求8所述的方法,所述从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,具体包括:8. The method according to claim 8, wherein said determining, from the set of page resource files of the applet, the subset of page resource files corresponding to the specified host application specifically includes:
    根据所述用户指令,确定所述指定宿主应用的标识;Determine the identifier of the designated host application according to the user instruction;
    从所述小程序的页面资源文件集合中,确定出携带有所述标识的页面资源文件夹,所述页面资源文件夹是根据所述预设存储路径信息,对所述小程序中与所述指定宿主应 用相关的页面资源文件进行存储而得到的文件夹。From the set of page resource files of the applet, the page resource folder carrying the identifier is determined, and the page resource folder is based on the preset storage path information, and the Specify the folder where page resource files related to the host application are stored.
  11. 如权利要求8所述的方法,所述生成所述指定宿主应用处的所述小程序的文件包之后,还包括:8. The method according to claim 8, after said generating the file package of the applet at the designated host application, further comprising:
    响应于终端设备发送的针对所述指定宿主应用处的所述小程序的文件包的获取请求,发送生成的所述文件包至所述终端设备。In response to the request for obtaining the file package of the applet at the designated host application sent by the terminal device, the generated file package is sent to the terminal device.
  12. 如权利要求8-11中任意一项所述的方法,所述页面信息包括:宿主应用图标信息、所述小程序中与宿主应用相关的文案信息以及所述小程序中与宿主应用相关的用户协议信息中的至少一种。The method according to any one of claims 8-11, the page information includes: host application icon information, copy information related to the host application in the applet, and users related to the host application in the applet At least one of the protocol information.
  13. 一种小程序的启动方法,包括:A method for starting a small program, including:
    获取用户针对指定宿主应用中的小程序的启动指令;Obtain the user's start instruction for the applet in the designated host application;
    响应于所述启动指令,获取与所述指定宿主应用对应的所述小程序的文件包,所述文件包中包含所述小程序的程序文件及与所述指定宿主应用对应的页面资源文件集合;所述小程序的程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时,根据所述预设存储路径信息,去展示所述页面资源文件对应的页面信息;所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;In response to the start instruction, obtain a file package of the applet corresponding to the designated host application, the file package containing the program file of the applet and a set of page resource files corresponding to the designated host application The program file of the small program is generated according to the preset storage path information of the page resource file related to the host application in the small program, so that when the program file is running, it is generated according to the preset storage path information To display the page information corresponding to the page resource file; the page resource file set includes the page resource file related to the designated host application in the applet;
    根据所述文件包,在所述指定宿主应用中启动所述小程序。According to the file package, the small program is started in the designated host application.
  14. 如权利要求13所述方法,所述页面资源文件集合是根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储而得到的文件夹。The method according to claim 13, wherein the page resource file set is a folder obtained by storing page resource files related to the designated host application in the applet according to the preset storage path information.
  15. 一种小程序文件包的生成装置,包括:A device for generating a small program file package includes:
    第一获取模块,用于获取待生成的小程序中与宿主应用相关的页面资源文件的预设存储路径信息;The first obtaining module is configured to obtain preset storage path information of page resource files related to the host application in the mini program to be generated;
    程序文件生成模块,用于根据所述预设存储路径信息,生成所述小程序的程序文件,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;The program file generation module is used to generate the program file of the applet according to the preset storage path information, so that when the program file is running, according to the preset storage path information, display the corresponding page resource file Page information;
    第二获取模块,用于获取与指定宿主应用对应的页面资源文件集合,所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;The second obtaining module is configured to obtain a set of page resource files corresponding to a designated host application, and the set of page resource files includes page resource files related to the designated host application in the applet;
    文件包生成模块,用于根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。The file package generation module is used to generate the small program file package at the designated host application according to the program file and the page resource file set.
  16. 如权利要求15所述的装置,所述第二获取模块,具体用于:The device according to claim 15, wherein the second acquisition module is specifically configured to:
    获取所述小程序中与所述指定宿主应用相关的页面资源文件;Obtaining page resource files related to the designated host application in the applet;
    根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储,得到与所述指定宿主应用对应的页面资源文件夹。According to the preset storage path information, the page resource file related to the designated host application in the applet is stored to obtain the page resource folder corresponding to the designated host application.
  17. 一种小程序文件包的生成装置,包括:A device for generating a small program file package includes:
    第一获取模块,用于获取用户指令,所述用户指令用于指示生成指定宿主应用处的小程序的文件包;The first obtaining module is configured to obtain user instructions, where the user instructions are used to instruct to generate a file package of a small program at a designated host application;
    第二获取模块,用于响应于所述用户指令,获取所述小程序的程序文件,所述程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;The second obtaining module is configured to obtain the program file of the applet in response to the user instruction, the program file being generated according to the preset storage path information of the page resource file related to the host application in the applet , So that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information;
    确定模块,用于从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,所述页面资源文件子集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;The determining module is configured to determine, from the page resource file collection of the applet, a page resource file sub-collection corresponding to the designated host application, and the page resource file sub-collection includes the applet and the Specify page resource files related to the host application;
    文件包生成模块,用于根据所述程序文件及所述页面资源文件子集合,生成所述指定宿主应用处的所述小程序的文件包。The file package generation module is used to generate the file package of the applet in the designated host application according to the program file and the page resource file subset.
  18. 如权利要求17所述的装置,所述确定模块,具体用于:The device according to claim 17, wherein the determining module is specifically configured to:
    根据所述用户指令,确定所述指定宿主应用的标识;Determine the identifier of the designated host application according to the user instruction;
    从所述小程序的页面资源文件集合中,确定出携带有所述标识的页面资源文件夹,所述页面资源文件夹是根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储而得到的文件夹。From the set of page resource files of the applet, the page resource folder carrying the identifier is determined, and the page resource folder is based on the preset storage path information, and the Specify the folder where page resource files related to the host application are stored.
  19. 一种小程序的启动装置,包括:A starting device for a small program, including:
    第一获取模块,用于获取用户针对指定宿主应用中的小程序的启动指令;The first obtaining module is used to obtain the user's start instruction for the applet in the designated host application;
    第二获取模块,用于响应于所述启动指令,获取与所述指定宿主应用对应的所述小程序的文件包,所述文件包中包含所述小程序的程序文件及与所述指定宿主应用对应的页面资源文件集合;所述小程序的程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时,根据所述预设存储路径信息,去展示所述页面资源文件对应的页面信息;所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;The second obtaining module is configured to obtain a file package of the applet corresponding to the designated host application in response to the start instruction, and the file package contains the program file of the applet and the file package of the applet and the designated host application. A collection of page resource files corresponding to the application; the program file of the applet is generated according to the preset storage path information of the page resource file related to the host application in the applet, so that when the program file is running, according to The preset storage path information is used to display the page information corresponding to the page resource file; the page resource file set includes the page resource file related to the designated host application in the applet;
    启动模块,用于根据所述文件包,在所述指定宿主应用中启动所述小程序。The start module is used to start the small program in the designated host application according to the file package.
  20. 如权利要求19所述装置,所述页面资源文件集合是根据所述预设存储路径信息,对所述小程序中与所述指定宿主应用相关的页面资源文件进行存储而得到的文件夹。The device according to claim 19, wherein the page resource file set is a folder obtained by storing page resource files related to the designated host application in the applet according to the preset storage path information.
  21. 一种小程序文件包的生成设备,包括:A device for generating small program file packages, including:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can:
    获取待生成的小程序中与宿主应用相关的页面资源文件的预设存储路径信息;Obtain the preset storage path information of the page resource file related to the host application in the mini program to be generated;
    根据所述预设存储路径信息,生成所述小程序的程序文件,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;Generating the program file of the applet according to the preset storage path information, so that when the program file is running, the page information corresponding to the page resource file is displayed according to the preset storage path information;
    获取与指定宿主应用对应的页面资源文件集合,所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;Acquiring a page resource file collection corresponding to a designated host application, where the page resource file collection includes page resource files related to the designated host application in the applet;
    根据所述程序文件及所述页面资源文件集合,生成所述指定宿主应用处的小程序文件包。According to the program file and the page resource file set, a small program file package at the designated host application is generated.
  22. 一种小程序文件包的生成设备,包括:A device for generating small program file packages, including:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can:
    获取用户指令,所述用户指令用于指示生成指定宿主应用处的小程序的文件包;Acquiring a user instruction, the user instruction being used to instruct to generate a file package of a small program at a designated host application;
    响应于所述用户指令,获取所述小程序的程序文件,所述程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时根据所述预设存储路径信息,展示所述页面资源文件对应的页面信息;In response to the user instruction, obtain the program file of the applet, the program file is generated according to the preset storage path information of the page resource file related to the host application in the applet, so as to facilitate the program When the file is running, display the page information corresponding to the page resource file according to the preset storage path information;
    从所述小程序的页面资源文件集合中,确定出与所述指定宿主应用对应的页面资源文件子集合,所述页面资源文件子集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;From the set of page resource files of the applet, determine the page resource file sub-set corresponding to the specified host application, and the page resource file sub-set contains the information related to the specified host application in the applet Page resource file;
    根据所述程序文件及所述页面资源文件子集合,生成所述指定宿主应用处的所述小程序的文件包。According to the program file and the page resource file subset, a file package of the applet in the designated host application is generated.
  23. 一种小程序的启动设备,包括:A startup device for small programs, including:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can:
    获取用户针对指定宿主应用中的小程序的启动指令;Obtain the user's start instruction for the applet in the designated host application;
    响应于所述启动指令,获取与所述指定宿主应用对应的所述小程序的文件包,所述文件包中包含所述小程序的程序文件及与所述指定宿主应用对应的页面资源文件集合;所述小程序的程序文件是根据所述小程序中与宿主应用相关的页面资源文件的预设存储路径信息而生成的,以便于所述程序文件运行时,根据所述预设存储路径信息,去展示所述页面资源文件对应的页面信息;所述页面资源文件集合中包含所述小程序中与所述指定宿主应用相关的页面资源文件;In response to the start instruction, obtain a file package of the applet corresponding to the designated host application, the file package containing the program file of the applet and a set of page resource files corresponding to the designated host application The program file of the small program is generated according to the preset storage path information of the page resource file related to the host application in the small program, so that when the program file is running, it is generated according to the preset storage path information , To display the page information corresponding to the page resource file; the page resource file set includes the page resource file related to the designated host application in the applet;
    根据所述文件包,在所述指定宿主应用中启动所述小程序。According to the file package, the small program is started in the designated host application.
PCT/CN2021/082396 2020-04-03 2021-03-23 Generation of applet file package WO2021197140A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010258585.2A CN111475142B (en) 2020-04-03 2020-04-03 Method, device and equipment for generating applet file package
CN202010258585.2 2020-04-03

Publications (1)

Publication Number Publication Date
WO2021197140A1 true WO2021197140A1 (en) 2021-10-07

Family

ID=71749685

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/082396 WO2021197140A1 (en) 2020-04-03 2021-03-23 Generation of applet file package

Country Status (2)

Country Link
CN (1) CN111475142B (en)
WO (1) WO2021197140A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475142B (en) * 2020-04-03 2023-04-28 支付宝(杭州)信息技术有限公司 Method, device and equipment for generating applet file package
CN111930382B (en) * 2020-09-21 2021-02-09 浙江口碑网络技术有限公司 Application page access method, device and equipment
CN113157348A (en) * 2021-05-24 2021-07-23 北京字节跳动网络技术有限公司 Game starting method and device, computer equipment and storage medium
CN113312055B (en) * 2021-05-28 2023-02-24 支付宝(中国)网络技术有限公司 Applet launching method, device and equipment
CN113516405A (en) * 2021-07-29 2021-10-19 快宝(上海)网络技术有限公司 Enterprise client express delivery and mailing processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060248508A1 (en) * 2005-04-29 2006-11-02 Symbol Technologies, Inc. Method and system for applet extensibility application program interface (API)
CN109947504A (en) * 2019-03-29 2019-06-28 上海连尚网络科技有限公司 A kind of method and apparatus executing boarding program in host program
CN110389935A (en) * 2019-07-25 2019-10-29 上海连尚网络科技有限公司 A kind of method, equipment and computer storage medium starting small routine
CN110609714A (en) * 2019-07-31 2019-12-24 百度在线网络技术(北京)有限公司 Data prefetching method, device and equipment and storage medium
CN111475142A (en) * 2020-04-03 2020-07-31 支付宝(杭州)信息技术有限公司 Method, device and equipment for generating applet file package

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7263696B1 (en) * 2002-12-10 2007-08-28 Emc Corporation Dynamic web based jar file finder
CN104750472B (en) * 2013-12-31 2018-01-09 北京新媒传信科技有限公司 The resource package management method and device of a kind of terminal applies
CN104216751B (en) * 2014-09-30 2018-01-12 广州猎豹网络科技有限公司 The loading method and system of a kind of functional unit interface resources of application program
CN108089865A (en) * 2017-12-04 2018-05-29 北京小米移动软件有限公司 Using method of cutting out, device and storage medium
CN109857455A (en) * 2018-12-29 2019-06-07 深圳Tcl新技术有限公司 Installation kit packaging method, system, equipment and storage medium
CN110333868B (en) * 2019-06-12 2023-12-19 创新先进技术有限公司 Method and system for generating installation packages of sub-applications
CN110221904B (en) * 2019-06-17 2023-08-04 腾讯科技(深圳)有限公司 Business process control method
CN110532029A (en) * 2019-09-04 2019-12-03 深圳前海微众银行股份有限公司 Small routine generation method, device, equipment and computer readable storage medium
CN110764791B (en) * 2019-10-25 2023-10-27 网易(杭州)网络有限公司 Channel adaptation method and device for applet and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060248508A1 (en) * 2005-04-29 2006-11-02 Symbol Technologies, Inc. Method and system for applet extensibility application program interface (API)
CN109947504A (en) * 2019-03-29 2019-06-28 上海连尚网络科技有限公司 A kind of method and apparatus executing boarding program in host program
CN110389935A (en) * 2019-07-25 2019-10-29 上海连尚网络科技有限公司 A kind of method, equipment and computer storage medium starting small routine
CN110609714A (en) * 2019-07-31 2019-12-24 百度在线网络技术(北京)有限公司 Data prefetching method, device and equipment and storage medium
CN111475142A (en) * 2020-04-03 2020-07-31 支付宝(杭州)信息技术有限公司 Method, device and equipment for generating applet file package

Also Published As

Publication number Publication date
CN111475142A (en) 2020-07-31
CN111475142B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
WO2021197140A1 (en) Generation of applet file package
US10194288B2 (en) Sticker distribution system for messaging apps
US11379248B2 (en) Data processing method, apparatus, device, and system
CN107193577B (en) Application starting method and device and intelligent terminal
WO2018068645A1 (en) Multi-service integration method and apparatus, intelligent terminal, server and operating system
CN105824830B (en) Method, client and equipment for displaying page
CN109739600B (en) Data processing method, medium, device and computing equipment
WO2021143371A1 (en) Method, apparatus, and device for generating applet page
CN108549562A (en) A kind of method and device of image load
CN110496395B (en) Component operation method, system and equipment for illusion engine
US20130036196A1 (en) Method and system for publishing template-based content
CN110020231A (en) Webpage capture method and device thereof
CN109947643B (en) A/B test-based experimental scheme configuration method, device and equipment
CN113536174A (en) Interface loading method, device and equipment
CN114168114A (en) Operator registration method, device and equipment
CN112433730A (en) Code detection rule generation method and device and electronic equipment
CN113407165A (en) SDK generation and self-upgrade method, device, readable medium and equipment
CN111538667A (en) Page testing method and device
WO2020135129A1 (en) Method and device for loading plug-in of application, and terminal
CN107402749B (en) Method and device for realizing picture loading library
CN111158820A (en) Control click event processing method and device, electronic equipment and storage medium
TW201913370A (en) Application page display method and device, device, storage medium
CN112988604B (en) Object testing method, testing system, electronic device and readable storage medium
US10362082B2 (en) Method for streaming-based distributed media data processing
CN111242731B (en) Service execution method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21781662

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21781662

Country of ref document: EP

Kind code of ref document: A1