Downloading method of installation-free application and related equipment
By including instructions in the configuration file of the first application and downloading the software package of the second application in advance, the problem of long download time for install-free applications in the prior art is solved, and the rapid opening and click-to-click use of the installation-free application is realized. Effect.
Patent Information
- Application Number
- CN202310747702.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-24
AI Technical Summary
The existing download method of install-free applications requires waiting for download time when opening functions or interfaces, which affects the user experience and cannot achieve click-and-read effect.
By including indication information in the configuration file of the first application, the software package of the second application is downloaded in advance, ensuring that when an operation to open the second application function or interface is received, it can be opened quickly and the waiting time can be reduced.
It realizes the quick opening of the function or interface of the application without installation, improves the user experience, reduces waiting time, and improves the response speed of the application.
Smart Images

Figure CN119179500A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a method for downloading an installation-free application and related equipment. Background Art
[0002] With the development of Internet technology, installation-free applications (applications, APPs) have become a popular trend. Installation-free applications (abbreviated as: installation-free applications) do not require an installation process. Users can click the application icon to download and run it directly from the server. Installation-free applications include one or more application packages. Different application packages implement different functions, and each application package can be downloaded independently.
[0003] At present, when a terminal needs to use a certain function, it downloads the application software package corresponding to the function. For example, when the terminal receives an operation for opening a certain function, it downloads the application software package corresponding to the function, and when the terminal receives an operation for opening another function, it downloads the application software package corresponding to the other function. Usually, it takes time to download the application software package, that is, it takes some time to wait each time a function is opened, and it is impossible to achieve true point-and-click use, which affects the user experience. Summary of the invention
[0004] The embodiments of the present application provide a method for downloading an installation-free application and related devices, which are used to quickly open functions or interfaces in the installation-free application.
[0005] In a first aspect, a method for downloading an installation-free application is provided. The method can be applied to a terminal. The method comprises: sending a first request to a server, the first request being used to request downloading a first application, the first application being an installation-free application; receiving a first application software package sent by the server, the first application software package being used to implement at least one function or interface of the first application, the first application software package comprising a configuration file, the configuration file comprising indication information, the indication information being used to indicate a second application software package, the second application software package being used to implement at least one function or interface of the second application; sending a second request to the server according to the indication information, the second request being used to request downloading the second application software package; and receiving the second application software package sent by the server.
[0006] It should be noted that, currently, when the terminal receives an operation for opening a certain function, it downloads the application software package corresponding to the function. Since the download takes time, the function cannot be opened in time. In an embodiment of the present application, the first application software package of the first application includes a configuration file, and the indication information in the configuration file indicates the second application software package of the second application. After the terminal downloads the first application software package, the second application software package of the second application can be downloaded according to the indication information in the configuration file in the first application software package. In other words, the terminal can download the second application software package before receiving the operation (the operation for opening the function corresponding to the second application software package). In this way, since the second application software package has been downloaded in advance, when the terminal receives the operation (the operation for opening the function corresponding to the second application software package), it can be opened quickly to achieve a point-and-click effect and improve the user experience.
[0007] In one possible design, the second application and the first application are the same application or different applications.
[0008] 1. The second application and the first application are the same application. In this case, the first application software package and the second application software package are used to implement different functions or interfaces in the same application.
[0009] For example, the first application software package is used to implement the first function, and the second application software package is used to implement the second function or the second interface. For another example, the first application software package is used to implement the first interface, and the second application software package is used to implement the second function or the second interface. Taking the first application software package as an example, the first interface is implemented, and the second application software package is used to implement the second interface, and the second interface is associated with the first interface. For example, the second interface is the previous interface or the next interface of the first interface, or the interface opened the most times from the first interface. Therefore, the embodiment of the present application can realize the fast opening of different functions / interfaces in the same application.
[0010] In one possible design, the second application and the first application satisfy at least one of the following:
[0011] The second application and the first application are from the same developer; or,
[0012] The second application and the first application are pre-configured associated applications; or,
[0013] The second application and the first application are applications of related types; or,
[0014] The number of switching between the second application and the first application is greater than a preset number.
[0015] In the embodiment of the present application, after the terminal downloads a first application package of an application (first application), the terminal can download a second application package of another application (second application) according to the instruction information in the configuration file in the first application package. When the terminal needs to open the second application (for example, receiving an operation for opening a function corresponding to the second application package), it can be opened quickly.
[0016] In a possible design, sending the second request to the server includes: sending the second request to the server when opening the function or interface corresponding to the first application software package. Therefore, the terminal does not need to wait for the second application software package to be downloaded before opening the function or interface corresponding to the first application software package. When opening the function or interface corresponding to the first application software package, the terminal can download the second application software package of the second application from the server, thereby reducing user waiting time and improving user experience.
[0017] In a possible design, before sending the second request to the server, it also includes: outputting a first prompt message, wherein the first prompt message is used to prompt whether to download the second application software package; and receiving a first confirmation instruction, wherein the first confirmation instruction is used to indicate confirmation to download the second application software package.
[0018] In an embodiment of the present application, a first application software package of a first application includes a configuration file, and the indication information in the configuration file indicates a second application software package of a second application. A user on the terminal side can choose to download or not download the second application software package. For example, if the user wants to save memory, he can choose not to download it, or if the user is interested in the second application, he can download it. If the second application software package is downloaded, when the terminal receives an operation for opening a function / interface corresponding to the second application software package, since the second application software package has been downloaded in advance, it can be opened quickly to achieve point-and-click use.
[0019] In one possible design, the indication information is also used to instruct the terminal to download a third application software package, and before sending the second request to the server, it also includes: outputting second prompt information, the second prompt information is used to prompt whether to download the second application software package and the third application software package; receiving a second confirmation instruction, the second confirmation instruction is used to indicate confirmation to download the second application software package; sending a second request to the server, including: sending the second request to the server, the second request including the package name of the second application software package, but not the package name of the third application software package.
[0020] In the embodiment of the present application, the first application software package of the first application includes a configuration file, and the indication information in the configuration file indicates the second application software package and the third application software package. The user on the terminal side can choose to download any one or all of the second application software package and the third application software package. For example, if the user thinks that the terminal memory is insufficient or is not interested in the second application, he can only download the second application software package and not the third application software package. Then, the second request sent by the terminal to the server only includes the package name of the second application software package and does not include the package name of the third application software package. In this way, the user on the terminal side can make a choice according to his own needs, and the experience is better.
[0021] In one possible design, before sending the second request to the server, it also includes: determining that the terminal satisfies at least one of the following: the remaining power is greater than the preset power; or, the remaining memory is greater than the preset memory; or, the current processor load is less than the preset load.
[0022] In the embodiment of the present application, the terminal can choose to download or not download the second application software package. For example, when the terminal determines that there is a lot of remaining memory, it can be downloaded, otherwise, it can not be downloaded. If it is downloaded, the function or interface corresponding to the second application software package can be quickly opened. If it is not downloaded, it can avoid the running speed reduction and freeze caused by insufficient terminal memory.
[0023] In one possible design, the indication information includes the package name of the second application software package.
[0024] In one possible design, the indication information also includes: at least one of: a package name of the second application, a first master-slave tag, and a second master-slave tag; the first master-slave tag is used to indicate that the second application software package is a master package or a slave package of the first application software package; the second master-slave tag is used to indicate that the second application is a master application or a slave application of the first application.
[0025] In a possible design, the first application software package is used to implement at least one function or interface of the first application, including: the first application software package is used to open a homepage of the first application.
[0026] Generally, when a terminal opens an application, the first thing that opens is the homepage of the application. Therefore, when the terminal downloads an installation-free application, the first application software package downloaded is used to open the homepage. In the embodiment of the present application, the application software package (first application software package) corresponding to the homepage includes a configuration file, and the configuration file includes indication information for indicating the second application software of the second application. Therefore, the terminal can download the second application software package of the second application in advance according to the indication information, so that it can be quickly opened when receiving an operation for opening the function corresponding to the second application software package.
[0027] In one possible design, the indication information is used to indicate a plurality of application software packages, the plurality of application software packages include the second application software package, and the second request is used to request downloading of the plurality of application software packages; the method further includes: receiving other application software packages sent by the server, the other application software packages being application software packages other than the second application software package in the plurality of application software packages. That is, the terminal downloads all the plurality of application software packages indicated in the indication information, so as to quickly open a function or interface corresponding to any application software package in the plurality of application software packages. The other application software packages and the second application software package may be sent together or separately.
[0028] In one possible design, the second request is used to request downloading of all application software packages of the second application, where all application software packages include the second application software package; and receiving the second application software package sent by the server includes: receiving all application software packages sent by the server.
[0029] That is, the first application software package includes a configuration file, the configuration file includes indication information, the indication information only indicates one application software package (the second application software package) of the second application, and the terminal downloads all application software packages of the second application according to the indication information. On the one hand, since the indication information only indicates one application software package of the second application, it is not necessary to indicate all application software packages, the amount of information is small, and the transmission resources consumed are small; on the other hand, the terminal downloads all application software packages of the second application according to the prompt information, and when the terminal wants to open any function or interface of the second application, it can be opened quickly.
[0030] In a second aspect, a method for downloading a free-installation application is also provided. The method can be applied to a terminal. The method includes: sending a first request to a server, the first request is used to request downloading a first application, and the first application is an free-installation application; receiving a first application software package and a second application software package sent by the terminal, the first application software package is used to implement at least one function or interface of the first application, and the second application software package is used to implement at least one function or interface of the second application; the second application and the first application are different applications.
[0031] In the embodiment of the present application, when the terminal requests to download an application (first application), the first application package of the application and the second application package of another application (second application) are downloaded together. Since the second application package has been downloaded in advance, when the terminal receives an operation for opening the second application (for example, an operation for opening the function corresponding to the second application package), it can be opened quickly, realizing point-and-use, and improving the user experience.
[0032] In one possible design, the second application and the first application satisfy at least one of the following:
[0033] The second application and the first application are from the same developer; or,
[0034] The second application and the first application are pre-configured associated applications; or,
[0035] The second application and the first application are applications of related types; or,
[0036] The number of switching between the second application and the first application is greater than a preset number.
[0037] In one possible design, the first application software package includes a configuration file, the configuration file includes indication information, and the indication information is used to indicate the second application software package.
[0038] In one possible design, the indication information includes the package name of the second application software package.
[0039] In one possible design, the indication information also includes: at least one of: a package name of the second application, a first master-slave tag, and a second master-slave tag; the first master-slave tag is used to indicate that the second application software package is a master package or a slave package of the first application software package; the second master-slave tag is used to indicate that the second application is a master application or a slave application of the first application.
[0040] In a possible design, the first application software package is used to implement at least one function or interface of the first application, including: the first application software package is used to open a homepage of the first application.
[0041] In a possible design, the second application software package is used to implement at least one function or interface of the second application, including: the second application software package is used to open the homepage of the second application.
[0042] In a third aspect, a method for downloading an installation-free application is also provided. The method can be applied to a server. The method includes: receiving a first request sent by a terminal, the first request is used to request the download of a first application, and the first application is an installation-free application; sending a first application software package to the terminal, the first application software package is used to implement at least one function or interface of the first application, the first application software package includes a configuration file, the configuration file includes indication information, the indication information is used to indicate a second application software package, and the second application software package is used to implement at least one function or interface of the second application; receiving a second request sent by the terminal, the second request is used to request the download of the second application software package; sending the second application software package to the terminal.
[0043] It should be noted that, currently, the configuration file in one application software package does not include indication information for indicating another application software package. In an embodiment of the present application, the first application software package of the first application includes a configuration file, and indication information is added to the configuration file, and the indication information is used to indicate the second application software package of the second application. In short, there is a binding relationship between the first application software package of the first application and the second application software package of the second application, and the binding relationship is indicated to the terminal through the indication information in the configuration file in the first application software package, which can facilitate the promotion of the second application to the terminal.
[0044] In one possible design, the second application and the first application are the same application or different applications.
[0045] In a possible design, the second application and the first application are the same application, and the first application software package and the second application software package are used to implement different functions or interfaces in the same application.
[0046] In one possible design, the second application and the first application satisfy at least one of the following:
[0047] The second application and the first application are from the same developer; or,
[0048] The second application and the first application are pre-configured associated applications; or,
[0049] The second application and the first application are applications of related types; or,
[0050] The number of switching between the second application and the first application is greater than a preset number.
[0051] In a possible design, the indication information is also used to indicate a third application software package, and the second request includes the package name of the second application software package but does not include the package name of the third application software package.
[0052] In one possible design, the indication information includes a package name of the second application software package in the first list.
[0053] In a possible design, the indication information also includes: at least one of: a package name of the second application, a first master-slave tag, and a second master-slave tag; the first master-slave tag is used to indicate that the second application software package is a master package or a slave package of the first application software package; the second master-slave tag is used to indicate that the second application is a master application or a slave application of the first application.
[0054] In a possible design, the first application software package is used to implement at least one function or interface of the first application, including: the first application software package is used to open a homepage of the first application.
[0055] In one possible design, the indication information is used to indicate multiple application software packages, the multiple application software packages include the second application software package, and the second request is used to request downloading of the multiple application software packages; the method also includes: sending other application software packages to the terminal, the other application software packages are application software packages in the multiple application software packages other than the second application software package.
[0056] In one possible design, the second request is used to request downloading of all application software packages of the second application, where all application software packages include the second application software package; and sending the second application software package to the terminal includes: sending all application software packages of the second application to the terminal.
[0057] In a fourth aspect, a method for downloading an installation-free application is also provided. The method can be applied to a server. The method includes: receiving a first request sent by a terminal, the first request is used to request downloading a first application, and the first application is an installation-free application; according to the first request, determining a first application software package of the first application, the first application software package is used to implement at least one function or interface of the first application, the first application software package includes a configuration file, the configuration file includes indication information, the indication information is used to indicate a second application software package, and the second application software package is used to implement at least one function or interface of the second application; according to the indication information, sending the first application software package and the second application software package to the terminal.
[0058] It should be noted that, currently, each time the server receives a request, it only sends the application software package requested by the request. In the embodiment of the present application, when the server receives a first request for requesting to download a first application, it determines the first application software package of the first application. Since the first application software package includes a configuration file, the indication information in the configuration file indicates the second application software package of the second application. The server can determine the second application software package of the second application according to the indication information, and then send the first application software package and the second application software package to the terminal together. In this way, it is convenient for the terminal to quickly open the function or interface corresponding to the second application software package.
[0059] In one possible design, the second application and the first application are the same application or different applications.
[0060] In a possible design, the second application and the first application are the same application, and the first application software package and the second application software package are used to implement different functions or interfaces in the same application.
[0061] In one possible design, the second application and the first application satisfy at least one of the following:
[0062] The second application and the first application are from the same developer; or,
[0063] The second application and the first application are pre-configured associated applications; or,
[0064] The second application and the first application are applications of related types; or,
[0065] The number of switching between the second application and the first application is greater than a preset number.
[0066] In a possible design, the indication information is also used to indicate a third application software package, and the second request includes the package name of the second application software package but does not include the package name of the third application software package.
[0067] In one possible design, the indication information includes a package name of the second application software package in the first list.
[0068] In a possible design, the indication information also includes: at least one of: a package name of the second application, a first master-slave tag, and a second master-slave tag; the first master-slave tag is used to indicate that the second application software package is a master package or a slave package of the first application software package; the second master-slave tag is used to indicate that the second application is a master application or a slave application of the first application.
[0069] In a possible design, the first application software package is used to implement at least one function or interface of the first application, including: the first application software package is used to open a homepage of the first application.
[0070] In one possible design, the indication information is used to indicate multiple application software packages, the multiple application software packages include the second application software package, and the second request is used to request downloading of the multiple application software packages; the method also includes: sending other application software packages to the terminal, the other application software packages are application software packages in the multiple application software packages other than the second application software package.
[0071] In one possible design, the second request is used to request downloading of all application software packages of the second application, where all application software packages include the second application software package; and sending the second application software package to the terminal includes: sending all application software packages of the second application to the terminal.
[0072] In a fifth aspect, a communication system is also provided, comprising: a server and a terminal;
[0073] The terminal is used to execute the method as described in the first aspect or the second aspect above.
[0074] The server is used to execute the method according to the third aspect or the fourth aspect;
[0075] In a sixth aspect, an electronic device is also provided, including:
[0076] a processor, a memory, and one or more programs;
[0077] The one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the processor, the electronic device executes the method described in the first aspect or the second aspect above.
[0078] In a seventh aspect, an electronic device is also provided, including:
[0079] a processor, a memory, and one or more programs;
[0080] The one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the processor, the electronic device executes the method described in the third aspect or the fourth aspect above.
[0081] In an eighth aspect, a computer-readable storage medium is also provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is run on a computer, the computer executes the method described in the first aspect or the second aspect above.
[0082] In a ninth aspect, a computer-readable storage medium is also provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is run on a computer, the computer executes the method described in the third aspect or the fourth aspect above.
[0083] In the tenth aspect, a computer program product is also provided, comprising a computer program, which, when executed on a computer, enables the computer to execute the method steps described in the first or second aspect above.
[0084] In the eleventh aspect, a computer program product is also provided, comprising a computer program, which, when executed on a computer, enables the computer to execute the method steps described in the third aspect or the fourth aspect.
[0085] In the twelfth aspect, an embodiment of the present application further provides a chip, which is coupled to a memory in an electronic device, and is used to call a computer program stored in the memory and execute the technical solution of the first aspect or the second aspect of the embodiment of the present application. In the embodiment of the present application, "coupling" refers to the direct or indirect combination of two components with each other.
[0086] In the thirteenth aspect, the embodiments of the present application also provide a chip, which is coupled to a memory in an electronic device, and is used to call a computer program stored in the memory and execute the technical solution of the third aspect or the fourth aspect of the embodiments of the present application. In the embodiments of the present application, "coupling" refers to the direct or indirect combination of two components with each other.
[0087] For the technical effects that can be achieved by the above-mentioned second to thirteenth aspects, please refer to the description of the technical effects that can be achieved by the corresponding design scheme in the above-mentioned first aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present application;
[0089] Figure 2 A schematic diagram of the software structure of an electronic device provided in one embodiment of the present application;
[0090] Figure 3 A schematic diagram of opening an installation-free application provided by an embodiment of the present application;
[0091] Figure 4 Another schematic diagram of opening an installation-free application provided by an embodiment of the present application;
[0092] Figure 5 Another schematic diagram of opening an installation-free application provided by an embodiment of the present application;
[0093] Figure 6 A flowchart of a method for downloading an installation-free application provided in an embodiment of the present application;
[0094] Figure 7 Another schematic diagram of a flow chart of a method for downloading a free-installation application provided in an embodiment of the present application;
[0095] Figure 8 Another schematic diagram of a flow chart of a method for downloading a free-installation application provided in an embodiment of the present application;
[0096] Fig. 9Another schematic diagram of a flow chart of a method for downloading a free-installation application provided in an embodiment of the present application;
[0097] Fig.10 Another schematic diagram of a flow chart of a method for downloading a free-installation application provided in an embodiment of the present application;
[0098] Fig.11 Another schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0099] Below, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0100] (1) Installation-free applications: no installation process is required. After the terminal downloads the application software package of the installation-free application, it can be directly run, which is convenient for users to operate. For example, the installation-free applications can include video, audio, image shooting / editing, shopping, news, communication, etc. according to their functions. Among them, the image shooting category can include camera applications, photo editing applications, picture or video editing applications, etc. The video category can include Etc. The audio class can include, for example, QQ Etc. Shopping categories include, for example Etc. News categories include, for example Etc. Communications include, for example Express delivery, etc.
[0101] (2) Application software package, a software package for implementing the functions / interfaces of the installation-free application. An installation-free application may include one or more application software packages. Among them, each application software package can be downloaded independently. Taking Harmony OS as an example, the application software package may be, for example, a Harmony OS Ability Package (HAP) package. It is understandable that an installation-free application includes one or more functions / interfaces, the same function / interface can be implemented by one or more application software packages, and different functions / interfaces correspond to different application software packages. It should be noted that, for the sake of ease of understanding, this article mainly takes the example of one function / interface corresponding to one application software package, and different functions / interfaces corresponding to different application software packages, and takes the application software package as a HAP package for explanation.
[0102] (3) At least one of the embodiments of the present application includes one or more; wherein, more than one means greater than or equal to two. In addition, it should be understood that in the description of this specification, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as expressing or implying relative importance, nor can they be understood as expressing or implying an order. For example, the first application and the second application do not represent the importance of the two or the order of the two, but are only for distinguishing the description. In the embodiments of the present application, "and / or" is only a description of the association relationship, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated with each other are in an "or" relationship.
[0103] (4) The directional terms mentioned in the embodiments of the present application, such as "upper", "lower", "left", "right", "inner", "outer", etc., are only references to the directions of the drawings. Therefore, the directional terms used are for better and clearer explanation and understanding of the embodiments of the present application, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the embodiments of the present application.
[0104] (5) References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of this specification include a particular feature, structure or characteristic described in conjunction with the embodiment. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "include", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0105] (6) As used in this specification, the term “when” or “after” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrase “upon determining that” or “if (a stated condition or event) is detected” may be interpreted to mean “if determining that” or “in response to determining that” or “upon detecting (a stated condition or event)” or “in response to detecting (a stated condition or event)”, depending on the context.
[0106] The method for downloading the installation-free application provided in the embodiment of the present application is applicable to the system. Exemplarily, the system includes a terminal and a server. Among them, the terminal can be a portable electronic device such as a mobile phone, a tablet computer, a laptop computer; it can also be a wearable device such as a watch, a bracelet, etc.; or, it can also be a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, etc. The embodiment of the present application does not limit the specific type of the terminal. The server can be various types of servers, such as a cloud server, an application server, etc., which are not limited in the embodiment of the present application. Among them, the server includes all application software packages of the installation-free application. The terminal can download the application software package of the installation-free application from the server to run the installation-free application. The specific implementation process will be described later.
[0107] Figure 1 FIG. 1 shows a schematic diagram of the structure of an electronic device. The electronic device may be, for example, a terminal in a system. Figure 1 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0108] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. The memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
[0109] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0110] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0111] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0112] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0113] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0114] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0115] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0116] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0117] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0118] The wireless communication function of the electronic device can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0119] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0120] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to electronic devices. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0121] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
[0122] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include one or more display screens 194.
[0123] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor, etc. Among them, the ISP is used to process the data fed back by the camera 193.
[0124] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and the software code of at least one application program, etc. The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory, etc.
[0125] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as pictures and videos are stored in the external memory card.
[0126] The electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0127] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0128] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to external speaker scenarios such as hands-free calls through one or more speakers 170A.
[0129] The receiver 170B, also called a "earpiece", may be one or more and is used to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the voice can be received by placing the receiver 170B close to the ear.
[0130] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0131] The earphone jack 170D is used to connect a wired earphone.
[0132] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
[0133] The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting.
[0134] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0135] The magnetic sensor 180D includes a Hall sensor, and the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
[0136] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes), and can detect the magnitude and direction of gravity when the electronic device is stationary.
[0137] Distance sensor 180F, used to measure distance. Electronic devices can measure distance through infrared or laser.
[0138] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light outward through the light emitting diode. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
[0139] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed brightness of the ambient light.
[0140] The fingerprint sensor 180H is used to collect fingerprints.
[0141] The temperature sensor 180J is used to detect the temperature.
[0142] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
[0143] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of a human vocal part.
[0144] The button 190 includes a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device can receive the button input and generate a key signal input related to the user settings and function control of the electronic device. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 195, or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device.
[0145] Understandably, Figure 1 The components shown do not constitute a specific limitation on the electronic device. The electronic device in the embodiment of the present invention may include Figure 1 In addition, Figure 1 The combination / connection relationship between the components can also be adjusted and modified.
[0146] Figure 2 A software structure diagram of an electronic device provided in an embodiment of the present application.
[0147] like Figure 2 As shown, the software structure of the electronic device can be a layered structure, and the electronic device can be a terminal in the system. The layered architecture is to divide the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. The layered architecture can be, for example, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application is based on the layered architecture. The system is taken as an example to illustrate the software structure of the electronic device. The system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime and system library, kernel layer and hardware layer.
[0148] like Figure 2 As shown, the application layer can include a series of application packages, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video and other applications.
[0149] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 2 As shown, the application framework layer may include an Ability Manager Service (AMS), a Bundle Manager Service (BMS), and an application / service center. Among them, AMS is responsible for the startup, exit, opening of functions / interfaces, and so on of applications (including installation-free applications) in the terminal. BMS is responsible for the management of HAP packages of applications (including installation-free applications). For example, BMS can record all HAP packages of each application (for example, non-installation-free applications). When an application is an installation-free application and is run for the first time, since the terminal has not yet downloaded the HAP package of the installation-free application, the BMS can notify the application / service center to download the HAP package of the installation-free application. The application / service center is used to manage applications / services. For example, when an application is an installation-free application, the application / service center can download the HAP package of the application / service from the server. Among them, the specific actions of different modules will be described later. Fig.10 Introduced in.
[0150] It is understandable that although Figure 2Although not shown in the figure, the application framework layer may also include a content provider, a view system, a phone manager, a resource manager, a notification manager, etc. The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures. The phone manager is used to provide communication functions for electronic devices. For example, the management of call status (including connected, hung up, etc.). The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the top status bar of the system in the form of an icon or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0151] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0152] The system library can include multiple functional modules. For example: surface manager, media library, 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc. Among them, the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.
[0153] The kernel layer is the layer between hardware and software. The kernel layer includes at least wifi driver, display driver, camera driver, audio driver, sensor driver, etc.
[0154] The hardware layer includes one or more cameras, and may also include other hardware such as sensors, displays, and wifi transceivers. The wifi transceiver is used to receive and send wifi signals, and the wifi transceiver may be a receiver and a transmitter in one, or may include a separate receiver and a separate transmitter.
[0155] Understandably, Figure 2 The software structure shown does not constitute a specific limitation on the software structure of the electronic device. The software structure of the electronic device in the embodiment of the present invention may include: Figure 2 More or fewer modules in Figure 2 More or fewer layers, or a layer contains more Figure 2 More or fewer modules, etc. In addition, Figure 2 The combination / connection relationship between modules can also be adjusted and modified.
[0156] The following takes a mobile phone as an example and describes the technical solution provided in the embodiments of the present application in conjunction with the accompanying drawings.
[0157] The server stores all application software packages (e.g., HAP packages) of the installation-free application, which are used to implement various functions / interfaces of the installation-free application. Among them, the same function / interface can be implemented by one or more HAP packages, and different functions / interfaces correspond to different HAP packages. For ease of understanding, the following example uses one function / interface in the installation-free application corresponding to one HAP package, and different functions / interfaces corresponding to different HAP packages. When the terminal wants to run the installation-free application, it can download the HAP package of the installation-free application from the server. Since each HAP package of the installation-free application can be downloaded independently, one download method includes:
[0158] When the terminal receives an operation for opening an installation-free application, HAP package 1 is downloaded from the server, and HAP package 1 is used to open a certain interface (for example, the homepage) of the installation-free application. After HAP package 1 is successfully downloaded, the terminal opens the interface (for example, the homepage) of the installation-free application based on HAP package 1. The process of the terminal downloading HAP package 1 from the server includes: the terminal sends request 1 to the server, request 1 is used to request downloading the installation-free application, after the server receives request 1, it sends HAP package 1 to the terminal, and the terminal receives HAP package 1. When the terminal receives an operation for opening another interface of the installation-free application, HAP package 2 is downloaded from the server, and HAP package 2 is used to open the other interface. After HAP package 2 is successfully downloaded, the terminal opens the other interface based on HAP package 2. The process of the terminal downloading HAP package 2 from the server includes: the terminal sends request 2 to the server, request 2 is used to request downloading the HAP package of the other interface of the installation-free application, after the server receives request 2, it sends HAP package 2 to the terminal, and the terminal receives HAP package 2.
[0159] In the above method, each time a new interface is opened by the terminal, a request needs to be sent to the server to request the download of the corresponding HAP package before the new interface can be opened. It should be understood that the download of the HAP package takes a certain amount of time. Therefore, from the perspective of user experience, each time a new interface is opened, some time needs to be waited, and it is impossible to achieve true point-and-click use, and the user experience is poor.
[0160] For example, see Figure 3 (a), the mobile phone displays an interface (for example, the negative first screen of the mobile phone), which includes one or more icons or service cards of free installation applications. When the mobile phone receives an operation for the service card 301 of Huawei Video, it downloads the HAP package 1 of Huawei Video from the server. The HAP package 1 is used to open a certain interface of Huawei Video (for example, the homepage). If the HAP package 1 is not downloaded successfully, the mobile phone displays the following Figure 3 (b) shows a prompt message in which the user is prompted to wait. After the HAP package 1 is downloaded successfully, the mobile phone displays the following Figure 3 (c) shows an interface, which is generated based on HAP package 1, for example, the homepage of Huawei Video. During this process, the user needs to wait for a while, i.e. Figure 3 (b) The duration of the interface shown. Figure 3 (c), when the mobile phone receives an operation for video 302, it downloads HAP package 2 corresponding to video 302 from the server, and the HAP package 2 is used to open video 302. If HAP package 2 is not downloaded successfully, the mobile phone displays the following Figure 3(d) shows an interface in which a prompt message is displayed to prompt the user to wait. After the HAP package 2 is downloaded successfully, the following is displayed: Figure 3 (e) is an interface generated based on HAP package 2 and used to play video 302. Therefore, Figure 3 In this case, each time a user opens a new interface, they need to wait for a while, because the phone needs to download the HAP package corresponding to the interface before it can be opened. This method cannot achieve true point-and-click use.
[0161] In order to solve the above problems, the present application provides a method for downloading an installation-free application. The method is applicable to a system including a terminal and a server. Specifically, the server receives a first request sent by the terminal, and the first request is used to request the download of a first application, which is an installation-free application. The server sends a first HAP package to the terminal, and the first HAP package is used to implement at least one function or interface of the first application. The first HAP package includes a configuration file, and the configuration file contains indication information, and the indication information is used to instruct the terminal to download a second HAP package. In simple terms, after the terminal downloads the first HAP package, it downloads the second HAP package according to the indication information in the configuration file in the first HAP package. That is, the terminal can download the second HAP in advance. Assuming that the second HAP is used to implement another function / interface of the first application, when the terminal receives an operation for opening the other function / interface, since the second HAP package has been downloaded, it does not need to be downloaded again and can be opened quickly, realizing point-and-use.
[0162] The second HAP package and the first HAP package may correspond to the same application or different applications. For ease of understanding, two application scenarios are introduced below. Application scenario 1 takes the second HAP package and the first HAP package corresponding to the same application as an example. Application scenario 2 takes the second HAP package and the first HAP package corresponding to different applications as an example.
[0163] Application scenario 1
[0164] The first HAP package and the second HAP package correspond to the same application. For example, the first HAP package and the second HAP package both correspond to the first application, and the first application is an installation-free application. The first HAP package and the second HAP package correspond to different functions / interfaces of the first application. For example, the first HAP package corresponds to the first function / interface of the first application, and the second HAP package corresponds to the second function / interface of the first application.
[0165] For example, see Figure 4(a), the mobile phone displays an interface. This interface takes the negative first screen of the mobile phone as an example. Of course, this interface can also be other interfaces as long as it contains icons or service cards of free installation applications. For example, this interface can also be the desktop of the mobile phone, the control center interface, etc.; or, it can also be the interface of an application in the mobile phone, such as the interface of the application store (such as the homepage), the interface of the quick application center, the interface of the shopping application, the interface of the communication application (such as the chat interface), etc. Figure 4 In (a), when the mobile phone receives the operation of the service card 401 for Huawei Video, it downloads the first HAP package from the server. When the first HAP package is not downloaded successfully, the mobile phone displays the following Figure 4 (b) shows a prompt message in the interface, prompting the user to wait. After the first HAP package is downloaded successfully, the mobile phone displays the following Figure 4 (c) shows the first interface, which is generated based on the first HAP package, such as the homepage of Huawei Video. The first HAP package includes a configuration file, and the configuration file includes instruction information to instruct the terminal to download the second HAP package. Therefore, the second HAP package is also downloaded in the background of the mobile phone. The second HAP package and the first HAP package correspond to different functions / interfaces of Huawei Video. For example, continue to refer to Figure 4 (c), the second HAP packet is used to generate the interface of the video 402. In this way, when the mobile phone receives an operation for the video 402, it displays the following Figure 4 (d) shows the second interface, which is generated based on the second HAP package and is used to play the video 402. It should be noted that since the mobile phone has downloaded the second HAP package in advance, Figure 4 (c) The first interface can be opened quickly Figure 4 (d) The second interface can be used immediately without waiting for a long time.
[0166] Please compare Figure 4 and Figure 3 , assuming Figure 3 Zhongcong Figure 3 (c) The interface switches to Figure 3 (e) requires waiting for the first time period. Figure 4 Zhongcong Figure 4 (c) The first interface switches to Figure 4 The second interface of (d) needs to wait for a second time. The second time is less than the first time. For example, the first time is 2 seconds or 3 seconds, and the second time is 0.1 seconds, 0.2 seconds, 0.5 seconds, 1 second, etc. Therefore, in this application scenario, different functions / interfaces in the same application can be quickly opened, that is, different functions / interfaces in the same application can be used instantly.
[0167] Application scenario 2
[0168] The first HAP package and the second HAP package correspond to different applications. For example, the first HAP package corresponds to the first application, and the second HAP package corresponds to the second application. For example, see Figure 5 , the first application is Figure 5 (a) The service card 501 corresponds to the popular scenic spot application, and the second application is Figure 5 The train ticket application corresponding to the service card 502 in (a).
[0169] Please continue to see Figure 5 (a), the mobile phone displays an interface (for example, the negative first screen of the mobile phone). The interface includes icons of free-installation applications or service cards. When the mobile phone receives an operation for the service card 501, it downloads the first HAP package from the server. The first HAP package is used to open the function / interface of the first application, i.e., the popular scenic spot application. If the first HAP package is not downloaded successfully, the mobile phone displays the following Figure 5 (b) shows a prompt message in the interface, prompting the user to wait. After the first HAP package is downloaded successfully, the mobile phone displays the following Figure 5 (c) shows the first interface, which is generated based on the first HAP package, such as the homepage of the popular scenic spot application. The first HAP package includes a configuration file, and the configuration file includes instruction information to instruct the terminal to download the second HAP package. Therefore, the terminal also downloads the second HAP package. The second HAP package corresponds to the second application, namely the train ticket application. Figure 5 (c), when the mobile phone receives a return operation, it returns to the negative one screen of the mobile phone, such as Figure 5 (d). Figure 5 In (d), when the mobile phone receives an operation on the icon of the service card 502, the following is displayed: Figure 5 (e) shows the second interface, which is generated based on the second HAP package. For example, the second interface is the homepage of the train ticket application. Since the mobile phone has downloaded the second HAP package of the second application (i.e., the train ticket application) in advance, Figure 5 (d) When opening the second application (i.e., the train ticket application), there is no need to wait for a long time and it can be opened quickly. Figure 5 It can be seen that when the terminal switches from the first application (eg, the popular attractions application) to the second application (eg, the train ticket application), it can quickly switch to the second application because the second HAP package of the second application is downloaded in advance.
[0170] Please compare application scenario 1 with application scenario 2. In application scenario 1, the second HAP and the first HAP package correspond to the same application, so if the terminal downloads the second HAP package in advance, the function / interface corresponding to the second HAP package in the application can be quickly opened, and the function / interface in the same application can be quickly opened. In application scenario 2, the second HAP and the first HAP package correspond to different applications, so if the terminal downloads the second HAP package of the second application in advance, the second application can be quickly opened, for example, when switching from the first application to the second application, it can switch quickly, that is, fast switching between different applications can be achieved.
[0171] In summary, in this application, after the terminal downloads the first HAP package, it downloads the second HAP package according to the instruction information in the configuration file in the first HAP package. Since the terminal downloads the second HAP in advance, when the terminal opens the function / interface corresponding to the second HAP package, it can be opened quickly to achieve point-and-click use.
[0172] The implementation principle of the method for downloading the installation-free application provided by the present application is explained below with reference to the accompanying drawings.
[0173] See also Figure 6 , is a flowchart of a method for downloading a free-installation application provided in an embodiment of the present application. The method is applicable to a system, the system includes a terminal and a server, and the introduction of the terminal and the server can be found in the above text. The method is applicable to application scenarios 1 and 2 in the above text. Figure 6 , the process includes:
[0174] S601: A terminal receives a first operation, where the first operation is used to open a first application in the terminal, and the first application is an installation-free application.
[0175] For an introduction to free installation apps, please refer to the glossary above, which will not be repeated here. Figure 4 For example, the first operation may be for Figure 4 (a) The operation of the service card 401 (e.g., a click operation) is performed to Figure 5 For example, the first operation may be for Figure 5 An operation (eg, a click operation) on the service card 501 in (a).
[0176] S602: The terminal sends a first request to the server, where the first request is used to request downloading of a first application.
[0177] For example, the first request may include the application package name of the first application. The server receives the first request, parses the first request, obtains the application package name of the first application, and determines the first application according to the application package name.
[0178] S603, the server determines a first HAP package. The first HAP package is used to implement at least one function / interface in the first application. The first HAP package includes a configuration file, the configuration file includes indication information, the indication information is used to indicate a second HAP package, and the second HAP package is used to implement at least one function or interface of the second application.
[0179] Among them, a possible implementation method for the server to determine the first HAP package is that all HAP packages of each application in N applications are stored in the server, and N is a positive integer. After receiving the first request, the server determines the first application in the N applications according to the application package name of the first application in the first request, and then determines all HAP packages of the first application. The first HAP package is one or more HAP packages among all HAP packages of the first application. Exemplarily, the first HAP package may be a HAP package corresponding to the homepage of the first application. That is, the first HAP package is used to open the homepage of the first application. In other words, after receiving the first request, the server sends the first HAP package corresponding to the homepage of the first application to the terminal, so that the terminal opens the homepage of the first application.
[0180] The first HAP package includes a configuration file, and optionally, the configuration file may be, for example, a module.json file. The configuration file includes instruction information. The form of the instruction information will be described later. The instruction information is used to instruct the terminal to download the second HAP package. The second HAP package may include one or more HAP packages, and the second HAP package and the first HAP package may correspond to the same application or different applications. Therefore, two cases are described below.
[0181] Case 1: The second HAP package and the first HAP package correspond to the same application. For example, the second HAP package and the first HAP package both correspond to the first application. In this case, the second HAP package and the first HAP package are used to implement different functions / interfaces in the first application. For example, the first HAP package is used to implement the first function / first interface in the first application, and the second HAP is used to implement the second function / second interface in the first application. This case can correspond to the application scenario 1 mentioned above, that is, Figure 4 .For example, Figure 4 (c) The first interface is generated based on the first HAP package, Figure 4 The second interface of (d) is generated based on the second HAP package. Since the terminal has downloaded the second HAP package in advance, Figure 4 (c) The first interface can be opened quickly Figure 4 (d) The second interface enables quick opening of different functions / interfaces within the same application.
[0182] Optionally, assuming that the first HAP package is used to implement the first interface in the first application, the second HAP package is used to implement the second interface in the first application, and the second interface is associated with the first interface. For example, the second interface includes the first n interfaces, the last n interfaces, or the interface opened more than a preset number of times from the first interface, where n is a positive integer.
[0183] Case 2: The second HAP package and the first HAP package correspond to different applications. For example, the first HAP package corresponds to the first application, and the second HAP package corresponds to the second application. The first HAP package is used to implement a function / interface in the first application, and the second HAP package is used to implement a function / interface in the second application. This case can correspond to the application scenario 2 mentioned above, that is, Figure 5 .For example, Figure 5 The first interface of (c) is generated based on the first HAP package, and the first interface is the interface of the first application (for example, a popular scenic spot application). Figure 5 (e) The second interface is generated based on the second HAP package. The second interface is the interface of the second application (for example, the train ticket application). Since the terminal has downloaded the second HAP in advance, when opening Figure 5 (e) The second interface can be opened quickly.
[0184] Optionally, in the second scenario, the second application has an association relationship with the first application, and the association relationship includes, for example, at least one of the following:
[0185] (1) The second application and the first application belong to the same developer.
[0186] For example, the first application is Toutiao, and the second application is Douyin, which belong to the same developer. For example, the first HAP package of Toutiao includes a configuration file, and the configuration file includes instruction information, and the instruction information is used to instruct the terminal to download the second HAP package, and the second HAP package corresponds to Douyin. In this way, after the terminal downloads the first HAP package of Toutiao, it downloads the second HAP package of Douyin according to the instruction information in the configuration file in the first HAP package. Since the terminal has downloaded the second HAP package of Douyin in advance, when the terminal receives an operation for opening Douyin, it can open it quickly; or, when the terminal receives an operation to switch from Toutiao to Douyin, it can quickly switch to Douyin.
[0187] (2) The second application and the first application are pre-configured associated applications.
[0188] One possible implementation is that before the first application and the second application are put on the application market, the developers of the first application and the second application have already negotiated that the first application and the second application are associated applications. For example, the first HAP package of the first application includes a configuration file, and the configuration file includes indication information, and the indication information is used to indicate the second HAP package, and the second HAP package corresponds to the second application. After the first application and the second application are put on the application market, if the terminal downloads the first HAP package of the first application, the second HAP package of the second application is downloaded according to the indication information in the configuration file of the first HAP package.
[0189] In this manner, the first application and the second application may not belong to the same developer, as long as the developer of the first application and the developer of the second application agree that the first application and the second application are associated applications.
[0190] (3) The second application and the first application are applications of related types.
[0191] The types of the second application and the first application are related, including: the second application and the first application are of the same type, and / or the second application is another application that may need to be used during the use of the first application.
[0192] Take the first application and the second application as an example. Assume that both the first application and the second application are short video applications, for example, the first application is Douyin and the second application is Kuaishou. That is, the first HAP package of Douyin includes a configuration file, and the configuration file includes instruction information for instructing the terminal to download the second HAP package, and the second HAP package corresponds to Kuaishou. In other words, after the terminal downloads the first HAP package of a certain type of free installation application from the server, according to the instruction information in the configuration file in the first HAP package, the second HAP package of another free installation application of the same type is downloaded. This method can help promote free installation applications (for example, the second application). It can be understood that when a user wants to open a certain type of first application in the terminal, it means that the user is interested in this type of application. Therefore, in this way, the server can recommend the same type of second application to the terminal. If the user is interested in the second application and wants to open the second application, since the HAP package of the second application has been downloaded in advance, the second application can be opened quickly, and the experience is better.
[0193] For example, the second application is another application that may be used during the use of the first application. Figure 5 For example, the first application is Figure 5 (a) Popular attractions application, the second application is Figure 5(a) The train ticket application. It should be understood that after the user opens the popular scenic spot application, he browses to the scenic spot he is interested in and may buy a train ticket to go to the scenic spot, so the train ticket application is an application that needs to be used in the process of using the popular scenic spot application. For another example, the first application is a shopping application (for example, Taobao), and the second application is a quick application (for example, Cainiao Station). It should be understood that after the user opens the shopping application to purchase items, he needs to receive a courier, so the courier application is an application that needs to be used in the process of using the shopping application. For another example, the first application is an application related to movie tickets, and the second application is an application related to catering. It should be understood that after watching a movie, consumers generally look for restaurants to eat, and they can find them through applications related to restaurants. Therefore, applications related to restaurants are applications that need to be used in the process of using applications related to movie tickets. Take the example that the first application is a popular scenic spot application and the second application is a train ticket application. That is, the first HAP package of the popular scenic spot application includes a configuration file, and the configuration file includes instruction information for instructing the terminal to download the second HAP package, and the second HAP package corresponds to the train ticket application. That is, after the terminal downloads the first HAP package of the popular scenic spot application from the server, it downloads the second HAP package of the train ticket application according to the instruction information in the configuration file in the first HAP package. In this way, when the terminal wants to open the interface of the train ticket application, it can be opened quickly, and the user experience is good.
[0194] (4) The number of switching between the second application and the first application is greater than a preset number.
[0195] One possible implementation is that the server can count the number of switches between different applications. For example, the server counts that the number of switches between a short video application (e.g., Tik Tok) and a shopping application (e.g., Taobao) is greater than a preset number. Then the server determines that the first application is a short video application and the second application is a shopping application; or, the first application is a shopping application and the second application is a short video application.
[0196] The above are several examples of the association relationship between the second application and the first application. It can be understood that the second application and the first application may have other relationships, which are not listed one by one in this application.
[0197] Optionally, the indication information may be one or more fields in a configuration file, such as a preload field. It should be noted that, currently, the HAP package of the application contains a configuration file, but the configuration file does not contain indication information for instructing the terminal to download another HAP package. One possible way of the present application is that before the first application is launched, the developer writes the indication information into the configuration file of the first HAP package. Another possible way is that the indication information is not written into the configuration file when the first application is launched, and the developer adds the indication information to the configuration file after the first application is launched, which is not limited in the embodiments of the present application. Exemplarily, the implementation methods of the indication information include at least one of the following:
[0198] Mode A: The indication information includes a first list, and the first list includes the package name of the HAP package. When the first list includes the package name of the second HAP package, the terminal is instructed to download the second HAP package. Exemplarily, the first list is as follows:
[0199] Preload:
[0200] HAP Name: HAP 1
[0201] HAP Name: HAP 2
[0202] HAP Name: HAP 3
[0203] That is, the second HAP package includes three HAP packages, which are named HAP 1, HAP 2, and HAP 3. The terminal downloads the three HAP packages according to the instruction information.
[0204] Mode B: The indication information includes a first list, and the first list includes the package name of the HAP package and the package name of the application. For example, when the first list includes the package name of the second HAP package and the package name of the second application, the terminal is instructed to download the second HAP package, and the second HAP package corresponds to the second application. Exemplarily, the first list is as follows:
[0205] Preload:
[0206] APP Name: APP 1
[0207] HAP Name: HAP 1
[0208] HAP Name: HAP 2
[0209] HAP Name: HAP 3
[0210] Mode B is different from Mode A. In Mode A, the instruction information only instructs the terminal to download the second HAP package, but does not indicate which application the second HAP corresponds to. In Mode B, the instruction information not only instructs the terminal to download the second HAP package, but also indicates that the application corresponding to the second HAP is the second application.
[0211] Mode C, the indication information includes a first list, the first list includes the package name of the HAP package and the master-slave mark, and the master-slave mark is used to indicate the master-slave relationship between the HAP package (for example, the second HAP package) indicated in the first list and the first HAP package. For example, when the first list includes the package name of the second HAP package and the master-slave mark 1, the terminal is instructed to download the second HAP package. The master-slave mark 1 is used to indicate that the second HAP package is the master package of the first HAP package. That is, when the second HAP package is the master package of the first HAP package, the terminal is instructed to download the second HAP package. For another example, when the first list includes the package name of the second HAP package and the master-slave mark 2, the terminal does not need to download the second HAP package. The master-slave mark 2 is used to indicate that the second HAP package is a slave package of the first HAP package. That is, when the second HAP package is a slave package of the first HAP package, the terminal does not need to download the second HAP package. For another example, when the first list includes the package name of the second HAP package and the master-slave mark 3, the terminal is instructed to download the second HAP package. The master-slave flag 3 is used to indicate whether the second HAP package is the master package or the slave package of the first HAP package. That is, no matter what the master-slave relationship between the second HAP package and the first HAP package is, the terminal is instructed to download the second HAP package.
[0212] Taking the case where the second HAP package is the main package of the first HAP package and the terminal is instructed to download the second HAP package as an example, the first list is as follows:
[0213] Preload:
[0214] HAP Name: HAP 1 Main
[0215] HAP Name: HAP 2
[0216] HAP Name: HAP 3 main
[0217] Therefore, the terminal determines to download the HAP package with the package name of HAP 1 and the HAP package with the package name of HAP 3 according to the first list.
[0218] In the above method C, the master-slave relationship between the second HAP package and the first HAP package can be set in advance. For example, the developer 2 of the second HAP package and the developer 1 of the first HAP package agree in advance on the master-slave relationship between the second HAP package and the first HAP package, and write indication information in the configuration file of the first HAP package to indicate the subordinate relationship between the two. For example, in order to promote its own HAP package (or the application corresponding to the HAP package), the developer 2 of the second HAP package reaches an agreement with the developer 1 of the popular first HAP package (or the application corresponding to the HAP package) to set the second HAP package as the master package of the first HAP package. In this way, when the terminal downloads the first HAP package, the second HAP package will also be downloaded through the indication information, thereby achieving the promotion purpose of the developer 2.
[0219] Mode D, the indication information includes a first list, the first list includes the package name of the HAP package, the package name of the application, and the master-slave mark, and the master-slave mark is used to indicate the master-slave relationship between the second application corresponding to the HAP package (for example, the second HAP package) indicated in the first list and the first application corresponding to the first HAP package. For example, when the first list includes the package name of the second HAP package, the package name of the second application, and the master-slave mark 1, the terminal is instructed to download the second HAP package. The master-slave mark 1 is used to indicate that the second application corresponding to the second HAP package is the master application of the first application corresponding to the first HAP package. That is, when the second application is the master application of the first application, the terminal is instructed to download the second HAP package. For another example, when the first list includes the package name of the second HAP package, the package name of the second application, and the master-slave mark 2, the terminal does not need to download the second HAP package. The master-slave mark 2 is used to indicate that the second application corresponding to the second HAP package is the slave application of the first application corresponding to the first HAP package. That is, when the second application is the slave application of the first application, the terminal does not need to download the second HAP package. For another example, when the first list includes the package name of the second HAP package, the package name of the second application, and the master-slave mark 3, the terminal is instructed to download the second HAP package. The master-slave mark 3 is used to indicate that the second application corresponding to the second HAP package is the master application or the slave application of the first application corresponding to the first HAP package. That is, regardless of the master-slave relationship between the second application and the first application, the terminal is instructed to download the second HAP package.
[0220] Taking the case where the second application is the main application of the first application and the terminal is instructed to download the second HAP package as an example, the first list is as follows:
[0221] Preload:
[0222] APP Name: APP 1 Main
[0223] HAP Name: HAP 1
[0224] APP Name: APP 2
[0225] HAP Name: HAP 2
[0226] HAP Name: HAP 3
[0227] Therefore, according to the first list, the terminal determines that the application with the package name APP1 is the master application of the first application, so the terminal downloads the HAP package corresponding to the package name HAP 1. Since the application with the package name APP2 is the slave application of the first application, the terminal does not need to download the HAP package with the package name HAP 2 and the HAP package with the package name HAP 3.
[0228] In the above method D, the master-slave relationship between the second application and the first application can be set in advance. For example, the developer 2 of the second application and the developer 1 of the first application agree in advance on the master-slave relationship between the second application and the first application, and write indication information in the configuration file of the first HAP package of the first application to indicate the subordinate relationship between the two. For example, in order to promote its own application, the developer 2 of the second application reaches an agreement with the developer 1 of the popular first application to set the second application as the master application of the first application. In this way, when the terminal downloads the first HAP package of the first application, the second HAP package of the second application will also be downloaded through the indication information, thereby achieving the promotion purpose of the developer 2.
[0229] S604: The server sends a first HAP packet to the terminal.
[0230] S605: The terminal displays a first interface, where the first interface is generated based on the first HAP package.
[0231] For example, the first HAP package is used to open the homepage of the first application, so the first interface is the homepage of the first application. Figure 4 For example, the first interface is Figure 4 (c) shows the interface. Figure 5 For example, the first interface is Figure 5 (c) The interface shown.
[0232] S606: The terminal downloads a second HAP package from the server.
[0233] Optionally, when the indication information is used to indicate multiple HAP packages (the multiple HAP packages include the second HAP package), the second request is used to request downloading of the multiple HAP packages. That is, the terminal downloads all HAP packages indicated in the indication information. For example, the indication information includes a first list, and the HAP packages corresponding to the package names of all HAP packages included in the first list are downloaded.
[0234] Optionally, S606 may be that the terminal downloads all HAP packages of the second application from the server, including the second HAP package. That is, the first HAP package includes a configuration file, the configuration file includes indication information, the indication information only indicates one HAP package (the second HAP package) of the second application, and the terminal downloads all application software packages of the second application according to the indication information. On the one hand, since the indication information only indicates one HAP package of the second application, there is no need to indicate all HAP packages, the amount of information is small, and less transmission resources are consumed; on the other hand, the terminal downloads all HAP packages of the second application according to the prompt information, and when the terminal wants to open any function or interface of the second application, it can be opened quickly.
[0235] Optionally, before S606, the terminal may also execute step A or step B. Step A: The terminal outputs a first prompt message, which first prompts the user whether to download the second HAP package. If the terminal receives an instruction to confirm the download, the second HAP package is downloaded; otherwise, the second HAP package is refused to be downloaded. Step B: The terminal outputs a second prompt message, which is used to prompt whether to download the second application, which is the application corresponding to the second HAP package. If the instruction to confirm the download is received, the second HAP package is downloaded; otherwise, the second HAP package is refused to be downloaded. For example, if the user of the terminal wants to save memory, he may refuse to download the second HAP package. If the user is more interested in the second application, he may choose to download the second HAP package.
[0236] Optionally, before S606, the terminal may further perform the step of determining whether the device state of the terminal satisfies a condition, and if so, downloading the second HAP package, otherwise, refusing to download the second HAP package. The device state of the terminal satisfies the condition including at least one of the following: the remaining power of the device is greater than a preset power, the remaining memory is greater than a preset memory, and the current load of the processor is less than a preset load.
[0237] Optionally, S606 has multiple implementations, which will be described later. Figure 7-Figure 8 Optional, Figure 6 In the process, S606 may be executed before or after S605, or may be executed synchronously with S605.
[0238] Optionally, after downloading the second HAP package, the terminal may delete the second HAP package when it is determined that at least one of the following conditions is met: for example, the function / interface of the second HAP package is not used within a preset time period, and the current memory is less than a threshold.
[0239] S607: The terminal receives a second operation, where the second operation is used to open a second interface. The second interface is generated based on the second HAP package.
[0240] S608: The terminal displays the second interface.
[0241] As described above, the first HAP package and the second HAP package may correspond to the same application or different applications, so the first interface and the second interface may be different interfaces of the same application or interfaces of different applications. For example, when the first HAP package and the second HAP package correspond to the same application, the first interface and the second interface are different interfaces of the same application. When the first HAP package and the second HAP package correspond to different applications, the first interface and the second interface are interfaces of different applications. It should be understood that since the second HAP package has been downloaded in advance, the terminal does not need to wait too long when opening the second interface, and the experience is better.
[0242] Optional, continue to see Figure 6 , assuming that the receiving moment of the second operation is the first moment, the opening moment of the second interface is the second moment, and the first moment is earlier than the second moment. The time interval between the first moment and the second moment is less than the threshold. The threshold is, for example, 0.1 seconds, 0.3 seconds, 0.5 seconds, 1 second, 2 seconds, etc. That is, when the terminal receives the second operation, the second interface can be quickly opened. Exemplarily, the threshold may include the time interval between the third moment and the fourth moment, the third moment is the receiving moment of the first operation, the fourth moment is the opening moment of the first interface, and the third moment is earlier than the fourth moment. That is, the time interval between the first moment and the second moment is less than the time interval between the third moment and the fourth moment. From the perspective of user experience, compared with the waiting time required to open the first interface, the waiting time required to open the second interface is shorter, because the terminal has downloaded the second HAP package for opening the second interface in advance, realizing point-to-point use.
[0243] Optional, Figure 6 In the process, at least one of steps S605 to S608 may be executed or not executed, so Figure 6 S605 to S608 are indicated by dashed lines. Exemplarily, at least one of the following situations is included:
[0244] 1. S605 is not executed. For example, after the terminal receives the first HAP package, the function or interface corresponding to the first HAP package is run in the background. For example, the first application is a positioning application. After the terminal downloads the first HAP package of the first application, the GPS is started in the background for positioning, and the interface of the first application may not be displayed in the foreground.
[0245] 2. S606 is not executed. One possible situation is that the terminal determines to download the second HAP package according to the indication information in the configuration file in the first HAP package. At this time, the terminal can output the first prompt information to prompt whether to download the second HAP package. If the terminal receives the instruction to confirm the download, the second HAP package is downloaded, otherwise, the second HAP package is not downloaded, that is, the terminal does not execute S606. Another possible situation is that the indication information in the configuration file includes a list. For the description of the list, please refer to the previous text. When the list is empty, the terminal does not execute S606.
[0246] 3. S607 and S608 are not executed. In short, after the terminal opens the first interface, if it does not receive the second operation, it is not necessary to execute S607 to S608.
[0247] See also Figure 7 , which is another flow chart of a method for downloading an installation-free application provided in an embodiment of the present application. Figure 7 It can be understood as Figure 6 Refinement, for example Figure 7 S706 to S708 are used for refinement Figure 6 S606 in. Figure 7 , the process includes:
[0248] S701: The terminal receives a first operation, where the first operation is used to open a first application in the terminal, and the first application is an installation-free application.
[0249] S702: The terminal sends a first request to the server, where the first request is used to request downloading of a first application.
[0250] S703, the server determines a first HAP package. The first HAP package is used to implement at least one function or interface in the first application. The first HAP package includes a configuration file, the configuration file includes instruction information, and the instruction information is used to instruct the terminal to download a second HAP package; the second HAP package is used to implement at least one function or interface of the second application.
[0251] S704: The server sends a first HAP packet to the terminal.
[0252] S705: The terminal displays a first interface, where the first interface is generated based on the first HAP package.
[0253] Among them, the implementation principle of S701 to S705 is the same as Figure 6 The implementation principles of S601 to S605 are the same and will not be repeated.
[0254] S706: The terminal parses the instruction information in the configuration file.
[0255] For example, S706 includes: the terminal parses the configuration file, obtains the indication information in the configuration file, and determines the second HAP package according to the indication information. For the configuration file and the indication information, please refer to the above description, which will not be repeated here.
[0256] S707: The terminal sends a second request to the server, where the second request is used to request downloading of a second HAP package.
[0257] Optionally, the second request may include a second list. The second list may be the same as the first list, and the first list is a list contained in the indication information in the configuration file, please refer to the previous description. Alternatively, the second list is different from the first list, for example, the second list is part of the content in the first list. Taking the form of the indication information in the previous method C as an example, the indication information includes a first list, and the first list includes the package name of the second HAP package and a master-slave mark, and the master-slave mark is used to indicate the master-slave relationship between the second HAP package and the first HAP package. When the master-slave mark indicates that the second HAP package is the master package of the first HAP package, the terminal is instructed to download the second HAP package. In this case, the second list is all or part of the first list. For example, the first list is as follows:
[0258] Preload:
[0259] HAP Name: HAP 1 Main
[0260] HAP Name: HAP 2
[0261] HAP Name: HAP 3 main
[0262] The HAP packages corresponding to HAP 1 and HAP 2 in the first list are the main packages of the first HAP package and need to be downloaded, while the HAP package corresponding to HAP 2 is the subordinate package of the first HAP package and does not need to be downloaded, so HAP 2 may not be included in the second list. For example, the second list is as follows:
[0263] Preload:
[0264] HAP Name: HAP 1 Main
[0265] HAP Name: HAP 3 master.
[0266] Optionally, S705 may be executed before, after or simultaneously with S706, or S705 may be executed before, after or simultaneously with S707, or S705 may be executed before, after or simultaneously with S708.
[0267] S708: The terminal receives a second HAP packet sent by the server.
[0268] Optionally, the second request in S707 may be used to request downloading of all HAP packages of the second application, including the second HAP package. Then, S708 includes the terminal receiving all HAP packages of the second application sent by the server. That is, the first HAP package includes a configuration file, the configuration file includes indication information, the indication information only indicates one HAP package (the second HAP package) of the second application, and the terminal downloads all HAP packages of the second application according to the indication information.
[0269] S709: The terminal receives a second operation, where the second operation is used to open a second interface.
[0270] S710: The terminal displays a second interface, where the second interface is generated based on a second HAP package.
[0271] Among them, the principles of S709 to S710 are the same as Figure 6 The principles of S607 to S608 are the same and will not be repeated here.
[0272] See also Figure 8 , which is another flow chart of the method for downloading an installation-free application provided in an embodiment of the present application. Figure 8 It can be understood as Figure 6 Another refinement of . For example, Figure 8 S806 to S807 are used for refinement Figure 6 S606 in. Figure 8 As shown, the process includes:
[0273] S801, a terminal receives a first operation, where the first operation is used to open a first application in the terminal, and the first application is an installation-free application.
[0274] S802: The terminal sends a first request to the server, where the first request is used to request downloading of a first application.
[0275] S803, the server determines a first HAP package. The first HAP package is used to implement at least one function or interface in the first application. The first HAP package includes a configuration file, the configuration file includes instruction information, and the instruction information is used to instruct the terminal to download a second HAP package; the second HAP package is used to implement at least one function or interface of the second application.
[0276] S804: The server sends a first HAP packet to the terminal.
[0277] S805: The terminal displays a first interface, where the first interface is generated based on the first HAP package.
[0278] Among them, the implementation principle of S801 to S805 is the same as Figure 6 The implementation principles of S601 to S605 are the same and will not be repeated.
[0279] S806, the server parses the instruction information in the configuration file.
[0280] For example, S806 includes: the server parses the configuration file to obtain the indication information in the configuration file, and determines the second HAP package according to the indication information. For the configuration file and the indication information, please refer to the above description, which will not be repeated here.
[0281] Optionally, at least one of steps S806 and S807 may be performed before, after, or simultaneously with S804; or, may be performed before, after, or simultaneously with S805.
[0282] S807: The server sends a second HAP packet to the terminal.
[0283] S808: The terminal receives a second operation, where the second operation is used to open a second interface.
[0284] S809, the terminal displays a second interface, where the second interface is generated based on the second HAP package.
[0285] Among them, the principles of S808 to S809 are the same as Figure 6 The principles of S607 to S608 are the same and will not be repeated here.
[0286] contrast Figure 7 and Figure 8 It can be seen that Figure 7 The terminal parses the instructions in the configuration file. Figure 8 The instructions in the configuration file are parsed by the server. It should be understood that Figure 7 The terminal parses the instructions in the configuration file, so Figure 7 In S704, the first HAP package sent by the server to the terminal includes a configuration file, and the configuration file needs to include indication information. Figure 8 The terminal does not need to parse the instructions in the configuration file, so Figure 8 The first HAP package sent by the server to the terminal in S804 includes a configuration file, and the configuration file may or may not include indication information, so it is described in two cases. Case 1, the configuration file does not include indication information, so that downlink transmission resources can be saved. A possible implementation method is that the server deletes the indication information in the configuration file in the first HAP package, and then sends the first HAP package after deleting the indication information to the terminal. It should be noted that the server also needs to retain the complete first HAP package, that is, the first HAP package in which the indication information has not been deleted, because the server also needs to execute S806, that is, parse the indication information in the configuration file. Case 2, the configuration file includes indication information, because the indication information in the configuration file is parsed by the server and the terminal does not need to parse it, so the terminal can ignore or skip the indication information when running the configuration file.
[0287] See also Fig. 9 , which is another flow chart of the method for downloading an installation-free application provided in an embodiment of the present application. Fig. 9 It can be understood as Figure 8 Adjustment. Fig. 9 As shown, the process includes:
[0288] S901, the terminal receives a first operation, where the first operation is used to open a first application in the terminal, and the first application is an installation-free application.
[0289] S902: The terminal sends a first request to the server, where the first request is used to request downloading of a first application.
[0290] S903, the server determines a first HAP package. The first HAP package is used to implement at least one function or interface in the first application. The first HAP package includes a configuration file, the configuration file includes instruction information, and the instruction information is used to instruct the terminal to download a second HAP package; the second HAP package is used to implement at least one function or interface of the second application.
[0291] S904, the server parses instruction information in the configuration file.
[0292] S905: The server sends a first HAP packet and a second HAP packet to the terminal.
[0293] Optionally, the first HAP packet and the second HAP packet may be sent through the same transmission channel, and the same transmission channel may include the same time-frequency resource, for example. The first HAP packet and the second HAP packet may be carried in the same message or in different messages.
[0294] S906: The terminal displays a first interface, where the first interface is generated based on the first HAP package.
[0295] S907: The terminal receives a second operation, where the second operation is used to open a second interface.
[0296] S908: The terminal displays a second interface, where the second interface is generated based on the second HAP package.
[0297] Please compare Figure 8 and Fig. 9 , Figure 8 After the server determines the first HAP package, it sends the first HAP package to the terminal in time, so that the terminal can open the first interface as soon as possible to avoid the user waiting for a long time. Then the server parses the instruction information in the configuration file and sends the second HAP package to the terminal. Therefore, Figure 8 The waiting time for opening the first interface can be shortened, but the first HAP packet and the second HAP packet need to be sent through two signalings. Fig. 9After the server determines the first HAP package, it first parses the instruction information in the configuration file to determine the second HAP package, and then sends the first HAP and the second HAP package to the terminal. After the terminal receives the first HAP package, it displays the first interface. Fig. 9 The first HAP and the second HAP packets can be sent through one signaling, which can save signaling overhead, but the waiting time for opening the first interface is longer than Figure 8 It takes a long time to open the first interface.
[0298] See also Fig.10 , which is another flow chart of a method for downloading a free-installation application provided in an embodiment of the present application. The flow chart can be applied to a system, wherein the system includes a terminal and a server, and the terminal has Figure 2 The software architecture is shown in Figure 1. Fig.10 , the process includes:
[0299] S1001, a display screen of a terminal receives a first operation, where the first operation is used to open a first application in the terminal, and the first application is an installation-free application.
[0300] S1002: The display screen of the terminal sends a start instruction to the AMS, where the start instruction is used to instruct to start a first application.
[0301] As mentioned above, AMS is responsible for the management of applications (including installation-free applications) in the terminal, for example, starting or exiting. Therefore, when the display screen receives a first operation for starting a first application, it sends a start instruction to AMS to start the first application. Exemplarily, the start instruction may include the package name of the first application.
[0302] S1003: The AMS sends a request 1 to the BMS, where the request 1 is used to request a HAP package of the first application.
[0303] As mentioned above, the BMS is used to manage the HAP packages of applications in the terminal. It is understandable that if the first application is to be started, the HAP package of the first application needs to be run. Therefore, when the AMS determines that the first application needs to be started, it requests the HAP package of the first application from the BMS.
[0304] S1004, the BMS sends a request 2 to the application / service center, where the request 2 is used to request a HAP package of the first application.
[0305] Optionally, before S1004, the BMS may also determine whether there is a HAP package of the first application, and when it is determined that there is no HAP package of the first application, send request 2 to the application / service center to request the HAP package of the first application. It should be understood that since the first application is an installation-free application, the terminal has not downloaded the HAP package of the first application before receiving the first operation, so the HAP package of the first application does not exist in the terminal, so the BMS sends request 2 to the application / service center.
[0306] S1005: The application / service center sends a first request to the server, where the first request is used to request downloading of a first application.
[0307] S1006, the server determines a first HAP package of the first application. The first HAP package is used to implement at least one function / interface of the first application. The first HAP package includes a configuration file, and the configuration file includes indication information, and the indication information is used to instruct the terminal to download a second HAP package.
[0308] S1007: The server sends a first HAP packet to the terminal.
[0309] S1008: The application / service center sends a response 2 to the BMS, where the response 2 is used to indicate that the first HAP package of the first application has been downloaded.
[0310] For example, the application / service center calls back the installation-free interface of the BMS and executes the installation-free process, such as directly running the first HAP package of the first application.
[0311] S1009 , the BMS sends a response 1 to the AMS, where the response 1 is used to indicate that the first HAP package of the first application has been executed.
[0312] S1010, the AMS sends a startup response to the display screen to indicate that the startup is successful.
[0313] S1011, displaying a first interface on a display screen, where the first interface is generated based on a first HAP package of a first application.
[0314] Fig.11 The electronic device 1100 provided in the embodiment of the present application is a schematic diagram of the structure. The electronic device 1100 may be the server or terminal mentioned above. Fig.11As shown, the electronic device 1100 may include: one or more processors 1101; one or more memories 1102; a communication interface 1103, and one or more computer programs 1104, and the above-mentioned components may be connected via one or more communication buses 1105. The one or more computer programs 1104 are stored in the above-mentioned memories 1102 and are configured to be executed by the one or more processors 1101, and the one or more computer programs 1104 include instructions. For example, when the electronic device 1100 is the server mentioned above, the instructions may be used to execute the relevant steps of the server in the above corresponding embodiments, for example, Figure 6-Figure 10 For another example, when the electronic device 1100 is the terminal mentioned above, the instruction can be used to execute the relevant steps of the terminal in the above corresponding embodiment, for example, Figure 6-Figure 10 The communication interface 1103 is used to implement the communication between the electronic device 1100 and other devices, for example, the communication interface can be a transceiver.
[0315] In the embodiments provided by the present application, the method provided by the embodiments of the present application is introduced from the perspective of an electronic device (such as a mobile phone, etc.) as an execution subject. In order to implement the functions in the method provided by the embodiments of the present application, the electronic device may include a hardware structure and / or a software module, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0316] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc. In the absence of conflict, the solutions of the above embodiments can be used in combination.
[0317] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0318] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0319] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0320] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0321] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for downloading an installation-free application, characterized in that: Applied to a terminal, the method comprises: Sending a first request to a server, where the first request is used to request downloading of a first application, where the first application is an installation-free application; receiving a first application software package sent by the server, the first application software package being used to implement at least one function or interface of the first application, the first application software package including a configuration file, the configuration file including indication information, the indication information being used to indicate a second application software package, the second application software package being used to implement at least one function or interface of a second application; Sending a second request to the server according to the indication information, where the second request is used to request downloading of the second application software package; Receive the second application software package sent by the server.
2. The method according to claim 1, characterized in that The second application and the first application are the same application or different applications.
3. The method according to claim 2, characterized in that The second application is the same application as the first application, and the first application software package and the second application software package are used to implement different functions or interfaces in the same application.
4. The method according to claim 1, characterized in that The second application and the first application satisfy at least one of the following: The second application and the first application are from the same developer; or, The second application and the first application are pre-configured associated applications; or, The second application and the first application are applications of related types; or, The number of switching between the second application and the first application is greater than a preset number.
5. The method according to any one of claims 1 to 4, characterized in that: Sending a second request to the server includes: When the function or interface corresponding to the first application software package is opened, the second request is sent to the server.
6. The method according to any one of claims 1 to 5, characterized in that: Before sending the second request to the server, the method further includes: Outputting first prompt information, where the first prompt information is used to prompt whether to download the second application software package; A first confirmation instruction is received, where the first confirmation instruction is used to indicate confirmation of downloading the second application software package.
7. The method according to any one of claims 1 to 5, characterized in that: The instruction information is also used to instruct the terminal to download a third application software package, and before sending the second request to the server, further includes: outputting second prompt information, where the second prompt information is used to prompt whether to download the second application software package and the third application software package; receiving a second confirmation instruction, where the second confirmation instruction is used to indicate confirmation of downloading the second application software package; Sending a second request to the server includes: The second request is sent to the server, where the second request includes the package name of the second application software package but does not include the package name of the third application software package.
8. The method according to any one of claims 1 to 7, characterized in that: The indication information includes the package name of the second application software package.
9. The method according to claim 8, characterized in that The instruction information also includes: at least one of a package name of the second application, a first master-slave tag, and a second master-slave tag; The first master-slave mark is used to indicate whether the second application software package is a master package or a slave package of the first application software package; The second master-slave flag is used to indicate whether the second application is a master application or a slave application of the first application.
10. The method according to any one of claims 1 to 9, characterized in that: The first application software package is used to implement at least one function or interface of the first application, including: the first application software package is used to open the homepage of the first application.
11. The method according to any one of claims 1 to 10, characterized in that: The indication information is used to indicate a plurality of application software packages, the plurality of application software packages include the second application software package, and the second request is used to request downloading of the plurality of application software packages; The method further comprises: Receive other application software packages sent by the server, where the other application software packages are application software packages other than the second application software package among the multiple application software packages.
12. A method for downloading an installation-free application, characterized in that: Applied to a terminal, the method comprises: A first request sent to a server, wherein the first request is used to request downloading of a first application, and the first application is an installation-free application; receiving a first application software package and a second application software package sent by the terminal, wherein the first application software package is used to implement at least one function or interface of the first application, and the second application software package is used to implement at least one function or interface of the second application; The second application and the first application are different applications.
13. A method for downloading an installation-free application, characterized in that: Applied to a server, the method comprises: Receiving a first request sent by a terminal, where the first request is used to request downloading of a first application, where the first application is an installation-free application; Sending a first application software package to the terminal, the first application software package being used to implement at least one function or interface of the first application, the first application software package including a configuration file, the configuration file including indication information, the indication information being used to indicate a second application software package, the second application software package being used to implement at least one function or interface of a second application; receiving a second request sent by the terminal, where the second request is used to request downloading of the second application software package; Send the second application software package to the terminal.
14. The method according to claim 13, characterized in that The second application and the first application are the same application or different applications.
15. The method according to claim 14, characterized in that The second application is the same application as the first application, and the first application software package and the second application software package are used to implement different functions or interfaces in the same application.
16. The method according to claim 13, characterized in that The second application and the first application satisfy at least one of the following: The second application and the first application are from the same developer; or, The second application and the first application are pre-configured associated applications; or, The second application and the first application are applications of related types; or, The number of switching between the second application and the first application is greater than a preset number.
17. The method according to any one of claims 13 to 16, characterized in that: The indication information is further used to indicate a third application software package. The second request includes the package name of the second application software package but does not include the package name of the third application software package.
18. The method according to any one of claims 13 to 17, characterized in that: The indication information includes the package name of the second application software package.
19. The method according to claim 18, characterized in that The instruction information also includes: at least one of a package name of the second application, a first master-slave tag, and a second master-slave tag; The first master-slave mark is used to indicate whether the second application software package is a master package or a slave package of the first application software package; The second master-slave flag is used to indicate whether the second application is a master application or a slave application of the first application.
20. The method according to any one of claims 13 to 19, characterized in that: The first application software package is used to implement at least one function or interface of the first application, including: the first application software package is used to open the homepage of the first application.
21. The method according to any one of claims 13 to 20, characterized in that: The indication information is used to indicate a plurality of application software packages, the plurality of application software packages include the second application software package, and the second request is used to request downloading of the plurality of application software packages; the method further includes: Sending other application software packages to the terminal, where the other application software packages are application software packages other than the second application software package among the multiple application software packages.
22. A method for downloading an installation-free application, characterized in that: Applied to a server, the method comprises: Receiving a first request sent by a terminal, where the first request is used to request downloading of a first application, where the first application is an installation-free application; Determining, according to the first request, a first application software package of the first application, the first application software package being used to implement at least one function or interface of the first application, the first application software package including a configuration file, the configuration file including indication information, the indication information being used to indicate a second application software package, the second application software package being used to implement at least one function or interface of a second application; The first application software package and the second application software package are sent to the terminal according to the indication information.
23. A communication system, characterized in that: include: Servers and terminals; The terminal is used to perform the method steps as claimed in any one of claims 1 to 12; The server is used to perform the method steps as claimed in any one of claims 13 to 22.
24. An electronic device, characterized in that: include: a processor, a memory, and one or more programs; The one or more programs are stored in the memory, and the one or more programs include instructions, which, when executed by the processor, enable the electronic device to perform the method steps as described in any one of claims 1 to 22.
25. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 22.
26. A computer program product, characterized in that The method comprises a computer program which, when being run on a computer, causes the computer to execute the method according to any one of claims 1 to 22.
Citation Information
Cited By
Instant application downloading method and related device
EP4711917A1
