Application installation method and device

By directly writing data streams to the internal storage space during the application installation process, the problem of large storage space and long-term download and installation in the existing technology is solved, and an efficient and successful application installation process is achieved.

CN114489697BActive Publication Date: 2025-02-25VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210003122.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2025-02-25
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

The installation method of existing applications requires 1 times the size of the installation file in both the external and internal storage space, which leads to a large storage space and a long time to download and install, which can easily lead to installation failure.

Method used

By responding to the installation instruction, the first data stream sent by the server is received, and the first session is created, and the first data stream is written into the internal storage space of the target directory. Only the internal storage space is required to have a storage space of 1 times the installation file size. Avoid reading and writing operations of external storage space.

Benefits of technology

Reduce the used storage space, realize one-stop lossless space streaming installation, improve the overall success rate and speed of download and installation, and avoid installation failures and user experience problems caused by the lack of read and write permissions of external storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114489697B_ABST
    Figure CN114489697B_ABST
Patent Text Reader

Abstract

This application discloses an application installation method and apparatus, belonging to the field of computer technology. The application installation method includes: receiving an installation instruction for a target application; responding to the installation instruction, receiving a first data stream sent by a server and creating a first session; writing the first data stream to a target directory according to the first session; and installing the target application after all its installation files have been written to the target directory; wherein the first data stream is the data stream corresponding to the installation files; the first session includes write permissions to the target directory; and the target directory is located in the internal storage space of a target electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and specifically relates to a method and device for installing an application. Background Art

[0002] like Figure 1 As shown, the process of installing an application (Application, APP) on an electronic device such as a mobile terminal mainly includes: 1. Network download, downloading the installation file of the application from a CDN (Content Delivery Network), storing the installation file in the external storage space (ExternalStorage) 101 of the electronic device, and passing the storage path of the installation file in the external storage space 101 to the installation manager of the operating system; 2. Local copy, the installation manager copies the installation file from the external storage space 101 to the internal storage space (InternalStorage) 102 of the electronic device based on the storage path of the installation file in the external storage space 101, and then decompresses and installs it.

[0003] The existing application installation method requires storage space of 1 times the size of the installation file in both the external storage space and the internal storage space from download to installation completion. The storage space used is large and the total time spent on downloading and installing is long, which easily leads to installation failure. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method and device for installing an application, which can solve the problem that the storage space used is large and the total time consumed for downloading and installing is long.

[0005] In a first aspect, an embodiment of the present application provides a method for installing an application, the method comprising:

[0006] receiving installation instructions for a target application;

[0007] In response to the installation instruction, receiving a first data stream sent by the server and creating a first session;

[0008] writing the first data stream to a target directory according to the first session;

[0009] When all installation files of the target application are written into the target directory, installing the target application;

[0010] The first data stream is a data stream corresponding to the installation file; the first session includes permission to perform write operations on the target directory; and the target directory is located in an internal storage space of the target electronic device.

[0011] In a second aspect, an embodiment of the present application provides a device for installing an application, the device comprising:

[0012] An instruction receiving module, used for receiving an installation instruction for a target application;

[0013] An instruction response module, configured to respond to the installation instruction, receive a first data stream sent by the server, and create a first session;

[0014] a data writing module, configured to write the first data stream into a target directory according to the first session;

[0015] An application installation module, used to install the target application when all installation files of the target application are written into the target directory;

[0016] The first data stream is a data stream corresponding to the installation file; the first session includes permission to perform write operations on the target directory; and the target directory is located in the internal storage space of the target electronic device.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0018] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0019] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0020] In an embodiment of the present application, by responding to an installation instruction, receiving a first data stream sent by a server, and creating a first session, the first data stream is written to a target directory in the internal storage space of the electronic device according to the first session including the permission to perform write operations on the target directory. During the installation of the application, only the internal storage space requires storage space of 1 times the size of the installation file, which can reduce the storage space used, achieve one-stop lossless space streaming installation, improve the overall success rate of download and installation, and only perform a download operation once without having to perform a local copy operation, which can simplify the process, improve the overall speed from receiving the installation instruction to the completion of the installation, and reduce the total time consumed for download and installation. Furthermore, download and installation can be achieved without the need for read and write permissions for the external storage space, which can avoid the phenomenon of installation failure due to the lack of read and write permissions for the external storage space, and the phenomenon of poor user experience caused by prompting the user to authorize due to the lack of read and write permissions for the external storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic diagram of the installation process of an application provided by the prior art;

[0022] Figure 2 This is one of the flowcharts of the method for installing an application provided in an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of the installation process of the application provided in the embodiment of the present application;

[0024] Figure 4 This is the second flowchart of the method for installing an application provided in an embodiment of the present application;

[0025] Figure 5 It is a structural diagram of an installation device for an application provided in an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0027] Figure 7 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0030] The following is a detailed description of the installation method and device of the application provided in the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0031] Figure 2 This is one of the flow charts of the method for installing the application provided in the embodiment of the present application. Figure 2 Describe the installation method of the application provided in the embodiment of the present application. Figure 2 As shown, the method includes:

[0032] Step 201: Receive an installation instruction for a target application.

[0033] Optionally, the execution subject of the application installation method provided in the embodiment of the present application is an application installation device. The application installation device is a target electronic device. The application installation method provided in the embodiment of the present application is used to install the target application on the target electronic device.

[0034] The installation device of the application can be implemented in various forms. For example, the installation device of the application described in the embodiment of the present application may include mobile terminals such as mobile phones, smart phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), navigation devices, smart bracelets, smart hands, digital cameras, etc., and fixed terminals such as desktop computers, etc. Below, it is assumed that the installation device of the application is a mobile terminal. However, it will be understood by those skilled in the art that, in addition to components specifically for mobile purposes, the construction according to the embodiment of the present application can also be applied to fixed type terminals.

[0035] The target application is an application to be installed. The target application is specifically an application, which is not specifically limited in the embodiment of the present application.

[0036] Optionally, when a user needs to install a target application, an installation instruction may be input to an installation device of the target application for the target application.

[0037] Optionally, the installation instruction may be a touch input, voice input, gesture input or key input for the target application, or may be a first operation.

[0038] For example, the first operation input by the user may be: the user clicks on a target control on a target interface; the target control is used to trigger the installation device of the application to perform an operation of installing the target application. The target interface may be an interface of an application store type application for displaying information of the target application. The information of the target application may include attribute information such as the name, version number, and file size of the installation file of the target application.

[0039] Exemplarily, the gesture input may be any one of a single-click gesture, a sliding gesture, a pressure recognition gesture, a long-press gesture, an area change gesture, a double-press gesture, and a double-click gesture.

[0040] It is understood that the above-listed installation instructions are exemplary, that is, the present application embodiment includes but is not limited to the above-listed inputs. In actual implementation, the installation instructions may also include any other possible inputs, which may be determined according to actual use requirements, and the present application embodiment does not limit them.

[0041] Optionally, the installation instruction may also be an installation instruction initiated by an operating system of an installation device of the application.

[0042] Exemplarily, when the application's installation device is configured to automatically update the application when connected to a Wi-Fi network, the application's installation device may receive an update instruction (ie, an installation instruction) initiated by the operating system for a target application to install a new version of the target application.

[0043] The installation device of the application program may receive the above installation instruction.

[0044] Step 202: In response to the installation instruction, receive a first data stream sent by the server and create a first session.

[0045] The first data stream is a data stream corresponding to the installation file of the target application; the first session includes the permission to perform write operations on the target directory; and the target directory is located in the internal storage space of the target electronic device.

[0046] Optionally, after receiving the installation instruction, the installation device of the application program responds to the installation instruction. The response of the installation device of the application program to the installation instruction may include: receiving a first data stream sent by a server and creating a first session.

