CN111324386A - Method and device for starting personal application program, electronic equipment and storage medium - Google Patents

Method and device for starting personal application program, electronic equipment and storage medium Download PDF

Info

Publication number
CN111324386A
CN111324386A CN201811528197.0A CN201811528197A CN111324386A CN 111324386 A CN111324386 A CN 111324386A CN 201811528197 A CN201811528197 A CN 201811528197A CN 111324386 A CN111324386 A CN 111324386A
Authority
CN
China
Prior art keywords
application program
self
starting
component
processing message
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.)
Pending
Application number
CN201811528197.0A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201811528197.0A priority Critical patent/CN111324386A/en
Publication of CN111324386A publication Critical patent/CN111324386A/en
Pending legal-status Critical Current

Links

Images

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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a method and a device for starting a self-service application program, electronic equipment and a storage medium. The method comprises the following steps: intercepting a predetermined processing message corresponding to the body-divided application program when a starting request for the body-divided application program is received; replacing the component parameters used for starting the self-body application program in the preset processing message with the component parameters of the original application program corresponding to the self-body application program; generating an active component corresponding to the original application program according to the replaced component parameters; and calling the required resources of the original application program corresponding to the required resources of the self-body application program based on the activity component to start and run the self-body application program. In the embodiment of the application, the required resources of the original application program can be called based on the generated active component when the self-body application program is started, so that the self-body application program can be normally started.

Description

