CN111475142A - Method, device and equipment for generating applet file package - Google Patents

Method, device and equipment for generating applet file package Download PDF

Info

Publication number
CN111475142A
CN111475142A CN202010258585.2A CN202010258585A CN111475142A CN 111475142 A CN111475142 A CN 111475142A CN 202010258585 A CN202010258585 A CN 202010258585A CN 111475142 A CN111475142 A CN 111475142A
Authority
CN
China
Prior art keywords
applet
file
page resource
host application
program
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010258585.2A
Other languages
Chinese (zh)
Other versions
CN111475142B (en
Inventor
林杰
常艺耀
王金生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Ant Chuangjiang Information Technology Co ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010258585.2A priority Critical patent/CN111475142B/en
Publication of CN111475142A publication Critical patent/CN111475142A/en
Priority to PCT/CN2021/082396 priority patent/WO2021197140A1/en
Application granted granted Critical
Publication of CN111475142B publication Critical patent/CN111475142B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

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

The embodiment of the specification discloses a method, a device and equipment for generating an applet file package, wherein the generation scheme of the applet file package comprises the following steps: responding 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 related to a host application in the applet, 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 runs; determining a page resource file subset corresponding to the specified host application from the page resource file set of the applet; and generating an applet file package at the appointed host application according to the program file and the page resource file subset corresponding to the appointed host application.

Description

Method, device and equipment for generating applet file package
Technical Field
One or more embodiments of the present specification relate to the field of computer technologies, and in particular, to a method, an apparatus, and a device for generating an applet package.
Background
The applet is an application which can be used without installation, a user can start and call the applet in the host application, the applet can be used at any time, installation and uninstallation are not needed, and the use convenience is good. Since the pages of the applet usually contain page information partially changed with the change of the host application, the page information required to be exposed by the applet is usually not completely consistent when the host application is different. In order to ensure that the applet started at each host application can display the page information corresponding to each host application, currently, the applet package usually includes the applet page resource file at each host application, so that the storage space occupied by the applet package and the flow consumed in the downloading process are both large.
In summary, how to reduce the data size of the generated applet package is a technical problem to be solved urgently.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a method, an apparatus, and a device for generating an applet package, which are used to generate an applet package with a smaller data size.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
an embodiment of the present specification provides a method for generating an applet package, including:
acquiring preset storage path information of a page resource file related to a host application in an applet to be generated;
generating a program file of the applet according to the preset storage path information, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information;
acquiring a page resource file set corresponding to a specified host application, wherein the page resource file set comprises page resource files related to the specified host application in the applet;
and generating an applet file package at the appointed host application according to the program file and the page resource file set.
An embodiment of the present specification provides a method for generating an applet package, including:
acquiring a user instruction, wherein the user instruction is used for instructing generation of a file package of an applet at a specified host application;
responding to the user instruction, acquiring a program file of the applet, wherein the program file is generated according to preset storage path information of a page resource file related to a host application in the applet, so that when the program file runs, the page information corresponding to the page resource file is displayed according to the preset storage path information;
determining a page resource file subset corresponding to the specified host application from a page resource file set of the applet, wherein the page resource file subset comprises page resource files related to the specified host application in the applet;
and generating a file package of the small program at the appointed 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:
acquiring a starting instruction of a user for an applet in a specified host application;
responding to the starting instruction, acquiring a file package of the applet corresponding to the specified host application, wherein the file package comprises a program file of the applet and a page resource file set corresponding to the specified host application; the program file of the small program is generated according to preset storage path information of a page resource file related to a host application in the small program, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set comprises page resource files related to the specified host application in the applet;
and starting the small program in the specified host application according to the file package.
An apparatus for generating an applet package provided in an embodiment of the present specification includes:
the first acquisition module is used for acquiring preset storage path information of a page resource file related to a host application in the applet to be generated;
a program file generating module, configured to generate a program file of the applet according to the preset storage path information, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information;
a second obtaining module, configured to obtain a set of page resource files corresponding to a specified host application, where the set of page resource files includes page resource files related to the specified host application in the applet;
and the file package generating module is used for generating the small program file package at the appointed host application according to the program file and the page resource file set.
An apparatus for generating an applet package provided in an embodiment of the present specification includes:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a user instruction which is used for indicating to generate a file package of an applet at a specified host application;
a second obtaining module, configured to obtain, in response to the user instruction, a program file of the applet, where the program file is generated according to preset storage path information of a page resource file related to a host application in the applet, so that when the program file runs, the page information corresponding to the page resource file is displayed according to the preset storage path information;
a determining module, configured to determine, from a set of page resource files of the applet, a subset of page resource files corresponding to the specified host application, where the subset of page resource files includes page resource files in the applet that are related to the specified host application;
and the file package generating module is used for generating the file package of the small program at the appointed host application according to the program file and the page resource file subset.
An embodiment of this specification provides a starting device of applet, includes:
the first acquisition module is used for acquiring a starting instruction of a user for the small program in the specified host application;
a second obtaining module, configured to, in response to the start instruction, obtain a file package of the applet corresponding to the specified host application, where the file package includes a program file of the applet and a set of page resource files corresponding to the specified host application; the program file of the small program is generated according to preset storage path information of a page resource file related to a host application in the small program, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set comprises page resource files related to the specified host application in the applet;
and the starting module is used for starting the small program in the specified host application according to the file package.
An apparatus for generating an applet package provided in an embodiment of the present specification includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring preset storage path information of a page resource file related to a host application in an applet to be generated;
generating a program file of the applet according to the preset storage path information, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information;
acquiring a page resource file set corresponding to a specified host application, wherein the page resource file set comprises page resource files related to the specified host application in the applet;
and generating an applet file package at the appointed host application according to the program file and the page resource file set.
An apparatus for generating an applet package provided in an embodiment of the present specification includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a user instruction, wherein the user instruction is used for instructing generation of a file package of an applet at a specified host application;
responding to the user instruction, acquiring a program file of the applet, wherein the program file is generated according to preset storage path information of a page resource file related to a host application in the applet, so that when the program file runs, the page information corresponding to the page resource file is displayed according to the preset storage path information;
determining a page resource file subset corresponding to the specified host application from a page resource file set of the applet, wherein the page resource file subset comprises page resource files related to the specified host application in the applet;
and generating a file package of the small program at the appointed host application according to the program file and the page resource file subset.
An embodiment of the present specification provides a starting apparatus for an applet, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a starting instruction of a user for an applet in a specified host application;
responding to the starting instruction, acquiring a file package of the applet corresponding to the specified host application, wherein the file package comprises a program file of the applet and a page resource file set corresponding to the specified host application; the program file of the small program is generated according to preset storage path information of a page resource file related to a host application in the small program, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set comprises page resource files related to the specified host application in the applet;
and starting the small program in the specified host application according to the file package.
One embodiment of the present description achieves the following advantageous effects:
when the program file of the applet runs, 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 applet file package at the appointed host application can be generated according to the program file of the applet and the page resource file subset corresponding to the appointed host application determined from the page resource file set of the applet. The small program file package at the appointed host application does not need to contain page resource files at other host applications of the small program, so that the data volume of the generated small program file package can be reduced, and the small program file package is favorable for reducing the storage space occupied by the small program file package and the data flow consumed in the downloading process.
Drawings
The accompanying drawings, which are included to provide a further understanding of one or more embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the disclosure and together with the description serve to explain the embodiments of the disclosure and not to limit the embodiments of the disclosure. In the drawings:
fig. 1 is a schematic flowchart of a method for generating an applet file package according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another applet package generation method provided in an embodiment of the present specification;
fig. 3 is a schematic view of an application scenario of a method for generating an applet package according to an embodiment of the present specification;
fig. 4 is a schematic flowchart of a method for starting an applet according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an applet package generation apparatus corresponding to fig. 1 provided in an embodiment of the present specification;
fig. 6 is a schematic structural diagram of an applet package generation apparatus corresponding to fig. 2 provided in an embodiment of the present specification;
fig. 7 is a schematic structural diagram of a starting apparatus of an applet corresponding to fig. 3 provided in an embodiment of this specification.
Detailed Description
To make the objects, technical solutions and advantages of one or more embodiments of the present disclosure more apparent, the technical solutions of one or more embodiments of the present disclosure will be described in detail and completely with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present specification, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from the embodiments given herein without making any creative effort fall within the scope of protection of one or more embodiments of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
In the prior art, an applet package usually includes a plurality of page resource files at a preset host application, where the page resource files include page information related to the host application in the applet. The program files in the applet file package are usually written with the identifiers of a plurality of preset host applications in a hard coding mode, so that when the program files of the applet run, the identifiers of the current host applications can be determined from the identifiers of the plurality of preset host applications; and then the page resource file at the current host application can be screened out from the page resource files at a plurality of preset host applications contained in the applet file package so as to show the page information related to the current host application in the applet.
Because the small program file package comprises the page resource files at the preset host application, the storage space occupied by the small program file package and the flow consumed in the downloading process are large. Meanwhile, since the identifiers of the multiple preset host applications are written into the program file of the applet in a hard coding mode at present, when a new host application is subsequently added, the program file of the applet needs to be modified, and the program file of the applet can be adapted to the new host application.
In order to solve the defects in the prior art, the scheme provides the following embodiments:
fig. 1 is a schematic flow chart of a method for generating an applet file package according to an embodiment of the present disclosure. From a program perspective, the execution subject of the flow may be a device of the applet developer or a program loaded in the device of the applet developer.
As shown in fig. 1, the process may include the following steps:
step 102: and acquiring preset storage path information of a page resource file related to the host application in the applet to be generated.
In this embodiment, an applet developer usually needs to design page information to be included in each applet page in advance, so that page information related to a host application in the applet page can be determined. The page information related to the host application can include applet page information which changes along with the change of the host application in which the applet is positioned. And the page resource file in the applet associated with the host application may be used to store such page information associated with the host application.
In practical applications, the page information related to the host application may be information in an image form, information in a text form, or information in an audio form, and the like, and is not limited in detail. The page information related to the host application may specifically include: at least one of host application icon information, case information in the applet related to the host application, and user protocol information in the applet related to the host application.
For example, when the applet is shopping software, the documentation information related to the host application in the applet may be: and the preferential information corresponding to the current host application can be enjoyed when the user purchases at the small program started in the current host application. In practical applications, the preference information corresponding to different host applications may be different. Alternatively, the documentation information related to the host application in the applet may also be: advertising language for the host application, and the like. The user protocol information related to the host application in the applet may include: and when the user starts the small program in the host application, a network service protocol, a privacy protocol and the like are required to be signed.
In this embodiment of the present specification, an applet developer may specify a preset storage path of a page resource file related to a host application in advance, and generate a program file and a page resource file set of an applet based on the preset storage path.
The preset storage path information of the page resource file may refer to a file and/or a folder line that a user experiences when searching for the page resource file on a disk. For example, when the preset storage path information is "a-B-C", it may indicate that the page resource file is stored in a folder C within a subfolder B in the folder a; alternatively, the page resource file may be a file with a file name C in the subfolder B stored in the folder a. This is not particularly limited.
Step 104: and generating a program file of the small program according to the preset storage path information so as to display the page information corresponding to the page resource file according to the preset storage path information when the program file runs.
In the embodiment of the present specification, the program File of the applet may be a source program of the applet or an executable program (EXE File) of the applet. When the program file of the applet runs, the page resource file indicated by the preset storage path information can be called through the program code of the applet to generate an applet page containing page information (namely page information related to the host application in the applet) corresponding to the page resource file, and the applet page is displayed.
Step 106: and acquiring a page resource file set corresponding to the specified host application, wherein the page resource file set comprises page resource files related to the specified host application in the applet.
In this embodiment of the present specification, a set of page resource files corresponding to each host application may be generated for each host application according to preset storage path information. That is, the set of pageresource files corresponding to different host applications may be different. And in the page resource file sets of different host applications, the storage path information aiming at the same page resource file and the preset storage path information of the page resource file should be the same.
In the embodiment of the present specification, the page resource file set corresponding to the specified host application only needs to include the page resource file in the applet, which is related to the specified host application, and does not need to include the page resource file in the applet, which is related to other host applications, so that the size of the page resource file set is small, which is beneficial to saving storage space.
Step 108: and generating an applet file package at the appointed host application according to the program file and the page resource file set.
In this embodiment, a user may launch and run an applet in a specified host application based on an applet package at the specified host application. For example, when a user starts an applet in a designated host application, a device in which the designated host application is located may download an applet package at the designated host application, and by running a program file in the applet package at the designated host application, applet page information corresponding to a page resource file related to the designated host application in the applet package is displayed.
It should be understood that the order of some steps in the method described in one or more embodiments of the present disclosure may be interchanged according to actual needs, or some steps may be omitted or deleted.
In the method in fig. 1, when the program file of the applet runs, 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 applet file package at the designated host application can be generated according to the program file of the applet and the page resource file set corresponding to the designated host application generated according to the preset storage path information. The small program file package at the appointed host application does not need to include page resource files at other host applications of the small program, so that the data volume of the generated small program file package can be reduced, and the small program file package occupies a storage space and is beneficial to reducing data flow consumed in the downloading process.
And the small program file packages at a plurality of host applications can be generated by using the program files of a set of small programs, so that the program files of the small programs have universality. When a new host application is added, only the page resource file set corresponding to the new host application needs to be generated according to the preset storage path information, and then the applet file package at the new host application can be generated based on the applet program file and the page resource file set corresponding to the new host application without modifying the program code in the applet program file. Therefore, the generation method of the small program file package has good applicability and is convenient to maintain.
Based on the process of fig. 1, some specific embodiments of the process are also provided in the examples of this specification, which are described below.
Optionally, step 108: generating the applet file package at the designated host application according to the program file and the page resource file set, which may specifically include:
and sending the program file and the page resource file set to a SaaS platform so that the SaaS platform responds to a user instruction and generates a small program file package at the application of the specified host according to the program file and the page resource file set.
In the embodiment of the present specification, a SaaS platform (Software-as-a-Service) is a platform for operating SaaS Software, and the SaaS platform can provide an enterprise with a network infrastructure, Software, and hardware operating platform required for building an information system, and the enterprise can obtain services provided by the SaaS platform through the internet, thereby bringing convenience to the enterprise.
In this embodiment of the present specification, an applet developer may generate an applet package at a specific host application by itself, and upload the applet package to an applet server or a SaaS platform, so that a user equipment downloads the applet package at the specific host application from the applet server or the SaaS platform.
Or, the applet developer may also generate the applet file of the applet and the set of page resource files corresponding to the specified host application to the SaaS platform, so that the SaaS platform generates an applet file package at the specified host application with higher security after performing security detection on the applet file and the set of page resource files corresponding to the specified host application. Correspondingly, the user can download the applet file package at the specified host application from the SaaS platform.
In practical applications, an applet package usually needs to contain executable codes (executables) of an applet, so that when a program file of the applet uploaded to a SaaS platform by an applet developer is a source program file, the SaaS platform can compile the program file of the applet to obtain the executable codes of the applet, and generate the applet package based on the executable codes of the applet.
In this embodiment of the present specification, when there are a plurality of host applications of an applet, the page resource file set of each host application may be all sent to the SaaS platform, so as to subsequently generate an applet file package at each host application. Therefore, the sending the page resource file set to the SaaS platform may specifically include:
sending a plurality of page resource file sets including a page resource file set corresponding to a specified host application to the SaaS platform, wherein the host application corresponding to each page resource file set in the plurality of page resource file sets is different.
And setting the identifier of the page resource file set corresponding to the specified host application as the identifier of the specified host application, so that the SaaS platform responds to a user instruction and determines the page resource file set corresponding to the specified host application from the multiple page resource file sets according to the identifier of the specified host application.
In this embodiment of the present 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 storage path of the same kind of page resource file in the multiple page resource file sets may be the same as the preset storage path of the kind of page resource file. Therefore, when the program file of the small program runs in each host application, page information related to the current host application in the small program is displayed according to the preset storage path information.
In this embodiment of the present specification, an identifier of each page resource file set may be set according to identifier information of each host application, so as to distinguish a plurality of page resource file sets uploaded by an applet developer. For example, when the set of page resource files are folders, the identity of the specified host application may be set to the name of the page resource folder corresponding to the specified host application. Therefore, the SaaS platform can determine the page resource file set corresponding to the specified host application from the multiple page resource file sets.
In the present specification embodiment, step 106: acquiring a page resource file set corresponding to a specified host application, which may specifically include:
and acquiring a page resource file related to the specified host application in the applet.
And storing the page resource file related to the specified host application in the applet according to the preset storage path information to obtain a page resource folder corresponding to the specified host application.
In this embodiment of the present specification, an applet developer may first generate corresponding page resource files according to each piece of page information related to a specified host application in an applet. For example, for a piece of document information related to a specified host application in an applet, a page resource file containing the document information can be generated; alternatively, an image of an application icon specifying the host application may be treated as one page resource file or the like.
The storing, according to the preset storage path information, the page resource file related to the specified host application in the applet specifically includes:
and setting a file name of the target page resource file according to the preset storage path information, wherein the file name is tail end path node information in the preset storage path information corresponding to the target page resource file.
Determining the storage position 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 specified host application in the applet; and storing the target page resource file to the storage position.
For example, assuming that for a page resource file of 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", the file name of the application icon image of the specified host application may be set as "host application icon", and a folder named as "second folder" may be established in the folder named as "first folder", so as to store the application icon image of the specified host application into the folder named as "second folder".
In this embodiment of the present specification, since the identifier of the page resource file set corresponding to the specified host application may be set according to the identifier information of the specified host application, after the page resource file related to the specified host application in the applet is stored according to the preset storage path information, a plurality of files and folders obtained after storage may be moved together to one folder with the name of the identifier of the specified host application, where the folder with the name of the identifier of the specified host application is the page resource file set related to the specified host application. Therefore, the preset storage path information does not contain the path node of the folder with the name of the identifier of the specified host application, so that the identifiers of a plurality of host applications can be prevented from being written in the program file of the small program, and the maintenance convenience of the program file of the small program is improved.
In practical application, when a program file of an applet runs, an identifier of a current host application can be determined through a calling interface, a folder with the identifier of the current host application is identified from an applet file package, a page resource file related to the host application is called from the folder with the identifier of the current host application according to preset storage path information, and then page information corresponding to the current host application in the applet is displayed.
Based on the same idea, another method for generating an applet file package is also provided in this embodiment of the present specification, and fig. 2 is a schematic flow diagram of the another method for generating an applet file package provided in this embodiment of the present specification. From a program perspective, the execution subject of the flow may be a SaaS platform.
As shown in fig. 2, the process may include the following steps:
step 202: user instructions are obtained for instructing generation of a package of applets at a specified host application.
In embodiments of the present specification, the package of files for an applet at a specified host application may include files required to launch the applet at the specified host application. The user may input the user instruction in the SaaS platform to instruct the SaaS platform to generate the applet package at the specified host application.
In practical applications, the specified host application indicated by the user instruction may be one application or a plurality of applications. For example, a platform interface of the SaaS platform may display a plurality of host application selection items, and a user may click a certain host application selection item to input the user instruction, where the user instruction is used to instruct generation of an applet package at a specific host application. In practical applications, the user may further click a confirmation button to input a user instruction for instructing generation of the applet packages at the designated host applications after selecting the selection items of the host applications. Subsequently, the user instruction is used to instruct generation of an applet package for a specific host application.
Step 204: and responding to the user instruction, acquiring a program file of the applet, wherein the program file is generated according to preset storage path information of a page resource file related to a host application in the applet, so that the program file displays page information corresponding to the page resource file according to the preset storage path information when running.
In this embodiment, the program file of the applet may be a program file generated by an applet developer according to preset storage path information of a page resource file related to the host application in the applet. The program file of the applet in step 204 may be the same as the program file of the applet generated in step 104.
When the program file of the applet runs, 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 applet page including the page information corresponding to the page resource file (i.e. the page information related to the host application in the applet). The page information related to the host application in the applet can refer to the applet page information which changes along with the change of the host application in which the applet is positioned. The page information related to the host application in the applet may include: at least one of host application icon information, case information in the applet related to the host application, and user protocol information in the applet related to the host application.
Step 206: and determining a page resource file subset corresponding to the specified host application from the page resource file set of the small program, wherein the page resource file subset comprises page resource files related to the specified host application in the small program.
In this embodiment of the present specification, a page resource file set of an applet may be prestored at a SaaS platform, where each page resource file subset in the page resource file set includes all page resource files related to one host application in the applet. That is, the subset of page resource files in the set of page resource files of the applet correspond one-to-one to the host application of the applet. The subset of page resource files determined in step 206 and corresponding to the specified host application may be the same as the set of page resource files obtained in synchronization step 106 and corresponding to the specified host application, and will not be described in detail here.
Step 208: and generating a file package of the small program at the appointed host application according to the program file and the page resource file subset.
It should be understood that the order of some steps in the method described in one or more embodiments of the present disclosure may be interchanged according to actual needs, or some steps may be omitted or deleted.
The method of fig. 2 generates an applet package at a specified host application based on the applet's program file and the subset of the page resource file corresponding to the specified host application. The small program file package at the appointed host application does not need to include page resource files at other host applications of the small program, so that the data volume of the generated small program file package can be reduced, and the small program file package occupies a storage space and is beneficial to reducing data flow consumed in the downloading process.
And the small program file packages at a plurality of host applications can be generated by using the program files of a set of small programs, so that the program files of the small programs have universality. When a new host application is added, only the page resource file set corresponding to the new host application needs to be generated according to the preset storage path information, and then the applet file package at the new host application can be generated based on the applet program file and the page resource file set corresponding to the new host application without modifying the program code in the applet program file. Therefore, the generation method of the applet file package has good applicability.
In this embodiment, the program code of the applet and the set of page resource files of the applet on the SaaS platform may be sent by the applet developer to the SaaS platform in advance.
Thus, step 204: before acquiring the program file of the applet, the method may further include:
receiving a source program file and a page resource file set of the applet, which are sent by an applet developer; and compiling the source program file to obtain a program file of the small program. It can be seen that the executable code of the applet may be contained in the program file of the applet.
In this embodiment of the present specification, the determining, from the set of page resource files of the applet, a subset of page resource files corresponding to the specified host application may specifically include:
determining the identifier of the specified host application according to the user instruction; and determining a page resource folder carrying the identifier from the page resource file set of the applet, wherein the page resource folder is obtained by storing the page resource file related to the specified host application in the applet according to the preset storage path information.
In the embodiment of the present specification, when an applet file package at a designated host application needs to be generated, the SaaS platform may automatically identify a page resource file subset carrying an identifier of the designated host application from a page resource file set of the applet, so as to serve as the page resource file subset corresponding to the designated host application, which is convenient and fast.
In the present illustrative embodiment, step 208: after generating the package of files of the applet at the designated host application, the method may further include: and sending the generated file package to the terminal equipment in response to an acquisition request sent by the terminal equipment and aiming at the file package of the applet at the specified host application.
Fig. 3 is an application scenario diagram of a method for generating an applet package according to an embodiment of the present disclosure. As shown in fig. 3, an applet developer may send a set of program files and page resource files of an applet to a SaaS platform 302 via a device 301. A user at the SaaS platform may enter instructions at the SaaS platform 302 that instruct generation of an applet package that specifies a hosted application to generate an applet package that specifies a hosted application. When the user starts the applet based on the specified host application in the terminal device 303, the terminal device 303 may download the package of the applet from the SaaS platform 302, so that the applet can be started based on the downloaded package of the applet.
Based on the same idea, an embodiment of the present specification further provides a method for starting an applet, and fig. 4 is a schematic flow diagram of the method for starting an applet provided in the embodiment of the present specification. From the program perspective, the execution subject of the flow may be the user's terminal device or a program of a specified host application installed in the user's terminal device.
As shown in fig. 4, the process may include the following steps:
step 402: and acquiring a starting instruction of a user for the small program in the specified host application.
In this specification embodiment, the user may click on an applet icon at a designated host application installed in the terminal device to input the start instruction.
Step 404: responding to the starting instruction, acquiring a file package of the applet corresponding to the specified host application, wherein the file package comprises a program file of the applet and a page resource file set corresponding to the specified host application; the program file of the small program is generated according to preset storage path information of a page resource file related to a host application in the small program, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set comprises page resource files related to the specified host application in the applet.
In an embodiment of the present specification, in response to the start instruction, when it is determined that the package of the applet is not stored in the user terminal device, the package of the applet corresponding to the specified host application is downloaded from the server of the applet or from the SaaS platform. The package corresponding to the designated host application may be generated by using the method for generating the applet package in fig. 1 or fig. 2, and details of the process for generating the applet package are not repeated.
In this embodiment of the present specification, the page resource file set corresponding to the specified host application may be a folder obtained by storing, according to the preset storage path information, a page resource file related to the specified host application in the applet, and a name of the folder may be identification information of the specified host application. Therefore, when the applet is started in the specified host application, the identifier of the current host application (namely the specified host application) is determined firstly in the running process of the program file of the applet, and the folder with the identifier of the specified host application in the applet file package is determined to be the folder in which the page resource file corresponding to the specified host application is stored. And then, according to the preset storage path information, calling the required page resource file from the folder in which the page resource file corresponding to the specified host application is stored, so as to display the small program page containing the page information related to the specified host application in the small program.
Step 406: and starting the small program in the specified host application according to the file package.
It should be understood that the order of some steps in the method described in one or more embodiments of the present disclosure may be interchanged according to actual needs, or some steps may be omitted or deleted.
In the method in fig. 4, the applet package downloaded by the user terminal device at the designated host application includes the page resource file corresponding to the designated host application, and the applet package does not need to include page resource files at other host applications of the applet, so that the data volume of the applet package can be reduced, and the reduction of the storage space occupied by the applet package and the data traffic consumed in the downloading process is facilitated.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method. Fig. 5 is a schematic structural diagram of an applet package generation apparatus corresponding to fig. 1 according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus may include:
the first obtaining module 502 is configured to obtain preset storage path information of a page resource file related to a host application in an applet to be generated.
A program file generating module 504, configured to generate a program file of the applet according to the preset storage path information, so that when the program file runs, the page information corresponding to the page resource file is displayed according to the preset storage path information.
A second obtaining module 506, configured to obtain a set of page resource files corresponding to a specified host application, where the set of page resource files includes page resource files related to the specified host application in the applet.
And a file package generating module 508, configured to generate an applet file package at the specified host application according to the program file and the set of page resource files.
The examples of this specification also provide some specific embodiments of the process based on the apparatus of fig. 5, which is described below.
Optionally, the second obtaining module 506 may be specifically configured to:
acquiring a page resource file related to the specified host application in the applet; and storing the page resource file related to the specified host application in the applet according to the preset storage path information to obtain a page resource folder corresponding to the specified host application.
The storing, according to the preset storage path information, the page resource file related to the specified host application in the applet may specifically include:
determining the storage position 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 specified host application in the applet; and storing the target page resource file to the storage position. And setting a file name of the target page resource file according to the preset storage path information, wherein the file name is tail end path node information in the preset storage path information corresponding to the target page resource file.
The file package generating module 508 may specifically be configured to: and sending the program file and the page resource file set to a SaaS platform so that the SaaS platform responds to a user instruction and generates a small program file package at the appointed host application according to the program file and the page resource file set.
The sending of the page resource file set to the SaaS platform may specifically include:
sending a plurality of page resource file sets including the page resource file set corresponding to the specified host application to a SaaS platform, wherein the host application corresponding to each page resource file set in the plurality of page resource file sets is different; and setting the identifier of the page resource file set corresponding to the specified host application as the identifier of the specified host application, so that the SaaS platform responds to a user instruction and determines the page resource file set corresponding to the specified host application from the multiple page resource file sets according to the identifier of the specified host application.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method. Fig. 6 is a schematic structural diagram of an applet package generation apparatus corresponding to fig. 2 according to an embodiment of the present disclosure. As shown in fig. 6, the apparatus may include:
a first obtaining module 602, configured to obtain a user instruction, where the user instruction is used to instruct generation of a package of applets at a specified host application.
A second obtaining module 604, configured to, in response to the user instruction, obtain a program file of the applet, where the program file is generated according to preset storage path information of a page resource file related to a host application in the applet, so that when the program file runs, the page information corresponding to the page resource file is displayed according to the preset storage path information.
A determining module 606, configured to determine, from the page resource file set of the applet, a page resource file subset corresponding to the specified host application, where the page resource file subset includes a page resource file in the applet, where the page resource file is related to the specified host application.
A document package generating module 608, configured to generate a document package of the applet at the designated host application according to the program file and the subset of the page resource file.
Optionally, the determining module 606 may be specifically configured to: determining the identifier of the specified host application according to the user instruction; and determining a page resource folder carrying the identifier from the page resource file set of the applet, wherein the page resource folder is obtained by storing the page resource file related to the specified host application in the applet according to the preset storage path information.
Optionally, the apparatus in fig. 6 may further include: and the receiving module is used for receiving the source program file of the applet sent by the applet developer. And the compiling module is used for compiling the source program file to obtain a program file of the small program.
Optionally, the apparatus in fig. 6 may further include: and the sending module is used for responding to an acquisition request of the file package of the applet at the specified host application sent by the terminal equipment and sending the generated file package to the terminal equipment.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method. Fig. 7 is a schematic structural diagram of a starting apparatus of an applet corresponding to fig. 3 provided in an embodiment of this specification. As shown in fig. 7, the apparatus may include:
an obtaining module 702, configured to obtain a start instruction of a user for an applet in a specified host application.
An obtaining module 704, configured to, in response to the start instruction, obtain a file package of the applet corresponding to the specified host application, where the file package includes a program file of the applet and a set of page resource files corresponding to the specified host application; the program file of the small program is generated according to preset storage path information of a page resource file related to a host application in the small program, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set comprises page resource files related to the specified host application in the applet; the page resource file set is a folder obtained by storing the page resource files related to the specified host application in the applet according to the preset storage path information.
A starting module 706, configured to start the applet in the specified host application according to the file package.
Based on the same idea, an embodiment of the present specification further provides an applet package generation device corresponding to the method in fig. 1, where the device may include:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to:
and acquiring preset storage path information of a page resource file related to the host application in the applet to be generated.
And generating a program file of the small program according to the preset storage path information so as to display the page information corresponding to the page resource file according to the preset storage path information when the program file runs.
And acquiring a page resource file set corresponding to the specified host application, wherein the page resource file set comprises page resource files related to the specified host application in the applet.
And generating an applet file package at the appointed host application according to the program file and the page resource file set.
Based on the same idea, an embodiment of the present specification further provides a device for generating an applet package corresponding to the method in fig. 2, where the device may include:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to:
user instructions are obtained for instructing generation of a package of applets at a specified host application.
And responding to the user instruction, acquiring a program file of the applet, wherein the program file is generated according to preset storage path information of a page resource file related to a host application in the applet, so that the program file displays page information corresponding to the page resource file according to the preset storage path information when running.
And determining a page resource file subset corresponding to the specified host application from the page resource file set of the small program, wherein the page resource file subset comprises page resource files related to the specified host application in the small program.
And generating a file package of the small program at the appointed host application according to the program file and the page resource file subset.
Based on the same idea, an embodiment of the present specification further provides an applet starting apparatus corresponding to the method in fig. 3, where the apparatus may include:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to:
and acquiring a starting instruction of a user for the small program in the specified host application.
Responding to the starting instruction, acquiring a file package of the applet corresponding to the specified host application, wherein the file package comprises a program file of the applet and a page resource file set corresponding to the specified host application; the program file of the small program is generated according to preset storage path information of a page resource file related to a host application in the small program, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set comprises page resource files related to the specified host application in the applet.
And starting the small program in the specified host application according to the file package.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 90 th generation of 20 th century, it is obvious that improvements in Hardware (for example, improvements in Circuit structures such as diodes, transistors and switches) or software (for improvement in method flow) can be distinguished for a technical improvement, however, as technology develops, many of the improvements in method flow today can be regarded as direct improvements in Hardware Circuit structures, designers almost all obtain corresponding Hardware Circuit structures by Programming the improved method flow into Hardware circuits, and therefore, it cannot be said that an improvement in method flow cannot be realized by Hardware entity modules, for example, Programmable logic devices (Programmable logic devices L organic devices, P L D) (for example, Field Programmable Gate Arrays (FPGAs) are integrated circuits whose logic functions are determined by user Programming of devices), and a digital system is "integrated" on a P L D "by self Programming of designers without requiring many kinds of integrated circuits manufactured and manufactured by special chip manufacturers to design and manufacture, and only a Hardware software is written in Hardware programs such as Hardware programs, software programs, such as Hardware programs, software, Hardware programs, software programs, Hardware programs, software, Hardware programs, software, Hardware programs, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software, Hardware, software.
A controller may be implemented in any suitable manner, e.g., in the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, Application Specific Integrated Circuits (ASICs), programmable logic controllers (PLC's) and embedded microcontrollers, examples of which include, but are not limited to, microcontrollers 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone L abs C8051F320, which may also be implemented as part of the control logic of a memory.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
One skilled in the art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to one or more embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, 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 a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is merely exemplary of the present disclosure and is not intended to limit one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of claims of one or more embodiments of the present specification.

Claims (23)

1. A generation method of an applet file package comprises the following steps:
acquiring preset storage path information of a page resource file related to a host application in an applet to be generated;
generating a program file of the applet according to the preset storage path information, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information;
acquiring a page resource file set corresponding to a specified host application, wherein the page resource file set comprises page resource files related to the specified host application in the applet;
and generating an applet file package at the appointed host application according to the program file and the page resource file set.
2. The method of claim 1, wherein the obtaining of the set of page resource files corresponding to the specified host application specifically comprises:
acquiring a page resource file related to the specified host application in the applet;
and storing the page resource file related to the specified host application in the applet according to the preset storage path information to obtain a page resource folder corresponding to the specified host application.
3. The method according to claim 2, wherein storing the page resource file related to the specified host application in the applet according to the preset storage path information specifically includes:
determining the storage position 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 specified host application in the applet;
and storing the target page resource file to the storage position.
4. The method of claim 3, wherein the storing the page resource file related to the specified host application in the applet according to the preset storage path information further comprises:
and setting a file name of the target page resource file according to the preset storage path information, wherein the file name is tail end path node information in the preset storage path information corresponding to the target page resource file.
5. The method according to claim 1, wherein the generating an applet package at the specified host application according to the program file and the set of page resource files comprises:
and sending the program file and the page resource file set to a SaaS platform so that the SaaS platform responds to a user instruction and generates a small program file package at the application of the specified host according to the program file and the page resource file set.
6. The method according to claim 5, wherein the sending the set of page resource files to the SaaS platform specifically comprises:
sending a plurality of page resource file sets including the page resource file set corresponding to the specified host application to a SaaS platform, wherein the host application corresponding to each page resource file set in the plurality of page resource file sets is different;
and setting the identifier of the page resource file set corresponding to the specified host application as the identifier of the specified host application, so that the SaaS platform responds to a user instruction and determines the page resource file set corresponding to the specified host application from the multiple page resource file sets according to the identifier of the specified host application.
7. The method of any of claims 1-6, the page information comprising: at least one of host application icon information, case information in the applet related to the host application, and user protocol information in the applet related to the host application.
8. A generation method of an applet file package comprises the following steps:
acquiring a user instruction, wherein the user instruction is used for instructing generation of a file package of an applet at a specified host application;
responding to the user instruction, acquiring a program file of the applet, wherein the program file is generated according to preset storage path information of a page resource file related to a host application in the applet, so that when the program file runs, the page information corresponding to the page resource file is displayed according to the preset storage path information;
determining a page resource file subset corresponding to the specified host application from a page resource file set of the applet, wherein the page resource file subset comprises page resource files related to the specified host application in the applet;
and generating a file package of the small program at the appointed host application according to the program file and the page resource file subset.
9. The method of claim 8, prior to obtaining the program file of the applet, further comprising:
receiving a source program file of the applet sent by an applet developer;
and compiling the source program file to obtain a program file of the small program.
10. The method according to claim 8, wherein the determining a subset of page resource files corresponding to the specified host application from the set of page resource files of the applet specifically comprises:
determining the identifier of the specified host application according to the user instruction;
and determining a page resource folder carrying the identifier from the page resource file set of the applet, wherein the page resource folder is obtained by storing the page resource file related to the specified host application in the applet according to the preset storage path information.
11. The method of claim 8, after generating the package of files for the applet at the specified host application, further comprising:
and sending the generated file package to the terminal equipment in response to an acquisition request sent by the terminal equipment and aiming at the file package of the applet at the specified host application.
12. The method of any of claims 8-11, the page information comprising: at least one of host application icon information, case information in the applet related to the host application, and user protocol information in the applet related to the host application.
13. A method of starting an applet, comprising:
acquiring a starting instruction of a user for an applet in a specified host application;
responding to the starting instruction, acquiring a file package of the applet corresponding to the specified host application, wherein the file package comprises a program file of the applet and a page resource file set corresponding to the specified host application; the program file of the small program is generated according to preset storage path information of a page resource file related to a host application in the small program, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set comprises page resource files related to the specified host application in the applet;
and starting the small program in the specified host application according to the file package.
14. The method according to claim 13, wherein the set of page resource files is a folder obtained by storing the page resource files related to the specified host application in the applet according to the preset storage path information.
15. An applet file package generation apparatus comprising:
the first acquisition module is used for acquiring preset storage path information of a page resource file related to a host application in the applet to be generated;
a program file generating module, configured to generate a program file of the applet according to the preset storage path information, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information;
a second obtaining module, configured to obtain a set of page resource files corresponding to a specified host application, where the set of page resource files includes page resource files related to the specified host application in the applet;
and the file package generating module is used for generating the small program file package at the appointed host application according to the program file and the page resource file set.
16. The apparatus of claim 15, wherein the second obtaining module is specifically configured to:
acquiring a page resource file related to the specified host application in the applet;
and storing the page resource file related to the specified host application in the applet according to the preset storage path information to obtain a page resource folder corresponding to the specified host application.
17. An applet file package generation apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a user instruction which is used for indicating to generate a file package of an applet at a specified host application;
a second obtaining module, configured to obtain, in response to the user instruction, a program file of the applet, where the program file is generated according to preset storage path information of a page resource file related to a host application in the applet, so that when the program file runs, the page information corresponding to the page resource file is displayed according to the preset storage path information;
a determining module, configured to determine, from a set of page resource files of the applet, a subset of page resource files corresponding to the specified host application, where the subset of page resource files includes page resource files in the applet that are related to the specified host application;
and the file package generating module is used for generating the file package of the small program at the appointed host application according to the program file and the page resource file subset.
18. The apparatus of claim 17, wherein the determining module is specifically configured to:
determining the identifier of the specified host application according to the user instruction;
and determining a page resource folder carrying the identifier from the page resource file set of the applet, wherein the page resource folder is obtained by storing the page resource file related to the specified host application in the applet according to the preset storage path information.
19. An applet starting apparatus comprising:
the first acquisition module is used for acquiring a starting instruction of a user for the small program in the specified host application;
a second obtaining module, configured to, in response to the start instruction, obtain a file package of the applet corresponding to the specified host application, where the file package includes a program file of the applet and a set of page resource files corresponding to the specified host application; the program file of the small program is generated according to preset storage path information of a page resource file related to a host application in the small program, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set comprises page resource files related to the specified host application in the applet;
and the starting module is used for starting the small program in the specified host application according to the file package.
20. The apparatus according to claim 19, wherein the set of page resource files is a folder obtained by storing the page resource files related to the specified host application in the applet according to the preset storage path information.
21. An applet package generating apparatus comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring preset storage path information of a page resource file related to a host application in an applet to be generated;
generating a program file of the applet according to the preset storage path information, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information;
acquiring a page resource file set corresponding to a specified host application, wherein the page resource file set comprises page resource files related to the specified host application in the applet;
and generating an applet file package at the appointed host application according to the program file and the page resource file set.
22. An applet package generating apparatus comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a user instruction, wherein the user instruction is used for instructing generation of a file package of an applet at a specified host application;
responding to the user instruction, acquiring a program file of the applet, wherein the program file is generated according to preset storage path information of a page resource file related to a host application in the applet, so that when the program file runs, the page information corresponding to the page resource file is displayed according to the preset storage path information;
determining a page resource file subset corresponding to the specified host application from a page resource file set of the applet, wherein the page resource file subset comprises page resource files related to the specified host application in the applet;
and generating a file package of the small program at the appointed host application according to the program file and the page resource file subset.
23. An applet starting apparatus comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a starting instruction of a user for an applet in a specified host application;
responding to the starting instruction, acquiring a file package of the applet corresponding to the specified host application, wherein the file package comprises a program file of the applet and a page resource file set corresponding to the specified host application; the program file of the small program is generated according to preset storage path information of a page resource file related to a host application in the small program, so that when the program file runs, page information corresponding to the page resource file is displayed according to the preset storage path information; the page resource file set comprises page resource files related to the specified host application in the applet;
and starting the small program in the specified host application according to the file package.
CN202010258585.2A 2020-04-03 2020-04-03 Method, device and equipment for generating applet file package Active CN111475142B (en)

Priority Applications (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
PCT/CN2021/082396 WO2021197140A1 (en) 2020-04-03 2021-03-23 Generation of applet file package

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN111475142A true CN111475142A (en) 2020-07-31
CN111475142B CN111475142B (en) 2023-04-28

Family

ID=71749685

Family Applications (1)

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

Country Status (2)

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

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930382A (en) * 2020-09-21 2020-11-13 浙江口碑网络技术有限公司 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
CN113312055A (en) * 2021-05-28 2021-08-27 支付宝(杭州)信息技术有限公司 Applet launching method, device and equipment
WO2021197140A1 (en) * 2020-04-03 2021-10-07 支付宝(杭州)信息技术有限公司 Generation of applet file package
CN113516405A (en) * 2021-07-29 2021-10-19 快宝(上海)网络技术有限公司 Enterprise client express delivery and mailing processing method and device, electronic equipment and storage medium
CN113760249A (en) * 2021-01-05 2021-12-07 北京沃东天骏信息技术有限公司 Program file processing method, device and equipment

Citations (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
CN104216751A (en) * 2014-09-30 2014-12-17 广州金山网络科技有限公司 Loading method and system of functional unit interface resource of application program
CN104750472A (en) * 2013-12-31 2015-07-01 北京新媒传信科技有限公司 Resource bundle management method and device of terminal application
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
CN110221904A (en) * 2019-06-17 2019-09-10 腾讯科技(深圳)有限公司 A kind of Business Process Control method
CN110333868A (en) * 2019-06-12 2019-10-15 阿里巴巴集团控股有限公司 For generating the method and system of the installation kit of sub- application
CN110532029A (en) * 2019-09-04 2019-12-03 深圳前海微众银行股份有限公司 Small routine generation method, device, equipment and computer readable storage medium
CN110764791A (en) * 2019-10-25 2020-02-07 网易(杭州)网络有限公司 Channel adaptation method and device of applet and electronic equipment

Family Cites Families (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)
CN109947504B (en) * 2019-03-29 2020-12-18 上海连尚网络科技有限公司 Method and equipment for executing hosted program in hosted program
CN110389935B (en) * 2019-07-25 2021-04-16 上海连尚网络科技有限公司 Method, equipment and computer storage medium for starting small program
CN110609714A (en) * 2019-07-31 2019-12-24 百度在线网络技术(北京)有限公司 Data prefetching method, device and equipment and storage medium
CN111475142B (en) * 2020-04-03 2023-04-28 支付宝(杭州)信息技术有限公司 Method, device and equipment for generating applet file package

Patent Citations (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
CN104750472A (en) * 2013-12-31 2015-07-01 北京新媒传信科技有限公司 Resource bundle management method and device of terminal application
CN104216751A (en) * 2014-09-30 2014-12-17 广州金山网络科技有限公司 Loading method and system of functional unit interface resource 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
CN110333868A (en) * 2019-06-12 2019-10-15 阿里巴巴集团控股有限公司 For generating the method and system of the installation kit of sub- application
CN110221904A (en) * 2019-06-17 2019-09-10 腾讯科技(深圳)有限公司 A kind of Business Process Control method
CN110532029A (en) * 2019-09-04 2019-12-03 深圳前海微众银行股份有限公司 Small routine generation method, device, equipment and computer readable storage medium
CN110764791A (en) * 2019-10-25 2020-02-07 网易(杭州)网络有限公司 Channel adaptation method and device of applet and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
%幻#影%: "如何将Debug文件夹下的资源打包成一个EXE文件直接执行", 《HTTPS://WWW.CNBLOGS.COM/CMBLOGS/P/9782855.HTML》 *
慕宣: "小程序加载本地图片路径问题", 《HTTPS://WWW.CNBLOGS.COM/NANNAN1221/P/10523726.HTML》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021197140A1 (en) * 2020-04-03 2021-10-07 支付宝(杭州)信息技术有限公司 Generation of applet file package
CN111930382A (en) * 2020-09-21 2020-11-13 浙江口碑网络技术有限公司 Application page access method, device and equipment
CN111930382B (en) * 2020-09-21 2021-02-09 浙江口碑网络技术有限公司 Application page access method, device and equipment
CN113760249A (en) * 2021-01-05 2021-12-07 北京沃东天骏信息技术有限公司 Program file processing method, device and equipment
CN113157348A (en) * 2021-05-24 2021-07-23 北京字节跳动网络技术有限公司 Game starting method and device, computer equipment and storage medium
CN113312055A (en) * 2021-05-28 2021-08-27 支付宝(杭州)信息技术有限公司 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

Also Published As

Publication number Publication date
WO2021197140A1 (en) 2021-10-07
CN111475142B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN111475142A (en) Method, device and equipment for generating applet file package
CN111638906B (en) SDK (software development kit) access method, device and system
CN108268289B (en) Parameter configuration method, device and system for web application
CN108400902B (en) Method, device and equipment for gray level test
CN107479868B (en) Interface loading method, device and equipment
CN111240788A (en) Method, device and equipment for generating small program page
CN112286504B (en) Method for realizing development and loading of applet based on REACTNATIVE in mobile APP
CN109710286B (en) System upgrading method, device, equipment and storage medium
CN114385164A (en) Page generation and rendering method and device, electronic equipment and storage medium
CN111273965B (en) Container application starting method, system and device and electronic equipment
CN114385563A (en) Hook control method and device based on preloads
CN108874399B (en) Method and device for installing plug-in and terminal
CN111694585A (en) Method, system, terminal and storage medium for replacing system partition file
CN107092472B (en) Dynamic publishing method and device
WO2020135129A1 (en) Method and device for loading plug-in of application, and terminal
CN112764796A (en) Installation package generation system
CN111435328B (en) Application testing method and device, electronic equipment and readable storage medium
CN107402749B (en) Method and device for realizing picture loading library
CN111338655A (en) Installation package distribution method and system
CN114201174A (en) Construction method and device of hybrid mobile application, electronic equipment and storage medium
CN112346761B (en) Front-end resource online method, device, system and storage medium
JP2016515243A (en) Method for automatic conversion of package for taizen installation of android application and computer-readable recording medium therefor
CN113157348A (en) Game starting method and device, computer equipment and storage medium
CN110362320B (en) Command implementation method and device of application development platform
US20150347111A1 (en) Composite content views

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40034498

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240301

Address after: Room 1408, No. 447 Nanquan North Road, China (Shanghai) Pilot Free Trade Zone, Pudong New Area, Shanghai, 200120

Patentee after: Shanghai Ant Chuangjiang Information Technology Co.,Ltd.

Country or region after: China

Address before: 310000 801-11 section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province

Patentee before: Alipay (Hangzhou) Information Technology Co.,Ltd.

Country or region before: China