[0047] It should be noted that the embodiment of the present application does not specifically limit the order of receiving the first data stream sent by the server and creating the first session. That is, the step of receiving the first data stream sent by the server can be performed first, and then the step of creating the first session can be performed; the step of creating the first session can also be performed first, and then the step of receiving the first data stream sent by the server can be performed; the step of receiving the first data stream sent by the server and the step of creating the first session can also be performed in parallel.

[0048] Receiving the first data stream sent by the server may include:

[0049] Access the server based on the download address of the installation file of the target application by calling the API (Application Programming Interface) for network communication;

[0050] After successfully connecting to the server, the installation file of the target application is downloaded from the download address, and the first data stream output by the server is received.

[0051] The server may be a server in a CDN; the server stores installation files of the target application.

[0052] For the Android operating system, the installation file is an APK (Android application package) file; for the iOS operating system, the installation file is a file in ipa, pxl or deb format.

[0053] A first session including permission to perform write operations on the target directory may be created based on a session control mechanism (ie, Session mechanism) of the operating system.

[0054] Optionally, the first session may include multiple interfaces; at least one of the interfaces includes permission to perform write operations on the target directory, and the interface is used to perform write operations on the target directory.

[0055] Optionally, when the operating system of the target electronic device is an Android system, the target directory may be a data directory.

[0056] Optionally, when the operating system of the target electronic device is iOS, the target directory may be the Applications directory.

[0057] Step 203: According to the first session, write the first data stream into the target directory.

[0058] Optionally, according to the permission for performing a write operation on the target directory included in the first session, an operation of writing the first data stream is performed on the target directory through the first session.

[0059] Step 204: When all installation files of the target application are written into the target directory, install the target application.

[0060] Optionally, when it is determined that all installation files of the target application are written into the target directory, that is, all data streams corresponding to the target application are stored in the target directory, the target application is installed.

[0061] Optionally, in an Android system, the target application program may be parsed and installed according to all stored first data streams by calling an installation method in PackageManager (which may be used to install and uninstall APP).

[0062] Optionally, the target application can also be installed by calling the installation method of the system API. APIs can be some predefined functions that provide applications and developers with the ability to access a set of routines based on certain software or hardware. The API in the embodiment of the present application can install the target application by calling a specific installation service. For example, for the Android system, the target application can be installed by calling the Install Package Process installation service.

[0063] Figure 3 The following figure shows the installation process of the application provided in the embodiment of the present application. Figure 3 and Figure 1 It can be seen that in the embodiment of the present application, the installation file of the application is directly written to the internal storage space of the electronic device, which reduces the steps of reading and writing the external storage space of the electronic device and copying the installation file from the external storage space to the internal storage space.

[0064] The embodiment of the present application receives the first data stream sent by the server in response to the installation instruction, and creates a first session. According to the first session including the permission to perform write operations on the target directory, the first data stream is written into the target directory in the internal storage space of the electronic device. In the process of installing the application, only the internal storage space needs 1 times the storage space of the installation file size, which can reduce the storage space used, realize one-stop lossless space streaming installation, improve the overall success rate of download and installation, and only perform a download operation once without having to perform a local copy operation, which can simplify the process, improve the overall speed from receiving the installation instruction to the completion of the installation, and reduce the total time consumed for download and installation. Furthermore, download and installation can be realized without the need for read and write permissions of the external storage space, which can avoid the phenomenon of installation failure due to the lack of read and write permissions of the external storage space, and the phenomenon of poor user experience caused by prompting the user to authorize due to the lack of read and write permissions of the external storage space.

[0065] Optionally, receiving a first data stream sent by a server includes: receiving the first data stream and storing the first data stream in a buffer register.

[0066] Optionally, after receiving the first data stream, a buffer register (buffer) may be used to store the received first data stream.

[0067] It can be understood that the buffer register in the embodiment of the present application is an input buffer for temporarily storing the first data stream. The first data stream stored in the buffer register is waiting to be written into the target directory.

