CN117076089B - Application management method, terminal device and storage medium - Google Patents

Application management method, terminal device and storage medium Download PDF

Info

Publication number
CN117076089B
CN117076089B CN202311284168.5A CN202311284168A CN117076089B CN 117076089 B CN117076089 B CN 117076089B CN 202311284168 A CN202311284168 A CN 202311284168A CN 117076089 B CN117076089 B CN 117076089B
Authority
CN
China
Prior art keywords
application
application program
signature
signature verification
package name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311284168.5A
Other languages
Chinese (zh)
Other versions
CN117076089A (en
Inventor
付辰
忻振文
陈川福
钟复港
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311284168.5A priority Critical patent/CN117076089B/en
Publication of CN117076089A publication Critical patent/CN117076089A/en
Application granted granted Critical
Publication of CN117076089B publication Critical patent/CN117076089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides an application management method, terminal equipment and a storage medium, and relates to the field of terminal equipment. The method comprises the following steps: in response to a first operation, opening any application program; switching the application program from the foreground to the background operation in response to the second operation; if the application package name of the application program is in the keep-alive white list, performing signature verification on the application program; and if the signature verification is successful, keeping alive the application process of the application program. In the case that the application package name of the background application is in the keep-alive white list, signature verification is firstly carried out on the background application, and the background application is kept alive after the background application signature verification is successful, so that the background application in the keep-alive white list is not directly kept alive, the situation that an application program is impersonated to be the keep-alive white list application by using the package name in the keep-alive white list can be avoided, and the situation of application cleaning is bypassed, and the accuracy of application cleaning is improved.

Description

Application management method, terminal device and storage medium
Technical Field
The present invention relates to the field of terminal devices, and in particular, to an application management method, a terminal device, and a storage medium.
Background
Terminal devices are becoming an important tool in daily life and work of people, and applications (apps) installed on terminal devices are becoming more and more abundant and diverse. Users will use different applications based on different needs and often switch between applications. In addition to the applications currently running in the foreground, previously launched applications will typically run in the background. Applications that fall back to the background continue to use system resources, such as memory, use processors, network access, etc. When the user carries out foreground operation on the application running in the background again, the application can be directly switched from the background to the foreground, and the application does not need to be cold started, so that compared with hot start, the starting speed of the application is improved; and the interface used by the last time can be directly displayed, so that the use of the user is convenient.
Because of the limitation of the system resources of the terminal equipment, the terminal equipment cannot allow all applications to survive unrestrictedly, can selectively keep alive the applications running in the background, and can search and kill the applications which do not need to survive continuously, namely, the related process is ended, so that the applications are prevented from using the system resources such as memory, processor and the like continuously. However, some background applications that do not need to survive, for example, increase the online use time of the user, may bypass the searching and killing of the terminal device by an improper means, so as to seek to survive.
Disclosure of Invention
The embodiment of the application discloses an application management method, terminal equipment and a storage medium, which can avoid the occurrence of the condition that some background applications which do not need to survive continuously bypass application searching and killing to survive continuously.
The first aspect of the application discloses an application management method, which is applied to terminal equipment, and comprises the following steps: responding to a first operation, and starting an application program; switching the application program from the foreground to the background operation in response to a second operation; if the application package name of the application program is in a preset keep-alive white list, carrying out signature verification on the application program; and if the signature verification of the application program is successful, keeping alive the application process of the application program. The method can determine whether to keep-alive a current background application based on the preconfigured keep-alive white list, so that the purpose of keeping-alive an application program which is required to run in the background by a user is achieved; meanwhile, under the condition that the application package name of a background application is in the keep-alive white list, the background application is not directly subjected to keep-alive, but is further subjected to signature verification, and after the background application is successfully subjected to signature verification, the background application is subjected to keep-alive, and the background application in the keep-alive white list is not directly subjected to keep-alive, so that the situation that some application programs impersonate the keep-alive white list application by using the application package name in the keep-alive white list can be avoided, and the situation of cleaning the application is bypassed, and the accuracy of cleaning the application is improved.
In some alternative embodiments, the signature verification of the application includes: performing signature verification on the application program based on the application signature of the application program and a target signature corresponding to the application package name in a preset configuration cache; if the application signature is the same as the target signature, determining that the signature verification of the application program is successful; and if the application signature is different from the target signature, determining that the signature verification of the application program fails.
In some alternative embodiments, the method further comprises: and if the application type of the application program is the target type, keeping the application program alive. By the method, the target type application program can be kept alive.
In some optional embodiments, if the application type of the application program is a target type, before the keep-alive the application program, the method further includes: and if the application package name of the application program is not in the keep-alive white list, determining the application type of the application program.
In some optional embodiments, the determining the application type of the application program includes: if the application package name of the application program has corresponding configuration information in a preset configuration cache, carrying out signature verification on the application program; and if the signature verification of the application program is successful, determining the application type in the configuration information in the configuration cache as the application type of the application program. The method can improve the efficiency of determining the application type based on configuration caching; meanwhile, before determining the application type based on the configuration cache, signature verification is performed on the application program, so that the condition that the current application program impersonates other application programs through the application package name can be avoided, and the accuracy of determining the application type is improved.
In some alternative embodiments, the method further comprises: if the application package name of the application program is matched with any application package name in the configuration cache, determining that corresponding configuration information exists in the configuration cache by the application package name of the application program. By the method, whether the configuration information corresponding to the application package name of the application program exists in the configuration buffer can be accurately determined.
In some alternative embodiments, the method further comprises: and updating the configuration cache based on the information pushed by the cloud server. By the method, the configuration cache can be updated, so that the efficiency of application management is improved.
The second aspect of the application discloses an application management method, applied to a terminal device, the method comprising: responding to a first operation, and starting an application program; switching the application program from the foreground to the background operation in response to a second operation; if the application package name of the application program has corresponding configuration information in a preset configuration cache, carrying out signature verification on the application program; if the signature verification of the application program is successful, determining the application type in the configuration information as the application type of the application program; and if the application type of the application program is the target type, keeping the application program alive. According to the method, the application type of the background application is determined based on the current application package name and the configuration file of the background application, so that the efficiency of determining the application type is improved, and when the application type of the background application is the target type, the background application is kept alive, and the application required by a user is prevented from being checked and killed; meanwhile, before the application type of the background application is determined based on the configuration file, signature verification is carried out on the background application, the application type is determined according to the configuration file after the background application signature verification is successful, and the situation that some application programs impersonate the application of the target type by modifying the application package name of the application program into the application package name of the target type application and bypass application cleaning is avoided, so that the accuracy of application cleaning is improved.
A third aspect of the present application discloses a terminal device, the terminal device comprising a processor and a memory, the memory being configured to store instructions, the processor being configured to invoke the instructions in the memory, so that the terminal device performs the application management method according to the first aspect.
A fourth aspect of the present application discloses a computer readable storage medium comprising computer instructions which, when run on a terminal device, cause the terminal device to perform the application management method according to the first or second aspect.
It should be understood that, the terminal device according to the third aspect and the computer readable storage medium according to the fourth aspect provided above correspond to the methods of the first aspect or the second aspect, and therefore, the advantages achieved by the method may refer to the advantages in the corresponding methods provided above, which are not described herein.
Drawings
Fig. 1 is a schematic diagram of a frame of a terminal device according to an embodiment of the present application.
Fig. 2 is a flow chart of an application management method provided in an embodiment of the present application.
Fig. 3 is a schematic diagram of an application setting interface according to an embodiment of the present application.
Fig. 4 is a schematic flow chart of generating an application signature cache and configuring the cache according to an embodiment of the present application.
Fig. 5 is a schematic flow chart of signature verification according to an embodiment of the present application.
Fig. 6 is a flowchart of updating an application signature cache according to an embodiment of the present application.
Fig. 7 is a flowchart of updating a configuration buffer according to an embodiment of the present application.
Fig. 8 is a flowchart of an application management method according to an embodiment of the present application.
Fig. 9 is a flowchart of an application management method provided in an embodiment of the present application.
Fig. 10 is a schematic structural diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In describing embodiments of the present application, words such as "exemplary," "or," "such as," and the like are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "or," "such as," and the like are intended to present related concepts in a concrete fashion.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, "/" means or, unless otherwise indicated herein. For example, A/B may represent A or B. The term "and/or" in this application is merely an association relationship describing an association object, and means that three relationships may exist. For example, a and/or B may represent: a exists alone, A and B exist simultaneously, and B exists alone. "at least one" means one or more. "plurality" means two or more than two. For example, at least one of a, b or c may represent: seven cases of a, b, c, a and b, a and c, b and c, a, b and c. It will be appreciated that the order of the steps shown in the flowcharts herein may be changed and some may be omitted.
When using a terminal device, a user uses different applications based on different demands, and often switches between a plurality of applications. In addition to the application currently running in the foreground, the previously launched application will typically be pushed to the background running. The application which is returned to the background still can continue to use the system resource, so the operating system of the terminal equipment usually can carry out application cleaning when the user experience is affected or is about to be affected based on the limitation of the system resource of the terminal equipment, and common scenes include insufficient memory, high temperature of a mobile phone, high power consumption, manual cleaning of a user and the like. During the application cleaning process, the operating system may end some relevant processes of the application, so as to avoid the continuous use of system resources such as memory, processor, and the like. The process of the application will release the system resources occupied by the application, such as releasing the physical memory occupied by the application. Some applications that go back to the background continue to run, such as music applications playing music in the background, video applications performing download tasks in the background, etc., are necessary for the user. Therefore, the operating system can selectively keep alive the background application according to the importance degree in the process of cleaning the application. Keep-alive refers to a means for an application to run in the background on a terminal device without being killed or shut down by the operating system. Keep-alive can enable an application program to respond to operation of a user or receive information in time when the application program runs in the background, and user experience and satisfaction are improved. However, in order to improve the influence of the background application, some improper means are used for the selective keep-alive mode of the operating system, so that the operating system keeps alive the background application, thereby bypassing the application searching and killing, and the background application can continue to run.
In order to solve the technical problem that some background applications which do not need to keep alive use an improper means to bypass application searching and killing and continue to run in the background, the embodiment of the application management method is provided, when terminal equipment triggers application cleaning, whether to keep alive a current background application can be determined based on a pre-configured keep-alive white list, the purpose of keeping alive an application program which a user needs to run in the background is achieved, and the application package name of the application program which needs to keep alive is recorded in the keep-alive white list; meanwhile, under the condition that the application package name of a background application is in the keep-alive white list, the background application is not directly subjected to keep-alive, but is further subjected to signature verification, and the background application is kept alive after the background application is successfully subjected to signature verification, and by not directly carrying out the keep-alive on the background application in the keep-alive white list, the situation that some application programs are required to keep-alive in the keep-alive white list by using the application package name in the keep-alive white list and impersonating the application programs in the keep-alive white list can be avoided, and the situation that application cleaning is bypassed occurs, so that the accuracy of the application cleaning is improved. By the method, the behavior of the application program in the malicious application counterfeit keep-alive white list can be identified, so that the situation of keeping the malicious application alive is avoided.
The application management method provided by the embodiment of the application is applied to the terminal equipment. By way of example, the terminal device in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an artificial intelligence (artificial intelligence, AI) device, a wearable device, a vehicle-mounted device, a smart home device, and/or a smart city device. The embodiment of the application does not limit the specific form of the terminal device. An operating system is installed on the terminal device, and the operating system may be one of a Windows Mobile, iOS cube, linux cube, an Zhuo (Android cube) system and MagicOS cube system or other systems not shown, and is described below by taking Android cube as an example.
First, some of the terms and related techniques referred to in the present application are explained for easy understanding by those skilled in the art.
1. And (5) application installation.
Based on the downloading instruction of an application program, the terminal device can download an installation package (APK file) of the application program, for example, the APK file of the application program can be obtained and downloaded by a mobile phone browser, an application market, computer transmission and the like. After the APK file is downloaded, when the APK file is opened, the zygate process creates a new application program process and invokes an installer (PackageInstaller application) to execute the installer. The PackageInstaller application manages the installation of the application by invoking the package management service (PackageManagerService, PMS). In the embodiment of the application, the PMS may parse and verify the APK file by calling a PackageParser class, and obtain application information and a signature of the application program from the APK file. The application information includes an application package name (packagname) and may also include one or more of a version number, rights, and components. The PMS saves the acquired application information and signature as Settings objects in Settings class. An application corresponds to a Settings object. The Settings class is an internal class of PMS that is responsible for managing the Settings and states of all applications. In one embodiment of the present application, the PMS calls the writeLPr method of the Settings class to write the data in the Settings object into the data/system/packages. This xml file is used to store all application information and status in the terminal device, managed by the PMS. The PMS will load this xml file at system start-up to quickly obtain the information and status of the application. This xml file is also updated after the installation, uninstallation, update, etc. of the application to maintain data consistency.
2. Application uninstallation.
The user can select an application program to be uninstalled on the terminal equipment by means of setting a menu, an application list, a desktop icon and the like, and an uninstalling instruction of the application program is generated. Based on an uninstall instruction for an application, the zygate process invokes a packageInstipuler application to uninstall the application. The PackageInstaller application performs the uninstallation of the application by invoking the PMS. For example, the PackageInstance application may call the deletePackage method of the PMS to complete the uninstallation. After the application program is unloaded, the PMS can call a deletePackageLocked method of the settingclass, and delete the application information and the signature corresponding to the application program from the settingobject, namely delete the application information and the signature corresponding to the application program in the/data/system/packages.xml file.
3. Multi-user mode.
The multi-user mode refers to that a plurality of users log in and operate on the same terminal equipment by using respective personal account numbers. Each user has its corresponding user space. The user may install applications, storage files, and other user data in their corresponding user space. Information isolation between different user spaces.
In the multi-user mode, the first user registered on the terminal device may be set as the primary user. The main user has all operation rights to the terminal equipment, including adding or deleting sub-users, changing terminal equipment settings, installing or uninstalling applications, etc. In some systems, the master user may also manage and restrict the rights of the child users. The child user is the other user created by the master user. The child users have their corresponding user spaces. The child user may install an application in their corresponding user space, or delete an installed application query. When a main user deletes a sub-user, the user space corresponding to the sub-user is deleted at the same time. When the user space corresponding to the sub-user is deleted, the application program installed in the sub-user space and the data stored in the sub-user space are deleted at the same time.
The application management method provided in the embodiment of the present application will be described below by way of example with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a frame of a terminal device according to an embodiment of the present application. The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the software system is divided into four layers, from top to bottom, an application layer, a framework layer, a system library, and a kernel layer, respectively.
The application layer may include a series of applications. For example, applications may include desktop, map, bluetooth, music, short messages, gallery, camera, navigation, video, and like applications.
The application framework layer provides an application programming interface (Application Programming Interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. For example, the application framework layer may include a package management service, a feature manager, a signature verification module, an application cleaning module, an application identification module, a cloud pushing module, a resource manager, and the like. The package management service is used for managing the application program on the terminal device, such as installation, uninstallation, update, and the like of the application program. The feature manager is used for managing services provided by the terminal device, such as signature verification services. The signature verification module is used for performing signature verification on the application program, for example, the application program can be subjected to signature verification according to the application package name of the application program, so as to determine whether the application program impersonates the application package name of other application programs. The application cleaning module is used for cleaning the running application program and can be used for ending the application process of the application program running in the background. The application identification module is used for identifying the application type of the application program. The cloud pushing module is used for receiving the broadcast pushed by the cloud server. Upon receiving the broadcast, the cloud pushing module may generate and send a cloud pushing event notification. The resource manager is used to provide various resources, such as localization strings, icons, pictures, layout files, video files, etc., to the application.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. Such as surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (e.g., openGL ES), two-dimensional graphics engine (e.g., SGL), image processing library, etc.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver. It will be appreciated that the layers and the components contained in the layers in the software structure shown in fig. 1 do not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer layers than illustrated, and more or fewer components may be included in each layer, as the present application is not limited. Fig. 2 is a flow chart of an application management method provided in an embodiment of the present application. As shown in fig. 2, the method includes:
101, a first application foreground runs.
The first application may be any application program installed by the terminal device, which is not limited in this regard. For example, the map, bluetooth, music, short message, gallery, camera, navigation, video, or any one of the applications shown in fig. 1 may be used.
When using the terminal device, the user may open the first application installed by the terminal device in a variety of ways. In an embodiment of the present application, the application icon of the first application on the desktop may be clicked, or the notification message of the first application in the message notification bar may be clicked, or the like. For example, taking a first application as an example of a video application, a desktop is displayed on a screen of the terminal device, where the desktop includes application icons of the video application. After the user clicks an application icon of the video application, an input management module in the terminal equipment can identify the clicking operation of the user and report the clicking operation to the desktop; the desktop may determine the clicked application icon and the video application corresponding to the clicked application icon according to a clicking operation of the user, and send a request to launch the video application to the activity management component (ActivityManagerServer, AMS). After the video application is started, the video application foreground operates, and the terminal equipment displays an application interface of the first application.
102, the first application switches to the background.
In an embodiment of the present application, the first application may be switched to background operation in response to the launching of the second application. The second application may be any type of application other than the first application, and is not limited in this regard.
In an embodiment of the present application, the first application may be switched to a background operation based on an operation of returning the user to the desktop. The operation of returning to the desktop is used for controlling the terminal equipment to return to the desktop from the currently displayed application interface. In an embodiment of the present application, the operation of returning to the desktop may include clicking a navigation bar, navigating using gestures, clicking hover navigation. The navigation bar is a mode for displaying a group of common function keys on a screen. Clicking on the navigation bar may include clicking a back key, a home key, a recent application key. Gesture navigation is used to control a cell phone through different gestures. Navigating using gestures may include sliding a gesture on the screen, such as performing a bottom up motion. Hover navigation is a method of displaying a movable button or icon on a screen of a terminal device. Clicking hover navigation may include long-press hover navigation, returning to the desktop, causing the current application to switch to the background.
The operating system triggers the application cleaning, step 103 is executed, and an application cleaning instruction is sent to the application cleaning module.
In an embodiment of the present application, the operating system triggers the application cleaning when the terminal device is in the target state. The target state may be set according to an actual situation, and the target state may include one or more states of a memory lower than a memory threshold, a device temperature of the terminal device higher than a temperature threshold, a power consumption rate of the terminal device higher than a rate threshold, a power consumption of the terminal device lower than a power threshold, and a user triggering application cleaning, which are not limited in any way.
After receiving the application cleaning instruction, the application cleaning module cleans the application running in the background in the terminal equipment, namely the background application. The application cleaning module can sequentially carry out cleaning decision on each background application to determine whether to keep alive the background application or end the corresponding application process.
104, the application cleaning module determines whether the application package name of the first application is a keep-alive whitelist.
The keep-alive whitelist is used to store the application package names of applications that the user needs to keep alive. When the application package name of an application program is in the keep-alive white list, determining that the user needs to keep-alive the application program.
In an embodiment of the present application, the keep-alive whitelist may be determined based on a user's selection. The user may add the application package name of the application to the keep-alive whitelist by setting the application to allow background activity. Fig. 3 is a schematic diagram of an application setting interface according to an embodiment of the present application. For example, as shown in fig. 3 (a), a user may perform application start management on an installed application program on a terminal device, and may set a right corresponding to each application program. As shown in fig. 3 (b), after the user selects the video application, whether the video application allows the background activity may be set, for example, a switch of the video application allowing the background activity is opened, and the video application is set to allow the background activity, so that an application package name of the video application is added to the keep-alive whitelist; the switch of the video application that allows background activity is closed and the video application is set to disallow background activity. And if the application package name of the video application is added into the keep-alive white list, removing the application package name of the video application from the keep-alive white list based on the fact that the video application is set to not allow background activities. In one embodiment, the keep-alive whitelist may be determined by a management application that manages applications installed on the terminal device. For example, a user may set a keep-alive whitelist based on a management application, adding an application to the keep-alive whitelist; alternatively, an application is moved out of the keep-alive whitelist.
If it is determined that the application package name of the first application is not in the keep-alive white list, the process is ended, and a preset judging mode can be selected to determine whether to keep-alive the first application. In an embodiment of the present application, the determining method may include determining whether the first application is a resident process, determining whether the first application is performing a background service, and determining whether the first application is an application corresponding to a previous application interface. Background services refer to persistent tasks that are performed when an application runs in the background, such as downloading data, playing audio, and the like. The application program corresponding to the last application interface refers to the application program corresponding to the application interface before switching to the current application interface. For example, after the first application is switched to the background, stopping displaying the application interface corresponding to the first application and displaying the desktop; at this time, the current application interface is a desktop, and the previous application interface is an application interface corresponding to the first application. In some implementations, the first application is keep-alive when the first application is a resident process; when the first application is in background service, keep-alive the first application; and when the first application is the application program corresponding to the last application interface, keeping alive the first application.
If it is determined that the application package name of the first application is in the keep-alive whitelist, step 105 is executed, and the application cleaning module sends a signature verification request to the signature verification module.
The signature verification request is used for controlling the signature verification module to carry out signature verification on the first application. In an embodiment of the present application, the signature verification request includes an application package name of the first application.
And 106, the signature verification module performs signature verification on the first application.
In an embodiment of the present application, the signature verification module sets two modules, a configuration cache and an application signature cache.
The configuration cache is used for storing a preset configuration file. The producer of the configuration file may be a developer corresponding to the operating system or a manufacturer corresponding to the terminal device. The configuration file may contain configuration information of commonly used application programs in the market, the commonly used application programs may include an application program with a usage rate higher than a preset first threshold value, an application program with an installation rate higher than a preset second threshold value, and an application program with an influence higher than a preset third threshold value, and the first threshold value, the second threshold value and the third threshold value may be set according to actual situations. The configuration information may include an application package name corresponding to the application program and an application signature corresponding to the application package name, and further includes a mapping relationship between the application package name and the application signature, so that the application signature corresponding to the application package name may be determined according to the mapping relationship.
For example, the configuration information of an application in a configuration file may be: < package name = "com.example.test" >// application package name com.example.test; < item signature= "aabbcccd" >/application signature is aabbcccd.
Because an application developer of an application program can customize installation files of different application package names of the application program for different enterprises, the application program has different application package names in different enterprises, and the different application package names correspond to the same application signature. For example, taking a pinned cube as an example, the pinned original application package name com. com.alibaba.android.rimet.company a, com.alibaba.android.rimet.company b, com.alibaba.android.rimet.company c. If all application package names customized by different companies are configured in the configuration file, the configuration information in the configuration file is excessive, so that not only is the storage space occupied, but also the maintenance difficulty of the configuration file is increased, so that in an embodiment of the application, a producer of the configuration file can determine the package name prefix corresponding to an application program when the application program has a plurality of application package names; the package name prefix and the application signature are stored in a configuration file. The package name prefix is a prefix contained in all application package names corresponding to the application program, and the package name prefix is equivalent to one application package name. For example, the pinned packet name prefix may be com. In this embodiment, when an application program has a plurality of application package names, all application package names are not stored in the configuration file, the package name prefix is used as the application package name, and only the package name prefix and the application signature are stored, so that the quantity of configuration information in the configuration file can be effectively reduced, and the maintenance difficulty of maintaining the configuration file is reduced.
In an embodiment of the present application, the configuration information of the application in the configuration file is determined according to an application installation package published by an application developer. For example, a producer of the configuration file obtains an application installation package from an official channel corresponding to the application, such as from an official download channel, and obtains configuration information of the application in the configuration file according to the obtained application installation package. The application program included in the configuration file may include an application program installed on the terminal device, and may also include an application program not installed on the terminal device.
In an embodiment of the present application, the configuration cache may update the configuration file stored in the configuration cache based on a new configuration file pushed by the cloud server. For example, when a new configuration file is received, the history configuration file stored in the configuration cache may be deleted, and the new configuration file may be stored in the configuration cache. Fig. 4 is a schematic flow chart of generating an application signature cache and configuring the cache according to an embodiment of the present application. As shown in fig. 4, the feature manager turns on the signature verification feature in the signature verification module, causing the signature verification service to turn on. In an embodiment of the present application, the feature manager may start the signature verification feature in the signature verification module when the terminal device is turned on; alternatively, the feature manager may turn on the signature verification feature in the signature verification module when the operating system triggers application cleaning. After the signature verification characteristic is started, notifying the signature verification service to be started; after the signature verification service is started, a configuration file is acquired in a configuration reader. The configuration reader is used for storing the configuration file. The configuration reader can store configuration files preset in the terminal equipment, and can also communicate with the cloud server, and is used for receiving and storing the configuration files pushed by the cloud server. After the signature verification service receives the configuration file, the configuration file is stored in a configuration cache.
In an embodiment of the present application, a producer of the configuration file may set a general configuration file for all terminal devices, or may set different configuration files for the terminal devices based on versions of different operating systems.
The application signature cache is used for storing application information of an application program installed on the terminal device. The application information may include an application package name corresponding to the application program and an application signature corresponding to the application package name, and further includes a mapping relationship between the application package name and the application signature, so that the application signature corresponding to the application package name may be determined according to the mapping relationship. In an embodiment of the present application, the application signature cache may obtain application information of the installed application by accessing the PMS, where the application information includes an application signature and an application package name, and obtains the application information of the installed application. For example, as shown in FIG. 4, the signature verification service may also be used to inform the application that signature caching is to be initialized; and when the application signature cache is initialized, the application information of the installed application program can be acquired and stored from the PMS, and the application information comprises an application signature and an application package name. For example, the application signature cache may obtain application information for an installed application based on the/data/system/packages.xml file in the PMS. For example, the application signature cache may retrieve/data/system/packages.xml files by calling up interfaces getPackageInfoAsUser, getInstalledPackagesAsUser on the PMS, etc., to obtain the application signature of the installed application.
When the signature verification module performs signature verification on the first application, the signature verification module can query the two modules, namely the configuration cache and the application signature cache, based on the application package name of the first application to respectively obtain corresponding application signatures; and comparing the two obtained signatures to obtain a signature verification result of the first application. Fig. 5 is a schematic flow chart of signature verification according to an embodiment of the present application. As shown in fig. 5, when a signature verification service in a signature verification module receives a signature verification request sent by an application cleaning module, an application signature corresponding to a first application is obtained from an application signature cache, and is hereinafter referred to as a first signature; and acquiring an application signature corresponding to the application package name of the first application from the configuration cache, and the application signature is hereinafter referred to as a second signature. And the signature verification module compares the acquired first signature with the second signature to obtain a signature verification result. If the first signature is the same as the second signature, determining that the signature verification result is successful; if the first signature is different from the second signature, determining that the signature verification result is failure. After the signature verification module obtains the signature verification result, the signature verification result can be stored. In an embodiment of the present application, an application package name that matches an application package name of the first application may be determined in an application signature cache; and determining an application signature corresponding to the application package name as a first signature. For example, when an application package name in the application signature cache is the same as an application package name of the first application, it is determined that the application package name matches the application package name of the first application. In an embodiment of the present application, an application package name that matches an application package name of the first application may be determined in the configuration cache; and determining an application signature corresponding to the application package name as a second signature. If the application package name in the configuration buffer memory is contained in the application package name of the first application, or if the application package name in the configuration buffer memory is the same as the application package name of the first application, determining that the application package name of the first application is matched with the application package name in the configuration buffer memory.
In an embodiment of the present application, after the application signature caches the application information, the stored application information may be updated based on the application program change condition on the terminal device. For example, as shown in fig. 4, the signature verification feature may register a listening event on the feature manager, where the listening event is used to listen for a change event of an application on the terminal device, such as an application installation event, an application uninstallation event, a child user deletion event, and so on.
When detecting the monitoring event registered by the signature verification feature on the feature manager, the feature manager sends corresponding notices to the signature verification feature, such as an application installation event notice, an application uninstallation event notice, a child user deletion event notice and the like. Fig. 6 is a flowchart of updating an application signature cache according to an embodiment of the present application. As shown in fig. 6, after the signature verification feature receives the application installation event notification sent by the feature manager, the signature verification feature sends an application installation event notification to the signature verification service; the signature verification service receives the application installation event notification and sends the application installation event notification to the application signature cache, so that the application signature cache is updated; the application signature cache may acquire application information of the new installed application, such as an application signature, through the PMS, and update the application signature cache so that the updated application signature cache includes the signature of the new installed application. After the signature verification feature receives the application uninstalling event notification sent by the feature manager, the signature verification feature sends the application uninstalling event notification to the signature verification service; the signature verification service receives the application unloading event notification and sends the application unloading event notification to the application signature cache so that the application signature cache is updated; the application signature cache can delete the application information of the application program corresponding to the application uninstalling event notification to finish updating, so that the updated application signature cache does not contain the application signature of the application program any more. After the signature verification feature receives the event deleting notification of the child user sent by the feature manager, the signature verification feature sends the event deleting notification of the child user to the signature verification service; the signature verification service receives the event deleting notification of the sub-user and sends the event deleting notification of the sub-user to the application signature cache, so that the application signature cache is updated; the application signature cache can delete the original cache, acquire and store the application information of the installed application on the PMS again, and update the application signature cache. Some embodiments of application signature caching to obtain application information may be found in the relevant description above.
In an embodiment of the present application, after the signature verification module generates the configuration buffer, the configuration buffer may be updated based on pushing of the cloud server. Fig. 7 is a flowchart of updating a configuration buffer according to an embodiment of the present application. As shown in fig. 7, the cloud pushing module in the terminal device may be configured to receive data pushed by the cloud server. When the cloud pushing module receives broadcasting carrying the configuration file pushed by the cloud server, a cloud pushing event notification corresponding to the broadcasting is sent to the signature verification characteristic, and the cloud pushing event notification is used for notifying an event of the configuration file pushed by the cloud server. After the signature verification feature receives the cloud pushing event notification sent by the feature manager, the signature verification feature sends the cloud pushing event notification to the signature verification service; the signature verification service receives the cloud pushing event notification and reads a configuration file pushed by the cloud server from the configuration reader; after receiving the configuration file, the signature verification service sends the configuration file to a configuration cache, so that the configuration cache is updated. For example, after the configuration file receives the configuration file sent by the signature verification service, the cached configuration file may be deleted and the newly received configuration file stored.
107, the signature verification module sends the signature verification result to the application cleaning module.
In one embodiment of the present application, the signature verification result includes:
xxx checkSignature failed/success; the verification of the// xxx signature fails/succeeds;
or,
pkgnae= xxx compare signature result, false/true; the verification of the xxx signature of the application package name fails/succeeds;
108, if the signature verification of the first application is successful, the application cleaning module keeps the first application alive.
In an embodiment of the present application, if the first application fails to check the signature, whether to keep-alive the first application may be determined according to a preset determination method. The determination method can be found in the above description.
According to the application management method provided by the embodiment, when the terminal equipment triggers application cleaning, whether to keep-alive a current background application can be determined based on the pre-configured keep-alive white list, so that the purpose of keeping-alive an application program which is required to run in the background by a user is achieved; meanwhile, under the condition that the application package name of a background application is in the keep-alive white list, the background application is not directly subjected to keep-alive, but is further subjected to signature verification, and after the background application is successfully subjected to signature verification, the background application is subjected to keep-alive, and the background application in the keep-alive white list is not directly subjected to keep-alive, so that the situation that some application programs impersonate the keep-alive white list application by using the application package name in the keep-alive white list can be avoided, and the situation of cleaning the application is bypassed, and the accuracy of cleaning the application is improved.
In the above embodiment, it is mentioned that if it is determined that the application package name of the first application does not keep-alive the white list, a preset determination manner may be selected to determine whether to keep-alive the first application, and a method for determining whether to keep-alive the first application when the application package name of the first application does not keep-alive the white list is described below with reference to the accompanying drawings. Fig. 8 is a flowchart of an application management method according to an embodiment of the present application. As shown in fig. 8, after step 104 in fig. 2 is performed, if it is determined that the application package name of the first application is not in the keep-alive whitelist, the method includes:
the application cleaning module sends 201 a type identification request to the application identification module.
The type identification request is used for informing the application identification module to carry out type identification on the first application. In an embodiment of the present application, the type identification request sent by the application cleaning module may include an application package name of the first application, so that the application identification module determines an application type of the first application according to the application package name of the first application.
202, the application identification module determines whether there is configuration information corresponding to the first application.
In an embodiment of the present application, the configuration file stored in the configuration buffer includes an application package name, an application type, and an application signature, where the configuration file further includes a mapping relationship between the application package name, the application type, and the application signature. The application package name may include a package name prefix. For example, the configuration information of an application in a configuration file may be: < package name = "com.example.test" >// application package name com.example.test; < item type= "IM"/>// application type is IM; < item signature= "aabbcccd" >/application signature is aabbcccd. In one embodiment of the present application, a producer of a configuration file may determine an application type of an application based on algorithmic recognition when generating configuration information for the application. For example, the application type of the application may be identified based on the application developer's description of the application. Some specific descriptions of generating configuration files, such as the related descriptions of package name prefixes, may be found in the related descriptions above. After the application identification module receives the type identification request, searching is performed based on the application package name of the first application, and whether the application package name matched with the application package name of the first application exists in the configuration file or not is determined, namely whether configuration information corresponding to the application package name of the first application exists in the configuration file or not is determined.
In an embodiment of the present application, when an application package name exists in the configuration file and matches with an application package name of the first application, determining that configuration information corresponding to the application package name of the first application exists in the configuration file; and when no application package name in the configuration file is matched with the application package name of the first application, determining that the configuration information corresponding to the application package name of the first application does not exist in the configuration file. If the application package name in the configuration buffer memory is contained in the application package name of the first application, or if the application package name in the configuration buffer memory is the same as the application package name of the first application, determining that the application package name of the first application is matched with the application package name in the configuration buffer memory.
If the application identification module determines that the configuration information corresponding to the first application does not exist, the flow of the method is ended, the application type of the first application can be determined based on other application type determination methods, the method is not limited to the above example, and the determined application type of the first application can be sent to the application cleaning module. In the embodiment of the application, when the application cleaning module receives the application type of the first application and determines that the application type of the first application is the target type, the first application is kept alive.
203, the application identification module sends a signature verification request to the signature verification module.
In an embodiment of the present application, the signature verification request includes an application package name of the first application.
The signature verification module performs signature verification on the first application 204.
205, the signature verification module sends the signature verification result to the application identification module.
For some embodiments of steps 204-205, see the relevant description of steps 106-107 in FIG. 2.
206, if the first application signature verification is successful, the application identification module determines the application type in the first application based on the configuration information.
In an embodiment of the present application, if signature verification of the first application is successful, the application identification module determines an application type in the configuration information corresponding to the first application as an application type of the first application.
207, the application identification module sends the application type to the application cleaning module.
208, if the application type of the first application is the target type, keep-alive the first application.
The target type may be set according to the needs of the user, for example, the target type may include an instant messaging type, an audio player type, and the like.
According to the application management method provided by the embodiment, when the terminal equipment triggers application cleaning, the application type of the application can be determined based on the application package name and the configuration file of the current background application, so that the efficiency of determining the application type is improved, and when the application type of the background application is the target type, the background application is kept alive, and the application required by a user is prevented from being searched and killed; meanwhile, before the application type of the background application is determined based on the configuration file, signature verification is carried out on the background application, the application type is determined according to the configuration file after the background application signature verification is successful, and the situation that some application programs impersonate the application of the target type by modifying the application package name of the application program into the application package name of the target type application and bypass application cleaning is avoided, so that the accuracy of application cleaning is improved.
Fig. 9 is a flowchart of an application management method provided in an embodiment of the present application. As shown in fig. 9, the method includes:
301, a first application foreground runs.
302, a first application switches to the background.
The operating system triggers the application cleaning, and step 303 is executed to send an application cleaning instruction to the application cleaning module.
For some embodiments of steps 301-303, see the relevant description of steps 101-103 in FIG. 2.
304, the application cleaning module sends a type identification request to the application identification module.
The application identification module determines 305 if configuration information for the first application exists.
306, the application identification module sends a signature verification request to the signature verification module.
307, the signature verification module performs signature verification on the first application.
308, the signature verification module sends the signature verification result to the application identification module.
309, if the first application signature verification is successful, the application identification module determines an application type in the first application based on the configuration information.
The application identification module sends 310 the application type to the application cleaning module.
311, if the application type of the first application is the target type, keep-alive the first application.
For some embodiments of steps 304-311, see the associated description of steps 201-208 in FIG. 2.
According to the application management method provided by the embodiment, when the terminal equipment triggers application cleaning, the application type of the background application can be determined based on the application package name and the configuration file of the current background application, so that the efficiency of determining the application type is improved, and when the application type of the background application is the target type, the background application is kept alive, and the application required by a user is prevented from being searched and killed; meanwhile, before the application type of the background application is determined based on the configuration file, signature verification is carried out on the background application, the application type is determined according to the configuration file after the background application signature verification is successful, and the situation that some application programs impersonate the application of the target type by modifying the application package name of the application program into the application package name of the target type application and bypass application cleaning is avoided, so that the accuracy of application cleaning is improved.
Fig. 10 is a schematic structural diagram of a terminal device 100 according to an embodiment of the present application. Referring to fig. 10, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 120, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display 194, a user identification module (subscriber identification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, terminal device 100 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I1C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I1C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). The I2S interface may be used for audio communication.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of terminal device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display function of the terminal device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I1C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the terminal device 100, or may be used to transfer data between the terminal device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other terminal devices 100, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present invention is only illustrative, and does not constitute a structural limitation of the terminal device 100. In other embodiments of the present application, the terminal device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters.
The wireless communication function of the terminal device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. applied to the terminal device 100.
The terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor that serves exception alerts, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like.
In some embodiments, the terminal device 100 may include 1 or N display screens 194, N being a positive integer greater than 1. The terminal device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element.
The internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (NVM).
The external memory interface 120 may be used to connect an external nonvolatile memory to realize expansion of the memory capability of the terminal device 100. The external nonvolatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external nonvolatile memory.
The terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or to handsfree talk through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When the terminal device 100 receives a call or voice message, it is possible to receive voice by approaching the receiver 170B to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The terminal device 100 may be provided with at least one microphone 170C. In other embodiments, the terminal device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the terminal device 100 may be further provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, implement directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D may be a USB interface 130 or a 3.5mm open mobile terminal device 100 platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. The gyro sensor 180B may be used to determine a motion gesture of the terminal device 100. The air pressure sensor 180C is used to measure air pressure. The magnetic sensor 180D includes a hall sensor. The terminal device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. The acceleration sensor 180E can detect the magnitude of acceleration of the terminal device 100 in various directions (typically three axes). A distance sensor 180F for measuring a distance. The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The ambient light sensor 180L is used to sense ambient light level. The fingerprint sensor 180H is used to collect a fingerprint. The temperature sensor 180J is for detecting temperature. The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The bone conduction sensor 180M may acquire a vibration signal.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The motor 191 may generate a vibration cue. The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be contacted and separated from the terminal apparatus 100 by being inserted into the SIM card interface 195 or by being withdrawn from the SIM card interface 195. The terminal device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be plugged into multiple frames of cards simultaneously. The multi-frame cards may be of the same type or of different types. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the terminal device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
The present embodiment also provides a computer storage medium having stored therein computer instructions which, when run on the terminal device 100, cause the terminal device 100 to execute the above-described related method steps to implement the application management method in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-described related steps to implement the application management method in the above-described embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component, or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the application management method in each method embodiment.
The terminal device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding methods provided above, and will not be described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated unit may be stored in a readable storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that the above embodiments are merely for illustrating the technical solution of the present application and not for limiting, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present application may be modified or substituted without departing from the spirit and scope of the technical solution of the present application.

Claims (10)

1. An application management method applied to a terminal device, the method comprising:
responding to a first operation, and starting an application program;
switching the application program from the foreground to the background operation in response to a second operation;
if the application package name of the application program is in a preset keep-alive white list, carrying out signature verification on the application program; if the signature verification of the application program is successful, keeping alive the application process of the application program;
if the application package name of the application program is not in the keep-alive white list, determining the application type of the application program comprises the following steps: if the application package name of the application program has corresponding configuration information in a preset configuration cache, carrying out signature verification on the application program; if the signature verification of the application program is successful, determining the application type in the configuration information in the configuration cache as the application type of the application program; and if the application type of the application program is the target type, keeping the application program alive.
2. The application management method according to claim 1, wherein said signature verification of the application program includes:
performing signature verification on the application program based on the application signature of the application program and a target signature corresponding to the application package name in the configuration cache;
if the application signature is the same as the target signature, determining that the signature verification of the application program is successful;
and if the application signature is different from the target signature, determining that the signature verification of the application program fails.
3. The application management method according to claim 1, wherein the method further comprises:
if the application package name of the application program is matched with any application package name in the configuration cache, determining that corresponding configuration information exists in the configuration cache by the application package name of the application program.
4. The application management method according to claim 1, wherein the method further comprises:
and updating the configuration cache based on the information pushed by the cloud server.
5. An application management method applied to a terminal device, the method comprising:
responding to a first operation, and starting an application program;
Switching the application program from the foreground to the background operation in response to a second operation;
if the application package name of the application program is in a preset keep-alive white list, carrying out signature verification on the application program; if the signature verification of the application program is successful, keeping alive the application process of the application program; wherein the determining of the keep-alive whitelist comprises: in response to an operation to set any application to allow background activity, adding the any application to the keep-alive whitelist;
if the application package name of the application program is not in the keep-alive white list, determining the application type of the application program comprises the following steps: if the application package name of the application program has corresponding configuration information in a preset configuration cache, carrying out signature verification on the application program; if the signature verification of the application program is successful, determining the application type in the configuration information as the application type of the application program; and if the application type of the application program is the target type, keeping the application program alive.
6. The application management method according to claim 5, wherein said signature verification of the application program includes:
Performing signature verification on the application program based on the application signature of the application program and a target signature corresponding to the application package name in the configuration cache;
if the application signature is the same as the target signature, determining that the signature verification of the application program is successful;
and if the application signature is different from the target signature, determining that the signature verification of the application program fails.
7. The application management method according to claim 5, wherein the method further comprises:
if the application package name of the application program is matched with any application package name in the configuration cache, determining that corresponding configuration information exists in the configuration cache by the application package name of the application program.
8. The application management method according to claim 5, wherein the method further comprises:
and updating the configuration cache based on the information pushed by the cloud server.
9. A computer readable storage medium comprising computer instructions which, when run on a terminal device, cause the terminal device to perform the application management method of any of claims 1 to 8.
10. A terminal device, characterized in that the terminal device comprises a processor and a memory for storing instructions, the processor for invoking the instructions in the memory to cause the terminal device to perform the application management method according to any of claims 1 to 8.
CN202311284168.5A 2023-10-07 2023-10-07 Application management method, terminal device and storage medium Active CN117076089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311284168.5A CN117076089B (en) 2023-10-07 2023-10-07 Application management method, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311284168.5A CN117076089B (en) 2023-10-07 2023-10-07 Application management method, terminal device and storage medium

Publications (2)

Publication Number Publication Date
CN117076089A CN117076089A (en) 2023-11-17
CN117076089B true CN117076089B (en) 2024-03-26

Family

ID=88706314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311284168.5A Active CN117076089B (en) 2023-10-07 2023-10-07 Application management method, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN117076089B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9389993B1 (en) * 2010-09-03 2016-07-12 Cisco Technology, Inc. System and method for whitelist management
CN107844342A (en) * 2017-11-21 2018-03-27 广东欧珀移动通信有限公司 Management-control method, device and the storage medium and mobile terminal of application program keep-alive
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium
CN112099757A (en) * 2020-09-21 2020-12-18 珠海格力电器股份有限公司 Application keep-alive method and device
CN114428546A (en) * 2022-01-25 2022-05-03 惠州Tcl移动通信有限公司 Background application cleaning method and device, storage medium and terminal equipment
CN116108416A (en) * 2023-02-27 2023-05-12 上海智能交通有限公司 Application program interface safety protection method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200259845A1 (en) * 2018-12-04 2020-08-13 Journey.ai Providing access control and identity verification for communications when receiving a communication from an entity to be verified

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9389993B1 (en) * 2010-09-03 2016-07-12 Cisco Technology, Inc. System and method for whitelist management
CN107844342A (en) * 2017-11-21 2018-03-27 广东欧珀移动通信有限公司 Management-control method, device and the storage medium and mobile terminal of application program keep-alive
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium
CN112099757A (en) * 2020-09-21 2020-12-18 珠海格力电器股份有限公司 Application keep-alive method and device
CN114428546A (en) * 2022-01-25 2022-05-03 惠州Tcl移动通信有限公司 Background application cleaning method and device, storage medium and terminal equipment
CN116108416A (en) * 2023-02-27 2023-05-12 上海智能交通有限公司 Application program interface safety protection method and system

Also Published As

Publication number Publication date
CN117076089A (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN113254409B (en) File sharing method, system and related equipment
WO2021185352A1 (en) Version upgrade method and related apparatus
CN113805797B (en) Processing method of network resource, electronic equipment and computer readable storage medium
WO2023051094A1 (en) Memory recovery method and apparatus, electronic device, and readable storage medium
CN117076089B (en) Application management method, terminal device and storage medium
CN114461239B (en) Software upgrading system and software upgrading method
CN113467821A (en) Application program repairing method, device, equipment and readable storage medium
CN115828227B (en) Method for identifying advertisement popup, electronic equipment and storage medium
CN117009023B (en) Method for displaying notification information and related device
CN117082419B (en) Speaker control method, system, device, apparatus and storage medium
CN116048710B (en) Application identifier display method, electronic device and readable storage medium
CN117376830B (en) Geofence matching method, electronic device and computer readable storage medium
CN115952564B (en) Data writing method and terminal equipment
CN115460445B (en) Screen projection method of electronic equipment and electronic equipment
CN116048545B (en) Processing method of popup advertisement, electronic equipment and readable storage medium
CN116048544B (en) Processing method of popup advertisement, electronic equipment and readable storage medium
CN116048829B (en) Interface calling method, device and storage medium
CN114006969B (en) Window starting method and electronic equipment
CN116541188A (en) Notification display method, terminal device and storage medium
CN116048325A (en) Processing method for abnormal behavior of application, electronic equipment and storage medium
CN117785548A (en) File updating method and electronic equipment
CN117440081A (en) Message sharing method and related equipment
CN117879981A (en) Display method and electronic equipment
CN115857964A (en) Application program installation method and related equipment
CN116560535A (en) Application component management method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant