[go: up one dir, main page]

CN112379933A - Application program starting method, device, medium and electronic equipment - Google Patents

Application program starting method, device, medium and electronic equipment Download PDF

Info

Publication number
CN112379933A
CN112379933A CN201910690692.XA CN201910690692A CN112379933A CN 112379933 A CN112379933 A CN 112379933A CN 201910690692 A CN201910690692 A CN 201910690692A CN 112379933 A CN112379933 A CN 112379933A
Authority
CN
China
Prior art keywords
resource
program
downloaded
starting
application
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
CN201910690692.XA
Other languages
Chinese (zh)
Other versions
CN112379933B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910690692.XA priority Critical patent/CN112379933B/en
Publication of CN112379933A publication Critical patent/CN112379933A/en
Application granted granted Critical
Publication of CN112379933B publication Critical patent/CN112379933B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06F9/44578Preparing or optimising for loading

Landscapes

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

Abstract

The disclosure provides an application program starting method, an application program starting device, a computer readable medium and an electronic device. The application program starting method in the embodiment of the disclosure comprises the following steps: acquiring a program code packet of an application program to be started, and acquiring pre-download resource configuration information from the program code packet; acquiring pre-download resources according to the pre-download resource configuration information while initializing an application program framework; executing program code in the program code package using the application framework; and responding to a resource loading instruction in the program code, and acquiring program starting resources required by starting the application program, wherein the program starting resources comprise the pre-downloaded resources which are downloaded in advance and the instant downloading resources which are not downloaded in advance. The method can utilize the network idle period for preparing the application program frame to download partial program starting resources in advance, shorten the resource downloading time and improve the starting speed of the application program.

Description

Application program starting method, device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an application starting method, an application starting apparatus, a computer-readable medium, and an electronic device.
Background
With the development of computer technology and network technology, the pace of life of people is also increasing. Compared with client-side application programs, lightweight application programs based on web pages or third-party application platforms are favored by more and more developers and users. Taking the wechat applet based on the wechat client as an example, when the wechat applet needs to be used, a user can open the corresponding wechat applet on the wechat client without downloading and installing the wechat applet specially, so that the use is convenient, and excessive storage resources and computing resources are not occupied.
The start and operation of the wechat applet are also particularly dependent on the services of the network resources, due to the characteristics of the wechat applet that do not require downloading and installing the client. When a user starts a WeChat applet, corresponding application program resources need to be downloaded from a network, and then an initial user interface is drawn on a display screen of the terminal equipment by loading the obtained application program resources. Although the starting process of the application program is relatively convenient, the downloading of the application program resource still occupies a large starting time, and the starting speed of the application program is reduced.
Therefore, how to further increase the starting speed of the application program is a problem to be solved urgently at present.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to an application starting method, an application starting apparatus, a computer readable medium and an electronic device, so as to overcome the technical problems of long downloading time and slow starting speed of application resources, at least to a certain extent.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the embodiments of the present disclosure, there is provided an application program starting method, including: acquiring a program code packet of an application program to be started, and acquiring pre-download resource configuration information from the program code packet; acquiring pre-download resources according to the pre-download resource configuration information while initializing an application program framework; executing program code in the program code package using the application framework; and responding to a resource loading instruction in the program code, and acquiring program starting resources required by starting the application program, wherein the program starting resources comprise the pre-downloaded resources which are downloaded in advance and the instant downloading resources which are not downloaded in advance.
According to an aspect of the embodiments of the present disclosure, there is provided an application starting apparatus, including: the system comprises a program code packet acquisition module, a resource configuration module and a resource configuration module, wherein the program code packet acquisition module is configured to acquire a program code packet of an application program to be started and acquire pre-download resource configuration information from the program code packet; the resource pre-downloading module is configured to obtain pre-downloading resources according to the pre-downloading resource configuration information while initializing an application program framework; a program code execution module configured to execute program code in the program code package using the application framework; and the starting resource loading module is configured to respond to a resource loading instruction in the program code and acquire program starting resources required for starting the application program, wherein the program starting resources comprise the pre-downloaded resources which are downloaded in advance and the instant downloading resources which are not downloaded in advance.
In some embodiments of the present disclosure, based on the above technical solution, the pre-download resource includes a program file resource and a code sub-package resource; the program code package obtaining module includes: a program file resource information acquisition unit configured to acquire a network download address and a local storage path of the program file resource from the program code package; a code packetization resource information acquisition unit configured to acquire a packetization name and a packetization root directory of the code packetization resource from the program code packet.
In some embodiments of the present disclosure, based on the above technical solution, the resource pre-downloading module includes: the program file resource downloading unit is configured to download the program file resource according to the network downloading address and store the program file resource according to the local storage path; and the code subpackage resource downloading unit is configured to download the code subpackage resource according to the subpackage name and the subpackage root directory.
In some embodiments of the present disclosure, based on the above technical solution, the network download address is a uniform resource locator based on a hypertext transfer security protocol.
In some embodiments of the present disclosure, based on the above technical solution, the program code in the program code package is a script file code based on Javascript scripting language; the program code execution module may be further configured to: and interpreting and executing the script file codes based on the Javascript script language by utilizing the application program framework.
In some embodiments of the present disclosure, based on the above technical solution, the starting resource loading module includes: the pre-download resource loading unit is configured to acquire a local storage path of the pre-download resource and multiplex the pre-download resource according to the local storage path; and the instant download resource loading unit is configured to determine a network download address of the instant download resource and call an application programming interface according to the network download address of the instant download resource to obtain the instant download resource.
In some embodiments of the present disclosure, based on the above technical solution, the pre-download resource loading unit includes: the resource multiplexing subunit is configured to multiplex the pre-download resource according to the local storage path if the pre-download resource is completely downloaded; and the resource continuous downloading subunit is configured to acquire the network downloading address of the pre-downloaded resource and continuously download the pre-downloaded resource according to the network downloading address of the pre-downloaded resource if the pre-downloaded resource is not downloaded completely.
According to an aspect of the embodiments of the present disclosure, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements the application starting method as in the above technical solution.
According to an aspect of an embodiment of the present disclosure, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the application program starting method as in the above technical solution via executing the executable instructions.
In the technical scheme provided by the embodiment of the disclosure, the network idle period for preparing the application framework is used for downloading the starting resources of the partial program in advance, the pre-downloaded resources can be directly called when the program code of the application program is executed, the resource downloading time can be greatly shortened by adopting the parallel strategy, the starting speed of the application program is improved, and better application program use experience is brought to a user.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 is a schematic diagram of a start-up process of an application program based on a web page or a third-party application platform shown in FIG. 1;
FIG. 2 schematically illustrates an exemplary system architecture diagram to which the disclosed subject matter may be applied;
FIG. 3 schematically illustrates a schematic diagram of an application launching method in an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of steps of an application launch method in some embodiments of the present disclosure;
FIG. 5 schematically illustrates a flow chart of steps for obtaining pre-download resource configuration information in some embodiments of the present disclosure;
FIG. 6 schematically shows a flow chart of steps for obtaining pre-downloaded resources in some embodiments of the present disclosure;
FIG. 7 schematically illustrates a flow chart of steps for obtaining program launch resources in some embodiments of the present disclosure;
FIG. 8 schematically illustrates a flow chart of steps for reusing pre-downloaded resources in some embodiments of the present disclosure;
fig. 9 schematically shows a starting flow diagram of a game in an application scenario according to an embodiment of the present disclosure.
FIG. 10 schematically illustrates a block diagram of an application launching device in some embodiments of the present disclosure;
FIG. 11 schematically illustrates a structural schematic diagram of a computer system suitable for use with an electronic device embodying embodiments of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In the related art in the field, an application based on a web page or a third-party application platform can be directly used without downloading and installing a special application client, and fig. 1 shows a schematic diagram of a starting process of such an application. As shown in fig. 1, after downloading the code package of the application program, an application program framework required for loading the application program needs to be prepared first, then the application program code file is injected, and an interface of the download file is actively called by executing the application program code, so as to obtain the program start resource required for starting the application program. In the starting process of the application program, each starting link is in a serial relation of sequential execution, and the execution of each starting link depends on the execution result of the previous link, for example, the acquisition of program starting resources depends on the injection and execution results of application program codes, which inevitably reduces the starting speed of the whole application program.
Based on the problems of the above schemes, the present disclosure provides an application starting method, an application starting apparatus, a computer readable medium, and an electronic device capable of increasing a starting speed. Fig. 2 shows an exemplary system architecture diagram to which the disclosed solution is applied.
As shown in FIG. 2, system architecture 200 may include client 210, network 220, and server 230. The client 210 may include various terminal devices such as a mobile phone and a computer, and a web browser or a third-party application platform may be installed on the client 210 as a carrier for starting an application program. The server 230 may include various server devices such as a web server, an application server, a database server, etc., and the server 230 may provide network resources and data services for the client 210. Network 220 may be a communication medium of any of a variety of connection types capable of providing a communication link between client 210 and server 230, such as a wired communication link, a wireless communication link, or a fiber optic cable, among others.
The system architecture in the embodiments of the present disclosure may have any number of clients, networks, and servers, as desired for implementation. For example, the server 230 may be a server group consisting of a plurality of server devices. In addition, the application starting method in the embodiment of the present disclosure may be mainly executed on the client 210, and is used for presenting a user interface obtained by starting the application on a display screen of the client 210.
Fig. 3 shows a schematic diagram of an application start method in an embodiment of the present disclosure. As shown in fig. 3, the present inventors found that the preparation period of the application framework, which belongs to a period of intensive CPU usage and is also a period of network idle, follows the program code package of the application. In the application starting method provided by the embodiment of the disclosure, a program developer may first configure, in a program code package of an application, related information that may be used for downloading a program starting resource in advance. Once the downloading of the program code package of the application program is completed, the part of information can be obtained, and then the program starting resource is downloaded in advance by using the network idle period for preparing the application program framework. By downloading the program starting resource in advance, the corresponding resource can be directly called when the program code is executed without waiting for downloading, and the starting speed of the application program can be greatly improved under the condition of shortening the downloading time of the program starting resource.
Having described the basic principles of the present disclosure, detailed descriptions of the application starting method, the application starting apparatus, the computer readable medium, and the electronic device provided by the present disclosure are provided below with reference to specific embodiments.
Fig. 4 schematically illustrates a flow chart of steps of an application launch method in some embodiments of the present disclosure. As shown in fig. 4, the method may mainly include the following steps:
and S410, acquiring a program code packet of the application program to be started, and acquiring pre-download resource configuration information from the program code packet.
When a user accesses an application program loaded on a browser or a third-party application platform for the first time, a program code package of the application program needs to be downloaded from a server side and cached locally. When the user accesses the application again, an attempt may first be made to retrieve the application's code package from the local cache. If the corresponding program code package does not exist in the local cache, the program code package needs to be downloaded again from the server. In the program code packet of the application program to be started acquired in this step, pre-download resource configuration information related to the pre-download resources is pre-configured.
And S420, acquiring the pre-download resources according to the pre-download resource configuration information while initializing the application program framework.
After the program code package is obtained in step S410, the application framework may be initialized. The application framework can generally provide various basic functional components such as interactive logic, network requests, data processing, view page display and the like, and after application code files are injected into the application framework, various program functions of the application can be realized by means of the basic functional components provided by the application framework. The initialization process of the application framework belongs to the network idle period, so that the pre-download resources required for starting the application can be acquired by using the pre-download resource configuration information acquired in step S410 while the application framework is loaded in this step.
And S430, executing the program codes in the program code packet by using the application program framework.
The application framework initialized in step S420 may execute the program code of the program code package acquired in step S410. In some alternative embodiments, the program code in the package of program code may be script file code based on a Javascript scripting language. The Javascript script language belongs to an interpretation type language, and the script file code obtained by compiling the Javascript language does not need to be completely compiled, but only needs to be translated sentence by sentence in the execution code. For the Javascript scripting language, the step can utilize the application program framework to interpret and execute the corresponding script file codes.
Step S440, responding to the resource loading instruction in the program code, acquiring program starting resources required by starting the application program, wherein the program starting resources comprise pre-downloaded resources which are downloaded in advance and instant downloaded resources which are not downloaded in advance.
There is a resource load instruction in the program code of the program code package to instruct the application program resource to load. When the resource loading instruction is executed, the program starting resource required by the application program can be obtained according to the resource loading instruction. When an application program needs to load a certain program starting resource, whether the program starting resource is a pre-downloaded resource which is downloaded in advance can be judged firstly, and if the program starting resource is the pre-downloaded resource, the program starting resource can be directly obtained from the local. If the program starting resource is judged to be the instant downloading resource which is not downloaded in advance, the corresponding resource needs to be downloaded from the network server in the step. When all the program starting resources are loaded, the complete user interface of the application program can be presented on the display screen of the client, namely the starting process of the application program is completed.
In the application program starting method provided by the embodiment of the disclosure, the network idle period for preparing the application program frame is used for downloading the partial program starting resources in advance, and the pre-downloaded resources can be directly called when the program code of the application program is executed.
In some embodiments of the present disclosure, the pre-downloaded resource synchronously downloaded during the stage of loading the application framework may mainly include two parts, one part is a program file resource, for example, a view file in various types of user interfaces, such as images and texts, and the other part is a code sub-package resource. In order to increase the starting speed of the application program, the program code of the application program may be packetized to form a code main packet and a code sub packet, and the program code packet obtained in step S410 may be the code main packet. Accordingly, the program code executed first in step S430 is also the program code in the code main package. In the code execution process, when the code subpackage resources are needed, the program codes in the code subpackage are continuously downloaded and executed. On this basis, fig. 5 schematically shows a flowchart of the steps of obtaining the pre-download resource configuration information in some embodiments of the present disclosure. As shown in fig. 5, on the basis of the above embodiments, the obtaining of the pre-download resource configuration information from the program code package in step S410 may include the following steps:
step S510, obtaining a network downloading address and a local storage path of the program file resource from the program code packet.
The application developer can pre-configure the network download address and the local storage path of the program file resource in the program code packet of the application program. The network download address is a storage address of the program file resource at the network service end, and the local storage path is a local storage address after the program file resource is acquired. Alternatively, the network download address of the program file resource may be a hypertext transfer security protocol (https) based uniform resource locator (url). For example, the network download address url of a program file resource may be "https:// test/res/xxx.
And S520, acquiring a sub-package name and a sub-package root directory of the code sub-package resource from the program code package.
An application program developer can pre-configure the subpackage name and the subpackage root directory of the code subpackage resource in a program code package of the application program. The name of the sub-package and the root directory root of the sub-package are strings, the name of the sub-package can be used for determining code sub-package resources which are stored in a network server and need to be downloaded and executed, the root directory of the sub-package is used for designating a directory in the whole engineering structure of the application program, and all codes in the directory are uniformly packaged into one code sub-package resource.
For different types of pre-downloaded resources, there is a certain difference in the acquisition mode. Fig. 6 schematically shows a flow chart of steps for obtaining pre-downloaded resources in some embodiments of the present disclosure. As shown in fig. 6, on the basis of the above embodiments, the obtaining of the pre-download resource according to the pre-download resource configuration information in step S420 may further include the following steps:
and S610, downloading the program file resource according to the network downloading address, and storing the program file resource according to the local storage path.
And for the program file resources in the pre-downloaded resources, downloading corresponding program file resources from the network server according to the acquired network download address, storing the program file resources in the local according to a local storage path, and loading the program file resources after the program codes are executed.
And S620, downloading the code sub-package resource according to the sub-package name and the sub-package root directory.
For the code packet resources in the pre-downloaded resources, the corresponding code packet resources are downloaded from the network server side according to the acquired packet names and the packet root directories, and when the application program is started and the packet page corresponding to the code packet resources needs to be opened, the codes in the code packet resources can be directly loaded without being downloaded again.
When the program code of the application program is executed, the program starting resources required for starting the application program can be obtained in response to the resource loading instruction in the program code, wherein the program starting resources comprise pre-downloading resources and instant downloading resources. FIG. 7 schematically shows a flowchart of steps for acquiring a program launch resource in some embodiments of the present disclosure. As shown in fig. 7, on the basis of the above embodiments, the acquiring of the program starting resource required for starting the application program in step S440 may further include the following steps:
and S710, acquiring a local storage path of the pre-downloaded resource, and multiplexing the pre-downloaded resource according to the local storage path.
Aiming at the pre-downloaded resource in the program starting resource which is downloaded in advance, the local storage path can be obtained in the step, and then the pre-downloaded resource is directly reused according to the local storage path without re-downloading from the network server. The local storage path may be a local storage path of the program file resource, or may be a package root directory of the code package resource.
And S720, determining the network download address of the instant download resource, and calling an application programming interface according to the network download address of the instant download resource to obtain the instant download resource.
For the instant download resource in the program start resource which is not downloaded in advance, the step can obtain the network download address, and then call an Application Programming Interface (API) provided by a browser carrying the Application program or a third party Application platform according to the network download address of the instant download resource, so as to download and obtain the corresponding instant download resource.
The downloading progress of the pre-downloaded resource is related to the current network communication speed and the loading speed of the application program frame, and for the pre-downloaded resource, the application program needs to judge the downloading state of the pre-downloaded resource when the related resource is loaded. Fig. 8 schematically illustrates a flow chart of steps for reusing pre-downloaded resources in some embodiments of the present disclosure. As shown in fig. 8, on the basis of the above embodiments, the multiplexing the pre-download resource according to the local storage path in step S710 may further include the following steps:
and step S810, if the pre-download resources are downloaded, multiplexing the pre-download resources according to the local storage path.
Step S820, if the pre-download resource is not downloaded, the network download address of the pre-download resource is obtained, and the pre-download resource is continuously downloaded according to the network download address of the pre-download resource.
For the pre-downloaded resource being downloaded, when the application program calls the API to request downloading, the logic for continuing downloading is started, and the downloading is continued according to the network downloading address of the pre-downloaded resource, so that the new loss is prevented from being increased.
The following describes the application starting method in the above embodiments in detail with reference to an application scenario. Fig. 9 shows a schematic diagram of a starting process of a game, and as shown in fig. 9, the starting process of the game mainly includes the following steps:
step s910, the user triggers a game start on a browser or a third-party application platform, and then starts downloading pkg a program code package of the game, where the program code package includes a game.json configuration file, and a file resource developer may configure in the game.json according to a path of a resource remote end and a local storage, and may configure root directory information for a sub-package resource that needs to be pre-downloaded.
And S920, after the program code packet of the game is downloaded, entering a framework preparation period, and starting to load an application program framework.
Step S930, while the application program frame is loaded in step S920, the pre-downloaded resource may be downloaded in advance, and specifically, the program file resource and the code sub-package resource may be downloaded and stored according to the configuration information in the game.
And S940, explaining the js code for executing the game by using the loaded application program framework in the step S930, and downloading program starting resources when needed.
Step S950, when downloading a program starting resource, it may be determined whether the program starting resource exists in the local storage, if so, it may be determined that the program starting resource is a pre-download resource, and if not, it may be determined that the program starting resource is an instant download resource.
And step S960, aiming at the instant downloading resource, calling a jsapi interface to carry out instant downloading on the instant downloading resource from a network service end.
Step s970. for the pre-download resource, it may be multiplexed based on the storage path in the local storage without re-downloading.
Step S980, after the program starting resource preparation is completed, a game interface of the game can be displayed on a display screen of the terminal equipment, and the starting process of the game is completed.
The scheme can fully utilize the network idle time of the frame preparation period to download the resources in advance, does not depend on the interpretation of the js codes of the executed games at all, and can obviously improve the starting speed of the games.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
The following describes embodiments of the apparatus of the present disclosure, which may be used to execute the application starting method in the above embodiments of the present disclosure. For details that are not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the application starting method described above in the present disclosure.
Fig. 10 schematically shows a block diagram of an application startup device in some embodiments of the present disclosure. As shown in fig. 10, the application starting apparatus 1000 may mainly include: a program code package obtaining module 1010, a resource pre-downloading module 1020, a program code executing module 1030, and a starting resource loading module 1040.
The program code package obtaining module 1010 is configured to obtain a program code package of an application program to be started, and obtain pre-download resource configuration information from the program code package; the resource pre-download module 1020 is configured to obtain pre-downloaded resources according to pre-downloaded resource configuration information while initializing the application framework; the program code execution module 1030 is configured to execute program code in the program code package using an application framework; the starting resource loading module 1040 is configured to respond to a resource loading instruction in the program code, and obtain a program starting resource required for starting the application program, where the program starting resource includes a pre-download resource downloaded in advance and an instant download resource not downloaded in advance.
In some embodiments of the present disclosure, based on the above embodiments, the pre-download resources include program file resources and code packetization resources; the program code package acquisition module includes: a program file resource information acquisition unit configured to acquire a network download address and a local storage path of a program file resource from a program code package; and the code subpackage resource information acquisition unit is configured to acquire the subpackage name and the subpackage root directory of the code subpackage resource from the program code package.
In some embodiments of the present disclosure, based on the above embodiments, the resource pre-download module includes: the program file resource downloading unit is configured to download the program file resource according to the network downloading address and store the program file resource according to the local storage path; and the code subpackage resource downloading unit is configured to download the code subpackage resource according to the subpackage name and the subpackage root directory.
In some embodiments of the present disclosure, based on the above embodiments, the network download address is a uniform resource locator based on the hypertext transfer security protocol.
In some embodiments of the present disclosure, based on the above embodiments, the program code in the program code package is script file code based on Javascript scripting language; the program code execution module may be further configured to: and interpreting and executing the script file code based on the Javascript script language by using the application program framework.
In some embodiments of the present disclosure, based on the above embodiments, the starting the resource loading module includes: the pre-download resource loading unit is configured to acquire a local storage path of the pre-download resource and reuse the pre-download resource according to the local storage path; and the instant downloading resource loading unit is configured to determine a network downloading address of the instant downloading resource and call an application programming interface according to the network downloading address of the instant downloading resource to obtain the instant downloading resource.
In some embodiments of the present disclosure, based on the above embodiments, the pre-download resource loading unit includes: the resource multiplexing subunit is configured to multiplex the pre-download resources according to the local storage path if the pre-download resources are completely downloaded; and the resource continuous downloading subunit is configured to acquire the network downloading address of the pre-downloaded resource and continuously download the pre-downloaded resource according to the network downloading address of the pre-downloaded resource if the pre-downloaded resource is not downloaded completely.
According to an aspect of the embodiments of the present disclosure, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements an application starting method as in the above embodiments.
According to an aspect of an embodiment of the present disclosure, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to perform the application launching method as in the above embodiments via execution of the executable instructions.
The specific details of the application starting apparatus provided in each embodiment of the present disclosure have been described in detail in the corresponding method embodiment, and therefore, are not described herein again.
FIG. 11 illustrates a schematic structural diagram of a computer system suitable for use in implementing an electronic device of an embodiment of the present disclosure.
It should be noted that the computer system 1100 of the electronic device shown in fig. 11 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 11, a computer system 1100 includes a Central Processing Unit (CPU)1101, which can perform various appropriate actions and processes in accordance with a program stored in a Read-Only Memory (ROM) 1102 or a program loaded from a storage section 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data necessary for system operation are also stored. The CPU1101, ROM 1102, and RAM 1103 are connected to each other by a bus 1104. An Input/Output (I/O) interface 1105 is also connected to bus 1104.
The following components are connected to the I/O interface 1105: an input portion 1106 including a keyboard, mouse, and the like; an output section 1107 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 1108 including a hard disk and the like; and a communication section 1109 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1109 performs communication processing via a network such as the internet. A driver 1110 is also connected to the I/O interface 1105 as necessary. A removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1110 as necessary, so that a computer program read out therefrom is mounted into the storage section 1108 as necessary.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 1109 and/or installed from the removable medium 1111. When the computer program is executed by a Central Processing Unit (CPU)1101, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. An application program starting method, characterized in that the method comprises:
acquiring a program code packet of an application program to be started, and acquiring pre-download resource configuration information from the program code packet;
acquiring pre-download resources according to the pre-download resource configuration information while initializing an application program framework;
executing program code in the program code package using the application framework;
and responding to a resource loading instruction in the program code, and acquiring program starting resources required by starting the application program, wherein the program starting resources comprise the pre-downloaded resources which are downloaded in advance and the instant downloading resources which are not downloaded in advance.
2. The application program starting method according to claim 1, wherein the pre-downloaded resources comprise program file resources and code packetization resources; the obtaining of the pre-download resource configuration information from the program code package includes:
acquiring a network downloading address and a local storage path of the program file resource from the program code packet;
and acquiring the subpackage name and the subpackage root directory of the code subpackage resource from the program code package.
3. The method for starting the application program according to claim 2, wherein the obtaining the pre-downloaded resource according to the pre-downloaded resource configuration information comprises:
downloading the program file resource according to the network downloading address, and storing the program file resource according to the local storage path;
and downloading the code subpackage resources according to the subpackage name and the subpackage root directory.
4. The application startup method according to claim 3, wherein the network download address is a uniform resource locator based on the hypertext transfer security protocol.
5. The application program starting method according to claim 1, wherein the program code in the program code package is a script file code based on a Javascript scripting language; the executing, by the application framework, the program code in the program code package, comprising:
and interpreting and executing the script file codes based on the Javascript script language by utilizing the application program framework.
6. The method for starting the application program according to claim 1, wherein the acquiring the program starting resource required for starting the application program comprises:
acquiring a local storage path of the pre-downloaded resource, and multiplexing the pre-downloaded resource according to the local storage path;
and determining the network download address of the instant download resource, and calling an application programming interface according to the network download address of the instant download resource to obtain the instant download resource.
7. The application program starting method according to claim 6, wherein the multiplexing the pre-downloaded resource according to the local storage path comprises:
if the pre-download resource is downloaded, multiplexing the pre-download resource according to the local storage path;
and if the pre-downloaded resource is not downloaded, acquiring the network download address of the pre-downloaded resource, and continuing to download the pre-downloaded resource according to the network download address of the pre-downloaded resource.
8. An application launching device, the device comprising:
the system comprises a program code packet acquisition module, a resource configuration module and a resource configuration module, wherein the program code packet acquisition module is configured to acquire a program code packet of an application program to be started and acquire pre-download resource configuration information from the program code packet;
the resource pre-downloading module is configured to obtain pre-downloading resources according to the pre-downloading resource configuration information while initializing an application program framework;
a program code execution module configured to execute program code in the program code package using the application framework;
and the starting resource loading module is configured to respond to a resource loading instruction in the program code and acquire program starting resources required for starting the application program, wherein the program starting resources comprise the pre-downloaded resources which are downloaded in advance and the instant downloading resources which are not downloaded in advance.
9. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the application launching method of any one of claims 1 to 7.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the application launching method of any of claims 1 to 7 via execution of the executable instructions.
CN201910690692.XA 2019-07-29 2019-07-29 Application program starting method, device, medium and electronic equipment Active CN112379933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910690692.XA CN112379933B (en) 2019-07-29 2019-07-29 Application program starting method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910690692.XA CN112379933B (en) 2019-07-29 2019-07-29 Application program starting method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112379933A true CN112379933A (en) 2021-02-19
CN112379933B CN112379933B (en) 2024-06-14