[0068] The embodiment of the present application can separate the operation of receiving the first data stream from the operation of writing the first data stream to the target directory by storing the received first data stream in a buffer register, thereby avoiding mutual influence between the above two operations, thereby increasing the speed of downloading the installation file of the target application from the server and the speed of writing the installation file of the target application to the target directory, and reducing the total time consumed in downloading and installation.

[0069] Optionally, writing the first data stream to the target directory according to the first session includes: writing the data in the buffer register to the target directory according to the first session at a first time interval.

[0070] Optionally, downloading the installation file of the target application requires a certain amount of time, and downloading and writing can be achieved based on the buffer register, that is, after the first data stream is stored in the buffer register, at every first time interval, according to the first session, the data in the buffer register is cyclically read and the read data is written to the target directory.

[0071] It is understandable that after the data in the buffer register is read, the buffer register is empty and can store new data.

[0072] The first time interval may be pre-set according to actual conditions. The specific value of the first time interval is not specifically limited in the embodiment of the present application.

[0073] Optionally, when the installation file of the target application is a compressed file (for example, compressed using GZIP), and when the first data stream written to the target directory meets the decompression conditions, the partial data that meets the decompression conditions can be decompressed first without having to wait until all the installation files of the target application are written to the target directory before decompressing them. This allows downloading, writing, and decompression to be achieved, further reducing the total time spent on downloading and installation and improving user experience.

[0074] The embodiment of the present application writes the data in the buffer register to the target directory at a first time interval and according to the first session, thereby separating the operation of receiving the first data stream from the operation of writing the first data stream to the target directory, avoiding mutual influence between the above two operations, thereby increasing the speed of downloading the installation file of the target application from the server and the speed of writing the installation file of the target application to the target directory, and reducing the total time consumed in downloading and installation.

[0075] Optionally, creating the first session includes: creating the first session based on the first application.

[0076] The first application is a target type application.

[0077] Optionally, the first session may be created based on an application of a target type. The type of the first application is the target type.

[0078] Optionally, the target type of application may be an application that comes with the operating system of the application installation device and is used to install the application.

[0079] Optionally, the first application may be any application of the target type.

[0080] Exemplarily, when the operating system of the application installation device is an Android system, the first application may be an installation manager PackageInstaller.

[0081] PackageInstaller is the default application of the Android system, which is used to interactively install ordinary package files. PackageInstaller can provide a user interface to manage applications (APP) or package files (APK).

[0082] The embodiment of the present application creates a first session through an application of the target type, without calling other applications to create sessions, thereby reducing resource overhead.

[0083] In order to facilitate the understanding of the above embodiments of the present application, the installation process of the application is described below through an embodiment. In the embodiment of the present application, the operating system of the target electronic device is described as an Android system as an example.

[0084] like Figure 4 As shown, after receiving the installation instruction, the installation process of the target application may include the following steps:

[0085] Step 401: Based on the address of the APK, obtain the network IO stream.

[0086] The address of the APK of the target application is requested through the API for network communication. After the network connection is successful, the IO stream corresponding to the APK (referred to as "network IO stream") can be obtained based on the communication network. The network IO stream is the first data stream.

[0087] Step 402: Create a first session and open a file channel in the data directory.

[0088] Create a Session (i.e., the first session) through the CreateSession interface; create a SessionId (i.e., the id of the first session) based on the SessionID interface of the first session; open the file channel of the data directory based on the SessionId and the OpenWrite interface of the first session. The Android system returns the session object of the first session. Based on the OutputStream of the file channel, the upper-layer application can write files to the system directory (including the data directory). For the first session, the network IO stream is InputStream.

[0089] It should be noted that step 401 may be performed first and then step 402, or step 402 may be performed first and then step 401, or step 401 and step 402 may be performed simultaneously.

[0090] Step 403: connect the network IO stream and the first session IO stream, and write the read buffer of the network IO stream into the data directory through the first session.

