WO2021197140A1 - Génération d'un paquet de fichiers d'applet - Google Patents

Génération d'un paquet de fichiers d'applet 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
English (en)
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/fr

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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

La présente invention concerne un procédé, un appareil et un dispositif permettant de générer un paquet de fichiers d'applet. Le procédé permettant de générer un paquet de fichiers d'applet consiste : à la suite d'une instruction d'utilisateur, à acquérir un fichier de programme d'un applet, le fichier de programme étant généré selon des informations de chemin de stockage prédéfinies d'un fichier de ressources de page, qui est associé à une application hôte, dans l'applet de telle sorte que des informations de page correspondant au fichier de ressources de page puissent être affichées en fonction des informations de chemin de stockage prédéfinies lorsque le fichier de programme s'exécute ; à déterminer un sous-ensemble de fichiers de ressources de page correspondant à l'application hôte désignée à partir d'un ensemble de fichiers de ressources de page de l'applet ; et à générer un paquet de fichiers d'applet au niveau de l'application hôte désignée selon le fichier de programme et le sous-ensemble de fichiers de ressources de page correspondant à l'application hôte désignée.
PCT/CN2021/082396 2020-04-03 2021-03-23 Génération d'un paquet de fichiers d'applet WO2021197140A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010258585.2A CN111475142B (zh) 2020-04-03 2020-04-03 一种小程序文件包的生成方法、装置及设备
CN202010258585.2 2020-04-03

Publications (1)

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

Family

ID=71749685

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/082396 WO2021197140A1 (fr) 2020-04-03 2021-03-23 Génération d'un paquet de fichiers d'applet

Country Status (2)

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

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475142B (zh) * 2020-04-03 2023-04-28 支付宝(杭州)信息技术有限公司 一种小程序文件包的生成方法、装置及设备
CN111930382B (zh) * 2020-09-21 2021-02-09 浙江口碑网络技术有限公司 应用页面的接入方法、装置及设备
CN113157348A (zh) * 2021-05-24 2021-07-23 北京字节跳动网络技术有限公司 游戏启动方法、装置、计算机设备以及存储介质
CN113312055B (zh) * 2021-05-28 2023-02-24 支付宝(中国)网络技术有限公司 一种小程序投放方法、装置以及设备
CN113516405A (zh) * 2021-07-29 2021-10-19 快宝(上海)网络技术有限公司 企业客户快递寄件处理方法、装置、电子设备及存储介质

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 (zh) * 2019-03-29 2019-06-28 上海连尚网络科技有限公司 一种在宿主程序中执行寄宿程序的方法与设备
CN110389935A (zh) * 2019-07-25 2019-10-29 上海连尚网络科技有限公司 一种启动小程序的方法、设备和计算机存储介质
CN110609714A (zh) * 2019-07-31 2019-12-24 百度在线网络技术(北京)有限公司 一种数据预取方法、装置、设备及存储介质
CN111475142A (zh) * 2020-04-03 2020-07-31 支付宝(杭州)信息技术有限公司 一种小程序文件包的生成方法、装置及设备

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 (zh) * 2013-12-31 2018-01-09 北京新媒传信科技有限公司 一种终端应用的资源包管理方法和装置
CN104216751B (zh) * 2014-09-30 2018-01-12 广州猎豹网络科技有限公司 一种应用程序的功能组件界面资源的加载方法及系统
CN108089865A (zh) * 2017-12-04 2018-05-29 北京小米移动软件有限公司 应用裁剪方法、装置及存储介质
CN109857455A (zh) * 2018-12-29 2019-06-07 深圳Tcl新技术有限公司 安装包打包方法、系统、设备及存储介质
CN110333868B (zh) * 2019-06-12 2023-12-19 创新先进技术有限公司 用于生成子应用的安装包的方法和系统
CN110221904B (zh) * 2019-06-17 2023-08-04 腾讯科技(深圳)有限公司 一种业务流程控制方法
CN110532029A (zh) * 2019-09-04 2019-12-03 深圳前海微众银行股份有限公司 小程序生成方法、装置、设备及计算机可读存储介质
CN110764791B (zh) * 2019-10-25 2023-10-27 网易(杭州)网络有限公司 小程序的渠道适配方法、装置及电子设备

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 (zh) * 2019-03-29 2019-06-28 上海连尚网络科技有限公司 一种在宿主程序中执行寄宿程序的方法与设备
CN110389935A (zh) * 2019-07-25 2019-10-29 上海连尚网络科技有限公司 一种启动小程序的方法、设备和计算机存储介质
CN110609714A (zh) * 2019-07-31 2019-12-24 百度在线网络技术(北京)有限公司 一种数据预取方法、装置、设备及存储介质
CN111475142A (zh) * 2020-04-03 2020-07-31 支付宝(杭州)信息技术有限公司 一种小程序文件包的生成方法、装置及设备

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2021197140A1 (fr) Génération d'un paquet de fichiers d'applet
US10194288B2 (en) Sticker distribution system for messaging apps
WO2021143371A1 (fr) Procédé, appareil et dispositif de génération de page d'apliquette
WO2018068645A1 (fr) Procédé et appareil d'intégration multiservice, terminal intelligent, serveur et système d'exploitation
CN107193577B (zh) 一种应用启动方法、装置和智能终端
US20220012068A1 (en) Data processing method, apparatus, device, and system
CN105824830B (zh) 一种显示页面的方法、客户端及设备
CN109739600B (zh) 数据处理方法、介质、装置和计算设备
CN108549562A (zh) 一种图像加载的方法及装置
US20130036196A1 (en) Method and system for publishing template-based content
CN110496395B (zh) 一种针对虚幻引擎的组件运行方法、系统及设备
CN107479868B (zh) 一种界面加载方法、装置及设备
CN110020231A (zh) 网页截图方法及其装置
CN109947643B (zh) 一种基于a/b测试的实验方案的配置方法、装置及设备
CN114168114A (zh) 一种算子注册方法、装置以及设备
CN112433730A (zh) 代码检测规则的生成方法、装置和电子设备
CN111158820A (zh) 控件点击事件处理方法、装置、电子设备及存储介质
CN113407165A (zh) Sdk的生成和自升级方法、装置、可读介质和设备
CN111538667A (zh) 一种页面测试的方法及装置
WO2020135129A1 (fr) Procédé et dispositif de chargement de module d'extension d'application, et terminal
WO2020063181A1 (fr) Procédé, dispositif et appareil de traitement de données
CN108595335B (zh) 测试环境部署方法、部署装置及存储介质
TW201913370A (zh) 應用程式app的頁面顯示方法及裝置、設備、儲存媒體
CN112988604B (zh) 对象测试方法、测试系统、电子设备及可读存储介质
US10362082B2 (en) Method for streaming-based distributed media data processing

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