Family

ID=74585970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910690692.XA Active CN112379933B (en) 2019-07-29 2019-07-29 Application program starting method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112379933B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254183A (en) * 2021-06-09 2021-08-13 北京字节跳动网络技术有限公司 Resource processing method and device, storage medium and electronic equipment
CN113434149A (en) * 2021-07-07 2021-09-24 腾讯科技(深圳)有限公司 Application program generating and loading method, device and medium
CN116351070A (en) * 2023-03-17 2023-06-30 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and readable storage medium
CN118672684A (en) * 2024-08-20 2024-09-20 国网信息通信产业集团有限公司 Mobile application-oriented subcontracting method and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536481A (en) * 2018-02-28 2018-09-14 努比亚技术有限公司 A kind of application program launching method, mobile terminal and computer storage media
CN108647055A (en) * 2018-05-10 2018-10-12 Oppo广东移动通信有限公司 Application program preloading method and device, storage medium and terminal
CN109002315A (en) * 2018-10-31 2018-12-14 Oppo广东移动通信有限公司 Application program update method, apparatus, terminal and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536481A (en) * 2018-02-28 2018-09-14 努比亚技术有限公司 A kind of application program launching method, mobile terminal and computer storage media
CN108647055A (en) * 2018-05-10 2018-10-12 Oppo广东移动通信有限公司 Application program preloading method and device, storage medium and terminal
CN109002315A (en) * 2018-10-31 2018-12-14 Oppo广东移动通信有限公司 Application program update method, apparatus, terminal and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254183A (en) * 2021-06-09 2021-08-13 北京字节跳动网络技术有限公司 Resource processing method and device, storage medium and electronic equipment
CN113434149A (en) * 2021-07-07 2021-09-24 腾讯科技(深圳)有限公司 Application program generating and loading method, device and medium
CN113434149B (en) * 2021-07-07 2023-09-08 腾讯科技(深圳)有限公司 Application program generating and loading method, device and medium
CN116351070A (en) * 2023-03-17 2023-06-30 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and readable storage medium
CN118672684A (en) * 2024-08-20 2024-09-20 国网信息通信产业集团有限公司 Mobile application-oriented subcontracting method and related equipment
CN118672684B (en) * 2024-08-20 2025-01-21 国网信息通信产业集团有限公司 A mobile application-oriented subpackaging method and related equipment

