An Application Installation Method, Device, Electronic Device, and Storage Medium
By decompressing the application installation package to obtain attribute information and judge the consistency of authorization information and device configuration, the installation judgment problem when Android devices cannot be connected to the Internet is solved and the user experience is improved.
Patent Information
- Application Number
- CN202210327616.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-03-30
AI Technical Summary
In the prior art, Android devices cannot determine whether to allow application installation when they cannot be connected to the Internet, resulting in poor user experience and need to be updated in the black and white list to replace it, affecting the stability and security of the device.
By decompressing the application installation package, obtaining attribute information, determining the consistency between the authorization information and the device configuration information, and when the time verification condition is not met, it is determined whether the application is allowed to be installed based on the offline time and the last verification time.
It realizes that whether application installation can be allowed even when electronic devices cannot be connected to the Internet, improves user experience, and solves the problem of networking and updating the black and white list in the existing technology.
Smart Images

Figure CN114895926B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computer technology, and in particular, to an application installation method, apparatus, electronic device, and storage medium. Background Art
[0002] An Android application package (APK) is a file format for application packages used by the Android operating system for distributing and installing mobile applications and middleware.
[0003] To ensure the stability and security of the device, it is necessary to control the installation of APKs. Most existing technologies use the following three methods: First, most Android devices will remind of unknown sources when installing APKs downloaded from non-application markets. Even if the download and update are popped up internally by the APK itself, which is equivalent to an update to the function of the APK itself issued by the official publisher of the APK, the device will still prompt that the APK is of unknown source. Therefore, in current application market management, each APK is authenticated, which easily causes the APK downloaded from the developer's official website to be recognized as an unknown source, and updating the already installed APK will also prompt an unknown source, prompting to download from the application mall, while the latest version of the application mall has not been put on the shelves, resulting in a poor user experience. Second, control whether an APK can be installed by building in a black and white list, but modifying the black and white list must be done while the device is connected to the network for replacement. Third, to ensure system stability and security, all non-factory-built-in APKs are prohibited from being installed, but it is easy to cause auxiliary APKs that are needed to not be easily installed. Summary of the Invention
[0004] Embodiments of the present application provide an application installation method, apparatus, electronic device, and storage medium, which can determine whether to allow the installation of an application even when the electronic device is not connected to the network, improving the user experience.
[0005] In a first aspect, an embodiment of the present application provides an application installation method, which includes:
[0006] Obtain an installation package of an application, and decompress the installation package to obtain attribute information of the installation package;
[0007] Obtain authorization information of the application from the attribute information, and when the authorization information is consistent with the configuration information of the electronic device, determine whether the electronic device meets a time verification condition;
[0008] When the time verification condition is not met, determine the allowed offline duration, offline boot duration, and the most recent verification time of the electronic device;
[0009] When the duration calculated according to the allowed offline duration, the authorization information, and the last verification time is less than the offline startup duration, install the application program in the electronic device based on the installation package.
[0010] In a second aspect, an embodiment of the present application provides an application program installation device, which includes:
[0011] An attribute information determination module, configured to obtain an installation package of an application program, and decompress the installation package to obtain attribute information of the installation package;
[0012] A time verification judgment module, configured to obtain the authorization information of the application program from the attribute information, and determine whether the electronic device meets the time verification condition when the authorization information is consistent with the configuration information of the electronic device;
[0013] A verification time determination module, configured to determine the allowed offline duration, the offline startup duration, and the last verification time of the electronic device when the time verification condition is not met;
[0014] An application program installation module, configured to install the application program in the electronic device based on the installation package when the duration calculated according to the allowed offline duration, the authorization information, and the last verification time is less than the offline startup duration.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes:
[0016] One or more processors;
[0017] A storage device, configured to store one or more programs;
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the application program installation method described in any embodiment of the present application.
[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the application program installation method described in any embodiment of the present application.
[0020] The embodiments of the present application provide a method, apparatus, electronic device, and storage medium for installing an application program. The method includes: obtaining an installation package of the application program, decompressing the installation package to obtain attribute information of the installation package; obtaining authorization information of the application program from the attribute information, and determining whether the electronic device meets a time verification condition when the authorization information is consistent with the configuration information of the electronic device; when the time verification condition is not met, determining the allowed offline duration, offline startup duration, and the most recent verification time of the electronic device; when the duration calculated based on the allowed offline duration, authorization information, and the most recent verification time is less than the offline startup duration, installing the application program in the electronic device based on the installation package. The present application determines whether the electronic device is currently in a disconnected network state by determining whether the electronic device meets the time verification condition. When in a disconnected network state, it is determined whether to allow the installation of the application program based on the allowed offline duration, offline startup duration, and the most recent verification time. The present application solves the problem in the prior art that the electronic device needs to be connected to the network to update the black and white lists to allow the installation of the application program, and can determine whether to allow the installation of the application program even when the electronic device is unable to connect to the network, improving the user experience.
[0021] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings are used to better understand the solution and do not limit the present application. Among them:
[0023] Figure 1 is the first flowchart of a method for installing an application program provided by an embodiment of the present application;
[0024] Figure 2 is the second flowchart of a method for installing an application program provided by an embodiment of the present application;
[0025] Figure 3 is the structural diagram of an apparatus for installing an application program provided by an embodiment of the present application;
[0026] Figure 4 is the block diagram of an electronic device for implementing a method for installing an application program according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts shall fall within the protection scope of this application.
[0028] Embodiment 1
[0029] Figure 1 FIG. 1 is a first flowchart of an application installation method provided by an embodiment of this application. This embodiment is applicable to the situation of managing whether an application on an electronic device is installed. An application installation method provided by this embodiment can be executed by an application installation device provided by an embodiment of this application. The device can be implemented in software and / or hardware and integrated in the electronic device that executes this method. Optionally, the electronic device can be a mobile phone, a tablet computer, a computer, a wearable device (such as a watch), etc.
[0030] See Figure 1 , the method of this embodiment includes but is not limited to the following steps:
[0031] S110. Obtain the installation package of the application, and decompress the installation package to obtain the attribute information of the installation package.
[0032] Among them, the attribute information may include basic information such as the package name information of the installation package of the electronic device.
[0033] In the embodiment of this application, when an application needs to be installed on an electronic device, first obtain the installation package of the application, and then decompress the installation package to obtain the attribute information of the installation package.
[0034] Further, before decompressing the installation package to obtain the attribute information of the installation package, it further includes: determining whether the application is an application already existing in the electronic device and installed by its own program; if so, install the installation package in the electronic device; if not, trigger the operation of decompressing the installation package to obtain the attribute information of the installation package.
[0035] In the embodiment of this application, when it is detected that a new application needs to be installed, first determine whether the application already exists in the electronic device. If so, there is no need to determine whether to allow the installation of the application on this electronic device, and the application should be directly installed.
[0036] Further, after decompressing the installation package to obtain the attribute information of the installation package, it further includes: determining whether the format of the attribute information meets the standard format requirements. If it does not meet the requirements, it indicates that the application installation package is not authorized by the official and may be forged by other parties after decryption. In this case, the execution of installing the application program in the electronic device based on the installation package is refused.
[0037] In the embodiment of the present application, if the format of the attribute information meets the standard format requirements, it indicates that the application installation package is authorized by the official rather than forged by other parties after decryption. In this case, the installation of the application program in the electronic device based on the installation package is allowed.
[0038] S120. Obtain the authorization information of the application program from the attribute information, and determine whether the electronic device meets the time verification condition when the authorization information is consistent with the configuration information of the electronic device.
[0039] In the embodiment of the present application, the attribute information may further include the authorization information of the application program. The authorization information includes the model, version number, etc. of the device allowed to install the application program. After decompressing the installation package to obtain the attribute information of the installation package, obtain the authorization information of the application program from the attribute information.
[0040] Optionally, it is possible to determine whether to allow installing the application program in this electronic device by obtaining the configuration information (such as model, version number) in the electronic device. When the authorization information in the attribute information is inconsistent with the configuration information of the electronic device, the installation of the application program in this electronic device is refused. When the authorization information is consistent with the configuration information of the electronic device, it is necessary to further determine whether the electronic device meets the time verification condition. The time verification condition refers to whether the electronic device is connected to the time server. If it is connected, the electronic device meets the time verification condition, indicating that the electronic device is currently in an online state.
[0041] S130. When the time verification condition is not met, determine the allowed offline duration, offline startup duration, and the last verification time of the electronic device.
[0042] In the embodiment of the present application, if the electronic device does not meet the time verification condition, it indicates that the electronic device is not connected to the time server, and the electronic device is currently in a time anomaly (i.e., a situation of being disconnected from the network). The possible reasons are: the electronic device has run out of power and has not synchronized the time through the network, or the time has been modified after being disconnected from the network. At this time, determine the allowed offline duration, offline startup duration, and the last verification time of the electronic device from the time partition of the electronic device.
[0043] Among them, the time partition is an area where time-related information is recorded and is not allowed to be modified by users. The time partition is used to record time information such as the current time, time difference (the time difference is defaulted to zero), power-on duration, power-on times, the most recent verification time, the most recent power-on time, the most recent power-off time, and whether the battery is abnormal. Under normal operation of the electronic device, the current time and power-on time in the time partition are updated at fixed intervals (such as fifteen minutes). When the electronic device is just powered on, the recorded time also needs to be refreshed. Specifically: when it is detected that the electronic device is powered on, check whether the current time in the time partition is later than the system time. If it is later, assign the time in the time partition to the system time and mark the battery as abnormal at the same time; if it is not later, update the system time to the time partition.
[0044] Further, before determining the allowed offline duration, offline power-on duration, and the most recent verification time of the electronic device, it includes: determining whether the automatic time correction function of the electronic device is normal; if it is not normal, trigger the operation of determining the allowed offline duration, offline power-on duration, and the most recent verification time of the electronic device.
[0045] In the embodiment of the present application, before determining whether the electronic device is in a time abnormal situation, first determine whether the automatic time correction function of the electronic device is normal (i.e., another situation in the offline state). When the automatic time correction function is not normal, then determine whether it meets the time abnormal situation.
[0046] It should be noted that when the electronic device meets the abnormal automatic time correction function or meets the time abnormal situation, it means that the electronic device is currently in the offline state.
[0047] S140: When the duration calculated based on the allowed offline duration, authorization information, and the most recent verification time is less than the offline power-on duration, install the application program in the electronic device based on the installation package.
[0048] In the embodiment of the present application, when the electronic device is currently in a time abnormal situation, at this time, the time is not used as the standard for allowing installation. Calculate the duration based on the allowed offline duration, authorization information, and the most recent verification time. Among them, the authorization information also includes the offline authorization period and the encryption time. The offline authorization end time can be calculated based on the offline authorization period and the encryption time. The formula for the duration can be: (offline authorization end time - the most recent verification time) / offline authorization period * allowed offline duration. When this duration is less than the offline power-on duration, allow the installation of the application program in the electronic device; when this duration is not less than the offline power-on duration, reject the installation of the application program in the electronic device.
[0049] Optionally, the offline duration can be set. When the offline duration of the electronic device is less than the allowed offline duration, allow the installation of the application program in the electronic device.
[0050] The technical solution provided in this embodiment obtains the installation package of the application program, extracts the installation package to obtain the attribute information of the installation package; obtains the authorization information of the application program from the attribute information, and determines whether the electronic device meets the time verification condition when the authorization information is consistent with the configuration information of the electronic device; when the time verification condition is not met, determine the allowed offline duration, offline startup duration and the last verification time of the electronic device; when the duration calculated based on the allowed offline duration, authorization period and the last verification time is less than the offline startup duration, install the application program in the electronic device based on the installation package. This application determines whether the electronic device is currently in a disconnected network state by judging whether the electronic device meets the time verification condition. When in a disconnected network state, it judges whether to allow the installation of the application program through the allowed offline duration, offline startup duration and the last verification time. This application solves the problem in the prior art that the electronic device needs to be connected to the network to update the black and white lists to allow the installation of the application program. It can download and install the application program from the official website without real-time updating of the application mall, and can also judge whether to allow the installation of the application program when the electronic device is unable to connect to the network, improving the user experience.
[0051] Embodiment Two
[0052] Figure 2 It is the second process schematic diagram of an application program installation method provided by an embodiment of the present application. The embodiment of the present application is optimized on the basis of the above embodiment. Specifically, the optimization is that this embodiment explains in detail the process of judging whether to allow the installation of the application program when the electronic device is connected to the network.
[0053] See Figure 2 , the method of this embodiment includes but is not limited to the following steps:
[0054] S210. Obtain the installation package of the application program, and extract the installation package to obtain the attribute information of the installation package.
[0055] Among them, the attribute information may include basic information such as the package name information of the installation package of the electronic device.
[0056] In the embodiment of the present application, when it is necessary to install an application program on the electronic device, first obtain the installation package of the application program, and then extract the installation package to obtain the attribute information of the installation package.
[0057] It should be noted that this application adds attribute information at a position that does not affect the installation and use of the installation package of the application program.
[0058] Preferably, the attribute information can be encrypted, that is, the decompressed installation package contains encrypted attribute information, and the encrypted attribute information needs to be decrypted to obtain the attribute information. The encryption process of the attribute information is completed by the background that manages the installation application. Specifically, the background that manages the installation application first verifies the authorization requirements. After passing the verification, it adds attribute information such as the encryption time, authorization period, allowed offline duration, and the model and version number of the device allowed to install the application to the installation package, and encrypts the attribute information.
[0059] Preferably, it can be determined whether the package name information of the installation package in the attribute information is consistent with the actual package name information of the application. When the package name information of the installation package is inconsistent with the actual package name information, the execution of installing the application in the electronic device based on the installation package is refused.
[0060] S220. Obtain the authorization information of the application from the attribute information, and when the authorization information is consistent with the configuration information of the electronic device, determine whether the electronic device meets the time verification condition.
[0061] In the embodiment of the present application, the attribute information may further include the authorization information of the application. The authorization information includes the model, version number, etc. of the device allowed to install the application. After decompressing the installation package to obtain the attribute information of the installation package, obtain the authorization information of the application from the attribute information.
[0062] Optionally, it can be determined whether to allow installing the application in this electronic device by obtaining the configuration information (such as model, version number) in the electronic device. When the authorization information in the attribute information is inconsistent with the configuration information of the electronic device, refuse to install the application in this electronic device. When the authorization information is consistent with the configuration information of the electronic device, it is necessary to further determine whether the electronic device meets the time verification condition. The time verification condition refers to whether the electronic device is connected to the time server. If connected, the electronic device meets the time verification condition, indicating that the electronic device is currently in an online state.
[0063] Further, before obtaining the authorization information of the application from the attribute information, it further includes: determining whether the electronic device is connected to the verification server; if connected, sending the attribute information to the verification server so that the verification server determines whether to install the application in the electronic device based on the attribute information; if not connected, triggering the step of obtaining the authorization information of the application from the attribute information.
[0064] S230. When the time verification condition is met, obtain the encryption time and authorization period of the application from the authorization information, and determine the time authorization period according to the encryption time and authorization period.
[0065] Among them, the authorization information includes the authorization period and also includes the encryption time.
[0066] In the embodiment of the present application, if the electronic device meets the time verification condition, it indicates that the electronic device is connected to the time server and the electronic device is currently in an online state. At this time, obtain the encryption time and authorization period of the application program from the authorization information. The encryption time can be the authorization start time. Add the authorization period to the encryption time to obtain the authorization end time. The time period between the authorization start time and the authorization end time is the time authorization period.
[0067] Furthermore, before determining the allowed offline duration, offline boot duration, and the most recent verification time of the electronic device, it includes: determining whether the automatic time correction function of the electronic device is normal; if it is normal, trigger the operation of obtaining the encryption time and authorization period of the application program from the authorization information and determining the time authorization period according to the encryption time and authorization period; if it is not normal, trigger the operation of determining the allowed offline duration, offline boot duration, and the most recent verification time of the electronic device.
[0068] In the embodiment of the present application, if the electronic device does not meet the time verification condition, it indicates that the electronic device is not connected to the time server. At this time, it is also necessary to determine whether the automatic time correction function of the electronic device is normal. If it is normal, still judge whether to install the application program on this electronic device according to the electronic device being currently in an online state. If it is not normal, then judge whether to install the application program on this electronic device according to the electronic device being currently in an offline state.
[0069] Optionally, the offline time criteria include any one of: the most recent verification time is later than the boot time of the electronic device, the most recent verification time is within the past day, and the battery flag of the electronic device is normal.
[0070] S240. When the current time of the time server is within the time authorization period, install the application program on the electronic device based on the installation package.
[0071] In the embodiment of the present application, if the electronic device meets the time verification condition, it indicates that the electronic device is connected to the time server. If the time authorization period is not permanent, it is necessary to judge whether installation is allowed through the current time. Then obtain the current time from the time server and judge whether the current time is within the time authorization period. If the current time is within the time authorization period, install the application program on the electronic device based on the installation package.
[0072] Optionally, if the current time is not within the time authorization period, it indicates that the authorization time for installing the application program has expired, and reject installing the application program on the electronic device based on the installation package.
[0073] To ensure that the current time in the time server is accurate and to avoid installing applications by modifying the system time (i.e., the current time), relevant methods for preventing the modification of the system time need to be designed. Specifically: when it is detected that the system time is modified, it is determined whether the electronic device is connected to the time server. If the electronic device is connected to the time server, it is further determined whether the modified time is consistent with the current time in the time server. If they are consistent, the system time is modified, and at the same time, the time difference in the time partition is set to the default value, the last verification time is updated, the boot duration and the restart count are cleared. If they are not consistent, the system time is modified, and at the same time, the time in the time partition is updated, the time difference is recorded, the last verification time is updated, the boot duration and the restart count are cleared. If the electronic device is not connected to the time server, it is further determined whether the modified time is newer than the time in the time partition. If it is newer, the time partition is updated. If it is not newer, only the system time is updated, the time in the time partition is not updated, and the time difference is recorded.
[0074] The technical solution provided in this embodiment obtains the installation package of the application program, extracts the attribute information of the installation package by decompressing the installation package; obtains the authorization information of the application program from the attribute information, and determines whether the electronic device meets the time verification condition when the authorization information is consistent with the configuration information of the electronic device; when the time verification condition is met, obtains the encrypted time and the authorization period of the application program from the authorization information, and determines the time authorization period according to the encrypted time and the authorization period; when the current time of the time server is within the time authorization period, installs the application program in the electronic device based on the installation package. This application determines whether the electronic device is currently in an online state by determining whether the electronic device meets the time verification condition. When in an online state, the time authorization period is determined by the encrypted time and the authorization period. When the current time is within the time authorization period, the application program is installed in the electronic device based on the installation package. This application can solve the problem that the APK downloaded from the developer's official website is recognized as an unknown source in the prior art, and can download and install the application program from the official website without real-time updating by the application mall, improving the user experience.
[0075] Embodiment III
[0076] Figure 3 is a schematic structural diagram of an application program installation device provided in an embodiment of the present application, as Figure 3 shown. The device 300 may include:
[0077] An attribute information determination module 310, configured to obtain the installation package of the application program, and extract the attribute information of the installation package by decompressing the installation package.
[0078] A time verification judgment module 320, configured to obtain the authorization information of the application program from the attribute information, and determine whether the electronic device meets the time verification condition when the authorization information is consistent with the configuration information of the electronic device.
[0079] A verification time determination module 330, configured to determine the allowed offline duration, the offline startup duration, and the most recent verification time of the electronic device when the time verification condition is not met.
[0080] An application program installation module 340, configured to install the application program in the electronic device based on the installation package when the duration calculated according to the allowed offline duration, the authorization information, and the most recent verification time is less than the offline startup duration.
[0081] Further, the above verification time determination module 330 is further configured to obtain the encryption time and the authorization period of the application program from the authorization information when the time verification condition is met, and determine the time authorization period according to the encryption time and the authorization period.
[0082] Further, the above application program installation module 340 is further configured to install the application program in the electronic device based on the installation package when the current time of the time server is within the time authorization period.
[0083] Further, the above application program installation device may further include: an offline time judgment module;
[0084] The offline time judgment module is configured to judge whether the automatic time correction function of the electronic device is normal before determining the allowed offline duration, the offline startup duration, and the most recent verification time of the electronic device; if it is normal, trigger the operation of obtaining the encryption time and the authorization period of the application program from the authorization information and determining the time authorization period according to the encryption time and the authorization period; if it is not normal, trigger the operation of determining the allowed offline duration, the offline startup duration, and the most recent verification time of the electronic device.
[0085] Optionally, the offline time standard includes any one of: the most recent verification time is later than the startup time of the electronic device, the most recent verification time is within the past day, and the battery flag bit of the electronic device is normal.
[0086] Further, the above application installation module 340 is further configured to determine whether the electronic device is connected to the verification server before obtaining the authorization information of the application from the attribute information; if connected, send the attribute information to the verification server, so that the verification server determines whether to install the application on the electronic device based on the installation package according to the attribute information; if not connected, trigger the step of obtaining the authorization information of the application from the attribute information.
[0087] Further, the above application installation module 340 is further configured to determine whether the format of the attribute information conforms to the standard format requirements after decompressing the installation package to obtain the attribute information of the installation package; if not, reject the execution of installing the application on the electronic device based on the installation package.
[0088] Further, the above application installation module 340 is further configured to determine whether the application is an existing application in the electronic device and is installed by its own program before decompressing the installation package to obtain the attribute information of the installation package; if so, install the installation package on the electronic device; if not, trigger the operation of decompressing the installation package to obtain the attribute information of the installation package.
[0089] The application installation device provided in this embodiment can be applied to the application installation method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0090] Embodiment 4
[0091] Figure 4 is a block diagram of an electronic device for implementing an application installation method according to an embodiment of the present application, Figure 4 showing a block diagram of an exemplary electronic device suitable for implementing the embodiments of the present application. Figure 4 The electronic device shown is merely an example and should not impose any limitations on the functions and application scope of the embodiments of the present application. Such an electronic device can typically be a smart phone, a tablet computer, a laptop computer, a vehicle-mounted terminal, and a wearable device, etc.
[0092] As Figure 4 shown, the electronic device 400 is presented in the form of a general-purpose computing device. The components of the electronic device 400 may include, but are not limited to: one or more processors or processing units 416, a memory 428, and a bus 418 connecting different system components (including the memory 428 and the processing unit 416).
[0093] The bus 418 represents one or more of several types of bus architectures, including a memory bus or memory controller, a peripheral bus, an Accelerated Graphics Port, a processor, or a local bus using any of the various bus architectures. By way of example, and not limitation, these architectures include the Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0094] The electronic device 400 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 400, including both volatile and nonvolatile media, removable and non-removable media.
[0095] The memory 428 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. The electronic device 400 may further include other removable / non-removable, volatile / nonvolatile computer system storage media. By way of example only, a storage system 434 can be provided for reading from and writing to non-removable, nonvolatile magnetic media ( Figure 4 not shown and typically called a "hard disk drive"). Although Figure 4 not shown in the figure, a disk drive for reading from and writing to a removable nonvolatile disk (e.g., a "floppy disk"), and an optical disk drive for reading from and writing to a removable nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) can be provided. In these cases, each drive can be connected to the bus 418 by one or more data media interfaces. The memory 428 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of the embodiments of the present application.
[0096] A program / utility 440 having a set (at least one) of program modules 442 can be stored, for example, in the memory 428, and such program modules 442 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. The program modules 442 generally carry out the functions and / or methods described in the embodiments of the present application.
[0097] The electronic device 400 can also communicate with one or more external devices 414 (such as a keyboard, a pointing device, a display 424, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 400, and / or communicate with any device that enables the electronic device 400 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through an input / output (I / O) interface 422. Moreover, the electronic device 400 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 420. As Figure 4 shown, the network adapter 420 communicates with other modules of the electronic device 400 through a bus 418. It should be understood that although Figure 4 not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0098] The processing unit 416 executes various functional applications and data processing by running programs stored in the memory 428, such as implementing the application installation method provided in any embodiment of the present application.
[0099] Embodiment Five
[0100] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program (or computer-executable instructions) is stored. When the program is executed by a processor, it can be used to execute the application installation method provided in any of the above embodiments of the present application.
[0101] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
[0102] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0103] The program code contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, and the like, or any suitable combination of the foregoing.
[0104] The computer program code for performing the operations of the embodiments of the present application may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
Claims
1. An application installation method, characterized in that, The method is applied to an electronic device, and the method includes: Obtain an installation package of an application, and decompress the installation package to obtain attribute information of the installation package; Obtain authorization information of the application from the attribute information, and determine whether the electronic device meets a time verification condition when the authorization information is consistent with the configuration information of the electronic device; When the time verification condition is not met, determine the allowed offline duration, the offline startup duration, and the last verification time of the electronic device, where the time verification condition refers to whether the electronic device is connected to a time server; When the duration calculated according to the allowed offline duration, the authorization information, and the last verification time is less than the offline startup duration, install the application in the electronic device based on the installation package, where the calculation formula of the calculated duration is: (offline authorization end time - last verification time) / offline authorization period * allowed offline duration.
2. The application installation method according to claim 1, wherein The method further includes: When the time verification condition is met, obtain the encryption time and the authorization period of the application from the authorization information, and determine a time authorization period according to the encryption time and the authorization period; When the current time of the time server is within the time authorization period, install the application in the electronic device based on the installation package.
3. The application installation method according to claim 2, wherein Before determining the allowed offline duration, the offline startup duration, and the last verification time of the electronic device, it includes: Judge whether the automatic time correction function of the electronic device is normal; If it is normal, trigger the operation of obtaining the encryption time and the authorization period of the application from the authorization information, and determining the time authorization period according to the encryption time and the authorization period; If it is not normal, trigger the operation of determining the allowed offline duration, the offline startup duration, and the last verification time of the electronic device.
4. The application installation method according to claim 1, characterized in that Before obtaining the authorization information of the application from the attribute information, it further includes: Judge whether the electronic device is connected to a verification server; If connected, send the attribute information to the verification server so that the verification server determines whether to install the application in the electronic device based on the attribute information; If not connected, trigger the step of obtaining the authorization information of the application from the attribute information.
5. The application installation method according to claim 1, characterized in that, After decompressing the installation package to obtain the attribute information of the installation package, it further includes: Judge whether the format of the attribute information meets the standard format requirements. If not, refuse to install the application in the electronic device based on the installation package.
6. The application installation method according to claim 1, wherein Before decompressing the installation package to obtain the attribute information of the installation package, it further includes: Judge whether the application is an existing application in the electronic device and is installed by its own program; If so, install the installation package in the electronic device; If not, trigger the operation of decompressing the installation package to obtain the attribute information of the installation package.
7. An application installation device, characterized in that, The device is integrated in an electronic device, and the device includes: An attribute information determination module, configured to obtain an installation package of an application program, and decompress the installation package to obtain the attribute information of the installation package; A time verification judgment module, configured to obtain the authorization information of the application program from the attribute information, and judge whether the electronic device meets the time verification condition when the authorization information is consistent with the configuration information of the electronic device; A verification time determination module, configured to determine the allowed offline duration, the offline startup duration, and the last verification time of the electronic device when the time verification condition is not met, where the time verification condition refers to whether the electronic device is connected to a time server; An application program installation module, configured to install the application program in the electronic device based on the installation package when the duration calculated according to the allowed offline duration, the authorization information, and the last verification time is less than the offline startup duration, where the calculation formula of the calculated duration is: (offline authorization end time - last verification time) / offline authorization period * allowed offline duration.
8. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device, configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the application program installation method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the application program installation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Installation method and device of installation package, electronic equipment and storage medium
CN112579111A
System, method, and API for progressively installing software application
CN1961307A