CN109657455B - Application real-time switching method, device, storage medium and apparatus - Google Patents

Application real-time switching method, device, storage medium and apparatus Download PDF

Info

Publication number
CN109657455B
CN109657455B CN201811596835.2A CN201811596835A CN109657455B CN 109657455 B CN109657455 B CN 109657455B CN 201811596835 A CN201811596835 A CN 201811596835A CN 109657455 B CN109657455 B CN 109657455B
Authority
CN
China
Prior art keywords
application
package
forbidden
package name
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
CN201811596835.2A
Other languages
Chinese (zh)
Other versions
CN109657455A (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.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology 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 Shenzhen Skyworth Digital Technology Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN201811596835.2A priority Critical patent/CN109657455B/en
Publication of CN109657455A publication Critical patent/CN109657455A/en
Application granted granted Critical
Publication of CN109657455B publication Critical patent/CN109657455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • 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

Abstract

The invention discloses a method, equipment, a storage medium and a device for switching applications in real time, wherein the method comprises the following steps: when the list of the currently forbidden package names is obtained, deleting the to-be-forbidden package names in the list of the currently forbidden package names from the installed package name database of the system, and forbidding the corresponding to-be-forbidden applications; respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list, and obtaining the package names to be loaded according to the comparison result; and loading the package name to be loaded into the system-installed package name database, and starting the application to be loaded corresponding to the package name to be loaded. The method comprises the steps that the package names to be forbidden are deleted from a package name database installed in the system, so that the system cannot run the applications to be forbidden, files of the applications to be loaded are still stored in an application installation directory, the package names to be loaded are added into the database, the system can run the applications to be loaded, and therefore the applications to be forbidden are effectively switched to the applications to be loaded.

Description

Application real-time switching method, device, storage medium and apparatus
Technical Field
The invention relates to the technical field of intelligent terminals, in particular to a method, equipment, a storage medium and a device for switching applications in real time.
Background
Under certain specific functional requirements, the intelligent terminal needs to integrate a plurality of APPs with the same function, such as an advertisement function, and because different advertisement applications have different advertisement resources, the intelligent terminal configures the plurality of advertisement applications in order to find the required resources. However, only one application program is allowed to run at the same time in the same application program, and therefore, when the application program is switched, the switched application program needs to be disabled, and the application program to be switched needs to be started.
The switched application is disabled, and it is now the conventional practice in the industry to call a disabler (disable), by which the state of the switched application is set to "disabled", thereby disabling the application, and the state of the application to be switched is set to "enabled". However, the application program generally needs a resident memory with a resident property, and when the application program has the resident property, the application program cannot be killed by calling the above-mentioned forbidden program, and the forbidden application still continues to run in the system, so the prior art still cannot effectively switch the application program.
Disclosure of Invention
The invention mainly aims to provide a method, equipment, a storage medium and a device for switching applications in real time, and aims to solve the technical problem that the application programs cannot be effectively switched in the prior art.
In order to achieve the above object, the present invention provides a method for switching applications in real time, comprising the following steps:
when a current forbidden package name list is obtained, deleting the to-be-forbidden package names in the current forbidden package name list from a system-installed package name database, and forbidding the to-be-forbidden applications corresponding to the to-be-forbidden package names;
respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list, and obtaining the package names to be loaded according to the comparison result;
and loading the package name to be loaded into the installed package name database of the system, and starting the application to be loaded corresponding to the package name to be loaded so as to realize switching the application to be forbidden to the application to be loaded.
Preferably, the comparing the application package name in the current application installation directory with the system installed package name database and the list of the currently forbidden package names respectively, and obtaining the package name to be loaded according to the comparison result specifically includes:
comparing the application package name in the current application installation directory with the installed package name database of the system;
if the application package name does not belong to the system installed package name database, comparing the application package name with the list of the currently forbidden package names;
and if the application package name does not belong to the list of the currently forbidden package names, taking the application package name as the name of the package to be loaded.
Preferably, if the application package name does not belong to the system-installed package name database, after comparing the application package name with the list of currently disabled package names, the method for switching applications in real time further includes:
and if the application package name belongs to the list of the currently forbidden package names, throwing an exception, and forbidding to load the application package name into the system installed package name database.
Preferably, the loading the package name to be loaded into the package name database installed in the system, and starting the application to be loaded corresponding to the package name to be loaded, so as to switch the application to be disabled to the application to be loaded, specifically including:
and loading the package name to be loaded into the installed package name database of the system, and sending a preset starting broadcast to the application to be loaded corresponding to the package name to be loaded so that the application to be loaded performs self-starting according to the preset starting broadcast to realize switching of the application to be forbidden to the application to be loaded.
Preferably, when the currently forbidden package name list is obtained, deleting the to-be-forbidden package names in the currently forbidden package name list from the system-installed package name database, and forbidding the to-be-forbidden applications corresponding to the to-be-forbidden package names, specifically including:
receiving a list of names of currently forbidden packages sent by a server, or acquiring currently applied forbidden information and generating the list of names of currently forbidden packages according to the currently applied forbidden information;
and deleting the package names to be forbidden in the current forbidden package name list from a system installed package name database, and forbidding the applications to be forbidden corresponding to the package names to be forbidden.
Preferably, the current application disabling information includes: at least one of the name of the abnormal application package, the name of the normal application package and the name of the application package to be switched;
correspondingly, the obtaining the current application disabling information and generating a list of the current disabling packet names according to the current application disabling information specifically include:
detecting whether the system application is abnormal or not, and acquiring an abnormal application package name when the system application is detected to be abnormal;
detecting whether the application abnormity is recovered or not, and acquiring a normal application package name when the application abnormity is detected to be recovered;
and acquiring the name of the application packet to be switched, and generating a current forbidden packet name list according to the name of the abnormal application packet, the name of the normal application packet and/or the name of the application packet to be switched.
Preferably, the current application installation directory includes: downloading an application installation directory and a system application pre-installation directory.
In addition, to achieve the above object, the present invention further provides an application real-time switching device, including: a memory, a processor and an application real-time switching program stored on the memory and executable on the processor, the application real-time switching program when executed by the processor implementing the steps of the application real-time switching method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium having an application real-time switching program stored thereon, wherein the application real-time switching program, when executed by a processor, implements the steps of the application real-time switching method as described above.
In addition, to achieve the above object, the present invention further provides an application real-time switching device, including:
the package name deleting module is used for deleting the package names to be forbidden in the current forbidden package name list from a system-installed package name database when the current forbidden package name list is obtained, and forbidding the applications to be forbidden corresponding to the package names to be forbidden;
the package name comparison module is used for respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list and obtaining the package names to be loaded according to the comparison result;
and the application switching module is used for loading the package name to be loaded into the installed package name database of the system and starting the application to be loaded corresponding to the package name to be loaded so as to switch the application to be forbidden to the application to be loaded.
In the invention, when the list of the currently forbidden package names is obtained, the package names to be forbidden in the list of the currently forbidden package names are deleted from the database of the installed package names of the system, and the applications to be forbidden corresponding to the package names to be forbidden are forbidden; respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list, and obtaining the package names to be loaded according to the comparison result; and loading the package name to be loaded into the system-installed package name database, and starting the application to be loaded corresponding to the package name to be loaded. The method comprises the steps that the package names to be forbidden are deleted from a package name database installed in the system, so that the system cannot run the applications to be forbidden, files of the applications to be loaded are still stored in an application installation directory, the package names to be loaded are added into the database, the system can run the applications to be loaded, and therefore the applications to be forbidden are effectively switched to the applications to be loaded.
Drawings
Fig. 1 is a schematic structural diagram of an application real-time switching device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a real-time handover method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a real-time handover method according to the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a real-time handover method according to the present invention;
FIG. 5 is a functional block diagram of a first embodiment of a real-time switching device according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an application real-time switching device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the application real-time switching device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may comprise a Display screen (Display), and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the application real-time switching device and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and an application real-time switching program.
In the application real-time switching device shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting peripheral equipment; the application real-time switching device calls an application real-time switching program stored in the memory 1005 through the processor 1001, and executes the application real-time switching method provided by the embodiment of the present invention.
The application real-time switching device calls an application real-time switching program stored in the memory 1005 through the processor 1001 and performs the following operations:
when a current forbidden package name list is obtained, deleting the to-be-forbidden package names in the current forbidden package name list from a system-installed package name database, and forbidding the to-be-forbidden applications corresponding to the to-be-forbidden package names;
respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list, and obtaining the package names to be loaded according to the comparison result;
and loading the package name to be loaded into the installed package name database of the system, and starting the application to be loaded corresponding to the package name to be loaded so as to realize switching the application to be forbidden to the application to be loaded.
Further, the processor 1001 may call the application real-time switching program stored in the memory 1005, and further perform the following operations:
comparing the application package name in the current application installation directory with the installed package name database of the system;
if the application package name does not belong to the system installed package name database, comparing the application package name with the list of the currently forbidden package names;
and if the application package name does not belong to the list of the currently forbidden package names, taking the application package name as the name of the package to be loaded.
Further, the processor 1001 may call the application real-time switching program stored in the memory 1005, and further perform the following operations:
and if the application package name belongs to the list of the currently forbidden package names, throwing an exception, and forbidding to load the application package name into the system installed package name database.
Further, the processor 1001 may call the application real-time switching program stored in the memory 1005, and further perform the following operations:
and loading the package name to be loaded into the installed package name database of the system, and sending a preset starting broadcast to the application to be loaded corresponding to the package name to be loaded so that the application to be loaded performs self-starting according to the preset starting broadcast to realize switching of the application to be forbidden to the application to be loaded.
Further, the processor 1001 may call the application real-time switching program stored in the memory 1005, and further perform the following operations:
receiving a list of names of currently forbidden packages sent by a server, or acquiring currently applied forbidden information and generating the list of names of currently forbidden packages according to the currently applied forbidden information;
and deleting the package names to be forbidden in the current forbidden package name list from a system installed package name database, and forbidding the applications to be forbidden corresponding to the package names to be forbidden.
Further, the current application disabling information includes: at least one of the name of the abnormal application package, the name of the normal application package and the name of the application package to be switched; the processor 1001 may call the application real-time switching program stored in the memory 1005, and further perform the following operations:
detecting whether the system application is abnormal or not, and acquiring an abnormal application package name when the system application is detected to be abnormal;
detecting whether the application abnormity is recovered or not, and acquiring a normal application package name when the application abnormity is detected to be recovered;
and acquiring the name of the application packet to be switched, and generating a current forbidden packet name list according to the name of the abnormal application packet, the name of the normal application packet and/or the name of the application packet to be switched.
In this embodiment, when the list of the currently forbidden package names is obtained, the package names to be forbidden in the list of the currently forbidden package names are deleted from the database of the installed package names of the system, and the applications to be forbidden corresponding to the package names to be forbidden are forbidden; respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list, and obtaining the package names to be loaded according to the comparison result; and loading the package name to be loaded into the system-installed package name database, and starting the application to be loaded corresponding to the package name to be loaded. The method comprises the steps that the package names to be forbidden are deleted from a package name database installed in the system, so that the system cannot run the applications to be forbidden, files of the applications to be loaded are still stored in an application installation directory, the package names to be loaded are added into the database, the system can run the applications to be loaded, and therefore the applications to be forbidden are effectively switched to the applications to be loaded.
Based on the hardware structure, the embodiment of the invention applying the real-time switching method is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a real-time handover method according to the present invention.
In a first embodiment, the method for switching applications in real time includes the following steps:
step S10: when the current forbidden package name list is obtained, deleting the to-be-forbidden package names in the current forbidden package name list from a system installed package name database, and forbidding the to-be-forbidden applications corresponding to the to-be-forbidden package names.
It should be noted that the execution main body of this embodiment is an application real-time switching device, and the application real-time switching device may be an electronic device such as a personal computer or a smart phone, which is not limited in this embodiment. The application scenario of this embodiment is that when it is detected that an application program in the application real-time switching device needs to be switched or disabled, a currently disabled packet name list is generated according to an application program packet name to be switched or disabled, so that the application real-time switching device switches or disables the application program according to the currently disabled packet name list.
It can be understood that, in the android system, a Package name (Package name) is a unique identifier for determining an application program, a Package name corresponding to an installed application in the application real-time switching device system is stored in an installed Package name database of the system, and if the Package name of the application program belongs to the installed Package name database of the system, the system can identify the application program and start and operate the application program; if the package name of the application program does not belong to the system-installed package name database, the system cannot identify the application program and cannot start and run the application program.
In a specific implementation, the list of currently disabled package names includes package names to be disabled corresponding to applications to be disabled, and in order to disable the applications to be disabled, the package names to be disabled in the list of currently disabled package names are deleted from a package name database installed in a system, so that the system cannot identify the applications to be disabled, and the applications to be disabled are disabled.
Step S20: and respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list, and obtaining the package names to be loaded according to the comparison result.
It should be noted that, when the history forbidden package name list is obtained, the history forbidden package name in the system installed package name database is deleted, and when the current forbidden package name list is obtained, if the history forbidden application corresponding to the history forbidden package name is not forbidden any more, the history forbidden application is taken as the application to be loaded, and the history forbidden package name is taken as the package name to be loaded and is reloaded into the system installed package name database.
It can be understood that the current application installation directory is an installation directory corresponding to an application program actually installed by the application real-time switching device, and all files of the application program are stored in the current application installation directory. And deleting the to-be-forbidden package name from the system installed package name database, but not deleting the to-be-forbidden package name from the current application installation directory, so that in order to search the to-be-loaded package name from the historical forbidden package name, the application package name in the current application installation directory is respectively compared with the system installed package name database and the current forbidden package name list, and the to-be-loaded package name is searched from the historical forbidden package name according to the comparison result.
Step S30: and loading the package name to be loaded into the installed package name database of the system, and starting the application to be loaded corresponding to the package name to be loaded so as to realize switching the application to be forbidden to the application to be loaded.
It should be noted that, since the files of the application to be loaded are all stored in the current application installation directory, even if the package name to be loaded is deleted from the system installed package name database, the system cannot start and run the application to be loaded for a while, but the application to be loaded can be restarted and run as long as the package name to be loaded is reloaded into the system installed package name database. And switching the application to be forbidden to the application to be loaded by forbidding the application to be forbidden and starting the application to be loaded.
In this embodiment, the package name to be disabled is deleted from the system-installed package name database, so that the system cannot run the application to be disabled, the file of the application to be loaded is still stored in the application installation directory, and the package name to be loaded is added to the system-installed package name database, so that the system can run the application to be loaded, and the application to be disabled is effectively switched to the application to be loaded.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of the real-time handover method according to the present invention, and the second embodiment of the real-time handover method according to the present invention is proposed based on the embodiment shown in fig. 2.
In the second embodiment, the step S20 specifically includes:
step S201: and comparing the application package name in the current application installation directory with the installed package name database of the system.
It should be noted that the current application installation directory is an installation directory corresponding to an application program actually installed by the application real-time switching device, and all files of the application program are stored in the current application installation directory. The package name to be forbidden is deleted from the system installed package name database but not from the current application installation directory, so that in order to find the package name to be loaded in the historical forbidden package name, the application package name in the current application installation directory is respectively compared with the system installed package name database and the current forbidden package name list.
Step S202: and if the application package name does not belong to the installed package name database of the system, comparing the application package name with the list of the currently forbidden package names.
It can be understood that, the application package name in the current application installation directory is compared with the system installed package name database, and if the application package name belongs to the system installed package name database, it indicates that the application package name is not deleted from the system installed package name database, and the application package name does not belong to the list of currently disabled package names, thereby indicating that the application corresponding to the application package name belongs to a normally running application, and does not need to be disabled or reloaded. And if the application package name does not belong to the system installed package name database, the application package name is deleted from the system installed package name database, and the application package name is compared with the list of the currently forbidden package names, so that whether the application package name is the to-be-loaded package name is judged.
Step S203: and if the application package name does not belong to the list of the currently forbidden package names, taking the application package name as the name of the package to be loaded.
It should be noted that, if the application package name does not belong to the list of the currently forbidden package names, it is indicated that the application package name belongs to the list of the historical forbidden package names, and the application package name is taken as the package name to be loaded, so as to reload the application corresponding to the application package name.
Further, after the step S202, the method further includes:
and if the application package name belongs to the list of the currently forbidden package names, throwing an exception, and forbidding to load the application package name into the system installed package name database.
It can be understood that if the application package name belongs to the list of the currently forbidden package names, the application package name is the name of the package to be forbidden, exception is thrown, and the application package name is prohibited from being loaded into the system installed package name database, so that the package name to be forbidden is guaranteed not to be loaded into the system, and the system is prevented from starting and running the application to be forbidden.
Further, the step S30 specifically includes:
and loading the package name to be loaded into the installed package name database of the system, and sending a preset starting broadcast to the application to be loaded corresponding to the package name to be loaded so that the application to be loaded performs self-starting according to the preset starting broadcast to realize switching of the application to be forbidden to the application to be loaded.
It should be noted that, after the package name to be loaded is loaded into the package name database installed in the system, a preset start broadcast is sent to the application to be loaded corresponding to the package name to be loaded, where the preset start broadcast may be a BOOT _ COMPLETE broadcast, so that the application to be loaded performs self-start according to the preset start broadcast.
In this embodiment, by comparing the application package name in the current application installation directory with the system installed package name database and the list of the currently forbidden package names, the package name to be loaded is accurately found from the historical forbidden package names, and the application to be loaded corresponding to the package name to be loaded is loaded, so that the efficiency of switching the applications in real time is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a third embodiment of the real-time handover method according to the present invention, and the third embodiment of the real-time handover method according to the present invention is proposed based on the embodiment shown in fig. 3.
In the third embodiment, the step S10 specifically includes:
step S101: and receiving a list of the names of the current forbidden packages sent by the server, or acquiring the forbidden information of the current application and generating the list of the names of the current forbidden packages according to the forbidden information of the current application.
It should be noted that the list of the currently forbidden packet names may be detected and generated by the server and then sent to the application real-time switching device, or may be detected and generated by the application real-time switching device itself, and the application real-time switching device selects and sets the obtaining mode of the list of the currently forbidden packet names in the two modes in advance.
Step S102: and deleting the package names to be forbidden in the current forbidden package name list from a system installed package name database, and forbidding the applications to be forbidden corresponding to the package names to be forbidden.
It can be understood that the system installed package name database stores the package names corresponding to the installed applications in the application real-time switching device system, and if the package names of the application programs belong to the system installed package name database, the system can identify the application programs and start and operate the application programs; if the package name of the application program does not belong to the system-installed package name database, the system cannot identify the application program and cannot start and run the application program. And deleting the package names to be forbidden in the current forbidden package name list from a system installed package name database so that the system cannot identify the applications to be forbidden, thereby forbidding the applications to be forbidden.
Further, the current application disabling information includes: at least one of the name of the abnormal application package, the name of the normal application package and the name of the application package to be switched;
correspondingly, the obtaining the current application disabling information and generating a list of the current disabling packet names according to the current application disabling information specifically include:
detecting whether the system application is abnormal or not, and acquiring an abnormal application package name when the system application is detected to be abnormal;
detecting whether the application abnormity is recovered or not, and acquiring a normal application package name when the application abnormity is detected to be recovered;
and acquiring the name of the application packet to be switched, and generating a current forbidden packet name list according to the name of the abnormal application packet, the name of the normal application packet and/or the name of the application packet to be switched.
It should be noted that, a list of currently disabled package names is generated according to the abnormal application package names, and the abnormal application corresponding to the abnormal application package name is disabled according to the list of currently disabled package names. And generating a list of the currently forbidden packet names according to the normal application packet names, and starting the normal application corresponding to the normal application packet names according to the list of the currently forbidden packet names. And generating a list of currently forbidden packet names according to the packet names to be switched, and switching the applications to be switched according to the list of currently forbidden packet names.
Further, the current application installation catalog includes: downloading an application installation directory and a system application pre-installation directory.
It can be understood that the system application pre-installation directory is an installation directory corresponding to a pre-installed application carried by the application real-time switching device and stores all files of the pre-installed application, and the download application installation directory is an installation directory corresponding to an application downloaded by a user and stores all files of the downloaded application. The downloaded application installation catalog and the system application pre-installation catalog comprise installation catalogs of all applications on the application real-time switching equipment, so that any application in the application real-time switching equipment is forbidden or switched.
In this embodiment, by receiving the list of the currently disabled packet names issued by the server or generating the list of the currently disabled packet names according to the currently applied disabled information, accurate application switching information can be obtained in time, so that the efficiency and accuracy of real-time application switching are improved.
In addition, an embodiment of the present invention further provides a storage medium, where an application real-time switching program is stored on the storage medium, and when executed by a processor, the application real-time switching program implements the following operations:
when a current forbidden package name list is obtained, deleting the to-be-forbidden package names in the current forbidden package name list from a system-installed package name database, and forbidding the to-be-forbidden applications corresponding to the to-be-forbidden package names;
respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list, and obtaining the package names to be loaded according to the comparison result;
and loading the package name to be loaded into the installed package name database of the system, and starting the application to be loaded corresponding to the package name to be loaded so as to realize switching the application to be forbidden to the application to be loaded.
Further, the application real-time switching program, when executed by the processor, further implements the following operations:
comparing the application package name in the current application installation directory with the installed package name database of the system;
if the application package name does not belong to the system installed package name database, comparing the application package name with the list of the currently forbidden package names;
and if the application package name does not belong to the list of the currently forbidden package names, taking the application package name as the name of the package to be loaded.
Further, the application real-time switching program, when executed by the processor, further implements the following operations:
and if the application package name belongs to the list of the currently forbidden package names, throwing an exception, and forbidding to load the application package name into the system installed package name database.
Further, the application real-time switching program, when executed by the processor, further implements the following operations:
and loading the package name to be loaded into the installed package name database of the system, and sending a preset starting broadcast to the application to be loaded corresponding to the package name to be loaded so that the application to be loaded performs self-starting according to the preset starting broadcast to realize switching of the application to be forbidden to the application to be loaded.
Further, the application real-time switching program, when executed by the processor, further implements the following operations:
receiving a list of names of currently forbidden packages sent by a server, or acquiring currently applied forbidden information and generating the list of names of currently forbidden packages according to the currently applied forbidden information;
and deleting the package names to be forbidden in the current forbidden package name list from a system installed package name database, and forbidding the applications to be forbidden corresponding to the package names to be forbidden.
Further, the current application disabling information includes: at least one of the name of the abnormal application package, the name of the normal application package and the name of the application package to be switched;
the application real-time switching program further realizes the following operations when being executed by the processor:
detecting whether the system application is abnormal or not, and acquiring an abnormal application package name when the system application is detected to be abnormal;
detecting whether the application abnormity is recovered or not, and acquiring a normal application package name when the application abnormity is detected to be recovered;
and acquiring the name of the application packet to be switched, and generating a current forbidden packet name list according to the name of the abnormal application packet, the name of the normal application packet and/or the name of the application packet to be switched.
In this embodiment, when the list of the currently forbidden package names is obtained, the package names to be forbidden in the list of the currently forbidden package names are deleted from the database of the installed package names of the system, and the applications to be forbidden corresponding to the package names to be forbidden are forbidden; respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list, and obtaining the package names to be loaded according to the comparison result; and loading the package name to be loaded into the system-installed package name database, and starting the application to be loaded corresponding to the package name to be loaded. The method comprises the steps that the package names to be forbidden are deleted from a package name database installed in the system, so that the system cannot run the applications to be forbidden, files of the applications to be loaded are still stored in an application installation directory, the package names to be loaded are added into the database, the system can run the applications to be loaded, and therefore the applications to be forbidden are effectively switched to the applications to be loaded.
Referring to fig. 5, fig. 5 is a functional block diagram of a first embodiment of the application real-time switching apparatus according to the present invention, and the first embodiment of the application real-time switching apparatus according to the present invention is provided based on the application real-time switching method.
In this embodiment, the application real-time switching device includes:
the package name deleting module 10 is configured to, when the currently forbidden package name list is obtained, delete the package name to be forbidden in the currently forbidden package name list from the system-installed package name database, and disable the application to be forbidden corresponding to the package name to be forbidden.
It should be noted that in the application scenario of this embodiment, when it is detected that the application program in the application real-time switching device needs to be switched or disabled, a currently disabled package name list is generated according to the package name of the application program to be switched or disabled, so that the application real-time switching device switches or disables the application program according to the currently disabled package name list.
It can be understood that, in the android system, a Package name (Package name) is a unique identifier for determining an application program, a Package name corresponding to an installed application in the application real-time switching device system is stored in an installed Package name database of the system, and if the Package name of the application program belongs to the installed Package name database of the system, the system can identify the application program and start and operate the application program; if the package name of the application program does not belong to the system-installed package name database, the system cannot identify the application program and cannot start and run the application program.
In a specific implementation, the list of currently disabled package names includes package names to be disabled corresponding to applications to be disabled, and in order to disable the applications to be disabled, the package names to be disabled in the list of currently disabled package names are deleted from a package name database installed in a system, so that the system cannot identify the applications to be disabled, and the applications to be disabled are disabled.
And the package name comparison module 20 is configured to compare the application package names in the current application installation directory with the system installed package name database and the list of currently disabled package names, respectively, and obtain package names to be loaded according to comparison results.
It should be noted that, when the history forbidden package name list is obtained, the history forbidden package name in the system installed package name database is deleted, and when the current forbidden package name list is obtained, if the history forbidden application corresponding to the history forbidden package name is not forbidden any more, the history forbidden application is taken as the application to be loaded, and the history forbidden package name is taken as the package name to be loaded and is reloaded into the system installed package name database.
It can be understood that the current application installation directory is an installation directory corresponding to an application program actually installed by the application real-time switching device, and all files of the application program are stored in the current application installation directory. And deleting the to-be-forbidden package name from the system installed package name database, but not deleting the to-be-forbidden package name from the current application installation directory, so that in order to search the to-be-loaded package name from the historical forbidden package name, the application package name in the current application installation directory is respectively compared with the system installed package name database and the current forbidden package name list, and the to-be-loaded package name is searched from the historical forbidden package name according to the comparison result.
The application switching module 30 is configured to load the package name to be loaded into the system-installed package name database, and start the application to be loaded corresponding to the package name to be loaded, so as to switch the application to be disabled to the application to be loaded.
It should be noted that, since the files of the application to be loaded are all stored in the current application installation directory, even if the package name to be loaded is deleted from the system installed package name database, the system cannot start and run the application to be loaded for a while, but the application to be loaded can be restarted and run as long as the package name to be loaded is reloaded into the system installed package name database. And switching the application to be forbidden to the application to be loaded by forbidding the application to be forbidden and starting the application to be loaded.
In this embodiment, the package name to be disabled is deleted from the system-installed package name database, so that the system cannot run the application to be disabled, the file of the application to be loaded is still stored in the application installation directory, and the package name to be loaded is added to the system-installed package name database, so that the system can run the application to be loaded, and the application to be disabled is effectively switched to the application to be loaded.
In an embodiment, the package name comparison module 20 is further configured to compare the application package name in the current application installation directory with the system installed package name database; if the application package name does not belong to the system installed package name database, comparing the application package name with the list of the currently forbidden package names; and if the application package name does not belong to the list of the currently forbidden package names, taking the application package name as the name of the package to be loaded.
In an embodiment, the package name comparison module 20 is further configured to throw an exception if the application package name belongs to the list of currently disabled package names, and prohibit the application package name from being loaded into the system installed package name database.
In an embodiment, the application switching module 30 is further configured to load the package name to be loaded into the system-installed package name database, and send a preset start broadcast to the application to be loaded corresponding to the package name to be loaded, so that the application to be loaded performs self-start according to the preset start broadcast, so as to switch the application to be disabled to the application to be loaded.
In an embodiment, the package name deleting module 10 is further configured to receive a list of currently disabled package names sent by a server, or obtain currently applied disabled information, and generate the list of currently disabled package names according to the currently applied disabled information; and deleting the package names to be forbidden in the current forbidden package name list from a system installed package name database, and forbidding the applications to be forbidden corresponding to the package names to be forbidden.
In one embodiment, the current application disabling information includes: at least one of the name of the abnormal application package, the name of the normal application package and the name of the application package to be switched;
the package name deleting module 10 is further configured to detect whether a system application is abnormal, and when the system application is detected to be abnormal, obtain an abnormal application package name; detecting whether the application abnormity is recovered or not, and acquiring a normal application package name when the application abnormity is detected to be recovered; and acquiring the name of the application packet to be switched, and generating a current forbidden packet name list according to the name of the abnormal application packet, the name of the normal application packet and/or the name of the application packet to be switched.
In one embodiment, the current application installation catalog includes: downloading an application installation directory and a system application pre-installation directory.
Other embodiments or specific implementation manners of the application real-time switching device according to the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The use of the words first, second, third, etc. do not denote any order, but rather the words are to be construed as names.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. An application real-time switching method is characterized by comprising the following steps:
when a current forbidden package name list is obtained, deleting the to-be-forbidden package names in the current forbidden package name list from a system-installed package name database, and forbidding the to-be-forbidden applications corresponding to the to-be-forbidden package names, wherein the to-be-forbidden applications corresponding to the to-be-forbidden package names after being deleted cannot be started;
respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list, and obtaining the package names to be loaded according to the comparison result;
loading the package name to be loaded into the installed package name database of the system, and starting the application to be loaded corresponding to the package name to be loaded so as to switch the application to be forbidden to the application to be loaded;
the step of respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list and obtaining the package names to be loaded according to the comparison result comprises the following steps:
comparing the application package name in the current application installation directory with the installed package name database of the system;
if the application package name does not belong to the system installed package name database, comparing the application package name with the list of the currently forbidden package names;
and if the application package name does not belong to the list of the currently forbidden package names, taking the application package name as the name of the package to be loaded.
2. The method for switching application real-time as claimed in claim 1, wherein after comparing the application package name with the list of currently disabled package names if the application package name does not belong to the database of installed package names of the system, the method further comprises:
and if the application package name belongs to the list of the currently forbidden package names, throwing an exception, and forbidding to load the application package name into the system installed package name database.
3. The method for switching the applications in real time according to claim 2, wherein the loading the package name to be loaded into the system-installed package name database, and starting the application to be loaded corresponding to the package name to be loaded to switch the application to be disabled to the application to be loaded specifically includes:
and loading the package name to be loaded into the installed package name database of the system, and sending a preset starting broadcast to the application to be loaded corresponding to the package name to be loaded so that the application to be loaded performs self-starting according to the preset starting broadcast to realize switching of the application to be forbidden to the application to be loaded.
4. The method for switching applications in real time according to any one of claims 1 to 3, wherein when the currently forbidden package name list is obtained, deleting a to-be-forbidden package name in the currently forbidden package name list from a system-installed package name database, and forbidding an application to be forbidden corresponding to the to-be-forbidden package name specifically includes:
receiving a list of names of currently forbidden packages sent by a server, or acquiring currently applied forbidden information and generating the list of names of currently forbidden packages according to the currently applied forbidden information;
and deleting the package names to be forbidden in the current forbidden package name list from a system installed package name database, and forbidding the applications to be forbidden corresponding to the package names to be forbidden.
5. The application real-time switching method of claim 4, wherein the current application disabling information comprises: at least one of the name of the abnormal application package, the name of the normal application package and the name of the application package to be switched;
correspondingly, the obtaining the current application disabling information and generating a list of the current disabling packet names according to the current application disabling information specifically include:
detecting whether the system application is abnormal or not, and acquiring an abnormal application package name when the system application is detected to be abnormal;
detecting whether the application abnormity is recovered or not, and acquiring a normal application package name when the application abnormity is detected to be recovered;
and acquiring the name of the application packet to be switched, and generating a current forbidden packet name list according to the name of the abnormal application packet, the name of the normal application packet and/or the name of the application packet to be switched.
6. The method for application real-time switching according to any one of claims 1 to 3, wherein the current application installation directory comprises: downloading an application installation directory and a system application pre-installation directory.
7. An apparatus for real-time application switching, the apparatus comprising: memory, processor and an application real-time switching program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the application real-time switching method according to any one of claims 1 to 6.
8. A storage medium having an application real-time switching program stored thereon, wherein the application real-time switching program, when executed by a processor, implements the steps of the application real-time switching method according to any one of claims 1 to 6.
9. An application real-time switching apparatus, comprising:
the system comprises a package name deleting module, a package name setting module and a package name setting module, wherein the package name deleting module is used for deleting the package names to be forbidden in a current forbidden package name list from a system-installed package name database and forbidding the applications to be forbidden corresponding to the package names to be forbidden when the current forbidden package name list is obtained, and the corresponding applications to be forbidden after the package names to be forbidden are deleted cannot be started;
the package name comparison module is used for respectively comparing the application package names in the current application installation directory with the system installed package name database and the current forbidden package name list and obtaining the package names to be loaded according to the comparison result;
the application switching module is used for loading the package name to be loaded into the system-installed package name database and starting the application to be loaded corresponding to the package name to be loaded so as to switch the application to be forbidden to the application to be loaded;
the package name comparison module is also used for comparing the application package name in the current application installation directory with the installed package name database of the system; if the application package name does not belong to the system installed package name database, comparing the application package name with the list of the currently forbidden package names; and if the application package name does not belong to the list of the currently forbidden package names, taking the application package name as the name of the package to be loaded.
CN201811596835.2A 2018-12-25 2018-12-25 Application real-time switching method, device, storage medium and apparatus Active CN109657455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811596835.2A CN109657455B (en) 2018-12-25 2018-12-25 Application real-time switching method, device, storage medium and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811596835.2A CN109657455B (en) 2018-12-25 2018-12-25 Application real-time switching method, device, storage medium and apparatus

Publications (2)

Publication Number Publication Date
CN109657455A CN109657455A (en) 2019-04-19
CN109657455B true CN109657455B (en) 2021-11-30

Family

ID=66116680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811596835.2A Active CN109657455B (en) 2018-12-25 2018-12-25 Application real-time switching method, device, storage medium and apparatus

Country Status (1)

Country Link
CN (1) CN109657455B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568654B (en) * 2021-07-13 2023-05-26 读书郎教育科技有限公司 Method and device for accurately controlling Android system based on application portrait

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615141A (en) * 2008-06-26 2009-12-30 陈鹰 A kind of method and application program scheduling module of carrying out application program scheduling
CN102736954A (en) * 2010-12-14 2012-10-17 微软公司 Addressing system degradation by application disabling
CN105825125A (en) * 2016-03-28 2016-08-03 乐视控股(北京)有限公司 Control method of application program and client side
CN106406944A (en) * 2016-09-05 2017-02-15 Tcl集团股份有限公司 Control method and system for forbidding self-starting of application
CN106484484A (en) * 2016-10-20 2017-03-08 广东欧珀移动通信有限公司 Application program installs management method and terminal unit
CN106713608A (en) * 2016-07-26 2017-05-24 腾讯科技(深圳)有限公司 Application function state modifying method and apparatus, and terminal
CN108762836A (en) * 2018-05-21 2018-11-06 Oppo广东移动通信有限公司 Management method, device, storage medium and the intelligent terminal of preloaded applications

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615141A (en) * 2008-06-26 2009-12-30 陈鹰 A kind of method and application program scheduling module of carrying out application program scheduling
CN102736954A (en) * 2010-12-14 2012-10-17 微软公司 Addressing system degradation by application disabling
CN105825125A (en) * 2016-03-28 2016-08-03 乐视控股(北京)有限公司 Control method of application program and client side
CN106713608A (en) * 2016-07-26 2017-05-24 腾讯科技(深圳)有限公司 Application function state modifying method and apparatus, and terminal
CN106406944A (en) * 2016-09-05 2017-02-15 Tcl集团股份有限公司 Control method and system for forbidding self-starting of application
CN106484484A (en) * 2016-10-20 2017-03-08 广东欧珀移动通信有限公司 Application program installs management method and terminal unit
CN108762836A (en) * 2018-05-21 2018-11-06 Oppo广东移动通信有限公司 Management method, device, storage medium and the intelligent terminal of preloaded applications

Also Published As

Publication number Publication date
CN109657455A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
CN108353462B (en) Configuration file downloading method and related equipment and system
CN108027741B (en) File processing method, device, terminal and storage medium based on patch upgrade
US7752616B2 (en) Update system capable of updating software
US9256479B2 (en) App icon processing method and communication terminal
CN106201574B (en) Application interface starting method and device
CN108540509B (en) Processing method and device of terminal browser, server and intelligent terminal
CN105335187A (en) Application processing method and apparatus
CN106713608B (en) Application function state modification method and device and terminal
CN106681813B (en) System management method and device
CN112256225A (en) Screen projection method, server, terminal device and computer readable storage medium
CN112202920A (en) Vehicle machine system upgrading method and device
CN114465998A (en) Multi-device file transmission method and device, terminal device and readable storage medium
CN110413292B (en) Light application installation method of application program, mobile terminal and storage medium
CN111078471A (en) System fault recovery method and device for display device and computer storage medium
CN109657455B (en) Application real-time switching method, device, storage medium and apparatus
CN113849199B (en) Method and device for cross-system installation of application, electronic equipment and storage medium
CN110139326B (en) Method, device and terminal equipment for automatically switching network modes in private network system
US9854429B2 (en) Mobile terminal configuration method and system
CN108121545B (en) Application program uninstalling feedback method and device
CN106843917B (en) Driver loading method and device
CN109710287B (en) Hot updating method, device and computer storage medium
CN116346261A (en) Network access method and device and computer equipment
CN107122174B (en) Application program updating method and device
CN111722850A (en) Method, device and system for processing application among multiple systems
CN115278646A (en) Embedded SIM card, terminal and method for selecting, downloading and installing application program

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