[0091] Read the buffer of the network IO stream and write the read buffer to the data directory through the first session. This process is to read the buffer of the network IO stream in a loop to achieve reading and writing at the same time. Write the read buffer to the data directory through the first session, which is achieved through the fsync interface of the first session.

[0092] Step 404: After the network IO stream is read, the commit interface of the first session is executed.

[0093] After the network IO stream is read, the first session also completes writing the APK to the data directory, and the commit interface of the first session is executed, triggering the Android system to execute the APK parsing step and install the target application.

[0094] It should be noted that the execution subject of the application installation method provided in the embodiment of the present application may be the application installation device, or the control module in the application installation device for executing the application installation method. In the embodiment of the present application, the application installation device provided in the embodiment of the present application is described by taking the application installation method executed by the application installation device as an example.

[0095] Figure 5 is a schematic diagram of the structure of the installation device of the application provided in the embodiment of the present application. Figure 5 As shown, the device includes an instruction receiving module 501, an instruction response module 502, a data writing module 503 and an application installation module 504, wherein:

[0096] The instruction receiving module 501 is used to receive the installation instruction for the target application program;

[0097] The instruction response module 502 is used to receive the first data stream sent by the server in response to the installation instruction and create a first session;

[0098] The data writing module 503 is used to write the first data stream into the target directory according to the first session;

[0099] An application installation module 504, used to install the target application when all installation files of the target application are written into the target directory;

[0100] The first data stream is a data stream corresponding to the installation file; the first session includes permission to perform write operations on the target directory; and the target directory is located in the internal storage space of the target electronic device.

[0101] Optionally, the instruction receiving module 501, the instruction responding module 502, the data writing module 503 and the application installing module 504 are electrically connected in sequence.

[0102] The instruction receiving module 501 may be used to receive an installation instruction input by a user or an installation instruction initiated by an operating system.

[0103] The instruction response module 502 may respond to the installation instruction. The response of the instruction response module 502 to the installation instruction may include: receiving a first data stream sent by the server and creating a first session.

[0104] The data writing module 503 may perform an operation of writing the first data stream to the target directory through the first session according to the permission for performing the write operation on the target directory included in the first session.

[0105] The application installation module 504 may install the target application when it is determined that all installation files of the target application are written into the target directory, that is, all data streams corresponding to the target application are stored in the target directory.

[0106] Optionally, the instruction response module 502 may include:

[0107] The data receiving unit is used to receive a first data stream and store the first data stream in a buffer register.

[0108] Optionally, the data writing module 503 may be specifically configured to write the data in the buffer register into the target directory at a first time interval and according to the first session.

[0109] Optionally, the instruction response module 502 may include:

[0110] A session creation unit, configured to create a first session based on the first application;

[0111] The first application is a target type application.

[0112] The embodiment of the present application receives the first data stream sent by the server in response to the installation instruction, and creates a first session. According to the first session including the permission to perform write operations on the target directory, the first data stream is written into the target directory in the internal storage space of the electronic device. In the process of installing the application, only the internal storage space needs 1 times the storage space of the installation file size, which can reduce the storage space used, realize one-stop lossless space streaming installation, improve the overall success rate of download and installation, and only perform a download operation once without having to perform a local copy operation, which can simplify the process, improve the overall speed from receiving the installation instruction to the completion of the installation, and reduce the total time consumed for download and installation. Furthermore, download and installation can be realized without the need for read and write permissions of the external storage space, which can avoid the phenomenon of installation failure due to the lack of read and write permissions of the external storage space, and the phenomenon of poor user experience caused by prompting the user to authorize due to the lack of read and write permissions of the external storage space.

[0113] The installation device of the application in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0114] The installation device of the application in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0115] The installation device of the application provided in the embodiment of the present application can realize Figures 2 to 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0116] Alternatively, if Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the embodiment of the installation method of the above-mentioned application is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0117] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0118] Figure 7 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application.

[0119] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.

[0120] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0121] The processor 710 is used to receive an installation instruction for a target application;