Method and device for starting personal application program, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for starting a self-healing application, an electronic device, and a storage medium.
Background
In life, a user sometimes needs to open a sub-body of an application program in a terminal device to simultaneously log in different account numbers of the application program, and when the function is realized, for the terminal device applying an Android (Android) system, firstly, real Activity needs to be replaced by pit Activity of the sub-body application program, and then the pit Activity needs to be restored to the real Activity to realize the starting of the sub-body application program.
In the prior art, for a terminal device using an Android O system, when the pit Activity is restored to a real Activity, a message processing flow in hook Activity thread (UI thread) is needed to change an Activity start message, but with upgrading the Android O system to an Android P system, since a framework layer in the Android P system reconstructs a code in an Activity life cycle, a message that needs to be intercepted originally is integrated into other messages, and thus a split application cannot be started.
Disclosure of Invention
The present application aims to solve at least one of the above technical drawbacks. The technical scheme provided by the application is as follows:
in a first aspect, an embodiment of the present application provides a method for starting a self-healing application program, where the method includes:
intercepting a predetermined processing message corresponding to the body-divided application program when a starting request for the body-divided application program is received;
replacing the component parameters used for starting the self-body application program in the preset processing message with the component parameters of the original application program corresponding to the self-body application program;
generating an active component corresponding to the original application program according to the replaced component parameters;
and calling the required resources of the original application program corresponding to the required resources of the self-body application program based on the activity component to start and run the self-body application program.
In this embodiment of the present application, intercepting a predetermined processing message corresponding to an avatar application includes:
and monitoring the process of the body-divided application program by adopting a first hook function so as to intercept a preset processing message corresponding to the body-divided application program.
In this embodiment of the present application, replacing a component parameter used for starting the self-identified application in a predetermined processing message with a component parameter of an original application corresponding to the self-identified application includes:
and determining the component parameters of the original application program based on the preset processing message corresponding to the body-separated application program intercepted by the first hook function and through the component parameter of the body-separated application program and the corresponding rule of the component parameters of the corresponding original application program.
In this embodiment of the present application, when receiving a start request for an application of the body, the method further includes:
call requests for Provider methods of the split application are monitored by a second hook function.
In this embodiment of the present application, after monitoring, by a hook function, a call request for a Provider method of a separate application, the method further includes:
determining whether a package name of the divided application program is stored;
and if so, deleting the stored package name of the body-splitting application program.
In an embodiment of the present application, the method further includes:
when a call request aiming at the Provider method of the self-body-separated application program is monitored, the call request is intercepted, and a target package name for starting the self-body-separated application program is used as response information of the call request.
In a second aspect, an embodiment of the present application provides an apparatus for starting a split application, where the apparatus includes:
the processing message intercepting module is used for intercepting a predetermined processing message corresponding to the body-separated application program when receiving a starting request of the body-separated application program;
the component parameter replacing module is used for replacing the component parameters used for starting the self-body application program in the preset processing message with the component parameters of the original application program corresponding to the self-body application program;
the activity component generation module is used for generating an activity component corresponding to the original application program according to the replaced component parameters;
and the application program running module is used for calling the required resources of the original application program corresponding to the required resources of the self-body application program according to the replaced component parameters to start and run the self-body application program.
In this embodiment of the present application, when intercepting a predetermined processing message corresponding to the body-separated application, the processing message intercepting module is specifically configured to:
and monitoring the process of the body-divided application program by adopting a first hook function so as to intercept a preset processing message corresponding to the body-divided application program.
In this embodiment of the present application, when replacing a component parameter used for starting the self-identified application program in the predetermined processing message with a component parameter of an original application program corresponding to the self-identified application program, the component parameter replacement module is specifically configured to:
and determining the component parameters of the original application program based on the preset processing message corresponding to the body-separated application program intercepted by the first hook function and through the component parameter of the body-separated application program and the corresponding rule of the component parameters of the corresponding original application program.
In this embodiment of the present application, when receiving a start request for an application of the body, the apparatus further includes:
and the call request monitoring module is used for monitoring a call request of the Provider method aiming at the self-service application program through a second hook function.
In this embodiment of the present application, the call request monitoring module is further configured to:
after monitoring a call request of a Provider method for the self-body application program through a hook function, determining whether a package name of the self-body application program is stored;
and if so, deleting the stored package name of the body-splitting application program.
In an embodiment of the present application, the apparatus further includes:
and the information return module is used for intercepting the call request when monitoring the call request aiming at the Provider method of the self-body-separated application program, and taking the target package name for starting the self-body-separated application program as response information of the call request.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a processor and a memory;
a memory for storing computer operating instructions;
and the processor is used for executing the method shown in the embodiment of the first aspect by calling the computer operation instruction.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the storage medium stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to perform the method shown in the foregoing first aspect.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
in the embodiment of the application, when a starting request for the body-splitting application program is received, the predetermined processing message corresponding to the body-splitting application program is intercepted, the component parameter used for starting the body-splitting application program in the predetermined processing message is replaced by the component parameter of the original application program corresponding to the body-splitting application program, and the movable component used for starting the original application program is generated according to the replaced component parameter, so that the required resource of the original application program can be called based on the generated movable component when the body-splitting application program is started, and the body-splitting application program can be normally started.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic flowchart of a method for starting an application of a split application according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a starting apparatus for a split application according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" include plural referents unless the context clearly dictates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
The body-dividing teacher can directly run the application of the user body-dividing as a plug-in framework with higher intrusiveness on the frame, but because the body-dividing teacher makes multiple hooks and has higher intrusiveness on the system, once the system is updated, if the system interface of the frame layer is changed, the body-dividing can not run.
Before an Android P operating system, such as an Android O system, for a terminal device applying the Android O system, when a body of an application program is opened by using a body master application program, a leave _ ACTIVITY message is intercepted through a message processing flow in hook ACTIVITY thread, and a pit ACTIVITY component parameter for starting the body application program is replaced by an ACTIVITY component of the application program requiring body division, so as to realize starting of the body application program, that is, the substitution of the pit ACTIVITY and the real ACTIVITY is completed by intercepting the leave _ ACTIVITY message, so as to realize starting of the body interface. However, in the Android P system, a frame layer, especially a code in an Activity lifecycle is reconstructed, for example, a message from LAUNCH _ ACTIVITY to DESTROYY _ ACTIVITY is completely removed, and if a method for starting a split application in an original Android O system is continuously adopted, the split application in a split teacher may not be operated, so that the embodiment of the application provides a method for starting the split application.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, several terms referred to in the embodiments of the present application will be described and explained:
the split application program comprises: the embodiment of the application refers to an application program obtained after the application program is double-opened;
the original application program corresponding to the body-separating application program comprises the following steps: in the present embodiment, refers to an application that requires dual opening.
In an example, the application program a is bi-opened to obtain an open application program a ', where the application program a' is an application program of the split body, and the application program a is an original application program corresponding to the application program of the split body.
The embodiment of the application provides a method for starting a self-healing application program, as shown in fig. 1, the method includes:
step S110, when receiving the starting request of the body application program, intercepting the preset processing message corresponding to the body application program.
Step S120, replacing the component parameter for starting the body-separated application program in the predetermined processing message with the component parameter of the original application program corresponding to the body-separated application program.
And step S130, generating an active component corresponding to the original application program according to the replaced component parameters.
Step S140, according to the replaced component parameter, calling a required resource of the original application corresponding to the required resource of the self-service application to start and run the self-service application.
In the embodiment of the application, when a starting request for the body-splitting application program is received, the predetermined processing message corresponding to the body-splitting application program is intercepted, the component parameter used for starting the body-splitting application program in the predetermined processing message is replaced by the component parameter of the original application program corresponding to the body-splitting application program, and the movable component used for starting the original application program is generated according to the replaced component parameter, so that the required resource of the original application program can be called based on the generated movable component when the body-splitting application program is started, and the body-splitting application program can be normally started. The following describes in detail a method for starting the self-service application provided in the embodiment of the present application.
Step S110, when receiving the starting request of the body application program, intercepting the preset processing message corresponding to the body application program.
In practical applications, the predetermined processing message corresponding to the body-separated application corresponds to the EXECUTE _ TRANSACTION message in the Android P system. That is to say, after receiving a start request for the split application, it is necessary to intercept EXECUTE _ TRANSACTION corresponding to the split application, because in actual application, for the Android O system, when starting the split application, a message processing flow in hook ACTIVITY thread is used to intercept the leave _ ACTIVITY message, so as to completely replace the pit ACTIVITY component parameter of the split application and the ACTIVITY component parameter of the original application corresponding to the split application, and ensure that the split application can be started normally.
However, as the Android system is upgraded, all messages from LAUNCH _ ACTIVITY to DESTROY _ ACTIVITY are removed in Android P, and it can be known through testing and code analysis that all processing of the Activity lifecycle in the Android P system is put into the processing logic of the message EXECUTE _ TRANSACTION. The code of the partial processing logic of EXECUTE _ TRANSACTION is specifically as follows:
Figure BDA0001905003900000071
from the above codes of message processing, it can be seen that the argument of the EXECUTE _ TRANSACTION message is a ClientTransaction object, and all processing logic is handed to the TransactionExecutor to EXECUTE, and the specific codes (in which some codes irrelevant to the core flow are omitted) are as follows:
Figure BDA0001905003900000072
Figure BDA0001905003900000081
analyzing the above codes, it can be known that since all processing logic related to the service is in the clienttransactioniltem, and TransactionExecutor is mainly responsible for managing the clienttransactioniltem, and the clienttransactioniltem retains a reference to the clienttransactionihandler (ActivityThread is a subclass of clienttransactionihandler), the call to specific Activity processing logic can be realized.
In addition, the ClientTransaction object contains a List array with a member type of ClientTransactionItem, the specific processing logic of ClientTransaction is also in the execute method of the ClientTransactionItem, the method is to realize the interface in the abstract class, the management of different life cycles of Activity is realized through different subclasses of the ClientTransactionItem, and the one-to-one correspondence of the processing messages of the Activity related life cycles in the original Activity thread is completed.
For an Activity starting process in an Android P system, in a junchactivity item subclass of a clienttransactioniltem, an Activity starting logic, a code of an execute method of the junchactivity item is specifically as follows:
Figure BDA0001905003900000091
in the Android P system, AMS (server side of Activity management mechanism) calls IApplicationThread of ClientTransaction through ClientLifeCycleManager, and realizes message transmission to Client (Client) side, as specifically shown in the following code:
Figure BDA0001905003900000092
Figure BDA0001905003900000101
based on this, it can be known from the above codes that the Activity starting logic of the Activity starting process in the Android P system is in the launchactivity item subclass of the clienttransactioniltem, and therefore, intercepting EXECUTE _ transport corresponding to the split application in the embodiment of the present application can achieve the effect of intercepting lace _ Activity in the Android O system.
As can be seen from the above code analysis, the parameter transmitted by the EXECUTE _ transport is a clienttransit object, however, in practical applications, there is a mactivellbacks set in the inside of the clienttransit object, and various subclass objects of the clienttransit item, such as launchactityitem, destroyactitylistitem, etc., are stored in the mactivellbacks set.
Further, after the EXECUTE _ transport is intercepted, the launchactityitem type can be judged according to the element value in the set, which is equivalent to capturing the Activity start message.
In this embodiment of the present application, intercepting a predetermined processing message corresponding to an avatar application includes:
and monitoring the process of the body-divided application program by adopting a first hook function so as to intercept a preset processing message corresponding to the body-divided application program.
In the embodiment of the present application, the hook operation is not limited to the hook operation of the windows system, and includes a processing method similar to a hook mechanism, and the execution logic function of a certain function of the target process can be modified through the hook operation. In colloquial, hook is an implementation behavior technique that modifies or adds system methods by intercepting functions and invoking calls.
In practical application, the predetermined processing message corresponding to the body-divided application is EXECUTE _ transport, that is, when a start request for the body-divided application is received, a hook operation mode may be adopted to monitor a process of the body-divided application and intercept the EXECUTE _ transport corresponding to the body-divided application.
Step S120, replacing the component parameter for starting the body-separated application program in the predetermined processing message with the component parameter of the original application program corresponding to the body-separated application program.
The component parameter for starting the body-divided application program may be a pit Activity component parameter for starting the body-divided application program, and the component parameter of the original application program corresponding to the body-divided application program may be an Activity component parameter of the original application program corresponding to the body-divided application program. That is, after the EXECUTE _ transport is intercepted, the pit Activity component parameter for starting the body application is replaced by the Activity component parameter of the original application corresponding to the body application.
In practical application, after an EXECUTE _ TRANSACTION is intercepted and the type of the LaunchActivities item is located, the pit Activity component parameter of the split application program in the LaunchActivities item type can be replaced by the Activity component parameter of the original application program corresponding to the split application program.
In this embodiment of the present application, replacing a component parameter used for starting the self-identified application in a predetermined processing message with a component parameter of an original application corresponding to the self-identified application includes:
and determining the component parameters of the original application program based on the preset processing message corresponding to the body-separated application program intercepted by the first hook function and through the component parameter of the body-separated application program and the corresponding rule of the component parameters of the corresponding original application program.
In practical application, the electronic device may pre-configure a component parameter of the body-splitting application and a component parameter correspondence rule of a corresponding original application, determine a component parameter of the original application corresponding to the body-splitting application according to the pre-configured correspondence rule after intercepting a predetermined processing message corresponding to the body-splitting application based on the first hook function, and then replace the component parameter used for starting the body-splitting application in the predetermined processing message with the component parameter of the original application corresponding to the determined body-splitting application, that is, replace the pit Activity component parameter used for starting the body-splitting application in the EXECUTE _ transport action with the Activity component parameter of the original application corresponding to the body-splitting application.
And step S130, generating an active component corresponding to the original application program according to the replaced component parameters.
In practical application, an optional implementation manner of generating an active component for starting the original application program according to the replaced component parameter is as follows: and modifying parameters used for generating an activtyclientrecord object in the EXECUTE _ TRANSACTION according to the replaced Activity component parameters of the original application program so as to ensure that the modified parameters can generate an Activity component used for starting the original application program.
This is because, in practical applications, it is the case for the Android O system to directly intercept the launchactionrecord object and modify the parameters of the activecyclirerecord object in the direct launchactivelity, but in the Android P system, the generation of the activecyclirerecord object is in the execute method (see the detailed description in the foregoing text) of launchactivecitltem after intercepting the message, that is, in the Android P system, the activecyclitentrecord object is not yet generated, but the parameters generated by the activecyclirectrecord are included in the ClientTransaction, and thus it is possible to directly start with the generation thereof.
As can be seen, although there is no activtyclientrecord object in the execu _ transport in the Android P system, the clienttransport includes a parameter generated by the activtyclientrecord object, so in this embodiment of the present application, a parameter used for generating the activtyclientrecord object in the execu _ transport is modified according to an Activity component parameter of an original application after replacement, so as to ensure that the modified parameter can generate an Activity component for starting the original application, where a specifically implemented code may be:
Figure BDA0001905003900000131
Figure BDA0001905003900000141
step S140, based on the active component, calls a required resource of the original application corresponding to the required resource of the self-identified application to start and run the self-identified application.
That is, after the active component corresponding to the original application program is generated according to the replaced component parameter, the required resource of the original application program can be called based on the generated active component, so that the self-service application program can be started and run.
In this embodiment of the present application, when receiving a start request for an application of the body, the method further includes:
and monitoring a call request of the Provider method aiming at the self-body application program through a second hook function.
In practical application, since the Provider method of the system is called when the self-body application program runs, a call request for the Provider method of the self-body application program can be monitored through the second hook function.
The second hook function also refers to a hook operation mode, and is different from the first hook function in that the hook object is different, and the specific implementation principle is the same as that of the first hook function, and is not described herein again.
In this embodiment of the present application, after monitoring, by a hook function, a call request for a Provider method of a self-service application, the method further includes:
determining whether a package name of the divided application program is stored;
and if so, deleting the stored package name of the body-splitting application program.
The target package name refers to the package name of the original application program corresponding to the personal application program. The package name of the self-service application program is stored in an icontenserprovider object corresponding to the Provider, and a NameValueCache variable in a settings global object acquires a code of a ContentProvider as follows:
Figure BDA0001905003900000151
in an embodiment of the present application, the method further includes:
when a call request aiming at the Provider method of the self-body-separated application program is monitored, the call request is intercepted, and a target package name for starting the self-body-separated application program is used as response information of the call request.
In practical application, when the Provider method is called by the self-identity application program, if the package name of the self-identity application program is stored, the system verifies the stored package name of the self-identity application program and the package name of the original application program corresponding to the self-identity application program, and at this time, a problem that the package name is inconsistent with the UID (user identifier) may occur, so that after the call request is monitored, it is necessary to determine whether the package name of the self-identity application program is stored.
If the package name of the stored divided application program exists, the stored package name of the divided application program is deleted, the mContentProvider object in the ContentProviderHolder can be cleared in the Android P system, so that the divided application program can call the Provider method again, namely, the code for acquiring the IContentProvider object corresponding to the Provider is executed again, the call request can be intercepted, the package name of the original application program is used as response information of the call request, the system can carry out verification based on the returned package name of the original application program, and the verification error can not occur at this time.
If the package name of the original application program does not exist, the call request can be directly intercepted, the package name of the original application program is used as response information of the call request, the system can carry out verification based on the returned package name of the original application program, and then verification errors can not occur.
Based on the same principle as the method shown in fig. 1, the embodiment of the present application further provides an apparatus 20 for starting a split application, and as shown in fig. 2, the apparatus 20 may include: a process message interception module 210, a component parameter replacement module 220, an active component initiation module 230, and an application execution module 240, wherein,
a processing message intercepting module 210, configured to intercept a predetermined processing message corresponding to the body-distinguished application program when a start request for the body-distinguished application program is received;
a component parameter replacing module 220, configured to replace a component parameter used for starting the self-identified application program in the predetermined processing message with a component parameter of an original application program corresponding to the self-identified application program;
an activity component generating module 230, configured to generate an activity component for starting the original application according to the replaced component parameter;
and the application program running module 240 is configured to call, according to the replaced component parameter, a required resource of the original application program corresponding to the required resource of the self-identified application program to start and run the self-identified application program.
In this embodiment of the present application, when intercepting a predetermined processing message corresponding to the body-separated application, the processing message intercepting module is specifically configured to:
and monitoring the process of the body-divided application program by adopting a first hook function so as to intercept a preset processing message corresponding to the body-divided application program.
In this embodiment of the present application, when replacing a component parameter used for starting the self-identified application program in the predetermined processing message with a component parameter of an original application program corresponding to the self-identified application program, the component parameter replacement module is specifically configured to:
and determining the component parameters of the original application program based on the preset processing message corresponding to the body-separated application program intercepted by the first hook function and through the component parameter of the body-separated application program and the corresponding rule of the component parameters of the corresponding original application program.
In this embodiment of the present application, when receiving a start request for an application of the body, the apparatus further includes:
and the call request monitoring module is used for monitoring a call request of the Provider method aiming at the self-service application program through a second hook function.
In this embodiment of the present application, the call request monitoring module is further configured to:
after monitoring a call request of a Provider method for the self-body application program through a hook function, determining whether a package name of the self-body application program is stored;
and if so, deleting the stored package name of the body-splitting application program.
In an embodiment of the present application, the apparatus further includes:
and the information return module is used for intercepting the call request when monitoring the call request aiming at the Provider method of the self-body-separated application program, and taking the target package name for starting the self-body-separated application program as response information of the call request.
In the embodiment of the application, when a starting request for the body-splitting application program is received, the predetermined processing message corresponding to the body-splitting application program is intercepted, the component parameter used for starting the body-splitting application program in the predetermined processing message is replaced by the component parameter of the original application program corresponding to the body-splitting application program, and the movable component used for starting the original application program is generated according to the replaced component parameter, so that the required resource of the original application program can be called based on the generated movable component when the body-splitting application program is started, and the body-splitting application program can be normally started.
Based on the same principle as the method for starting the self-identified application program in the embodiment of the present application, an embodiment of the present application further provides an electronic device, which may include but is not limited to: a processor and a memory; a memory for storing computer operating instructions; and the processor is used for executing the method shown in the embodiment by calling the computer operation instruction.
Based on the same principle as the starting method of the self-service application program in the embodiment of the present application, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the storage medium stores at least one instruction, at least one section of program, a code set, or an instruction set, and the at least one instruction, the at least one section of program, the code set, or the instruction set is loaded and executed by a processor to implement the method shown in the above embodiment, which is not described herein again.
Referring now to fig. 3, a schematic diagram of an electronic device 300 suitable for implementing embodiments of the present application is shown, where the electronic device 300 may be a terminal device or a server. The terminal device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), etc., and a fixed terminal such as a digital TV, a desktop computer, etc., among others. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present application.
It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods illustrated in the method embodiments.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the disclosure. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A method for starting a self-healing application program, comprising:
intercepting a preset processing message corresponding to the body-divided application program when a starting request for the body-divided application program is received;
replacing the component parameters used for starting the self-body application program in the preset processing message with the component parameters of the original application program corresponding to the self-body application program;
generating an active component for starting the original application program according to the replaced component parameters;
and calling the required resources of the original application program corresponding to the required resources of the self-body-separated application program based on the activity component to start and run the self-body-separated application program.
2. The method of claim 1, wherein intercepting the predetermined processing message corresponding to the divided application comprises:
and monitoring the process of the self-body application program by adopting a first hook function so as to intercept a preset processing message corresponding to the self-body application program.
3. The method according to claim 2, wherein replacing the component parameter used for starting the self-identified application program in the predetermined processing message with the component parameter of the original application program corresponding to the self-identified application program comprises:
and determining the component parameters of the original application program through the rule corresponding to the component parameters of the body-divided application program and the corresponding component parameters of the corresponding original application program based on the preset processing message corresponding to the body-divided application program intercepted by the first hook function.
4. The method of claim 1, wherein upon receiving a start request for an application for an avatar, the method further comprises:
and monitoring a call request of a Provider method aiming at the self-body application program through a second hook function.
5. The method of claim 4, wherein after monitoring the call request for the Provider method of the self-service application through the hook function, the method further comprises:
determining whether a package name of the divided application program is stored;
and if so, deleting the stored package name of the body-splitting application program.
6. The method according to claim 4 or 5, characterized in that the method further comprises:
when a call request of a Provider method for the self-body-divided application program is monitored, intercepting the call request, and taking a target package name for starting the self-body-divided application program as response information of the call request.
7. A device for launching a discrete application, comprising:
the processing message intercepting module is used for intercepting a predetermined processing message corresponding to the personal application program when receiving a starting request of the personal application program;
a component parameter replacing module, configured to replace a component parameter used for starting the self-identified application program in the predetermined processing message with a component parameter of an original application program corresponding to the self-identified application program;
the activity component generation module is used for generating an activity component for starting the original application program according to the replaced component parameters;
and the application program running module is used for calling the required resources of the original application program corresponding to the required resources of the self-body-separated application program according to the replaced component parameters to start and run the self-body-separated application program.
8. The starting device according to claim 7, wherein the processing message intercepting module, when intercepting the predetermined processing message corresponding to the self-identified application program, is specifically configured to:
and monitoring the process of the self-body application program by adopting a first hook function so as to intercept a preset processing message corresponding to the self-body application program.
9. An electronic device, comprising:
a processor and a memory;
the memory is used for storing computer operation instructions;
the processor is used for executing the method of any one of the claims 1 to 6 by calling the computer operation instruction.
10. A computer readable storage medium having stored thereon a computer program, the storage medium having stored thereon at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the method of any of the preceding claims 1 to 6.
CN201811528197.0A 2018-12-13 2018-12-13 Method and device for starting personal application program, electronic equipment and storage medium Pending CN111324386A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811528197.0A CN111324386A (en) 2018-12-13 2018-12-13 Method and device for starting personal application program, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811528197.0A CN111324386A (en) 2018-12-13 2018-12-13 Method and device for starting personal application program, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111324386A true CN111324386A (en) 2020-06-23

Family

ID=71166695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811528197.0A Pending CN111324386A (en) 2018-12-13 2018-12-13 Method and device for starting personal application program, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111324386A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988353A (en) * 2021-03-12 2021-06-18 北京明朝万达科技股份有限公司 Operation control method and device for application program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955782A (en) * 2016-05-09 2016-09-21 北京奇虎科技有限公司 Application program running control method and device
CN105975333A (en) * 2015-12-24 2016-09-28 北京奇虎科技有限公司 Method and device for running control of application programs
CN106066803A (en) * 2016-05-25 2016-11-02 北京奇虎科技有限公司 Application program runs the method and device controlled
CN107291512A (en) * 2017-06-30 2017-10-24 珠海市魅族科技有限公司 The many extractions of root of application program, device, terminal device and storage medium
CN107748685A (en) * 2017-11-21 2018-03-02 广东欧珀移动通信有限公司 Application program launching control method, device, terminal device and storage medium
CN108804194A (en) * 2018-06-13 2018-11-13 北京奇虎科技有限公司 Notification bar message treatment method, device, user terminal and readable storage medium storing program for executing
CN108874479A (en) * 2018-05-04 2018-11-23 北京奇虎科技有限公司 Notification bar message display method, device, user terminal and readable storage medium storing program for executing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975333A (en) * 2015-12-24 2016-09-28 北京奇虎科技有限公司 Method and device for running control of application programs
CN105955782A (en) * 2016-05-09 2016-09-21 北京奇虎科技有限公司 Application program running control method and device
CN106066803A (en) * 2016-05-25 2016-11-02 北京奇虎科技有限公司 Application program runs the method and device controlled
CN107291512A (en) * 2017-06-30 2017-10-24 珠海市魅族科技有限公司 The many extractions of root of application program, device, terminal device and storage medium
CN107748685A (en) * 2017-11-21 2018-03-02 广东欧珀移动通信有限公司 Application program launching control method, device, terminal device and storage medium
CN108874479A (en) * 2018-05-04 2018-11-23 北京奇虎科技有限公司 Notification bar message display method, device, user terminal and readable storage medium storing program for executing
CN108804194A (en) * 2018-06-13 2018-11-13 北京奇虎科技有限公司 Notification bar message treatment method, device, user terminal and readable storage medium storing program for executing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988353A (en) * 2021-03-12 2021-06-18 北京明朝万达科技股份有限公司 Operation control method and device for application program