Also Published As

Publication number Publication date
CN112379933B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
CN112379933B (en) Application program starting method, device, medium and electronic equipment
CN105389222B (en) A kind of methods, devices and systems of dynamic call native interface
JP4857349B2 (en) Method, system, and computer program for providing asynchronous portal pages within a portal system
CN108111555B (en) Method and system for controlling installation package download process
CN110457038B (en) Card display method, device and equipment of auxiliary application terminal and storage medium
CN109240697B (en) Call processing method and device and storage medium
WO2012155678A1 (en) Method and terminal for developing mobile phone application interface based on browser parsing manner
CN110427225A (en) A kind of method and apparatus starting small routine
CN114191809B (en) Vibration control method, apparatus, electronic device, and computer-readable storage medium
CN110764805A (en) Method, device, terminal and storage medium for noninductive upgrade of client
CN104967689B (en) A data processing method and device
CN112473131A (en) Method and device for realizing game running and computer readable storage medium
CN105955833B (en) Engine calling method and device
CN112491940B (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
CN102664945B (en) For document down loading method, device and system that time-out connects
CN109857963A (en) Local resource access method, device and electronic equipment
CN110806856A (en) Data loading method and device and electronic equipment
EP3872630B1 (en) Request processing method and apparatus, electronic device, and computer storage medium
CN110727416A (en) Development framework generation method and related device
CN111723314A (en) Webpage display method and device, electronic equipment and computer readable storage medium
CN113535419B (en) A service arrangement method and device
CN107239265B (en) Binding method and device of Java function and C function
CN113434234A (en) Page jump method, device, computer readable storage medium and processor
CN112612531A (en) Application program starting method and device, electronic equipment and storage medium
CN113515323B (en) Method and device for optimizing loading speed of Web application in portable terminal client

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
GR01 Patent grant
GR01 Patent grant