[0122] The processor 710 is further configured to receive, in response to the installation instruction, a first data stream sent by the server and create a first session;

[0123] The processor 710 is further configured to write the first data stream into a target directory according to the first session;

[0124] The processor 710 is further configured to install the target application when all installation files of the target application are written into the target directory;

[0125] The first data stream is a data stream corresponding to the installation file; the first session includes permission to perform write operations on the target directory; and the target directory is located in the internal storage space of the target electronic device.

[0126] The embodiment of the present application receives the first data stream sent by the server in response to the installation instruction, and creates a first session. According to the first session including the permission to perform write operations on the target directory, the first data stream is written into the target directory in the internal storage space of the electronic device. In the process of installing the application, only the internal storage space needs 1 times the storage space of the installation file size, which can reduce the storage space used, realize one-stop lossless space streaming installation, improve the overall success rate of download and installation, and only perform a download operation once without having to perform a local copy operation, which can simplify the process, improve the overall speed from receiving the installation instruction to the completion of the installation, and reduce the total time consumed for download and installation. Furthermore, download and installation can be realized without the need for read and write permissions of the external storage space, which can avoid the phenomenon of installation failure due to the lack of read and write permissions of the external storage space, and the phenomenon of poor user experience caused by prompting the user to authorize due to the lack of read and write permissions of the external storage space.

[0127] Optionally, the processor 710 is further configured to receive a first data stream and store the first data stream in a buffer register.

[0128] Optionally, the processor 710 is further configured to write the data in the buffer register into the target directory at a first time interval and according to the first session.

[0129] Optionally, the processor 710 is further configured to create a first session based on the first application;

[0130] The first application is a target type application.

[0131] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 709 can be used to store software programs and various data, including but not limited to target applications and operating systems. The processor 710 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and target applications, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 710.

[0132] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the embodiment of the installation method of the above-mentioned application is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0133] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0134] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned application installation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0135] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0136] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0138] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for installing an application, characterized in that: include: receiving installation instructions for a target application; In response to the installation instruction, receiving a first data stream sent by the server and creating a first session; writing the first data stream to a target directory according to the first session; When all installation files of the target application are written into the target directory, installing the target application; The first data stream is a data stream corresponding to the installation file; the first session includes permission to perform write operations on the target directory; and the target directory is located in an internal storage space of the target electronic device.

2. The method for installing an application according to claim 1, characterized in that: The receiving server sends a first data stream, comprising: The first data stream is received and stored in a buffer register.

3. The method for installing an application according to claim 2, characterized in that: The step of writing the first data stream into a target directory according to the first session includes: At a first time interval, according to the first session, the data in the buffer register is written into the target directory.

4. The method for installing an application according to claim 1, characterized in that: The creating the first session comprises: Based on the first application, create the first session; The first application is a target type application.

5. An application installation device, characterized in that: include: An instruction receiving module, used for receiving an installation instruction for a target application; An instruction response module, configured to respond to the installation instruction, receive a first data stream sent by the server, and create a first session; a data writing module, configured to write the first data stream into a target directory according to the first session; An application installation module, used to install the target application when all installation files of the target application are written into the target directory; The first data stream is a data stream corresponding to the installation file; the first session includes permission to perform write operations on the target directory; and the target directory is located in the internal storage space of the target electronic device.

6. The application installation device according to claim 5, characterized in that: The instruction response module includes: The data receiving unit is used to receive the first data stream and store the first data stream in a buffer register.

7. The application installation device according to claim 6, characterized in that: The data writing module is specifically configured to write the data in the buffer register into the target directory at a first time interval and according to the first session.

8. The application installation device according to claim 5, characterized in that: The instruction response module includes: A session creation unit, configured to create the first session based on the first application; The first application is a target type application.

9. An electronic device, characterized in that: The invention comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for installing the application program as described in any one of claims 1 to 4.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the application installation method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • An application program installation method and a mobile terminal

    CN109086054A

  • Application program installation method and device

    CN112052018A