Similar Documents

Publication Publication Date Title
WO2020207454A1 (en) Information pushing method and device
CN109582310B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN109308241B (en) Method and device for monitoring starting process of application program, terminal equipment and storage medium
US20220043898A1 (en) Methods and apparatuses for acquiring information
CN110851204B (en) Application starting method and device and application packaging method and device
CN112596720A (en) Service operation method and device, electronic equipment and computer storage medium
CN111432001A (en) Method, apparatus, electronic device, and computer-readable medium for jumping scenes
CN112416632A (en) Event communication method and device, electronic equipment and computer readable medium
CN108959102B (en) Method and device for generating test data and testing application to be tested
CN111338666A (en) Method, device, medium and electronic equipment for realizing application program upgrading
CN111382058B (en) Service testing method and device, server and storage medium
CN111324386A (en) Method and device for starting personal application program, electronic equipment and storage medium
CN111008032A (en) Page data updating method and device
CN111124523A (en) Method and apparatus for initializing applications
CN111382039A (en) Method, device, electronic equipment and storage medium for reporting user behavior event
CN112882921B (en) Fault simulation method and device
CN114925066A (en) Data processing method and device, electronic equipment and storage medium
CN111382057B (en) Test case generation method, test method and device, server and storage medium
CN110221854B (en) Multi-process data updating method, device, medium and electronic equipment
CN111382038B (en) Method, device, electronic equipment and storage medium for reporting service data
CN113283891A (en) Information processing method and device and electronic equipment
CN111324888B (en) Verification method and device for application program starting, electronic equipment and storage medium
CN111324888A (en) Verification method and device during application program starting, electronic equipment and storage medium
CN109766246B (en) Method and apparatus for monitoring applications
CN110262756B (en) Method and device for caching data

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